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


Joined: 13 Oct 2001
Posts: 18
Location: USA

PostPosted: Sat Nov 02, 2002 6:39 am   

Stopping/Starting Triggers
 
Okay, what I want to do is type in a command that will enable or disable a trigger.
Ex: #TRIGGER {(%w) tells you} {tell %1 I am busy}
Now if I type say...afk it will enable the trigger and if I type noafk it will disable the trigger.
Reply with quote
titanium
Beginner


Joined: 13 Oct 2001
Posts: 18
Location: USA

PostPosted: Sat Nov 02, 2002 6:50 am   
 
Also, how can I make the command be random...
Ex: When they tell me something, I will say
"Leave me alone"/"I am busy" Would I first set up a variable like this?: #var random "tell (%1) I am busy|tell (%1) Leave me alone"
then ... put in the trigger #TRIGGER {(%w) tells you} {@random,%random(1,2)}

Titanium
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Nov 02, 2002 7:22 am   
 
This is done by using either the ID or CLASS field of the trigger command. The trigger (or the class it's in) can then be enabled with #T+ and disabled with #T-.

For random messages, limit the random part to the part you want to change.
#VAR random {I am busy|Leave me alone}
#TRIGGER {(%w) tells you} {tell %1 %item(%random(1,2),@random)}

LightBulb
Senior Member
Reply with quote
titanium
Beginner


Joined: 13 Oct 2001
Posts: 18
Location: USA

PostPosted: Sat Nov 02, 2002 3:22 pm   
 
Thanks!
Reply with quote
titanium
Beginner


Joined: 13 Oct 2001
Posts: 18
Location: USA

PostPosted: Sat Nov 02, 2002 4:22 pm   
 
This is what I put in:
#VAR random {I am busy|Leave me alone|I'm gone, send another tell or a mudmail}
#TRIGGER {(%w) tells you} {tell %1 %item(%random(1,3),@random)}

And when I tested it, all it said was tell (%w) then nothing after that, it didn't go to the random part.

Any ideas?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Nov 02, 2002 4:46 pm   
 
The help files are a useful thing, just a little looking and you would have realized that %item's arguements are reversed.

#TRIGGER {(%w) tells you} {tell %1 %item(@random,%random(1,3))}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Nov 02, 2002 5:54 pm   
 
OOPS! I never can remember the order, I'm constantly looking up functions.

LightBulb
Senior 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