Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer listen_handle;
- integer channel = -329;
- key ToucherID;
- string Mainmessage = "\nPlease make a choice.";
- string SettingsMsg = "Please choose a setting.";
- string TransparencyMsg = "Choose to show or hide the object.";
- string DeleteMsg = "Are you sure you want to delete the object?";
- string ReturnMsg = "Do you want to return the object to your inventory?";
- list mainpage = ["On", "Off", "Settings", "Delete", "Return"];
- list settings = ["Size", "Transparency", "Delete", "Return"];
- list resize = ["1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m", "On"];
- list transparency = ["Show", "Hide"];
- list delete = ["Yes","No"];
- list returnIt = ["Yes return it", "No don't return it"];
- DialogMenu()
- {
- llListenRemove(listen_handle);
- listen_handle = llListen(channel, "", ToucherID, "");
- llSetTimerEvent(60.0);
- }
- MainMenu()
- {
- DialogMenu();
- llDialog(ToucherID, Mainmessage, mainpage, channel);
- }
- settingsMenu()
- {
- DialogMenu();
- llDialog(ToucherID, SettingsMsg, settings, channel);
- }
- resizeMenu()
- {
- string ScaleMsg = "\n Please select what size the object should be. It should be the same size as your landing point. Then turn it on. \nCurrent size is " + (string)scale + "m.";
- DialogMenu();
- llDialog(ToucherID, ScaleMsg, resize, channel);
- }
- TransparencyMenu()
- {
- DialogMenu();
- llDialog(ToucherID, TransparencyMsg, transparency, channel);
- }
- DeleteMenu()
- {
- DialogMenu();
- llDialog(ToucherID, DeleteMsg, delete, channel);
- }
- ReturnMenu()
- {
- DialogMenu();
- llDialog(ToucherID, ReturnMsg, returnIt, channel);
- }
- default
- {
- touch_end(integer num)
- {
- ToucherID = llGetOwner();
- if( llDetectedKey(0) == ToucherID)
- {
- MainMenu();
- }
- }
- listen(integer channel, string name, key id, string message)
- {
- if (message == "On")
- {
- // do something;
- llListenRemove(listen_handle);
- }
- else if (message == "Off")
- {
- llListenRemove(listen_handle);
- llSensorRemove();
- }
- else if (message = "Settings")
- {
- settingsMenu();
- }
- else if (message == "Size")
- {
- resizeMenu();
- }
- else if (message == "1m")
- {
- //set scale
- }
- else if (message == "2m")
- {
- //set scale
- }
- else if (message == "3m")
- {
- //set scale
- }
- else if (message == "4m")
- {
- //set scale
- }
- else if (message == "5m")
- {
- //set scale
- }
- else if (message == "6m")
- {
- //set scale
- }
- else if (message == "7m")
- {
- //set scale
- }
- else if (message == "8m")
- {
- //set scale
- }
- else if (message == "9m")
- {
- //set scale
- }
- else if (message == "10m")
- {
- //set scale
- }
- else if (message == "Transparency")
- {
- TransparencyMenu();
- }
- else if (message == "Show")
- {
- llSetAlpha(1.0,ALL_SIDES);
- }
- else if (message == "Hide")
- {
- llSetAlpha(0.0,ALL_SIDES);
- }
- else if (message == "Delete")
- {
- DeleteMenu();
- }
- else if (message == "Return")
- {
- ReturnMenu();
- }
- if (message == "Yes")
- {
- llDie();
- }
- else if (message == "No")
- {
- MainMenu();
- }
- else if (message == "Yes return it")
- {
- //return object
- }
- else if (message == "No don't return it")
- {
- MainMenu();
- }
- llSetTimerEvent(0);
- }
- timer()
- {
- // stop timer
- llSetTimerEvent(0);
- llListenRemove(listen_handle);
- llOwnerSay("Dialog timed out. Please touch the sweeper and try again.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement