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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: 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
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: 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!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Ralph1971
Wanderer


Joined: 01 Mar 2008
Posts: 64

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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