script to preserve multiple corpses n number of times.

Scripts and support for your favorite MUD client.
Kuurg
Sojourner
Posts: 398
Joined: Mon Jul 09, 2001 5:01 am
Location: Faang
Contact:

script to preserve multiple corpses n number of times.

Postby Kuurg » Wed Jul 25, 2001 4:02 am

'pres' with no arguments will start it
'abortpres' will end it prematurely

when prompted for corpses to preserve, separate each name with a space, i.e. (1.corpse 2.corpse 3.corpse)

criticisms welcome

enter the following in a text file and import it into zmud

#ALIAS presem {#IF (@prescount >0) {ptarget=%item( @preslist, (@prescount));presloop} {#var ptarget "";#var rep 0;#var reptotal 0;#var prescount 0;#var preslist "";#var prestotal 0;#T- prestrig}}
#ALIAS presloop {#IF (@rep >0) {cast 'preserve' @ptarget;#add rep -1} {#add prescount -1;say @ptarget preserved for a total of @prestotal hours;rep=@reptotal;#va prestotal 0;presem}}
#ALIAS abortpres {#var ptarget "";#var rep 0;#var reptotal 0;#var prescount 0;#var preslist "";#var prestotal 0;#T- prestrig}
#ALIAS pres {preslist=%prompt( "", "Who do you want to preserve?");reptotal=%prompt( "", "How many preserves for each corpse?");preslist=%trim( %replace( @preslist, " ", "|"));prescount=%numitems( @preslist);rep=@reptotal;#T+ prestrig;presem}
#TRIGGER {is preserved for (%d) additional hours.} {#add prestotal %1} "prestrig"
#TRIGGER {You complete your spell} {sit;rest;pray;med} "prestrig"
#TRIGGER {Your prayers are complete} {stand;presloop} "prestrig"

[This message has been edited by Kuurg (edited 07-25-2001).]
Dinggle
Sojourner
Posts: 142
Joined: Wed May 09, 2001 5:01 am
Contact:

Postby Dinggle » Sun Jul 29, 2001 1:41 am

this is dangerously close to robotting. they used to delete folks who would sit down and do something like with minor creation to notch summoning.

dont leave your puter when you use it
Kuurg
Sojourner
Posts: 398
Joined: Mon Jul 09, 2001 5:01 am
Location: Faang
Contact:

Postby Kuurg » Sun Jul 29, 2001 3:26 pm

I use my power for good.

I'll include a disclaimer from this point forward =p

only to be used to enhance playability and take the pain out of redundant, repetitive actions.
rylan
Sojourner
Posts: 2903
Joined: Fri Jan 26, 2001 6:01 am
Location: Hudson, MA

Postby rylan » Mon Jul 30, 2001 3:36 am

I don't see anything wrong with activiting this sucker and going away for 10 min or so while you preserve up some corpses.
Much less annoying than having to type in all the time to rest, mem, preserve etc.

If you just let the thing run for say hours though, yeah, thats bad :P
Kuurg
Sojourner
Posts: 398
Joined: Mon Jul 09, 2001 5:01 am
Location: Faang
Contact:

Postby Kuurg » Mon Jul 30, 2001 4:09 pm

Disclaimer: Not to be used for naughtiness.

If you want to enter the list and repetition on a single line as opposed to being prompted for values, replace the pres alias with this one:

syntax is "pres 1.corpse 2.corpse 3.corpse 5"
where 5 is number of repetitions for each corpse. I didn't like the prompts much.
you can strip out the #sh messages for each if you find them annoying. I tried to idiot-proof it a bit.


#ALIAS pres {preslist=%-1;preslist=%trim( %replace( @preslist, " ", "|"));prescount=%numitems( @preslist);reptotal=%item( @preslist, @prescount);#IF (%isnumber( @reptotal)) {#delitem preslist %item( @preslist, @prescount);prescount=%numitems( @preslist);rep=@reptotal;#sh %ansi( 15)-= Preserving @preslist =-;#T+ prestrig;presem} {#sh %ansi( 12)-= The correct syntax is '%ansi( 15)pres 1.corpse 2.corpse 4%ansi( 12)' =-;abortpres}}

[This message has been edited by Kuurg (edited 07-30-2001).]

[This message has been edited by Kuurg (edited 07-30-2001).]
Gindipple
Sojourner
Posts: 676
Joined: Fri Jan 26, 2001 6:01 am
Location: O' Fallon, MO. USA
Contact:

Postby Gindipple » Mon Jul 30, 2001 5:13 pm

My rendition
Use at your own risk!

Should rotate through everyone in plist regardless of how many preserves you have.
for Zmud 4.62, might need some minor debugging

This trigger must be set as prompt type and off by default..
#TR {RETURN for more*} {#CR} Continue

Off by default.
#TR {You continue your praying.} {#T+ Praying2;med;#T- Praying1} Praying1
#TR {Your prayers are complete.} {put all.ration bag;put skin bag;stand;#T- Continue;#T- Praying2} Praying2

These can be always on by default.
#TR {Corpse of (%w) is preserved for (%d) additional hours.} {#IF (pres=1) {update_time %1 %2;#MATH curr_pres @curr_pres+1;#IF (curr_pres > end_pres) {curr_press=start_pres} cast 'pres' %word(@plist,curr_pres,|)}} PresMain
#TR {You don't have that spell memorized.} {#IF (pres=1) {pup}} Restart
#TR {You stop meditating.} {med} Generic

#AL pup {#T+ Praying1;#T+ Continue;get ration bag;eat ration;get skin bag;drink skin;rest;pray}
#AL reset_pres {#FORALL @plist {#VAR _%i 0}}
#AL update_time {#MATH _%1 @_%1+%2}
#AL presgo {pres=1;start_pres=1;end_pres=%numwords(@plist,|);reset_pres;cast 'pres' %word(@plist,start_pres,|)}
#AL pres_report {#FORALL @plist {say %i is pressed @_%i mins.;#UNVAR _%i}}

Some example plist, note you need at least 1 preserve memed.
plist="Gindipple"
plist="1.Gindipple|2.Gindipple|3.Gindipple"
plist="1.Gindipple|2.Gindipple|3.Gindipple|4.Gindipple|5.Gindipple|6.Gindipple|7.Gindipple"
presgo

to stop toggle triggers off, #IG works, then enter
pres=0
pres_report


------------------
Gindipple (Gnome) stands here.
Xyr
Sojourner
Posts: 2
Joined: Mon Jul 30, 2001 5:01 am
Location: Kensington, MD USA

Postby Xyr » Mon Jul 30, 2001 5:59 pm

or you could play a necro, and get wraiths. That would eliminate any need to do these silly pres scripts altogether. *nog me*

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 31 guests