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
Monkeh
Newbie


Joined: 26 Mar 2007
Posts: 2

PostPosted: Mon Mar 26, 2007 1:18 pm   

Series of triggers that wait for input.
 
I'm trying to write a script that will do some calculations based on stats inputted by the user. For example, the script would echo "Please input your level.", and you'd put in your level which would be saved to a variable, then it'd move on to "Please input your race.", save that to a variable, etc etc. What would I have to do to have it wait for input, then save said input to a variable and move on to the next step?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 26, 2007 1:55 pm   
 
Easiest way: The #prompt and #pick commands.

Harder but more versatile and ultimately coolest way: The Trigger Wizard

Hardest way: Oninput triggers.

#alias Start {#t+ InputTrig;#say Input your race}

#trig "InputTrig" {(*)} {#if (%ismember(%1,@ValidRaces)) {#say Please input your level} {#state InputTrig 0}} "" {oninput}
#cond {(*)} {etc etc} {oninput}
Reply with quote
Monkeh
Newbie


Joined: 26 Mar 2007
Posts: 2

PostPosted: Mon Mar 26, 2007 2:03 pm   
 
Thank you! I decided to go with #pr since it's easiest and I'm lazy. :)
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