User:Talia Tokugawa/scripts/VisitInform

From Second Life Wiki
< User:Talia Tokugawa‎ | scripts
Revision as of 13:28, 5 July 2008 by Talia Tokugawa (talk | contribs) (New page: Just a quick script so that the owner of a property can keep track of arrivals. Will remember the last hundred names so that the owner doesn't get spammed by repeated visits or people run...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Just a quick script so that the owner of a property can keep track of arrivals. Will remember the last hundred names so that the owner doesn't get spammed by repeated visits or people running backwards and forwards over the prim. Enjoy :P

<lsl> list names=[];

default {

   state_entry()
   {
       llVolumeDetect(TRUE);
   }
   collision_start( integer number_detected )
   {
       string name = llDetectedName(0);
       if (llListFindList(names, [name])==-1)
       {
           llInstantMessage( llGetOwner(), name + " has just arrived at " + (string)llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_NAME]));
           if (llGetListLength(names) >= 100) names=(names=[]) + llDeleteSubList(names, 0,0) + name;
           else names=(names=[]) + names + name;
       }
   }
   
   on_rez(integer p)
   {
       llResetScript();
   }

}

</lsl>