|
Berill Newbie
Joined: 29 May 2003 Posts: 6
|
Posted: 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! |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jul 18, 2003 12:48 am |
#TR {Three piles of coins} {get coin}
#COND {~>} {get coin} {nocr|prompt|LoopPat|Param=2} |
|
|
|
Berill Newbie
Joined: 29 May 2003 Posts: 6
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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}} |
|
|
|
|
|