Jump to content

Recommended Posts

Hello,

I have a flying machine I made and its lovely and public and it tends to get taken across a sim or two making it hard to find. I love letting people enjoy the ride but would like it to tell me where it is.

Anyone ever see such a script? Ive tried the Market Place. nothing, well not from my searching anyway.

So if I was going to try to make this Im thinking;

timer()

llBESTLOCATIONEVENT (     )

llGetOwner

IIInstantMessage ()

the logic being,

where am I ( sim and co-ordinates)

who owns me

send owner message with surl

send every x minutes, say 30

 

Share this post


Link to post
Share on other sites

Yeah, just format your location message like this and you will be able to click a button on a popup and teleport straight to it.

llInstantMessage(<YOUR KEY>,"http://maps.secondlife.com/secondlife/<SIM NAME>/<X POS>/<Y POS>/<Z POS>");

 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Sari6t said:

send every x minutes, say 30

Prepare for spam. Especially if 10, 20, 30 people take them out. At the least put in a counter so there is only one message.

You would be better, I think, turning the plane to a temporary item once they sit. That way when they stand, even in a no-script area, the plane will just clean up. As long as people are sitting on a temporary item it won't dissapear. As soon as they stand, pretty much instant clean up.

Edited by Callum Meriman
  • Like 1

Share this post


Link to post
Share on other sites

So this is the basic script cobbled from a few examples in the Wiki and it works a treat for what I need. Might mod it more but if someone needs something like this, then this works.

 

float gap = 1800.0; // Send Message Interval
float counter = 0.0;

 
string wwGetSLUrl()
{
    string text = "Located at ....";
    string globe = "http://maps.secondlife.com/secondlife";
    string region = llGetRegionName();
    vector pos = llGetPos();
    string posx = (string)llRound(pos.x);
    string posy = (string)llRound(pos.y);
    string posz = (string)llRound(pos.z);
    return (text + globe + "/" + llEscapeURL(region) +"/" + posx + "/" + posy + "/" + posz);
}
 
default
{
    state_entry()
    {
        llSetTimerEvent(gap);   
    }
    
    timer()
    {
     counter = counter + gap;
     key owner = llGetOwner();
     llInstantMessage(owner,wwGetSLUrl() );
    
    }
}
 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...