'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).]
script to preserve multiple corpses n number of times.
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).]
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).]
-
- Sojourner
- Posts: 676
- Joined: Fri Jan 26, 2001 6:01 am
- Location: O' Fallon, MO. USA
- Contact:
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.
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.
Who is online
Users browsing this forum: No registered users and 31 guests