Linden text version 2
{
LLEmbeddedItems version 1
{
count 0
}
Text length 1055
-------------------------------------------------------------
goggles script in secondlife
----------------------------
// when touched, present a dialog with four color choices
 
integer CHANNEL = 42; // dialog channel
list MENU_MAIN = ["open", "close"]; // the main menu

 
default {
    state_entry() {
        llListen(CHANNEL, "", NULL_KEY, ""); // listen for dialog answers (from multiple users)
    }
 
    touch_start(integer total_number)
    {
        llDialog(llDetectedKey(0), "Goggels Menu", MENU_MAIN, CHANNEL); // present dialog on click
    }
 
    listen(integer channel, string name, key id, string message)
    {
        //if (llListFindList(MENU_MAIN, [message]) != -1)  // verify dialog choice
if (message == "open")
        {
            llSay(1, "open"); // output the answer
            
            if (message == "close")
                llSay(1, "close"); // output the answer
                
            
        } else
            llSay(1, llToLower(message)); // not a valid dialog choice
    }
}
 
-------------------------}
 