Difference between revisions of "User:Talia Tokugawa/scripts/VisitInform"
Jump to navigation
Jump to search
(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...) |
|||
Line 2: | Line 2: | ||
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 | 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 | ||
list names=[]; | |||
list names=[]; | |||
default { | |||
default | state_entry() { | ||
{ | |||
state_entry() | |||
llVolumeDetect(TRUE); | llVolumeDetect(TRUE); | ||
} | } | ||
collision_start( integer | collision_start( integer ind ) { | ||
string name = llDetectedName(0); | string name = llDetectedName(0); | ||
if (llListFindList(names, [name])==-1) | if (llListFindList(names, [name])==-1) { | ||
llInstantMessage( llGetOwner(), name + " has just arrived at " + (string)llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_NAME])); | llInstantMessage( llGetOwner(), name + " has just arrived at " + (string)llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_NAME])); | ||
if (llGetListLength(names) >= 100) names=(names=[]) + llDeleteSubList(names, 0,0) + name; | if (llGetListLength(names) >= 100) names=(names=[]) + llDeleteSubList(names, 0,0) + name; | ||
Line 23: | Line 18: | ||
} | } | ||
on_rez(integer | on_rez(integer irp) { | ||
llResetScript(); | llResetScript(); | ||
} | } | ||
} | } | ||
Latest revision as of 13:50, 23 August 2023
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
list names=[]; default { state_entry() { llVolumeDetect(TRUE); } collision_start( integer ind ) { 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 irp) { llResetScript(); } }