Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key user;
- integer Channel;
- integer matted = FALSE;
- integer phaseout = FALSE;
- integer switch;
- integer switch1;
- integer switch2;
- integer switch3;
- default
- {
- changed(integer change)
- {
- if (change & CHANGED_REGION | CHANGED_OWNER)
- {
- llResetScript();
- }
- }
- touch_start(integer total_number)
- {
- Channel = (integer) ( "0x" + (string) llGetOwner() ) - 123456;
- user = llDetectedOwner(0);
- if(user)
- {
- llDialog(user, "What Would You Like To Do?", ["Summon", "Around You", "Takeoff", "Explode", "Doors", "Phase", "Cloister", "Lock/Unlock", "Warp"],Channel);
- llListen(Channel, "", user, "");
- }
- }
- listen(integer chan, string name, key id, string msg)
- {
- if(chan == Channel)
- {
- if(msg == "Summon")
- {
- if(matted == TRUE)
- {
- llOwnerSay("Exterior is already Materialised!");
- }
- else
- {
- rotation rot = llEuler2Rot (<0,0,180> * DEG_TO_RAD );
- llRezObject("~MPBDr12", llGetPos() + <4,0,0.87> * llGetRot(), ZERO_VECTOR, rot * llGetRot(), 0);
- llOwnerSay("Materialising...");
- matted = TRUE;
- }
- }
- else if(msg == "Around You")
- {
- if(matted == TRUE)
- {
- llOwnerSay("Exterior is already Materialised!");
- }
- else
- {
- rotation rot = llEuler2Rot (<0,0,0> * DEG_TO_RAD );
- llRezObject("~MPBDr12", llGetPos() + <0,0,0.87> * llGetRot(), ZERO_VECTOR, rot * llGetRot(), 0);
- llOwnerSay("Materialising Around You...");
- matted = TRUE;
- }
- }
- else if (msg == "Takeoff")
- {
- if(matted == FALSE)
- {
- llOwnerSay("Exterior has already Dematerialised!");
- }
- else
- {
- llRegionSay(Channel, "Demat");
- llOwnerSay("Dematerialising...");
- matted = FALSE;
- llResetScript();
- }
- }
- else if(msg == "Explode")
- {
- if(matted == TRUE)
- {
- llRegionSay(Channel, "Explode");
- }
- matted = FALSE;
- llResetScript();
- }
- else if(msg == "Doors")
- {
- if(matted == TRUE)
- {
- llRegionSay(Channel, "Open");
- }
- }
- else if(msg == "Phase")
- {
- if(matted == TRUE)
- {
- if (switch = !switch)
- {
- llRegionSay(Channel, "phaseout");
- }
- else
- {
- llRegionSay(Channel, "phasein");
- }
- }
- }
- else if(msg == "Cloister")
- {
- if(matted == TRUE)
- {
- if(switch1 = !switch1)
- {
- llRegionSay(Channel,"cloisterbellon");
- }
- else
- {
- llRegionSay(Channel,"cloisterbelloff");
- }
- }
- }
- else if(msg == "Lock/Unlock")
- {
- if(matted == TRUE)
- {
- if(switch2 = !switch2)
- {
- llRegionSay(Channel, "dooranyone");
- llOwnerSay("Doors are now UNLOCKED to ANYONE");
- }
- else
- {
- llRegionSay(Channel, "doorowner");
- llOwnerSay("Doors are now LOCKED to OWNER");
- }
- }
- }
- else if(msg == "Warp")
- {
- if(matted == TRUE)
- {
- llDialog(user, "Select a Warp", ["Surface"],Channel);
- }
- }
- else if(msg == "Surface")
- {
- llRegionSay(Channel, "TP2Surface");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement