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
sepe
Novice


Joined: 09 Feb 2002
Posts: 39
Location: USA

PostPosted: Mon Mar 11, 2002 3:31 pm   

YESNO Command
 
I'm trying to write as script using #YESNO but can't get the no part right

for example

Drink water
#yesno (want some more water) {drink water {THIS IS WHAT I DON'T KNOW}
Drink water
#yesno (want some more water) {drink water {THIS IS WHAT I DON'T KNOW}
Drink water
#yesno (want some more water) {drink water {THIS IS WHAT I DON'T KNOW}


I want the NO portion to abort the script and process no more. But no matter what I answer, yes no or click the 'X', the rest of the alias is procesed and sent to the mud, and I get prompted for the YES NO each time. What am I doing wrong?


Dazed glazed and having fun
Reply with quote
BadMojo
Wanderer


Joined: 11 Oct 2000
Posts: 84
Location: USA

PostPosted: Mon Mar 11, 2002 3:48 pm   
 
You can use ABORT to stop the processing of a script.

ABORT by itself will stop the processing of the current subsection of a script, while ABORT 1 will stop the processing of the entire script.

Note: Any number can be used in the ABORT # command as long as it is not 0.

-BadMojo
Reply with quote
sepe
Novice


Joined: 09 Feb 2002
Posts: 39
Location: USA

PostPosted: Mon Mar 11, 2002 4:02 pm   
 
OK GREAT, got that to work now, thanks bud, now lets expand it a little

can you put in a third option of say ... Drink heal potion then continue with the script?

Dazed glazed and having fun
Reply with quote
TaisharMalkier
Novice


Joined: 28 Sep 2001
Posts: 45
Location: USA

PostPosted: Mon Mar 11, 2002 4:02 pm   
 
#YESNO (Would you like to drink more water?) {Yes:drink water} {No:#ABORT}

Contain rather than hurt.
Hurt rather than maim.
Maim rather than kill.
Kill rather than be killed.
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Mon Mar 11, 2002 5:53 pm   
 
quote:

OK GREAT, got that to work now, thanks bud, now lets expand it a little

can you put in a third option of say ... Drink heal potion then continue with the script?

Dazed glazed and having fun



#YESNO "Want some more water?" {Yes:drink water} {No:#ABORT 1} {Maybe:quaff heal}

will do the job.

Troubadour
Reply with quote
sepe
Novice


Joined: 09 Feb 2002
Posts: 39
Location: USA

PostPosted: Tue Mar 12, 2002 10:19 pm   
 
OK so I'm greedy, First thanks again for the help so far it's all worked.

There is only one thing (I hope) that I like to further with this command. Can the buttons in the pop up box be keyboard activated, i.e. hit Y for yes or N for N, and not having to click with mouse or hit enter? I thought I saw this before and I thought it was acomplised by adding a :y after the command like this....

#YESNO "Want some more water?" {Yes:drink water:y} {No:#ABORT 1:n} {Maybe:quaff heal:m}

But of course it didn't work

:)
thanks

Dazed glazed and having fun
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Mar 13, 2002 1:08 am   
 
I beleive you can't do what you want. The best you can do is to define a default button which will be the one executed when you just press enter. To define the default button, put an * in front of its caption.

Kjata
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