////////////////////////////////////////////////////////// // (C) Wizardry and Steamworks - 2011, GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html // // for legal details, rights of fair usage and // // the disclaimer and warranty conditions. // ////////////////////////////////////////////////////////// string objectName = ""; integer reqID = 0; default { link_message(integer sender_num, integer num, string str, key id) { if(id != "kcr_rez") return; list data = llCSV2List(str); if(llGetListLength(data) != 5) { llSay(DEBUG_CHANNEL, "Rezzer expected 5 parameters and got only: " + (string)llGetListLength(data)); return; } reqID = sender_num; objectName = llList2String(data, 0); list posDec = llParseString2List(llList2String(data, 1), ["<", ">", ","], []); vector pos = ZERO_VECTOR; pos.x = llList2Integer(posDec, 0); pos.y = llList2Integer(posDec, 1); pos.z = llList2Integer(posDec, 2); list velDec = llParseString2List(llList2String(data, 2), ["<", ">", ","], []); vector vel = ZERO_VECTOR; vel.x = llList2Integer(velDec, 0); vel.y = llList2Integer(velDec, 1); vel.z = llList2Integer(velDec, 2); list rotDec = llParseString2List(llList2String(data, 3), ["<", ">", ","], []); rotation rot = ZERO_ROTATION; rot.x = llList2Integer(rotDec, 0); rot.y = llList2Integer(rotDec, 1); rot.z = llList2Integer(rotDec, 2); rot.s = llList2Integer(rotDec, 3); llRezObject(objectName, pos, vel, rot, llList2Integer(data, 4)); llSensor(objectName, "", ACTIVE|PASSIVE|SCRIPTED, 64, TWO_PI); } sensor(integer num) { key rezObjectKey = NULL_KEY; string rezObjectName = ""; integer itra = 0; do { rezObjectKey = llDetectedKey(itra); rezObjectName = llDetectedName(itra); if(rezObjectName == objectName) { jump found_object; } } while(++itra