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
Twigg
Wanderer


Joined: 22 May 2003
Posts: 60
Location: USA

PostPosted: Mon Jun 21, 2004 4:53 am   

#ALARM;#ALARM;#ALARM;...still don' quite have it
 
Alright,
What is wrong with this ALIAS? I thought I had it and now...is it something with my spacing?

#ALIAS lhome {unlock door;#ALARM +1 {open door;#ALARM +1 {go door; #ALARM +1 {close door;#ALARM +1 {lock door;#ALARM +1 {out;#ALARM +{down;#ALARM +1 {out}}}}}}}}
Once again, Thank-you
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jun 21, 2004 5:56 am   
 
You left out the number for the sixth alarm. There is also an unneeded space before the third alarm.
#ALIAS lhome {unlock door;#ALARM +1 {open door;#ALARM +1 {go door; #ALARM +1 {close door;#ALARM +1 {lock door;#ALARM +1 {out;#ALARM +{down;#ALARM +1 {out}}}}}}}}

I would probably redo the alias so the alarms weren't nested.
#ALIAS lhome {unlock door;#ALARM +1 {open door};#ALARM +2 {go door};#ALARM +3 {close door};#ALARM +4 {lock door};#ALARM +5 {out};#ALARM +6 {down};#ALARM +7 {out}}
Reply with quote
Twigg
Wanderer


Joined: 22 May 2003
Posts: 60
Location: USA

PostPosted: Mon Jun 21, 2004 3:03 pm   
 
Lightbulb,
thanks, I am delighted that I almost had it right! Interesting that the script can be written with the #ALARMs nested or put the actions in brackets. Can this be done with any simple script of this type instead of nesting the #ALARM command?
Once again thank-you for helping me sort this out!
Wait a minute....I just took a good look at the #AlIAS correction you sent...this is they way I understand it. If the #ALARM is embedded then each additional #ALARM time can be unique..not accrue. If it is not embedded then each additional #ALARM time amounts adds on to the next one? Yes?
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Mon Jun 21, 2004 3:19 pm   
 
As you learn the nuances of zMUD, you'll find that there are multiple ways of doing just about anything. Another option for this script would be to set itup as a multistate trigger, and it may work a little quicker and more reliably. For the sake of example, I'll just assume what you see at each step, and also assume that room names appear in [].

Start by unlocking the door manually.
quote:

#TR {You unlock the door} {open door}
#COND {You open the door} {go door}
#COND {~[Your home~]} {close door}
#COND {You close the door} {lock door}
#COND {You lock the door} {out}
#COND {~[Outside your home~]} {down}
#COND {~[Outside and below your home~]} {out}

Reply with quote
Twigg
Wanderer


Joined: 22 May 2003
Posts: 60
Location: USA

PostPosted: Mon Jun 21, 2004 3:26 pm   
 
Geniusclown,
what I want to know is if the way you have it written is the way I would enter it on the command line? (love command line entry!) I mean I understand that I supply the correct triggers...I am wild to learn how to use triggers and the best way for me to learn how to do it, is to make one that works...
Reply with quote
Mercator
Newbie


Joined: 05 May 2004
Posts: 7
Location: United Kingdom

PostPosted: Mon Jun 21, 2004 4:07 pm   
 
The trigger that Genuisclown provided is for command line entry although you'll probably need to seperate all your conditions with a ;
Reply with quote
Twigg
Wanderer


Joined: 22 May 2003
Posts: 60
Location: USA

PostPosted: Mon Jun 21, 2004 4:58 pm   
 
Mercator.
Like this?

#TR;{You unlock the door} {open door}
#COND;{You open the door} {go door}
#COND;{~[Your home~]} {close door}
#COND;{You close the door} {lock door}
#COND;{You lock the door} {out}
#COND;{~[Outside your home~]} {down}
#COND;{~[Outside and below your home~]} {out}
Reply with quote
mr_kent
Enchanter


Joined: 10 Oct 2000
Posts: 698

PostPosted: Mon Jun 21, 2004 5:39 pm   
 
#TR {You unlock the door} {open door};
#COND {You open the door} {go door};#COND {~[Your home~]} {close door};
#COND {You close the door} {lock door};
#COND {You lock the door} {out};
#COND {~[Outside your home~]} {down};
#COND {~[Outside and below your home~]} {out};

Is what he meant, but if you copy, paste (and edit-to match the lines received-) the block, then the semicolons aren't needed.

Semicolons would be needed if there were no hard returns in the block after pasting... for example:

#TR {You unlock the door} {open door};#COND {You open the door} {go door};#COND {~[Your home~]} {close door};#COND {You close the door} {lock door};#COND {You lock the door} {out};#COND {~[Outside your home~]} {down};#COND {~[Outside and below your home~]} {out}
Reply with quote
Mercator
Newbie


Joined: 05 May 2004
Posts: 7
Location: United Kingdom

PostPosted: Mon Jun 21, 2004 8:00 pm   
 
Thanks for the explanation mr_kent. Twigg is going to be making many, many command line multi-state triggers really soon :)
Reply with quote
Twigg
Wanderer


Joined: 22 May 2003
Posts: 60
Location: USA

PostPosted: Mon Jun 21, 2004 10:13 pm   
 
Yes indeed! Twigg is delighted...I have not tried to make a trigger yet but I am far closer to understanding how to do it!
Thank-you!
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