Advertisement
Gayngel

Product Prim with Uniquechan

Sep 4th, 2016
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string name = "hair_color_red";
  2. integer comchan = -77;
  3. integer uniquechan1;
  4. integer uniquechan2;
  5. integer uniquechan3;
  6. integer unique_handle1;
  7. integer unique_handle2;
  8. integer unique_handle3;
  9. integer listen_handle;
  10. key HUDPrim;
  11.  
  12. default
  13. {
  14.  
  15.    on_rez(integer start_param)
  16.     {
  17.  
  18.         llResetScript();
  19.  
  20.     }
  21.    
  22.     state_entry()
  23.     {
  24.        
  25.         listen_handle = llListen(comchan,"","","");    
  26.    
  27.     }
  28.  
  29.     listen(integer chan, string name, key id, string msg)
  30.     {
  31.  
  32.         if(chan == comchan)
  33.         {
  34.  
  35.     list tmpData = llParseString2List(msg,["#"],[]);
  36.     string cmd = llStringTrim(llList2String(tmpData,0),STRING_TRIM);
  37.     integer ref = (integer)llStringTrim(llList2String(tmpData,1),STRING_TRIM);  
  38.  
  39.             if(cmd == name )
  40.             {
  41.                 HUDPrim = id;  
  42.                 llListenRemove(listen_handle);
  43.                 uniquechan1 = ref -1234;
  44.                 uniquechan2 = ref - 5678;
  45.                 uniquechan3 = ref - 91011;
  46.                 llRegionSayTo(id,comchan,"Pong!");
  47.                 unique_handle1 = llListen(uniquechan1,"",HUDPrim,"");
  48.                 unique_handle2 = llListen(uniquechan2,"",HUDPrim,"");
  49.                 unique_handle3 = llListen(uniquechan3,"",HUDPrim,"");
  50.  
  51.             }
  52.        
  53.         }
  54.     }
  55.  
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement