Advertisement
ericheartsong

Untitled

Apr 27th, 2024
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. integer lh1=0;
  3. integer lh2=0;
  4. string msg1 = "Suri, tp us to the skybox";
  5. string msg2 = "Suri, tp me to the skybox";
  6.  
  7. teleportAll() {
  8.     list avatarsInRegion = llGetAgentList(AGENT_LIST_PARCEL, []);
  9.     integer numOfAvatars = llGetListLength(avatarsInRegion);
  10.     integer index;
  11.     while (index < numOfAvatars) {
  12.         key id = llList2Key(avatarsInRegion, index);
  13.         llRequestPermissions(id,PERMISSION_TELEPORT);
  14.         ++index;
  15.     }
  16. }
  17.  
  18. default
  19. {
  20.    
  21.     state_entry(){  
  22.        lh1 = llListen(0, "", NULL_KEY, msg1);
  23.        lh2 = llListen(0, "", NULL_KEY, msg2);
  24.     }
  25.    
  26.     listen( integer canal, string name, key id, string msg ) {
  27.         if (msg == msg1) {
  28.             teleportAll();
  29.         } else {
  30.             llRequestExperiencePermissions(id, "");  
  31.         }
  32.     }
  33.  
  34.     run_time_permissions(integer perm)
  35.     {
  36.         llOwnerSay(llGetPermissionsKey());
  37.         if (PERMISSION_TELEPORT & perm) {
  38.             llOwnerSay(llGetPermissionsKey());
  39.             llTeleportAgent(llGetPermissionsKey(), "skybox", ZERO_VECTOR, ZERO_VECTOR);
  40.         }
  41.     }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement