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
dazed-n-confused
Novice


Joined: 14 Jan 2004
Posts: 31

PostPosted: Thu Feb 05, 2004 11:29 am   

dynamic buttons
 
I have a set of buttons which i wish to display single word messages in the captions box. By putting variables in the caption, and using triggers to change their values, Im hoping to get short messages about cures or the right attack at just the right time, ect. I play a fast paced mud with tons of scroll and having these reminders of importaint things not vanish in the scroll would be extremly valuable. Once the variable has taken on a non default value, I would like for it to remain until i preform the propper action. Example: "you are bleeding heavily" would put a value of clot in var1, when "you force you wound to heal by clotting" occurs I would like var1 become ready for another value then and only then.
Also, if I run out of buttons some kind of notification? would be nice. Very Happy
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Thu Feb 05, 2004 12:28 pm   
 
Looks like you wanting something like a todo list with buttons showing you your list and doing the actions.

#VAR ToDo {} {}
#Trigger {You need to do action 1 message} {#ADDITEM ToDo action1}
#Trigger {You need to do action 2 message} {#ADDITEM ToDo action1}
.
.
.
#Trigger {You need to do action n message} {#ADDITEM ToDo actionn}
#Trigger {You have done action 1 message} {#DELITEM ToDo action1}
#Trigger {You have done action 2 message} {#DELITEM ToDo action1}
.
.
.
#Trigger {You have done action n message} {#DELITEM ToDo actionn}

This should build your list. to add in the buttons
button1 caption %item(@ToDo,1)--value #EXEC %item(@ToDo,1)

button2 caption %item(@ToDo,2)--value #EXEC %item(@ToDo,2)
.
.
.
buttonn caption %item(@ToDo,n)--value #EXEC %item(@ToDo,3)

You don't need worry about how things you need to do. It will show however many things to do as you have buttons. If you have more things to do than buttons then it will show them as you complete the things showing.

If you have to limit it you can add to the 'need to do' trigger values in #IF (%numitems(@ToDo)>=@MaxThingsToDo) {#ECHO To many things to do!!!}
Reply with quote
dazed-n-confused
Novice


Joined: 14 Jan 2004
Posts: 31

PostPosted: Wed Feb 18, 2004 5:43 am   
 
OK, whats this do?
value #EXEC %item(@ToDo,1)
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Wed Feb 18, 2004 6:28 am   
 
that means put
#EXEC %item(@ToDo,1)
into the value field of the buttons setting editor. This is what will be done when you press the button.

#EXEC executes commands in this case the results of %item(@ToDo,1)
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