|
Ralph1971 Wanderer
Joined: 01 Mar 2008 Posts: 64
|
Posted: Sun Nov 09, 2008 1:54 am
buttons |
I'm trying to create a button that does the following
default is off
when I click on it, I turn on a class (truesight) and quaff a truesight potion
in the truesight folder (class) it has the appropriate triggers to quaff another potion when the current duration runs out
when I click on the button again, it shuts down the class (thereby turning off the re-quaff triggers)
I can get it to turn on, but I can't seem to set it up to turn off.. I've had to go to a menu command and right click when I'm done fighting (or whatever I need the truesight for)
thanks
zmud 7.21 |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Nov 09, 2008 3:32 am |
You need to create a toggle type button.
Put your code to turn on the the truesight class and quaff the potion in the first state, and disable it in the other.
This should be a good starting point.
Code: |
#BUTTON 1 {Enable True Sight} {
#T+ TrueSight
quaff true
} {Disable True Sight} {#T- TrueSight} {} {1} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {}
|
|
|
_________________ Asati di tempari! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Nov 09, 2008 4:54 am |
Though you'll probably find the settings editor a much better way to edit buttons than the (frankly horrific) #button command. Also, you might need to use
#BUTTON 1 {Enable True Sight} {#T+ TrueSight;quaff true} {Disable True Sight} {#T- TrueSight} {} {1} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {}
to get this to work properly in zMUD. |
|
|
|
Ralph1971 Wanderer
Joined: 01 Mar 2008 Posts: 64
|
Posted: Sun Nov 09, 2008 11:40 pm |
Worked like a charm, thank you :)
I'm not sure what I was doing wrong, went into setting editor, and it looked like i was doing everything that that command line entry did. |
|
|
|
|
|