// Say /19 computer for a dialog MENU with choices
integer CHANNEL = 19; // dialog channel menu speaks to prim script on this channel
list MENU_MAIN = ["Shield On", "Shield Off", "Security On", "Security Off"]; // the Main menu.. NOTE reverse order of the listing.
list MENU_TWO = ["3", "2", "...Back", "1"]; // a SUBMENU.. NOTE reverse order of the listing.
default {
state_entry() {
llListen(CHANNEL, "", NULL_KEY, ""
; // listen for dialog answers (from multiple users)
}
listen(integer channel, string name, key id, string message)
{
if (message == "Computer"
{
llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, CHANNEL);
llSay(0, "You picked Computer"
; // present submenu on request
}
if (llListFindList(MENU_MAIN + MENU_TWO, [message]) != -1) // verify dialog choice
{
llSay(0, name + " picked the option '" + message + "'."
; // output the answer.. Menu says what item was picked.
if (message == "...Back"
llDialog(id, "What do you want to do?", MENU_MAIN, CHANNEL); // present main menu on request to go back
else if (message == "Shield On"
llSay(0, "Shield On"
;
else if (message == "Shield Off"
//works
llSay(0, "Shield Off"
;
else if (message == "Security On"
//WORKS
llSay(0, "Security On"
;
else if (message == "Security Off"
//WORKS
llSay(0, "Security Off"
;
}
else
llSay(0, name + " picked invalid option '" + llToLower(message) + "'."
; // not a valid dialog choice
}
}
integer CHANNEL = 19; // dialog channel menu speaks to prim script on this channel
list MENU_MAIN = ["Shield On", "Shield Off", "Security On", "Security Off"]; // the Main menu.. NOTE reverse order of the listing.
list MENU_TWO = ["3", "2", "...Back", "1"]; // a SUBMENU.. NOTE reverse order of the listing.
default {
state_entry() {
llListen(CHANNEL, "", NULL_KEY, ""
; // listen for dialog answers (from multiple users)}
listen(integer channel, string name, key id, string message)
{
if (message == "Computer"
{
llDialog(llDetectedKey(0), "What do you want to do?", MENU_MAIN, CHANNEL);
llSay(0, "You picked Computer"
; // present submenu on request}
if (llListFindList(MENU_MAIN + MENU_TWO, [message]) != -1) // verify dialog choice
{
llSay(0, name + " picked the option '" + message + "'."
; // output the answer.. Menu says what item was picked.if (message == "...Back"
llDialog(id, "What do you want to do?", MENU_MAIN, CHANNEL); // present main menu on request to go back
else if (message == "Shield On"

llSay(0, "Shield On"
;else if (message == "Shield Off"
//worksllSay(0, "Shield Off"
;else if (message == "Security On"
//WORKSllSay(0, "Security On"
;else if (message == "Security Off"
//WORKSllSay(0, "Security Off"
;}
else
llSay(0, name + " picked invalid option '" + llToLower(message) + "'."
; // not a valid dialog choice}
}

