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
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Thu Apr 15, 2004 3:20 am   

Tasks
 
I would like a thing to make 'Tasks' that tell me what I need to do.

For example, if it says 'It is pitch black...' I would like it to make a button to 'rem lantern;drop lantern;get lantern pack; hold lantern' and when I click the button it dissapears. And when it says 'You are thirsty.' it makes a button for 'rem skin;drink skin;drink skin;drink skin;wear skin' Once I see one I can figure out the rest that I need.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu Apr 15, 2004 5:18 am   
 
Wouldnt this be better offered just triggering off the It is pitch Black
#tr {It is pitch black} {rem lantern etc etc etc}
but if you insist on using the buttons

Make a push button withh all the commands you want it do
Give it a UNIUQE ID id Lanternbutton and make this the last command it executes #T- Lanternbutton

Then do
#TRIGGER {It is pitch black...} {#T+ Lanternbutton}
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Thu Apr 15, 2004 9:16 pm   
 
The reason I don't set a trigger is because on my game there is a timer like this: -+=*=+- for some commands and if you hit anything during that it will interrupt it. I used to have a trigger like that and it got me killed a few times.
Reply with quote
SpinDrJr
Beginner


Joined: 08 Jul 2003
Posts: 16

PostPosted: Fri Apr 16, 2004 9:06 pm   
 
That sounds like a very restricting timer thing there and I don't think you will get very far not being able to make triggers. I would suggest making a trigger to disable all your other trigger while that timer is running. Just put all your other triggers in a class of their own and put a single trigger outside of this class that triggers when your timer starts. When your trigger fires you want to turn all your other triggers that might interfere with it (you put those all in a class right? :P) To turn off your triggers class put this command in your trigger
#T- triggerclass where triggerclass is the name of the class you put all your other triggers. Then you want to make another trigger that fires when your timer is done that turns all your other triggers back on
#T+ triggerclass
I think this should work just fine but as I have never done it there might be some wierd issues. I would try it out because your not going to be able to do very powerful scripting without triggers sending info to the mud.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Apr 17, 2004 12:51 am   
 
Make a button. For the caption, put
%item( @tasks, 1)
For the value, put
#EXEC %item( @tasks, 1)
#DELN tasks 1

It won't delete itself, but you'll know everything is done whenever it doesn't have a caption. Use #ADDITEM whenever you want to add a task to the list.

For tasks which require multiple actions, you should probably make aliases. For instance
#AL lantern {rem lantern;drop lantern;get lantern pack;hold lantern}
Now you can have a trigger do
#TR {It is pitch black...} {#ADDI tasks lantern}
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Sat Apr 17, 2004 5:27 am   
 
I've got it all worked out to my satisfaction. And on the game I play not having triggers isn't really any loss. The only triggers worth using are a few minor ones that are fixed because of my tasks. This puts the only triggers that send output I've been able to think of so far into a task, which works much better. Because only output stops the timer. And the only triggers I use now are things to change colors.

#CLASS {Tasks}
#TRIGGER {You are hungry.} {#T+ Food}
#TRIGGER {You are thirsty.} {#T+ Water}
#TRIGGER {It is pitch black...} {#T+ Light}
#TRIGGER {The day has begun.} {#T+ NoLight}
#BUTTON 4 {Light} {rem light;drop light;get light pack;hold light;#T- Light} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {Light}
#BUTTON 5 {Water} {rem skin;drink skin;drink skin;drink skin;wear skin;#T- Water} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {Water}
#BUTTON 6 {Food} {get meat pack;get meat pack;eat meat;eat meat;#T- Food} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {Food}
#BUTTON 7 {Remove Light} {rem light;put light pack;#T- NoLight} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {NoLight}
#CLASS 0
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