Advertisement
Gayngel

Untitled

May 6th, 2015
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. key user;
  2. integer Channel;
  3. integer matted = FALSE;
  4. integer phaseout = FALSE;
  5. integer switch;
  6. integer switch1;
  7. integer switch2;
  8. integer switch3;
  9. default
  10. {
  11. changed(integer change)
  12. {
  13. if (change & CHANGED_REGION | CHANGED_OWNER)
  14. {
  15. llResetScript();
  16. }
  17. }
  18. touch_start(integer total_number)
  19. {
  20. Channel = (integer) ( "0x" + (string) llGetOwner() ) - 123456;
  21. user = llDetectedOwner(0);
  22. if(user)
  23. {
  24. llDialog(user, "What Would You Like To Do?", ["Summon", "Around You", "Takeoff", "Explode", "Doors", "Phase", "Cloister", "Lock/Unlock", "Warp"],Channel);
  25. llListen(Channel, "", user, "");
  26. }
  27. }
  28.  
  29. listen(integer chan, string name, key id, string msg)
  30. {
  31.  
  32. if(chan == Channel)
  33. {
  34.  
  35. if(msg == "Summon")
  36. {
  37.  
  38. if(matted == TRUE)
  39. {
  40.  
  41. llOwnerSay("Exterior is already Materialised!");
  42. }
  43. else
  44. {
  45.  
  46. rotation rot = llEuler2Rot (<0,0,180> * DEG_TO_RAD );
  47.  
  48. llRezObject("~MPBDr12", llGetPos() + <4,0,0.87> * llGetRot(), ZERO_VECTOR, rot * llGetRot(), 0);
  49. llOwnerSay("Materialising...");
  50. matted = TRUE;
  51. }
  52. }
  53. else if(msg == "Around You")
  54. {
  55. if(matted == TRUE)
  56. {
  57. llOwnerSay("Exterior is already Materialised!");
  58. }
  59. else
  60. {
  61. rotation rot = llEuler2Rot (<0,0,0> * DEG_TO_RAD );
  62.  
  63. llRezObject("~MPBDr12", llGetPos() + <0,0,0.87> * llGetRot(), ZERO_VECTOR, rot * llGetRot(), 0);
  64. llOwnerSay("Materialising Around You...");
  65. matted = TRUE;
  66. }
  67. }
  68. else if (msg == "Takeoff")
  69. {
  70.  
  71. if(matted == FALSE)
  72. {
  73. llOwnerSay("Exterior has already Dematerialised!");
  74. }
  75. else
  76. {
  77. llRegionSay(Channel, "Demat");
  78. llOwnerSay("Dematerialising...");
  79. matted = FALSE;
  80. llResetScript();
  81. }
  82.  
  83. }
  84. else if(msg == "Explode")
  85. {
  86.  
  87. if(matted == TRUE)
  88. {
  89.  
  90. llRegionSay(Channel, "Explode");
  91. }
  92. matted = FALSE;
  93. llResetScript();
  94. }
  95.  
  96. else if(msg == "Doors")
  97. {
  98. if(matted == TRUE)
  99. {
  100. llRegionSay(Channel, "Open");
  101. }
  102. }
  103.  
  104. else if(msg == "Phase")
  105. {
  106. if(matted == TRUE)
  107. {
  108. if (switch = !switch)
  109. {
  110. llRegionSay(Channel, "phaseout");
  111. }
  112. else
  113. {
  114. llRegionSay(Channel, "phasein");
  115. }
  116. }
  117. }
  118. else if(msg == "Cloister")
  119. {
  120. if(matted == TRUE)
  121. {
  122. if(switch1 = !switch1)
  123. {
  124. llRegionSay(Channel,"cloisterbellon");
  125. }
  126. else
  127. {
  128. llRegionSay(Channel,"cloisterbelloff");
  129. }
  130. }
  131. }
  132. else if(msg == "Lock/Unlock")
  133. {
  134. if(matted == TRUE)
  135. {
  136. if(switch2 = !switch2)
  137. {
  138. llRegionSay(Channel, "dooranyone");
  139. llOwnerSay("Doors are now UNLOCKED to ANYONE");
  140. }
  141. else
  142. {
  143. llRegionSay(Channel, "doorowner");
  144. llOwnerSay("Doors are now LOCKED to OWNER");
  145. }
  146. }
  147. }
  148. else if(msg == "Warp")
  149. {
  150. if(matted == TRUE)
  151. {
  152. llDialog(user, "Select a Warp", ["Surface"],Channel);
  153. }
  154.  
  155. }
  156.  
  157. else if(msg == "Surface")
  158. {
  159. llRegionSay(Channel, "TP2Surface");
  160. }
  161. }
  162. }
  163. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement