#if class = on ?

Scripts and support for your favorite MUD client.
Vazzgo
Sojourner
Posts: 96
Joined: Tue Feb 06, 2001 6:01 am
Location: Gudalajara, Jalisco, Mexico
Contact:

#if class = on ?

Postby Vazzgo » Tue May 29, 2001 7:37 pm

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?
Gindipple
Sojourner
Posts: 676
Joined: Fri Jan 26, 2001 6:01 am
Location: O' Fallon, MO. USA
Contact:

Postby Gindipple » Tue May 29, 2001 7:44 pm

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.
Vazzgo
Sojourner
Posts: 96
Joined: Tue Feb 06, 2001 6:01 am
Location: Gudalajara, Jalisco, Mexico
Contact:

Postby Vazzgo » Tue May 29, 2001 7:54 pm

I already have buttons to toggle on/off certain triggers like: bashing, rescue, looter, glance, etc.. but what im looking for is what you meant about the command #t?? to know if certain class is actually on or off..
Tasan
Sojourner
Posts: 1710
Joined: Fri Mar 30, 2001 6:01 am
Location: Fridley, Mn USA
Contact:

Postby Tasan » Tue May 29, 2001 8:30 pm

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).]
belleshel
Sojourner
Posts: 526
Joined: Mon Jan 29, 2001 6:01 am
Location: Northeast

Postby belleshel » Tue May 29, 2001 8:38 pm

#T? is a timer function Image
Think the only way is as Tasan suggested using a variable to keep track;(.
Belle

I have to fool around with it later, hate having inefficent stuff lying around Image
Jorus
Sojourner
Posts: 277
Joined: Fri Apr 27, 2001 5:01 am
Location: Vancouver, BC
Contact:

Postby Jorus » Wed May 30, 2001 4:51 am

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
Faedril
Sojourner
Posts: 78
Joined: Fri Feb 23, 2001 6:01 am
Location: MI

Postby Faedril » Wed May 30, 2001 3:21 pm

You can always make a trigger off of an alias or say. For instance, make: You say "Autoloot Off" a trigger for #t- autoloot and You say "Autoloot On" for #t+ autoloot.
Vazzgo
Sojourner
Posts: 96
Joined: Tue Feb 06, 2001 6:01 am
Location: Gudalajara, Jalisco, Mexico
Contact:

Postby Vazzgo » Thu May 31, 2001 7:16 am

Thanks guys, example of autoloot was merely an example and what im trully looking for is a way to know if a class is on or off.. haven't played lately so i will check out what Jorus said asap.. thanks Image

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 15 guests