Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
a_priebe47
Newbie


Joined: 04 Aug 2003
Posts: 7
Location: Canada

PostPosted: Fri Nov 07, 2003 8:12 am   

Repeating a Trigger
 
I was just wondering how I would repeat the following trigger. It's meant to brew 100 potions.

Code:

c 'create fire'; get empty port; hold empty; brew shadowform; remove potion; put potion port; get empty port; hold empty; brew shadowform; trance; #WAIT 200

I just want to repeat that exact process 100 times. I'm using v.3.62a
Thanks.

~a_priebe47
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Nov 07, 2003 8:41 am   
 
It's difficult to know what will work with such an old version. You
might be able to use #REPEAT. If that command doesn't exist, you
should look for looping commands (#LOOP, #WHILE, #UNTIL, etc). If
those don't exist, you'll probably have to use a trigger with a
counting variable.

Sorry I can't be more help, but that's why the website describes it
as 'unsupported'.
Reply with quote
coolbriguy
Beginner


Joined: 29 Oct 2000
Posts: 26
Location: USA

PostPosted: Mon Dec 01, 2003 4:21 am   
 
Well one way to assure that you will get 100 of each potion setup a brew session. You can play around with this but for an easy way to view it do the following or a modification of such:

#TR {says 'brewstart (*)'} {cast 'create fire';get empty port;hold empty;@potion = %1;@count = 0;brew @potion}
#TR {You brew up} {#ADD count 1;say I have brewed @count @potion potions;remove @potion;put @potion portal}
#TR {You put (*) potion in} {get empty portal;hold empty;brew @potion}
#TR {You failed.} {brew @potion}
#TR {You don't have enough mana.} {trance}
#TR {You complete your trance.} {brew @potion}
#TR {You need to be holding an empty} {get empty portal;hold empty;brew @potion}
#TR {You say 'I have brewed 100}{@potion = nothing;sleep}

Now of course this is a rough script but if you play with it you can completely automate the brewing process. You can have it switch to a different potion by changing the last trigger for the:
#TR {You say 'I have brewed 100 shadowform potions'} {@count = 0;@potion = sanctuary}
And then make a trigger for each succsessive spell you wish to brew with the last setting the potion variable to nothing or saving and quitting. Good Luck.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net