Syntax: #YE question {commands} {commands}

Displays a dialog box that asks the specified question. If the Yes button is clicked, the first command is executed. If the No button is clicked, the second command is executed. If Escape is pressed, then no command is executed.

You can customize the buttons by placing the caption you want for the button in front of the command, separated by a colon. For example {Sword:get sword} creates a button labeled "Sword" which executes the command "get sword" when clicked. Using these custom buttons, you can add as many buttons to the YESNO command as you want. If you put an asterisk * at the beginning of a button caption, that button is flagged as the default button.

YESNO examples

#YESNO "Do you want to sac the corpse?" {sac corpse}
Displays a standard Yes/No dialog. If Yes is clicked, the corpse is sacrificed.

#YESNO "Where to you want to go today?" {Temple:.temple} {Guild:.guild} {*Microsoft:#URL %yesno function as follows:
$tmp = 0
#if (%yesno("Yes or no?")) {$tmp = 1} {$tmp = 2}
#print {The value of tmp is $tmp}

Add comment

Login or register to post comments