|
Monkeh Newbie
Joined: 26 Mar 2007 Posts: 2
|
Posted: 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?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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} |
|
|
|
Monkeh Newbie
Joined: 26 Mar 2007 Posts: 2
|
Posted: Mon Mar 26, 2007 2:03 pm |
Thank you! I decided to go with #pr since it's easiest and I'm lazy. :)
|
|
|
|
|
|