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
kurosh
Beginner


Joined: 01 May 2002
Posts: 18

PostPosted: Thu Jun 12, 2003 7:48 am   

alarms and string lists
 
Two questions...

Is it possible to use one time alarms with more precision than seconds? Or is there an alternative other than #wait? For example

#ALA +5 {save} if I wanted it to be in 5.5 seconds instead of 5 what could I do?


Also, I have a variable with a string list in it and an if statement that wants to check to see if the input equals one of the values in the string list. Is the only way to do this #FORALL or is there a better way?
Example:
@junk=(a|b|c|d|e)
#forall @junk {#IF {%i=%1} {true}}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jun 12, 2003 8:47 am   
 
Well, you could use 5.5
#ALA +5.5 {save}
Or, if it's for a trigger, you could use a Wait type multi-state trigger.
#TR {your trigger}
#COND {} {save} {Wait|Param=5500}

Better ways of checking list membership include doing it directly in the trigger pattern
#TR {{@junk}} {true}
or using %ismember()
#IF (%ismember( %1, @junk)) {true}

LightBulb
Advanced Member
Reply with quote
kurosh
Beginner


Joined: 01 May 2002
Posts: 18

PostPosted: Thu Jun 12, 2003 7:07 pm   
 
Answer to my second question works fine thanks. But, the first one doesn't work... I've tried using decimals and they don't work, perhaps it's because I'm using version 6.16?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jun 12, 2003 7:19 pm   
 
That's correct. There are no multi-state triggers in 6.16, and #ALARM is limited to 1-second increments. If you aren't willing to upgrade, you'll just have to accept the limitations of the version you prefer.

LightBulb
Advanced Member
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