Advertisement
Madi_Perth

Untitled

Jan 3rd, 2024
1,048
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Linden Scripting 1.33 KB | Source Code | 0 0
  1. //
  2. //#################################################################################################################################
  3. //
  4. // Play sound by UUID
  5. //
  6. // Dorex Delicioso 2023
  7. //
  8. //#################################################################################################################################
  9.  
  10. integer DODEBUG = TRUE;
  11.  
  12. // ############################## CONSTANTS ##############################
  13.  
  14. integer CHANNEL = -13572468;
  15.  
  16. // ############################## VARIABLES ##############################
  17.  
  18. integer  gListener;
  19.  
  20. // ############################## FUNCTIONS ##############################
  21.  
  22. sayDebug(string text){
  23.     if (DODEBUG){
  24.         llOwnerSay(text);
  25.     }
  26. }
  27.  
  28. // ############################## DEFAULT STATE ##############################
  29.  
  30. default
  31. {  
  32.     on_rez(integer start) {
  33.         llResetScript();
  34.     }
  35.  
  36.     touch_start(integer a)
  37.     {
  38.          gListener = llListen( CHANNEL, "", "", "");  
  39.         llTextBox(llDetectedKey(0), "Paste in a Sound UUID", CHANNEL);
  40.     }
  41.  
  42.  
  43.     listen(integer channel, string name, key id, string message)
  44.     {
  45.         llListenRemove(gListener);
  46.         llPlaySound(message,1.0);      
  47.     }
  48.  
  49.     changed(integer change)
  50.     {
  51.         if(change & (CHANGED_OWNER | CHANGED_INVENTORY))
  52.             llResetScript();
  53.     }
  54.  
  55. }
  56.  
  57.  
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement