/////////////////////////////////////////////////////////////////////////// // Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // // rights of fair usage, the disclaimer and warranty conditions. // /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // INTERNALS // /////////////////////////////////////////////////////////////////////////// integer Name2Number(string name) { list alph = ["*", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; integer i = llStringLength(name)-1; integer ahash = 0; do { ahash += llListFindList(alph, (list)llToLower(llGetSubString(name, i, i))); } while(--i>-1); return ahash; } integer hidTarget = -1; integer nTarget = -1; key avKey = NULL_KEY; default { at_target(integer tnum, vector targetpos, vector ourpos) { if(avKey == NULL_KEY) return; avKey = NULL_KEY; llSetTimerEvent(2); } not_at_target() { llTargetRemove(nTarget); vector pos = llList2Vector(llGetObjectDetails(avKey, [OBJECT_POS]), 0); nTarget = llTarget(pos, 1); llMoveToTarget(pos, .5); } timer() { llSetTimerEvent(0); llSetStatus(STATUS_PHYSICS, FALSE); vector size = llGetScale(); float xsize = size.z + size.z/2; float i = size.z; do { llSetScale(); llSleep(1); } while(++i); llSetStatus(STATUS_PHYSICS|STATUS_PHANTOM, TRUE); vector pos = llList2Vector(llGetObjectDetails(avKey, [OBJECT_POS]), 0); nTarget = llTarget(pos, 1); llMoveToTarget(pos, .5); return; @continue; } while(--num>-1); } }