Advertisement
Guest User

hud

a guest
Dec 8th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. integer menu_handler;
  2. integer menu_channel;
  3.  
  4. menu(key user,string title,list buttons)
  5. {
  6. menu_channel = (integer)(llFrand(99999.0) * -1);
  7. menu_handler = llListen(menu_channel,"",llGetOwner(),"");
  8. llDialog(user,title,buttons,menu_channel);
  9. llSetTimerEvent(25.0);
  10. }
  11.  
  12. default
  13. {
  14. state_entry()
  15. { llSetTouchText("Remote!");
  16. }
  17. touch_start(integer t)
  18. {
  19. llPlaySound("c74a4b10-7270-0f31-b375-23a9eb3fa75b",0.20);
  20. menu(llDetectedKey(0),"Choose a color from the List below...",["brown","red","green","blue","steel","orange","yellow","pink","purple","sky","black","OFF"]);
  21. }
  22. timer()
  23. {
  24. llSetTimerEvent(0.0);
  25. llListenRemove(menu_handler);
  26. }
  27. listen(integer channel,string name,key id,string message)
  28. {
  29. if (channel == menu_channel)
  30. {
  31. integer c_channel = 12;
  32. if(message == "brown")
  33. {
  34. llShout(c_channel, "brownl");
  35. }
  36. else if(message == "red")
  37. {
  38. llShout(c_channel, "redl");
  39. }
  40.  
  41. else if(message == "green")
  42. {
  43. llShout(c_channel, "greenl");
  44. }
  45. else if(message == "blue")
  46. {
  47. llShout(c_channel, "bluel");
  48. }
  49. else if(message == "black")
  50. {
  51. llShout(c_channel, "blackl");
  52. }
  53. else if(message == "steel")
  54. {
  55. llShout(c_channel, "steell");
  56. }
  57. else if(message == "orange")
  58. {
  59. llShout(c_channel, "orangel");
  60. }
  61. else if(message == "yellow")
  62. {
  63. llShout(c_channel, "yellowl");
  64. }
  65. else if(message == "purple")
  66. {
  67. llShout(c_channel, "purplel"); }
  68. else if(message == "pink")
  69. {
  70. llShout(c_channel, "pinkl"); }
  71. else if(message == "lime")
  72. {
  73. llShout(c_channel, "limel"); }
  74. else if(message == "sky")
  75. {
  76. llShout(c_channel, "skyl"); }
  77. else if(message == "lavander")
  78. {
  79. llShout(c_channel, "lavanderl"); }
  80. else if(message == "OFF")
  81. {
  82. llShout(c_channel, "off");
  83.  
  84. }
  85. }
  86. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement