Advertisement
Gayngel

Untitled

May 22nd, 2016
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1.  
  2. integer btn1;
  3. integer btn2;
  4. integer btn3;
  5. integer btn4;
  6. integer b;
  7.  
  8. Say(string msg)
  9. {
  10.  
  11. }
  12.  
  13. default
  14. {
  15.  
  16. on_rez(integer start_param)
  17. {
  18.  
  19. llResetScript();
  20. }
  21.  
  22. state_entry()
  23. {
  24.  
  25. integer linktotal = llGetNumberOfPrims()+1;
  26.  
  27. for(b = 0; b < linktotal; ++b)
  28. {
  29.  
  30. string linkname = llGetLinkName(b);
  31.  
  32. if(linkname == "button1")
  33. {
  34.  
  35. btn1 = b;
  36.  
  37. }
  38.  
  39. else if(linkname == "button2")
  40. {
  41.  
  42. btn2 = b;
  43.  
  44. }
  45.  
  46. else if(linkname == "button3")
  47. {
  48.  
  49. btn3 = b;
  50.  
  51. }
  52.  
  53. else if(linkname == "button4")
  54. {
  55.  
  56. btn4 = b;
  57.  
  58. }
  59.  
  60.  
  61. }
  62.  
  63.  
  64. }
  65.  
  66. touch_end(integer num)
  67. {
  68.  
  69. integer linknumber = llDetectedLinkNumber();
  70.  
  71. if(linknumber == btn1)
  72. {
  73. llSay(-19735, "rainbow");
  74. }
  75.  
  76. else if(linknumber == btn2)
  77. {
  78.  
  79. llSay(-19735, "rainbow_steal");
  80.  
  81. }
  82.  
  83. }
  84.  
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement