////////////////////////////////////////////////////////// // WaS (c) grimore.org - 2012, License: GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html // // for legal details, rights of fair usage and // // the disclaimer and warranty conditions. // ////////////////////////////////////////////////////////// key nQuery = NULL_KEY; integer nLine = 0; list nList = []; string curSim = ""; //pragma inline readRegions() { if(llGetInventoryType("Regions") == INVENTORY_NOTECARD) jump read; llOwnerSay("Failed to find notecard."); return; @read; nQuery = llGetNotecardLine("Regions", 0); } default { state_entry() { llSetText("", <0,0,0>, 0); readRegions(); } changed(integer change) { if(change & CHANGED_INVENTORY) { llSensorRemove(); llSetTimerEvent(0); llResetScript(); } } timer() { llSetTimerEvent(0); curSim = llList2String(llParseString2List(llList2String(nList, 0), [" - "], []), 0); nQuery = llRequestSimulatorData(curSim, 6); } no_sensor() { if(llList2String(llParseString2List(llList2String(nList, 0), ["[ ", " ]"], []), 1) != nQuery) { nQuery = curSim + " - [ " + (string)nQuery + " ] T0:0:0"; // Comment the following lines out between the --MARK-- if you do not want Prowler support. // Otherwise, make sure that you replace your PROWL_API_KEY. You can find instructions on // the Wizardry and Steamworks wiki @ http://grimore.org/wiki/Prowler // --MARK-- integer cha = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; llMessageLinked(LINK_THIS, cha, "PROWL_API_KEY,6f5902ac237024bdd0c176cb93063dc4,PROWL_APPLICATION,SIM Status,PROWL_EVENT,SIM Status Change,PROWL_DESCRIPTION," + "SIM: " + curSim + " is now: " + (string)nQuery, ""); // --MARK-- jump updated; } nQuery = llList2String(llParseString2List(llList2String(nList, 0), ["T"], []), 1); nLine = llList2Integer(llParseString2List(nQuery, [":"], []), 2) + llList2Integer(llParseString2List(nQuery, [":"], []), 1) * 60 + llList2Integer(llParseString2List(nQuery, [":"], []), 0) * 3600 + 1; nQuery = llList2String(llParseString2List(llList2String(nList, 0), ["T"], []), 0) + "T" + (string)(nLine/3600) + ":" + (string)((nLine%3600)/60) + ":" + (string)((nLine%3600)%60); @updated; nList = llDeleteSubList(nList, 0, 0); nList += nQuery; llSetText(llDumpList2String(nList, "\n"), <1,1,1>, 1); llSetTimerEvent(1); } link_message(integer sender_num, integer num, string str, key id) { if(str == "SYN") llMessageLinked(LINK_THIS, 0, llList2CSV(nList), "ACK"); } dataserver(key id, string data) { if(id != nQuery) return; if(data == EOF || data == "" || llStringLength(data) > 8) jump read; llSensor("", nQuery = data, AGENT, .1, 0); return; @read; if(data == EOF) { llSetTimerEvent(1); return; } if(data == "") jump skip; nList += data; @skip; nQuery = llGetNotecardLine("Regions", ++nLine); } }