User:Opensource Obscure/ShowMap
< User:Opensource Obscure
Jump to navigation
Jump to search
Revision as of 06:58, 15 May 2011 by Opensource Obscure (talk | contribs) (script to load the map of current region as a web texture)
<lsl>
ShowMap(key avatar) {
string url = "http://map.secondlife.com/"; vector sim_coord = llGetRegionCorner(); string x = (string)((integer)(sim_coord.x / 256.0)); string y = (string)((integer)(sim_coord.y / 256.0)); url += "map-1-" + x + "-" + y + "-objects.jpg"; llLoadURL(avatar, "View the sim map", url);
}
default {
state_entry() { llSay(0, "Click to open the map of this region as a web texture."); }
touch_start(integer total_number) { ShowMap(llDetectedKey(0)); }
} </lsl>