Guest User

Untitled

a guest
Nov 18th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Write your greeting in the next line
  2. string greeting="Greet you!";
  3. integer clears;
  4.  
  5.  
  6. list visitors;
  7. integer i;
  8. list temp;
  9. default
  10. {
  11.     state_entry()
  12.     {
  13.         llSetTimerEvent(.01);
  14.     }
  15.  
  16.     timer()
  17.     {
  18.        temp= llGetAgentList(AGENT_LIST_PARCEL,[]);
  19.        {
  20.            if(llGetListLength(temp)>0)
  21.            {
  22.                //llOwnerSay(llDumpList2String(temp,", "));
  23.                 for(i=0;i<llGetListLength(temp);i++)
  24.                 {
  25.                     if(llListFindList(visitors,[llList2Key(temp,i)])==-1)
  26.                     {
  27.                         visitors+=llList2Key(temp,i);
  28.                         llRegionSayTo(llList2Key(temp,i),0,greeting);
  29.                     }
  30.                 }
  31.             }
  32.         }
  33.         if(llGetListLength(visitors)>700)
  34.         {
  35.             clears+=200;
  36.             visitors=llListReplaceList(visitors,visitors,200,800);
  37.         }
  38.         llSetTimerEvent(60);
  39.     }
  40.     touch_start(integer tickles)
  41.     {
  42.         integer count = clears+llGetListLength(visitors);
  43.         if(llDetectedKey(0)==llGetOwner())llRegionSayTo(llGetOwner(),0,(string)count+" visitors since you launched");
  44.     }
  45. }
Add Comment
Please, Sign In to add comment