Advertisement
Guest User

Untitled

a guest
May 24th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer CHANNEL_ASK     = -120003;
  2. integer CHANNEL_RESPOND = -120004;
  3.  
  4. string  QUESTION        = "ping";
  5. string  RESPONSE        = "pong";
  6.  
  7. default
  8. {
  9.     state_entry(){
  10.         llListen(CHANNEL_ASK,    "",NULL_KEY,QUESTION);
  11.         llListen(CHANNEL_RESPOND,"",NULL_KEY,RESPONSE);
  12.     }
  13.  
  14.     touch_start(integer total_number){
  15.          llRegionSay(CHANNEL_ASK,QUESTION);  
  16.     }
  17.    
  18.     listen(integer channel, string name, key id, string message){
  19.         if(channel == CHANNEL_ASK && llGetAttached())
  20.             llRegionSay(CHANNEL_RESPOND, RESPONSE);
  21.        
  22.         else if(channel == CHANNEL_RESPOND){
  23.             string owner_name = llKey2Name(llGetOwnerKey(id));
  24.             llOwnerSay(owner_name + " is wearing the item");
  25.         }  
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement