key httpkey;//This stores the key for the HTTP request we send. string body_retrieved; // this will hold what is returned from http request key StatusQuery; //stores the key for the status request string SimName; string SimAddress; vector LandingPoint = <128.0, 128.0, 22.0>; vector LookAt = <1.0,1.0,1.0>; list LastFewAgents; LoadDestination () { SimAddress = llGetObjectDesc(); SimName = llGetObjectName(); StatusQuery = llRequestSimulatorData(SimAddress, DATA_SIM_STATUS); string CommandList = ""; CommandList = osMovePen( CommandList, 25, 75 ); CommandList += "FontSize 16;"; CommandList = osDrawText( CommandList, SimName ); osSetDynamicTextureDataBlendFace( "", "vector", CommandList, "width:256,height:256", FALSE, 2, 0, 255, 3 ); } 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 osTeleportAgent( WhomToTeleport, SimAddress, LandingPoint, LookAt ); //IF OS scripts are not enabled, you can use this: // llMapDestination(SimAddress, LandingPoint, LookAt); } default { state_entry() { LoadDestination(); llSetTextureAnim(ANIM_ON | LOOP, 1, 4, 4, 0.0, 16, 5); llSetText("", ZERO_VECTOR, 0); } dataserver(key queryId, string data) //turn gate black of destination is down { if (data=="up") llSetColor(<1.000, 1.000, 1.000>,1); else llSetColor(<0.067, 0.067, 0.067>,1); } touch_start(integer number) { LoadDestination(); } collision(integer number) { PerformTeleport( llDetectedKey( 0 )); } }