Madi_Perth

Untitled

Oct 14th, 2023
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Linden Scripting 19.66 KB | Source Code | 0 0
  1. //Dancer control script v4.5.6
  2. //
  3. // 11/25 changed the listener from opening and closing to leaving open
  4. //       and just activating and deactivating with llListenControl.
  5.  
  6. integer gTouched; //button touched on the hud      
  7. integer gPlayButton;    //prim number of play button
  8. integer gShuffleButton; //prim number of shuffle button.
  9. integer gInfoButton;    //prim number of the info button
  10. integer gMinButton;     //prim number of the minimize button
  11. string gButtonTouched;  //name of what button on the hud was touched
  12. string gDanceCard;      //current dance notecard
  13. list gDanceList;           //list of dances in notecard
  14. list gTempDanceList;  //list of unshuffled dances held for buttle_suffle()  
  15. list gNoteCards;        //dance notecards list
  16. list gDancerKeys;     //dancer names and  uuid keys on dance slots
  17. list gDisplayNames;   //list of display names from keys
  18. string tempKey;
  19. key owner;              //owner of hud
  20. integer gNotecardLine;   //Current note card line
  21. key gNotecardQueryId;    //notecard file handle
  22. integer menuindex;  //counter for DialogPlus
  23. integer gChannel; //DialogPlus channel number
  24. integer gDanceNum; //current dance number in the list
  25. string  gTimerNum; //current timer number for dance switch
  26. integer infoFlag; //if info button is set to verbose mode.
  27. vector gOldLocation; //location on screen before min button is pressed
  28.  
  29. //  Linked Messages integer commands
  30. integer FWD     =1;  //forward 1 dance in the list
  31. integer PLAY    =2;  //play the current dance sellected
  32. integer PAUSE   =3;  //pause the current dance sellected
  33. integer RWD     =4;  //backward 1 dance in the list
  34. integer SHUFFLE_ON =5;  //dance list is random
  35. integer SHUFFLE_OFF =6; //dance list is sequenced
  36. integer SYNC    =7; //resync the dancers
  37. integer LOAD    =8; // load the list of dances
  38. integer TIMER   =9; // set the timer for the dances
  39. integer INFO    =10; //set the info flag
  40. integer TIME_CHANGE  =11; // time signal to switch to the next dance
  41. integer ADDKEY  =12; //Add DanceKey to dancer list
  42. integer ADDGOOD =13; //The dance is good to add
  43. integer ADDREJECT =14;  //the dancer has been rejected from being added
  44. integer DELKEY =15; //delete dancer key from the dancer list
  45.  
  46. // Texture for Suffle off
  47. string SOFF = "bdd61b36-e00d-5c9d-fd5b-34ce15dec1c5";
  48. // Texture for Suffle on
  49. string SON = "ad9651e3-ca77-fb09-ca6e-5d30e1321f68";
  50. // Play Texture for Play button
  51. string PLAYTXT = "729aee79-5ef0-3baf-eacc-06857889c28b";
  52. // Pause Texture for Play button
  53. string PAUSETXT =  "8a818aa5-ebdd-fbf2-d239-b2165e92a59e";
  54. // Left Arrow for minmize button
  55. string LEFT = "37f2ff4a-cafa-e1fa-69f4-9ddb012dcddf";
  56. // Right Arrow for minmize button
  57. string RIGHT = "da33f7fc-db6f-12f6-2297-89b3551abc58";
  58.  
  59. integer NOTE_CHANNEL_LISTENER = -900;    //Channel for NoteCard listener
  60. integer DANCE_CHANNEL_LISTENER = -901;    //Channel for Dance listener
  61. integer TIMER_CHANNEL_LISTENER = -902;    //Channel for Timer listener
  62. integer EJECT_CHANNEL_LISTENER = -903; //Channel for master dancer listener
  63.  
  64. integer note_handle; //handle for notecard loading listener events
  65. integer dance_handle; //handle for dance selecting listener events
  66. integer timer_handle; //handle for dance time dialog listener events
  67. integer eject_handle; //handler for eject dialog listener events
  68.  
  69. //move the hud off to the left with the min or max button is pressed
  70. min_max()
  71. {
  72.     list l = llGetLinkPrimitiveParams(gMinButton, [PRIM_TEXTURE,1]);
  73.    
  74.    
  75.     if(llList2String(l, 0) == "left arrow")
  76.     {
  77.         gOldLocation = llGetLocalPos();
  78. //        llOwnerSay((string) gOldLocation);
  79.         llSetPos(<gOldLocation.x, 0.0326734, gOldLocation.z>);
  80.         llSetLinkTexture(gMinButton, RIGHT, ALL_SIDES);
  81.     }
  82.    
  83.     if(llList2String(l, 0) == "right arrow")
  84.     {
  85.         llSetPos(gOldLocation);
  86.         llSetLinkTexture(gMinButton, LEFT, ALL_SIDES);
  87.     }
  88.     //llSetPos(llGetLocalPos() + (<0.0, 0.20,  0 > *   llGetLocalRot()));
  89.    
  90. }
  91. //send sync command to the dancers to sync them
  92. sync()
  93. {
  94.     list l;
  95.     l = llGetLinkPrimitiveParams(gPlayButton, [PRIM_TEXTURE,1]);
  96.     if(llList2String(l, 0) != "play")
  97.     {        
  98.         llMessageLinked(LINK_SET, PAUSE, currDance(),"");
  99.         llSleep(0.2);
  100.         llMessageLinked(LINK_SET, PLAY, currDance(), "");
  101.     }
  102. }
  103.  
  104. //get a list of notecards then load dances from it
  105. fLoadFromNoteCard()
  106. {
  107.     integer lNotesNum = llGetInventoryNumber(INVENTORY_NOTECARD);
  108.     //if (llGetListLength(gDanceList) > 0)
  109.     //    llMessageLinked(LINK_SET, PAUSE, currDance(), "");
  110.     gNoteCards = [];
  111.     //gDanceList = [];
  112.     gTempDanceList = [];
  113.     gNotecardLine = 0;
  114.     //gDanceNum = 0;
  115.     while (lNotesNum--)
  116.        gNoteCards += llGetInventoryName(INVENTORY_NOTECARD, lNotesNum);
  117.     llListenControl(note_handle, TRUE);
  118.     DialogPlus(owner, "Load Dance Notecard", gNoteCards, NOTE_CHANNEL_LISTENER, menuindex = 0);
  119. }
  120.  
  121. // controls the suffle button texture and sends the command
  122. // to the dancer scripts to randomize the dance list.
  123. button_shuffle()
  124. {
  125.     list l;
  126.    
  127.     l = llGetLinkPrimitiveParams( gTouched, [PRIM_TEXTURE, 1]);
  128.     if (llList2String(l, 0) == "Shuffle Off")
  129.     {
  130.         llMessageLinked(LINK_SET, PAUSE, currDance(), "");
  131.         llSetLinkTexture(gShuffleButton, SOFF, ALL_SIDES);
  132.         gTempDanceList = gDanceList;
  133.         gDanceList = llListRandomize(gDanceList, 1);
  134.        
  135.         l = llGetLinkPrimitiveParams(gPlayButton, [PRIM_TEXTURE, 1]);
  136.         if(llList2String(l, 0) != "play")
  137.             llMessageLinked(LINK_SET, PLAY, currDance(), "");
  138.         //llOwnerSay(llList2CSV(gDanceList));
  139.     } else
  140.     {
  141.         llSetLinkTexture(gShuffleButton, SON, ALL_SIDES);
  142.         llMessageLinked(LINK_SET, PAUSE, currDance(), "");
  143.         gDanceList = gTempDanceList;
  144.         l = llGetLinkPrimitiveParams(gPlayButton, [PRIM_TEXTURE, 1]);
  145.         if(llList2String(l, 0) != "play")
  146.             llMessageLinked(LINK_SET, PLAY, currDance(), "");
  147.         //llOwnerSay(llList2CSV(gDanceList));
  148.     }
  149. }
  150. /// shuffle dance if shuffle button is on shuffle
  151. // play if the play button is set to play
  152. shuffle_and_play()
  153. {
  154.     list l;
  155.  
  156.     l = llGetLinkPrimitiveParams( gShuffleButton, [PRIM_TEXTURE, 1]);    
  157.     if(llList2String(l, 0) != "Shuffle Off")
  158.     {
  159.         gTempDanceList = gDanceList;
  160.         gDanceList = llListRandomize(gDanceList, 1);
  161.         //llOwnerSay(llList2CSV(gDanceList));
  162.     }
  163.  
  164.     l = llGetLinkPrimitiveParams(gPlayButton, [PRIM_TEXTURE, 1]);
  165.     //llOwnerSay(llList2String(l, 0));
  166.     if (llList2String(l, 0) != "play")
  167.         llMessageLinked(LINK_SET, PLAY, currDance(), "");
  168. }
  169.  
  170. // step forward one dance in the list
  171. fwd ()
  172. {
  173.     list l;
  174.     string tempDance;
  175.    
  176.     l = llGetLinkPrimitiveParams(gPlayButton, [PRIM_TEXTURE, 1]);
  177.     tempDance = currDance();
  178.     if (llList2String(l, 0)== "play")
  179.         nextDance();
  180.     else
  181.     {
  182.         llMessageLinked(LINK_SET, PLAY, nextDance(), "");
  183.         llMessageLinked(LINK_SET, PAUSE, tempDance, "");
  184.     }
  185.     if(infoFlag == 1)
  186.         llOwnerSay("Now Playing " +currDance()+".");
  187. }
  188.  
  189. // step backward on in the dance list
  190. rwd()
  191. {
  192.     list l;
  193.     string tempDance;
  194.  
  195.     l = llGetLinkPrimitiveParams(gPlayButton, [PRIM_TEXTURE, 1]);
  196.     tempDance = currDance();
  197.     if (llList2String(l, 0)== "play")
  198.         prevDance();
  199.     else
  200.     {
  201.         llMessageLinked(LINK_SET, PLAY, prevDance(), "");
  202.         llMessageLinked(LINK_SET, PAUSE, tempDance, "");
  203.     }
  204.  
  205.      if(infoFlag == 1)
  206.         llOwnerSay("Now Playing " +currDance()+".");
  207. }
  208.  
  209. // play pause button interaction
  210. button_play ()
  211. {
  212.     list l;
  213.  
  214.     if(llGetListLength(gDanceList) == 0)
  215.     {
  216.         llOwnerSay("No Dances Loaded.  Load Dances First.");
  217.         return;
  218.     }
  219.  
  220.     // if script time is less than 2 seconds play/pause
  221.     if(llGetTime() < 2)
  222.     {
  223.         l = llGetLinkPrimitiveParams( gPlayButton, [PRIM_TEXTURE,1]);
  224.         if (llList2String(l, 0) == "play")
  225.         {
  226.             llSetLinkTexture( gPlayButton, PAUSETXT, ALL_SIDES);
  227.             llMessageLinked(LINK_SET, PLAY, currDance(), "");
  228.         }
  229.         else
  230.         {
  231.             llSetLinkTexture( gPlayButton, PLAYTXT, ALL_SIDES);
  232.             llMessageLinked(LINK_SET, PAUSE, currDance(), "");
  233.         }
  234.     }
  235.     else
  236.     {
  237.         // if script time is < 2 seconds open a dialog with dances in it
  238.         // long touch on the play/pause button
  239.         llListenControl(dance_handle, TRUE);
  240.         DialogPlus(owner, "Select a Dance", gDanceList,
  241.                    DANCE_CHANNEL_LISTENER, menuindex = 0);
  242.     }
  243. }
  244.  
  245. //select the next dance in the list
  246. string nextDance()
  247. {
  248.     ++gDanceNum;
  249.     if(gDanceNum >= llGetListLength(gDanceList))
  250.         gDanceNum = 0;
  251.     return llList2String(gDanceList, gDanceNum);    
  252. }
  253.  
  254. //select the prev dance in the list
  255. string prevDance()
  256. {
  257.     --gDanceNum;
  258.     if(gDanceNum < 0)
  259.         gDanceNum = llGetListLength(gDanceList) - 1;
  260.     return llList2String(gDanceList, gDanceNum);
  261. }
  262.  
  263.  
  264.  
  265. show_dancer_list()
  266. {
  267.     list l;
  268.     integer i;
  269.     llOwnerSay(llList2CSV(gDancerKeys));
  270.     llOwnerSay("/*******************************************************/");
  271.     for(i = 0; i < llGetListLength(gDancerKeys); i += 2)
  272.     {
  273.         llOwnerSay(llList2CSV(llList2List(gDancerKeys, i, (i+1))));
  274.     }
  275.      llOwnerSay("/*******************************************************/");
  276.     gDisplayNames = llList2ListStrided(gDancerKeys, 0, -1, 1);
  277.     llOwnerSay("display names: " +llList2CSV(gDisplayNames));
  278.     return;  
  279. }
  280.  
  281.  
  282.  
  283. // play single selected dance only
  284. play_single(string selected)
  285. {
  286.     string tempDance;
  287.      
  288.     if(infoFlag == 1)
  289.         llOwnerSay("Single Dance Mode, playing " +selected+ ".");
  290.     llMessageLinked(LINK_SET, TIMER, "None", "");
  291.     tempDance = currDance();
  292.     gDanceNum = llListFindList(gDanceList, (list) selected);
  293.     llMessageLinked(LINK_SET, PLAY, selected, "");
  294.     llMessageLinked(LINK_SET, PAUSE, tempDance, "");
  295.     llSetLinkTexture( gPlayButton, PAUSETXT, ALL_SIDES);
  296. }
  297.  
  298. //return the current dance in the list
  299. string currDance()
  300. {
  301.     return llList2String(gDanceList, gDanceNum);
  302. }
  303.  
  304. //function to display info
  305. info()
  306. {
  307.     if(llGetTime() > 2)
  308.     {
  309.         if (infoFlag == 0)
  310.         {
  311.             llOwnerSay("Verbose mode is now on.");
  312.             infoFlag = 1;
  313.             return;
  314.         }
  315.         else if(infoFlag == 1)
  316.         {
  317.             llOwnerSay("Verbose mode is now off.");
  318.             infoFlag = 0;
  319.             return;
  320.         }
  321.     }
  322.     if(gTimerNum == ""  || gTimerNum == "None")
  323.         llOwnerSay("Timer is not set.");
  324.     else
  325.         llOwnerSay("Timer is set to " +gTimerNum+ " seconds.");
  326.     llOwnerSay("Now Playing: " + currDance());
  327. }
  328. //Created by Ugleh Ulrik
  329. //This sort
  330. //Edited by Taff Nouvelle to put the buttons in correct order.
  331.  
  332. list order_buttons(list buttons)
  333. {
  334.     return llList2List(buttons, -3, -1) + llList2List(buttons, -6, -4) +
  335.     llList2List(buttons, -9, -7) + llList2List(buttons, -12, -10);
  336. }
  337.  
  338. DialogPlus(key avatar, string message, list buttons, integer gChannel, integer CurMenu)
  339. {
  340.     llSetTimerEvent(30);
  341.     if (12 < llGetListLength(buttons))
  342.     {
  343.         list lbut = buttons;
  344.         list Nbuttons = [];
  345.         if(CurMenu == -1)
  346.         {
  347.             CurMenu = 0;
  348.             menuindex = 0;
  349.         }
  350.  
  351.         if((Nbuttons = (llList2List(buttons, (CurMenu * 10), ((CurMenu * 10) + 9)) + ["Back", "Next"])) == ["Back", "Next"])
  352.             DialogPlus(avatar, message, lbut, gChannel, menuindex = 0);
  353.         else
  354.            llDialog(avatar, message,  order_buttons(Nbuttons), gChannel);
  355.     }
  356.     else
  357.         llDialog(avatar, message,  order_buttons(buttons), gChannel);
  358. }
  359.  
  360. //return the number of the prim named
  361. integer getPrimNum (string button)
  362. {
  363.     integer nPrims = llGetNumberOfPrims();    
  364.     integer i;
  365.      
  366.     for( i = 0; i < nPrims; ++i)
  367.     {
  368.         string pName = llGetLinkName(i);
  369.         if (pName == button)
  370.             return i;
  371.     }
  372.     return 0;
  373. }
  374.  
  375. //look for key in dancerlist, add or reject if its in the list
  376. integer check_and_addkey(string ikey)
  377. {
  378.     if(llGetListLength(gDancerKeys) == 0)
  379.     {
  380.         gDancerKeys += ikey;
  381.         gDancerKeys += llGetDisplayName(ikey);
  382.         return 1;
  383.     }
  384.  
  385.     if(llListFindList(gDancerKeys, (list) ikey) != -1)
  386.         return 0;
  387.     else
  388.         {
  389.             gDancerKeys += ikey;
  390.             gDancerKeys += llGetDisplayName(ikey);
  391.             return 1;
  392.         }
  393.    
  394. }
  395.  
  396.  
  397. //delete a key from the gDancerKeys list
  398. delete_key(string ikey)
  399. {
  400.     integer key_location = llListFindList(gDancerKeys, (list) ikey);
  401.     gDancerKeys = llDeleteSubList(gDancerKeys, key_location, (key_location+1));
  402. }
  403.  
  404. default
  405. {
  406.     state_entry()
  407.     {
  408.         gPlayButton = getPrimNum("Play");
  409.         gShuffleButton = getPrimNum("Shuffle");
  410.         gInfoButton = getPrimNum("info");
  411.         gMinButton = getPrimNum("min");
  412.         infoFlag = 0;
  413.         llSetLinkTexture( gPlayButton, PLAYTXT, ALL_SIDES);
  414.         llSetLinkTexture( gShuffleButton, SON, ALL_SIDES);
  415.         llSetLinkTexture( gMinButton, LEFT, ALL_SIDES);
  416.         owner = llGetOwner();
  417.         gDanceNum = 0;
  418.         gDancerKeys = [];
  419.         note_handle = llListen(NOTE_CHANNEL_LISTENER, "", owner, "");
  420.         dance_handle = llListen(DANCE_CHANNEL_LISTENER, "", owner, "");
  421.         timer_handle = llListen(TIMER_CHANNEL_LISTENER, "", owner, "");
  422.         eject_handle = llListen(EJECT_CHANNEL_LISTENER, "", owner, "");
  423.         llListenControl(note_handle, FALSE);
  424.         llListenControl(dance_handle, FALSE);
  425.         llListenControl(timer_handle, FALSE);
  426.         llListenControl(eject_handle, FALSE);
  427.     }
  428.    
  429.     changed(integer change)
  430.     {
  431.         if (change & CHANGED_OWNER)
  432.         {
  433.             llResetScript();
  434.             owner = llGetOwner();
  435.         }
  436.     }
  437.    
  438.     // We need a listen for the dialog itself, but as well as the Back/Next bbutton.
  439.     listen(integer channel, string name, key id, string message)
  440.     {
  441.        
  442.         string msg;
  443.         list dialogList;
  444.         //handle listen event for timer button
  445.         if(channel == TIMER_CHANNEL_LISTENER)
  446.         {
  447.                 llMessageLinked(LINK_SET, TIMER, message, "");
  448.                 llSetTimerEvent(0);
  449.                 llListenControl(timer_handle, FALSE);
  450.                 sync();
  451.                 gTimerNum = message;
  452.                 return;
  453.         }
  454.  
  455.         //set list and message for dialog box for loading notecards
  456.         if(channel == NOTE_CHANNEL_LISTENER)
  457.         {
  458.                     msg = "Load Dance Notecard";
  459.                     dialogList = gNoteCards;
  460.         }
  461.  
  462.         //set list and message for dialog box for loading dances
  463.         if(channel == DANCE_CHANNEL_LISTENER)
  464.         {
  465.              msg = "Select a Dance";
  466.              dialogList = gDanceList;
  467.         }
  468.  
  469.         if(channel == EJECT_CHANNEL_LISTENER)
  470.         {
  471.             msg = "Select Dancer to Eject";
  472.             dialogList = gDisplayNames;  
  473.         }
  474.         if(message == "Next")
  475.             DialogPlus(owner, msg, dialogList, channel, ++menuindex);
  476.         else if(message == "Back")
  477.             DialogPlus(owner, msg, dialogList, channel, --menuindex);
  478.         else
  479.         {
  480.             //llOwnerSay(message);
  481.             llSetTimerEvent(0);
  482.                
  483.             // load notecard to list
  484.             if(channel == NOTE_CHANNEL_LISTENER)
  485.             {
  486.                 llListenControl(note_handle, FALSE);
  487.                 gDanceCard = message;
  488.                 gNotecardQueryId = llGetNotecardLine(gDanceCard, gNotecardLine);
  489.             }
  490.  
  491.             //select a dance
  492.             if(channel == DANCE_CHANNEL_LISTENER)
  493.             {
  494.                 llListenControl(dance_handle, FALSE);
  495.                 play_single(message);
  496.             }
  497.  
  498.             // Eject a dancer from the hud
  499.             if(channel == EJECT_CHANNEL_LISTENER)
  500.             {
  501.                 llListenControl(eject_handle, FALSE);
  502.                 tempKey = llList2String(gDancerKeys,
  503.                                         llListFindList(gDisplayNames,
  504.                                                        (list) message));
  505.                 llSay(0, "tempKey: "+ tempKey);
  506.             }
  507.         }
  508.     }
  509.    
  510.     touch_start(integer start_number)
  511.     {
  512.         llResetTime();
  513.     }
  514.      
  515.     touch_end(integer total_number)
  516.     {
  517.         gTouched = llDetectedLinkNumber(0);
  518.  
  519.         list l = llGetLinkPrimitiveParams( gTouched, [PRIM_NAME]);
  520.         llOwnerSay("Number: " +(string) gTouched+ " Name: "+ llList2String(l, 0));
  521.         gButtonTouched = llList2String(l, 0);
  522.         if (gButtonTouched == "FWD")
  523.            fwd();            
  524.         else if (gButtonTouched == "RWD")
  525.             rwd();
  526.         else if (gButtonTouched == "Shuffle")
  527.             button_shuffle();
  528.         else if (gButtonTouched == "Play")
  529.             button_play();
  530.         else if (gButtonTouched == "Load")
  531.             fLoadFromNoteCard();
  532.         else if (gButtonTouched == "Timer")
  533.         {
  534.             list dTime = ["None", "15", "30", "60", "90", "120"];
  535.             llListenControl(timer_handle, TRUE);
  536.             llDialog(owner, "Set Dance Time", dTime, TIMER_CHANNEL_LISTENER);
  537.         } else if (gButtonTouched == "min")
  538.             min_max();
  539.         else if (gButtonTouched == "Sync")
  540.             sync();
  541.         else if (gButtonTouched == "info")
  542.             info();
  543.         else
  544.         {
  545. //            if (llGetSubString(gButtonTouched, 0, 5) == "Dancer"
  546.             if (llGetTime() > 2)
  547.             {
  548.                 llOwnerSay("Dancer Button Touched");
  549.                 show_dancer_list();
  550.             }
  551.         }
  552.     }
  553.    
  554.     dataserver (key query_id, string data)
  555.     {
  556.         if (query_id == gNotecardQueryId)
  557.             if(data == EOF)
  558.             {
  559.                 llOwnerSay("Loaded " +(string) llGetListLength(gTempDanceList)+ " dances from " +gDanceCard+ " notecard.");
  560.                 if(llGetListLength(gDanceList) > 0)
  561.                     llMessageLinked(LINK_SET, PAUSE, currDance(), "");
  562.                 gDanceList = gTempDanceList;
  563.                 gDanceNum = 0;
  564.                 shuffle_and_play();
  565.             }
  566.             else
  567.             {
  568.                 gNotecardQueryId = llGetNotecardLine(gDanceCard, ++gNotecardLine);
  569.                 if (llStringLength(data) != 0)
  570.                     gTempDanceList += data;
  571.             }
  572.     }
  573.  
  574.     // timer for dialog menu.
  575.     timer()
  576.     {
  577.         llOwnerSay("Dialog Menu timed out.");
  578.         llListenControl(timer_handle, FALSE);
  579.         llListenControl(dance_handle, FALSE);
  580.         llListenControl(note_handle, FALSE);
  581.         llSetTimerEvent(0);
  582.     }
  583.  
  584.     // incoming timer event for timed dances.
  585.     link_message(integer sender_num, integer num, string str, key id)
  586.     {
  587.         list l;
  588.         l = llGetLinkPrimitiveParams(gPlayButton, [PRIM_TEXTURE,1]);
  589.         if(num == TIME_CHANGE)
  590.         {
  591.             if(llList2String(l, 0) != "play")
  592.                 fwd();
  593.         }
  594.  
  595.         if(num == ADDKEY)
  596.         {
  597.             if(check_and_addkey(str) == 1)
  598.             {
  599.                 llOwnerSay(llList2CSV(gDancerKeys));
  600.                 llMessageLinked(LINK_SET, ADDGOOD, str, "");
  601.                 if(llList2String(l, 0) != "play")
  602.                 {
  603.                     llSleep(5.0);
  604.                     sync();
  605.                 }
  606.             }
  607.             else
  608.             {
  609.                 llMessageLinked(LINK_SET, ADDREJECT, str, "");
  610.             }
  611.         }
  612.  
  613.         if(num == DELKEY)
  614.             delete_key(str);
  615.  
  616.         if(num == SYNC)
  617.         {
  618.             llSleep(5);
  619.             sync();
  620.         }
  621.     }
  622.  
  623.     on_rez(integer start_param)
  624.     {
  625.         gDancerKeys = [];
  626.     }
  627. }
  628.  
Add Comment
Please, Sign In to add comment