|
leonardofaoro Novice
Joined: 07 Feb 2008 Posts: 40 Location: Italy
|
Posted: 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 |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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)) {...}
|
|
|
|
|
leonardofaoro Novice
Joined: 07 Feb 2008 Posts: 40 Location: Italy
|
Posted: Wed Feb 24, 2010 10:35 pm |
Thanks a lot Rehab!
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: 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 :) |
|
|
|
leonardofaoro Novice
Joined: 07 Feb 2008 Posts: 40 Location: Italy
|
Posted: Fri Feb 26, 2010 10:10 pm |
Hahaha, thank you for making me notice that, sorry Rahab :)
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: 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.
|
|
|
|
|
|