Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer menu_handler;
- integer menu_channel;
- menu(key user,string title,list buttons)
- {
- menu_channel = (integer)(llFrand(99999.0) * -1);
- menu_handler = llListen(menu_channel,"",llGetOwner(),"");
- llDialog(user,title,buttons,menu_channel);
- llSetTimerEvent(25.0);
- }
- default
- {
- state_entry()
- { llSetTouchText("Remote!");
- }
- touch_start(integer t)
- {
- llPlaySound("c74a4b10-7270-0f31-b375-23a9eb3fa75b",0.20);
- menu(llDetectedKey(0),"Choose a color from the List below...",["brown","red","green","blue","steel","orange","yellow","pink","purple","sky","black","OFF"]);
- }
- timer()
- {
- llSetTimerEvent(0.0);
- llListenRemove(menu_handler);
- }
- listen(integer channel,string name,key id,string message)
- {
- if (channel == menu_channel)
- {
- integer c_channel = 12;
- if(message == "brown")
- {
- llShout(c_channel, "brownl");
- }
- else if(message == "red")
- {
- llShout(c_channel, "redl");
- }
- else if(message == "green")
- {
- llShout(c_channel, "greenl");
- }
- else if(message == "blue")
- {
- llShout(c_channel, "bluel");
- }
- else if(message == "black")
- {
- llShout(c_channel, "blackl");
- }
- else if(message == "steel")
- {
- llShout(c_channel, "steell");
- }
- else if(message == "orange")
- {
- llShout(c_channel, "orangel");
- }
- else if(message == "yellow")
- {
- llShout(c_channel, "yellowl");
- }
- else if(message == "purple")
- {
- llShout(c_channel, "purplel"); }
- else if(message == "pink")
- {
- llShout(c_channel, "pinkl"); }
- else if(message == "lime")
- {
- llShout(c_channel, "limel"); }
- else if(message == "sky")
- {
- llShout(c_channel, "skyl"); }
- else if(message == "lavander")
- {
- llShout(c_channel, "lavanderl"); }
- else if(message == "OFF")
- {
- llShout(c_channel, "off");
- }
- }
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement