Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
leonardofaoro
Novice


Joined: 07 Feb 2008
Posts: 40
Location: Italy

PostPosted: Wed Feb 24, 2010 5:54 pm   

Script check if trigger is disabled?
 
Is it possible to check from zScript if a trigger is disabled or enabled?

#IF (trigger1 = 0) {#T+ trigger1}

Hope you guys get the idea
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Feb 24, 2010 9:22 pm   
 
Well, you could just do #T+ without checking. If it is already enabled, it doesn't do anything. However, there are other situations where you might want to check whether a trigger or alias is enabled. Use the %trigger() function for this. This function will work on triggers, aliases, classes, or any other setting.
Code:

#IF (%trigger(trigger1)) {...}
Reply with quote
leonardofaoro
Novice


Joined: 07 Feb 2008
Posts: 40
Location: Italy

PostPosted: Wed Feb 24, 2010 10:35 pm   
 
Thanks a lot Rehab!
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Fri Feb 26, 2010 9:48 pm   
 
/me sings "They're trying to make me go to rehab but I said 'No, no, no!'."

Second time in as many days he's been called Rehab instead of Rahab *lol*
_________________
Taz :)
Reply with quote
leonardofaoro
Novice


Joined: 07 Feb 2008
Posts: 40
Location: Italy

PostPosted: Fri Feb 26, 2010 10:10 pm   
 
Hahaha, thank you for making me notice that, sorry Rahab :)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Mar 01, 2010 3:47 pm   
 
No problem! You aren't the first, and since it's not my real name, I feel no need to defend it against misspelling. Very Happy
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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