yesno = NewStringList()
list add (yesno, "Yes")
list add (yesno, "No")if (GetBoolean(Victim, "killanyway")) {
ShowMenu ("place holder text", yesno, false) {
if (result = "yes") {
msg ("<br/>long unpleasant text scene")
}
else if (result = "No") {
msg ("There's sure to be a weapon around here somewhere.")
}<game name="blah">
<yesno type="simplestringlist">yes; no</yesno>
</game>show menu ("Do you choose Yes or No?", game.yesno, false) {
// whatever script
}<global_lists_object type="object">
<inherit name="editor_object" />
<parent>null</parent>
</global_lists_object>
<verb name="blah">
firsttime {
global_lists_object.yesno = NewStringList()
list add (global_lists_object.yesno, "Yes")
list add (global_lists_object.yesno, "No")
on ready {
if (GetBoolean(this.Victim, "killanyway")) {
ShowMenu ("place holder text", global_lists_object.yesno, false) {
if (result = "yes") {
msg ("<br/>long unpleasant text scene")
} else if (result = "No") {
msg ("There's sure to be a weapon around here somewhere.")
}
}
}
}
} otherwise {
if (GetBoolean(this.Victim, "killanyway")) {
ShowMenu ("place holder text", game.yesno, false) {
if (result = "yes") {
msg ("<br/>long unpleasant text scene")
} else if (result = "No") {
msg ("There's sure to be a weapon around here somewhere.")
}
}
}
}
}
</verb>
<command name="fight">
<pattern>fight #text#</pattern>
<script>
if (text = "red orc") {
monster = GetObject (global_monsters_object.orc_list.red_orc)
fight_function (player,monster)
} else if (text = "lion") {
monster = GetObject (global_monsters_object.animal_list.lion)
fight_function (player,monster)
} else if (text = "fire dragon") {
monster = GetObject (global_monsters_object.dragon_list.fire_dragon)
fight_function (player,monster)
} else {
msg ("blah")
}
</script>
</command>
<function name="fight_function" parameters="monster">
// blah blah blah scripts
</function>
<global_monsters_object type="object">
<inherit name="editor_object" />
<parent>null</parent>
<orc_list type="objectlist">green_orc;blue_orc;red_orc</orc_list>
<dragon_list type="objectlist">earth_dragon;water_dragon;air_dragon;fire_dragon</dragon_list>
<animal_list type="objectlist">snake;wolf;lion;tiger;bear</animal_list>
</global_monsters_object>