Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Library: Recall Location Script

Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-22-2007 18:49
So I decided to write this script for myself. I've been getting griefed and orbited a lot lately, and if I was building in the sandbox I always found it hard to get back to my original location after being orbited. So I wrote this nifty script which saves your location every 10 minutes, and also has a reset function and recall save function. Here's the commands:

/2 recall (Opens up the map to your last saved location [which is saved every 5 minutes])
/2 recall save (Saves your last saved location to the script and no longer updates until you reset.)
/2 recall reset (or) /2 reset (Resets the recaller to save your current location and continue to update every 10 minutes.)

From: someone

///////////////////////////////////////////////////////////
//////////// ANIAM MAP RECALLER ///////////
//////////// Feel free to redistribute, but do ///////////
//////////// not sell. Keep full mod rights on ///////////
//////////// this script at all times. Hope this///////////
//////////// helps! - Aniam Ingmann ///////////
///////////////////////////////////////////////////////////
string MySim;
vector MyPos;
default
{
on_rez(integer sp)
{
llResetScript();
}
state_entry()
{
llListen(2,"",llGetOwner(),"";);
llSetTimerEvent(1);
llSleep(2);
llSetTimerEvent(600);
}
timer()
{
MyPos = llGetPos();
MySim = llGetRegionName();
llOwnerSay("Saved to Position: "+(string)MyPos+" and Region: "+MySim+".";);
}
listen(integer c, string n, key id, string msg)
{
if (msg == "recall reset"||msg == "reset";)
{
llResetScript();
}
if (msg == "recall save";)
{
llSetTimerEvent(0);
llOwnerSay("Saving last location...";);
llOwnerSay("Saved: Position "+(string)MyPos+" Region: "+MySim+".";);
llOwnerSay("No longer updating until you say /2 recall reset or /2 reset";);
}
if (msg == "recall";)
{
llOwnerSay("Opening up last location on map.";);
llMapDestination(MySim,MyPos,ZERO_VECTOR);
}
}
}

_____________________
From: someone

Don't worry, Aniam is here!
- Noob
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
02-13-2008 07:49
i assume this is entered into an object, do you just simply attach it to yourself, or to your hud?