////////////////////////////////////////////////////////// // (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. // ////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // INTERNALS // /////////////////////////////////////////////////////////////////////////// list menu_items = []; list key_items = []; integer mitra = 0; list cList = []; list tgtKeys = []; list tgtNames = []; string texName = ""; integer o = 0; integer comHandle = 0; integer comChannel = 0; list mFwd() { if(mitra+1>llGetListLength(menu_items)) return cList; cList = llListInsertList(llListInsertList(llList2List(menu_items, ++mitra, (mitra+=9)), ["<= Back"], 0), ["Next =>"], 2); return cList; } list mBwd() { if(mitra-19<0) return cList; cList = llListInsertList(llListInsertList(llList2List(menu_items, (mitra-=19), (mitra+=9)), ["<= Back"], 0), ["Next =>"], 2); return cList; } init() { llParticleSystem([]); comChannel = ((integer)("0x"+llGetSubString((string)llGetKey(),-8,-1)) & 0x3FFFFFFF) ^ 0xBFFFFFFF; } default { state_entry() { init(); } on_rez(integer param) { llResetScript(); } timer() { llSetTimerEvent(0); llParticleSystem([12,texName,5,<.2,.2,.2>,6,<.45,.45,.45>,1,<1,1,1>,3,<1,1,1>,2,((float)1.0),4,((float)1.0),15,((integer)2),13,((float).8),7,((float)5.0),9,((integer)8),17,((float).5),18,((float).5),16,((float).5),22,(((float).4) * 3.14159274),23,(((float).0) * 3.14159274),8,<.0,.0,-.1>,0,((integer)335),20,llList2Key(tgtKeys,0)]); if(!--o) { llSetTimerEvent(0); llParticleSystem([]); return; } llSetTimerEvent(1); } link_message(integer sender_num, integer num, string str, key id) { if(str == "tpoofer") { llOwnerSay("Please wait, scanning for avatars..."); llSensor("", "", AGENT, 96, TWO_PI); return; } if(str == "tpoof") { tgtKeys = (list)id; integer itra; for(itra=0, mitra=0, menu_items=[]; itra"], 2); comHandle = llListen(comChannel+2, "", llGetOwner(), ""); llDialog(llGetOwner(), "Please select a texture to poof an avatar with:\n", cList, comChannel+2); return; } } sensor(integer num) { integer itra; for(itra=0, mitra=0, tgtKeys=[], tgtNames=[], menu_items=[]; itra"], 2); comHandle = llListen(comChannel+1, "", llGetOwner(), ""); llDialog(llGetOwner(), "Please select an avatar to poof from the list below:\n", cList, comChannel+1); } listen(integer channel, string name, key id, string message) { if(message == "<= Back") { llDialog(id, "Please browse the available items:\n", mBwd(), channel); return; } if(message == "Next =>") { llDialog(id, "Please browse the available items:\n", mFwd(), channel); return; } if(channel == comChannel+1) { llListenRemove(comHandle); integer itra=llGetListLength(tgtNames)-1; do { if(llGetSubString(message,0,23) == llList2String(tgtNames, itra)) { tgtKeys = (list)llList2Key(tgtKeys, itra); jump found_target; } } while(--itra>=0); @found_target; for(itra=0, mitra=0, menu_items=[]; itra"], 2); comHandle = llListen(comChannel+2, "", llGetOwner(), ""); llDialog(llGetOwner(), "Please select a texture to poof an avatar with:\n", cList, comChannel+2); return; } if(channel == comChannel+2) { integer itra=llGetInventoryNumber(INVENTORY_TEXTURE); do { if(llGetSubString(llGetInventoryName(INVENTORY_TEXTURE, itra), 0, 23) == message) { texName = llGetInventoryName(INVENTORY_TEXTURE, itra); jump found_texture; } } while(--itra>=0); @found_texture; llListenRemove(comHandle); for(itra=2, mitra=0, menu_items=[]; itra<512; itra=itra<<1) { menu_items += (string)itra; } cList = llListInsertList(llListInsertList(llList2List(menu_items, mitra, (mitra+=9)), ["<= Back"], 0), ["Next =>"], 2); comHandle = llListen(comChannel+3, "", llGetOwner(), ""); llDialog(llGetOwner(), "Please select the number of seconds the avatar will be poofed:\n", cList, comChannel+3); return; } if(channel == comChannel+3) { llListenRemove(comHandle); o = (integer)message; llSetTimerEvent(2); } } }