//Cat (category) numbers: //1: ART AND CULTURE 2: CORPORATE 3: EDUCATION 4: FUN AND GAMES //5: GOVERNMENT 6: PERSONAL 7: REGIONAL 8: RETAIL //9: TOURISM 10: VENUES 11: RENTALS 12: RELIGION //Sort codes: 1=popularity 2=latest additions string SimAddress; //the hypergrid address string SimName; //the destination region name string SimSnapshotURL; //URL of the photo -- this script doesn't use it, but you can use string GridName; //name of the destination's grid string SimLocation; //Upper, middle or lower string URL; key httpkey;//This stores the key for the HTTP request we send. string body_retrieved; // this will hold what is returned from http request vector LandingPoint = <128.0, 128.0, 22.0>; vector LookAt = <1.0,1.0,1.0>; list LastFewAgents; PerformTeleport( key WhomToTeleport ) { integer CurrentTime = llGetUnixTime(); integer AgentIndex = llListFindList( LastFewAgents, [ WhomToTeleport ] ); // Is the agent we're teleporting already in the list? if (AgentIndex != -1) // If yes, check to make sure it's been > 5 seconds { integer PreviousTime = llList2Integer( LastFewAgents, AgentIndex+1 ); // Get the last time they were teleported if (PreviousTime >= (CurrentTime - 30)) return; // Less than five seconds ago? Exit without teleporting LastFewAgents = llDeleteSubList( LastFewAgents, AgentIndex, AgentIndex+1); // Delete the agent from the list } LastFewAgents += [ WhomToTeleport, CurrentTime ]; // Add the agent and current time to the list llMapDestination(SimAddress, LandingPoint, LookAt); //IF OS scripts are enabled, you can use this instead: //osTeleportAgent( WhomToTeleport, SimAddress, LandingPoint, LookAt ); } default { state_entry() { URL = llGetObjectDesc(); httpkey=llHTTPRequest(URL, [] ,""); } http_response(key id, integer status, list meta, string body) { body_retrieved = body; SimName = llGetSubString(body_retrieved, llSubStringIndex(body,"")+18, llSubStringIndex(body, "")-1); GridName = llGetSubString(body_retrieved, llSubStringIndex(body,"")+16, llSubStringIndex(body, "")-1); SimLocation = llGetSubString(body_retrieved, llSubStringIndex(body,"")+15, llSubStringIndex(body, "")-1); SimAddress = llGetSubString(body_retrieved, llSubStringIndex(body,"")+12, llSubStringIndex(body, "")-1); llSetText("Hypergate to "+ SimName +" on "+GridName +"\n"+ SimLocation,<1,1,1>,1); } touch_start(integer number) { URL = llGetObjectDesc(); llOwnerSay("Looking up "+URL); httpkey=llHTTPRequest(URL, [] ,""); } collision(integer number) { PerformTeleport( llDetectedKey( 0 )); } }