quick question.. is there a way to make #if to work if certain class is on or off?
in example:
if (autoloot=on) (say looter is on) (say looter if off)
know what i mean?
#if class = on ?
-
- Sojourner
- Posts: 676
- Joined: Fri Jan 26, 2001 6:01 am
- Location: O' Fallon, MO. USA
- Contact:
I think what you're really after is if a variable is set on or off. Looks like what you are trying to do is have a togglable looter. I use one myself. Best thing for this is use a button. Then in the button do one of 2 things, either set variables to 2 states, 1 and 0 work good, then do #if(the_variable==1) {blah blah} else {blah blah}. Or in the button actually turn off and on a certain Trigger class, using #T+ TriggerName and #T- TriggerName.
I do think there is a #T? that might check exactly what you asked for if I really missed the intended point.
I do think there is a #T? that might check exactly what you asked for if I really missed the intended point.
Here, this is directly from the zMUD help file:
"So, how about an example? In the Introduction to Triggers we created an autosplit trigger. We can make this trigger much more user friendly by using it with a button. Select Make Button from the Action menu. In the Off Caption field, enter the text AutoSplit. In the On Command field enter emote is auto-splitting;#t+ autosplit. In the Off Command field enter emote stops auto-splitting;#t- autosplit. In the Variable field, enter autosplit. Click OK to save the button definition. Now you have a button labeled AutoSplit, and it is currently off. Click the button. The command emote is auto-splitting is sent to the MUD (telling your group members what you are doing), and the autosplit trigger is enabled. The semi-colon (or Separator character) allows you to specify more than one command on the same line. Note that the button now appears in the On state (is pressed in). This gives you the visual clue that your AutoSplit function is enabled so that you don't forget. Click the button again. The text emote stops autosplitting is sent to the MUD, and the autosplit trigger is disabled. The button now appears in the Off position. Now you don't have to waste two keys on the keyboard to turn your autosplit trigger on and off, and in addition you have a nice visual clue as to whether your trigger is active or not. Try to beat this in a text-based MUD client!
"
This is almost exactly what you asked about, well at least a solution. You can parse multiple commands under the command fields to allow you to make those say tiggers.
However, if you really want something like in your example, you can add a simple variable for the ifcheck.
You have the class being triggered by a #T+ statement, then just add one more variable... say ATstat, and when it goes off it has ATstat set to 1, whereas it is normally 0(triggered with the #T- line).
Twyl
[This message has been edited by Tasan (edited 05-29-2001).]
[This message has been edited by Tasan (edited 05-29-2001).]
"So, how about an example? In the Introduction to Triggers we created an autosplit trigger. We can make this trigger much more user friendly by using it with a button. Select Make Button from the Action menu. In the Off Caption field, enter the text AutoSplit. In the On Command field enter emote is auto-splitting;#t+ autosplit. In the Off Command field enter emote stops auto-splitting;#t- autosplit. In the Variable field, enter autosplit. Click OK to save the button definition. Now you have a button labeled AutoSplit, and it is currently off. Click the button. The command emote is auto-splitting is sent to the MUD (telling your group members what you are doing), and the autosplit trigger is enabled. The semi-colon (or Separator character) allows you to specify more than one command on the same line. Note that the button now appears in the On state (is pressed in). This gives you the visual clue that your AutoSplit function is enabled so that you don't forget. Click the button again. The text emote stops autosplitting is sent to the MUD, and the autosplit trigger is disabled. The button now appears in the Off position. Now you don't have to waste two keys on the keyboard to turn your autosplit trigger on and off, and in addition you have a nice visual clue as to whether your trigger is active or not. Try to beat this in a text-based MUD client!
"
This is almost exactly what you asked about, well at least a solution. You can parse multiple commands under the command fields to allow you to make those say tiggers.
However, if you really want something like in your example, you can add a simple variable for the ifcheck.
You have the class being triggered by a #T+ statement, then just add one more variable... say ATstat, and when it goes off it has ATstat set to 1, whereas it is normally 0(triggered with the #T- line).
Twyl
[This message has been edited by Tasan (edited 05-29-2001).]
[This message has been edited by Tasan (edited 05-29-2001).]
From Zmud 5.55 helpfile:
"trigger
Syntax: %trigger(class)
return true if the specified trigger class is enabled"
That should do the trick for you.. Don't confuse it with the "%trigger" sytax, though, which is a predefined variable set to the line that last triggered a trigger.
A similar function _should_ exist in 6.16.
Enjoy,
Jorus
"trigger
Syntax: %trigger(class)
return true if the specified trigger class is enabled"
That should do the trick for you.. Don't confuse it with the "%trigger" sytax, though, which is a predefined variable set to the line that last triggered a trigger.
A similar function _should_ exist in 6.16.
Enjoy,
Jorus
Who is online
Users browsing this forum: No registered users and 15 guests