Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

get_slurl()

Klug Kuhn
Registered User
Join date: 7 Sep 2007
Posts: 126
11-18-2008 22:41
There are other ways to do, but this is what i use and hope someone would find it useful. The function is great for owner IM notifier etc..

You could also alter the function a bit into get_slurl(vector pos) to obtain a specific position instead.

//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

//=================================================
string get_slurl()
{
vector pos = llGetPos();
string result = "http://slurl.com/secondlife/"+llEscapeURL(llGetRegionName())+"/"+(string)((integer)pos.x)+"/"+(string)((integer)pos.y)+"/"+(string)((integer)pos.z);

return result;
}
//=================================================
default
{
state_entry()
{
}
touch_start(integer total_number)
{
llOwnerSay(get_slurl());
}
}

//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
//_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
11-19-2008 02:30
:) -- I marginally prefer...

get_slurl() {
vector pos = llGetPos();
return llDumpList2String(["http://slurl.com/secondlife",
llEscapeURL(llGetRegionName()),
llRound(pos.x), llRound(pos.y), llRound(pos.z)], "/";);
}

regs,
/esc
_____________________
http://slurl.com/secondlife/Together
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
11-19-2008 04:50
Thanks Guys,

Both useful functions add to my library of tools :)
But you may wish declare the function as string in order to use the second version.