// This script will email you a daily count of new visitors and repeat visitors.
// Visitors are counted once per email update cycle.
// -----------------------------------
// Configuration: customize this script here.
// Change this to your email address.
string MyEmail = "This email address is being protected from spambots. You need JavaScript enabled to view it.";
// This is a number 0 to 96 meters, anything farther away than that will not be noticed.
float SensorRange = 96.0;
// How often to send email updates.
integer UpdateFrequency = 86400; // Number of seconds in 1 day.
// -----------------------------------
// Internal Variables -- Do not change.
list todayVisitors = [];
list allVisitors = [];
list repeatVisitors = [];
list firstTimers = [];
integer newVisitors = 0;
integer returnVisitors = 0;
string ParcelName;
default
{
state_entry()
{
list parcelDetails = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME]);
ParcelName = llList2String(parcelDetails, 0);
llSensorRepeat( "", "", AGENT, SensorRange, PI, 20);
llSetTimerEvent(UpdateFrequency); // Email me a regular report.
llOwnerSay("Visitor Log Started.");
}
sensor(integer avsFound)
{
key avKey;
integer avNum;
for(avNum=0; avNum500)
{
allVisitors = llList2List(allVisitors, 0, 499);
}
llEmail(MyEmail, subj, body);
}
}