Jump to content

Device for seeing who was there?


Syo Emerald
 Share

You are about to reply to a thread that has been inactive for 3984 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm curious who comes around to my parcel when I'm not there. Any chance there is a gadget that could tell me that? I'm not sure for that I should search on the marketplace. Its not necessary about securtiy, because its just my curiosity. :catvery-happy:

Link to comment
Share on other sites

I had the same curiosity as you so put together this script which will keep a list of your visitors for you.

Drop it in any prim you want and good to go.

 

float  HowOftenToCheck = 180;  // In seconds, how often will the                                // sensor look for visitors. Higher = less lagfloat  HowFarToLook = 50;      //  How far in meters the script will look around its position                               //   to find the visiotrs. Up to 96 meters!    //============================================================================================== string AllAgents;string OwnerName;string HackTime(){    string xt           = llGetTimestamp();    string x;    integer i;    // First process date out of xt    i = llSubStringIndex(xt, "T");    x = llGetSubString(xt, 0, i - 1);    // Get rid of the date    xt = llGetSubString(xt, i + 1, -1);    // Second process time    i = llSubStringIndex(xt, ".");    x += " " + llGetSubString(xt, 0, i - 1) + "GMT";    return x;} default{    state_entry()    {        // arc=PI is a sphere, you could look more narrowly in the direction object is facing with PI/2, PI/4 etc.        // don't repeat this too often to avoid lag.        llSensorRepeat("", "", AGENT, HowFarToLook, PI, HowOftenToCheck);    }    sensor(integer num_detected)    {        string thisAgent = "";        integer agentNum;        for (agentNum=0; agentNum<num_detected; agentNum++)        {            key thisKey = llDetectedKey(agentNum);            string thisAgent = llDetectedName(agentNum);            if (llSubStringIndex(AllAgents+"\n", "\n"+thisAgent+"\n") < 0)            {                AllAgents = AllAgents + "\n" + "(" + HackTime()+")"+thisAgent;            }        }    }         touch(integer num_detected)      {        if (AllAgents != "")                {                  llOwnerSay("Hi boss! Our visitors were these: "+ AllAgents);                  AllAgents = "";                }        else                 {   llOwnerSay("I didn't notice any new visitors yet...");  llSleep(1.0);  }         }    } 

 

Link to comment
Share on other sites

Oh wow....my parcel seems to be the most attractive thing in the neighbourhood. Together with my tiny teehouse (it tells me who went inside) I counted six different people who where already  on my sim since yesterday. I'm...suprised.

Link to comment
Share on other sites

Its a tiny parcel I rented from Lionheart. I made an asian garden on the ground and have a skybox miles away in the sky....oh and looks like I just missed number 7, who took a look into my teahouse 15 minutes ago :catvery-happy:

(I get it messaged to my email when someone new opens the door).

Link to comment
Share on other sites

This is what I use. Much, much better than a sensor, for a lot of reasons. Just gotta be okay with getting lots of IMs if you have lots of visitors while you're offline/not there. it's a great proof of concept for llGetAgentList.

 

key owner = "3c85d896-963a-4f77-9325-0eee0147ac66"; //Your UUID.default{    state_entry()    {        llSetTimerEvent(300.0);    }    timer()    {        integer numberOfAvatarsInSim = llGetRegionAgentCount();        if(numberOfAvatarsInSim >= 0)        {            if(llGetAgentSize(owner) == ZERO_VECTOR)            {                list avatarsInRegion = llGetAgentList(AGENT_LIST_PARCEL, []);                integer numOfAvatars = llGetListLength(avatarsInRegion);                integer index;                while(index < numOfAvatars)                {                    key id = llList2Key(avatarsInRegion, index);                    string name = llKey2Name(id);                    llInstantMessage(owner, name + " is on the parcel.");                    llInstantMessage(owner, "https://my.secondlife.com/" + llGetUsername(id));                    ++index;                }            }        }    }}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3984 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...