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
Berill
Newbie


Joined: 29 May 2003
Posts: 6

PostPosted: Thu Jul 17, 2003 11:53 pm   

Delaying commands
 
Is there a way to delay the commands from triggers, besides using #ALARM? I'm really looking for a way for each command to be sent on the prompt, instead of this:

#TRIGGER {Three piles of coins} {#LOOP 3 {get coin}}

Which would execute like this:
Three piles of coins
get coin
get coin
get coin

To something that would make it execute like this:
Three piles of coins
get coin
You pick up some coins
>
get coin
You pick up some coins
>
etc.

Thanks for any help!
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jul 18, 2003 12:48 am   
 
#TR {Three piles of coins} {get coin}
#COND {~>} {get coin} {nocr|prompt|LoopPat|Param=2}
Reply with quote
Berill
Newbie


Joined: 29 May 2003
Posts: 6

PostPosted: Fri Jul 18, 2003 1:14 am   
 
Thanks, that was actually very helpful, for something else though :)

I guess I didn't make it clear, but I'm using this for something a little more involved:

#TRIGGER {%d piles of coins} {#VAR CoinNum %1;#LOOP @CoinNum {get coin}}

The problem is that the MUD I am writing this for has a command queue of up to 4 commands. So if there are 5 piles of coins, it won't pick up the 5th one because it discards extra commands, and if I have other commands already inputted, it may not pick up any. Soo... I don't know if there is some way to increment the parameter, or some other way to do this.

Thanks
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Jul 18, 2003 4:14 am   
 
#TR {(%d) piles of coins} {#VAR CoinNum %1;#ADD CoinNum -1;get coin}
#TR {You pick up some coins} {#IF (@CoinNum > 0) {#ADD CoinNum -1;get coin}}
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