Jump to content

Tabris Daxter

Resident
  • Posts

    129
  • Joined

  • Last visited

Everything posted by Tabris Daxter

  1. i tired google and i got Detecting what's under the crosshair in mouselook? which is a post a few lower. and the wiki article. most of the other google results were imdb where an actor with the first or last name "ray" was in a movie
  2. i'm only in the VERY early design stage of a KAOS / ASSASSIN game that will be grid-wide. the model i'm leaning towards is paying L$20/round (round lasts a month) and the winner gets half the "pot" any thoughts
  3. Hey all, this might SOUND like a script request but it's not.(sorta) is there anywhere that has mod castray weapon scripts available as the wiki one is slightly (as written) buggy. ty
  4. not worried about the code being in public. most of it came from either the forums or the wiki. i just wanted to give you a copy that uses MY source data when building the lists incase that was the problem.
  5. Just wanted you to have a copy. I'm having a problem with The lvl3 menu only getting 50% of The entries. The "Beach" category works fine. The "City" category has 2 options (not The right ones) The "WTF" & "Space" categories are empty. Any help appreciated
  6. Hi Void, i've sent you a copy of the latest version in-world. it also includes the notecards that form the menu. TY
  7. Void sorry for the late reply. would you be able to give a code snippet so i can work through it. TY
  8. Innula Zenovka wrote: What do I do if it's a more complex shape -- a pentagon for example, or even, heaven help us, a pentagram? asking the wrong guy
  9. hey again. the problem i'm now having is somewhat related to Strided List Trouble. here is the updated code. list NCnames; list type; list catagory; list scenename; list btnlvl1 = ["scene","on","off"]; list output = []; key toucherID; integer diagchan; integer Ldiag; scene_lst() { NCnames = []; integer numNC = llGetInventoryNumber(INVENTORY_NOTECARD); integer x = 0; while (x < numNC) { NCnames += llParseString2List(llGetInventoryName(INVENTORY_NOTECARD,x++),["."],[]); } integer NClstlen = llGetListLength(NCnames); integer i = 0; while (i < NClstlen) { type += llList2String(NCnames,i++); catagory += llList2String(NCnames,i++); scenename += llList2String(NCnames,i++); } } list ListUnique( list lAll ) { integer i; list lFiltered = llList2List(lAll, 0, 0); integer iAll = llGetListLength( lAll ); for (i = 1; i < iAll; ++i) { if ( llListFindList(lFiltered, llList2List(lAll, i, i) ) == -1 ) { lFiltered += llList2List(lAll, i, i); } } return lFiltered; } default { state_entry() { diagchan = -1000; Ldiag = llListen(diagchan,"","",""); scene_lst(); } touch_start(integer badtouch) { toucherID = llDetectedKey(0); llDialog(toucherID,"HI ALL",btnlvl1,diagchan); llSetTimerEvent(30); } listen(integer chan, string name, key id, string msg) { if (chan == diagchan) { integer menulvl1 = llListFindList(btnlvl1,[msg]); integer menulvl2 = llListFindList(catagory,[msg]); integer menulvl3 = llListFindList(scenename,[msg]); if (menulvl1 != -1) { if (llList2String(btnlvl1, menulvl1) == msg) { output += [msg]; llDialog(toucherID,llList2String(btnlvl1, menulvl1),ListUnique(catagory),diagchan); llSetTimerEvent(30); llSay(0,(string)llGetListLength(output)); } } else if (menulvl2 != -1) { if (llList2String(catagory, menulvl2) == msg) { output += [msg]; llDialog(toucherID,llList2String(catagory, menulvl2),ListUnique(scenename),diagchan); llSetTimerEvent(30); llSay(0,(string)llGetListLength(output)); } } else if (menulvl3 != -1) { if (llList2String(scenename, menulvl3) == msg) { output += [msg]; llSay(0,(string)llGetListLength(output)); llSay(0,llDumpList2String(output,".")); llSetTimerEvent(5); } } } } timer() { llListenRemove(Ldiag); llSetTimerEvent(0); } } notecard NAMES are in the format of scene.beach.palm tree & scene.city.hotel etc etc one of my current problems is one i've been having with another semi-related project too. it will run through the dialog sequence (lvl1 > lvl2 > lvl3 >> output) but will not run through again without resetting the script. the second problem is that the lvl3 menu is just the scenename list (i know it's coded this way ATM) i need some way of filtering it based on the output of the lvl2 menu
  10. the first level is the only command that will be the same all others can change dependant on the names of the notecards. the format of the notecard names is type.catagory.name. so scene >> beach >> water fall, will open the notecard named "scene.beach.water fall" this test else if (llList2String(catagory, menulvl2) == msg) (anything after this fails to fire or something) is supposed to test if the catagory equals the message recieved and then bring up the level 3 (name) dialog
  11. OK here is my current code. I've gone with the parallel lists but now i'm having trouble with the dialog. list NCnames;list type;list catagory;list scenename;list btnlvl1 = ["scene","on","off"];key toucherID;integer diagchan;integer Ldiag;scene_lst(){ NCnames = []; integer numNC = llGetInventoryNumber(INVENTORY_NOTECARD); integer x = 0; while (x < numNC) { NCnames += llParseString2List(llGetInventoryName(INVENTORY_NOTECARD,x++),["."],[]); } /*type = llList2ListStrided(NCnames, 0, -1, 3); catagory = llList2ListStrided(llDeleteSubList(NCnames, 0, 0), 0, -1, 3); scenename = llList2ListStrided(llDeleteSubList(NCnames, 0, 1), 0, -1, 3);*/ integer NClstlen = llGetListLength(NCnames); integer i = 0; while (i < NClstlen) { type += llList2String(NCnames,i++); catagory += llList2String(NCnames,i++); scenename += llList2String(NCnames,i++); }}list ListUnique( list lAll ) { integer i; list lFiltered = llList2List(lAll, 0, 0); integer iAll = llGetListLength( lAll ); for (i = 1; i < iAll; ++i) { if ( llListFindList(lFiltered, llList2List(lAll, i, i) ) == -1 ) { lFiltered += llList2List(lAll, i, i); } } return lFiltered;} default{ state_entry() { diagchan = -1000; Ldiag = llListen(diagchan,"","",""); scene_lst(); } touch_start(integer badtouch) { toucherID = llDetectedKey(0); llDialog(toucherID,"HI ALL",btnlvl1,diagchan); llSetTimerEvent(30); } listen(integer chan, string name, key id, string msg) { if (chan == diagchan) { integer menulvl1 = llListFindList(btnlvl1,[msg]); integer menulvl2 = llListFindList(catagory,[msg]); integer menulvl3 = llListFindList(scenename,[msg]); if (menulvl1 != -1) { if (llList2String(btnlvl1, menulvl1) == msg) { llDialog(toucherID,llList2String(btnlvl1, menulvl1),ListUnique(catagory),diagchan); //llDialog(toucherID,llList2String(btnlvl1, menulvl1),catagory,diagchan); llSetTimerEvent(30); } else if (llList2String(catagory, menulvl2) == msg) { llDialog(toucherID,llList2String(catagory, menulvl2),ListUnique(scenename),diagchan); llSay(0,llList2String(scenename,menulvl3)); llSetTimerEvent(30); } } } } timer() { llListenRemove(Ldiag); }} the part bolded is meant to bring up the last level menu and allow for the notecard to be chosen. EDIT: the formatting borked
  12. So back to original question. (sort of) this is part 1 in a much larger project. I'm making a nested dialog menu from the names of notecards in the format of "menu1.menu2.menu3" will that work with 3 parallel lists or is 1 strided recomended?
  13. ty Dora. so basically i have to do this So, to get every second element... llList2ListStrided(llDeleteSubList(src, 0, 0), 0, -1, 2)); and to get every third element... llList2ListStrided(llDeleteSubList(src, 0, 1), 0, -1, 3)); yay for not working as intended. EDIT: forgot reference to list result_a = llList2ListStrided(NCnames,0,-1,3);list result_b = llList2ListStrided(NCnames,2,-1,3);list result_c = llList2ListStrided(NCnames,3,-1,3); i was playing with the numbers trying to the the damn thig to work
  14. hey all, i'm having some problems with getting strided lists to work. what i want is record 0 >> -1 stride of 3 for top menu. 1 >> -1 stride of 3 for level 2 menu 2 >> -1 stride of 3 for final menu. the list is made up of the names of notecards in the format of "scene.city.office" & "scene.beach.palm tree" code follows list NCnames; scene_lst() { NCnames = []; integer numNC = llGetInventoryNumber(INVENTORY_NOTECARD); integer x = 0; while (x < numNC) { NCnames += llParseString2List(llGetInventoryName(INVENTORY_NOTECARD,x++),["."],[]); } } default { state_entry() { } touch_start(integer badtouch) { scene_lst(); integer lstlen = llGetListLength(NCnames); integer i = 0; list result_a = llList2ListStrided(NCnames,0,-1,2); list result_b = llList2ListStrided(NCnames,2,-1,3); list result_c = llList2ListStrided(NCnames,3,-1,3); llSay(0,llDumpList2String(result_a,"++")); llSay(0,llDumpList2String(result_b,"++")); llSay(0,llDumpList2String(result_c,"++")); //while (i < lstlen) //{ // llSay(0,(string)i + " " + llList2String(NCnames,i)); // i++; //} } } current output in chat scene++Palm Tree++beach++scene++back alley NC test: scene++scene NC test: scene++scene i'm trying to get this working first before working on the dialog bit (need something stronger than REDBULL, DR PEPPER & VODKA for that :matte-motes-big-grin:) ty in advance EDIT: do i even need to use strided lists? am i over complicating it?
  15. ty guys, forgot one question. will a prim llDie() if an Avi is sitting on it?
  16. Hey all, just a few questions. Is it possible to kill an unlinked prim if said prim has no script with llDie() in it? Can the Object_rez(key id) event pickup an object rezed in another script (same prim)? for the MLP experts is there an start param for the ~ball object, if there is is it static or dynamic? ty in advance
  17. you could probably even use a VERY popular and easy to use system that is FREE MLP
  18. @Shihan Feir see also RFC: single script multi room rental box. but i think that is where your trying to get it from
  19. ty void for the feedback. All point you made are relevant and I most likely will incorporate them. i know about the listen problem (haven't run into it yet) but this is still a WIP. the custom feeding of the TP script is so i can update it easier incase it needs changing in the future (new functions/ old ones broken). the TP script is a basic warp-pos straight from the wiki. about the llkey2name it's used in a dialog in a touch event, so unless you can touch from another region it shouldn't matter. i'm going to re-write the reset function maybe put it in another script so i have a timeout/ time limit for payment to be made before it reverts to vacant. with your suggestion for the room data string function thing could you please provide an example or something to get me started. with the unixtime to weekday is it possible to also get the day of the month. eg. Mon 14, 10:30am. ty again void edit: is there something borked with the email subscription system in the forums?
  20. hi all, what follows is my attempt at a multi room rental box using only a single script. i am asking for comments, suggestions or improvements. i know there are a few things "missing" (eg. warnings/ messages and something that happens when time runs out) these will be added soon. (once i get it clear in my mind :) ) CODE: //Variables list vacantlst = ["info","1 hour","1 day","1 week"]; list rentedlst = ["info"]; list tennantlst = ["info","Teleport","Extend"]; list LandLordlst = ["RESET","Security ON","Security Off","UPDATE"]; integer dlgchan = 666; list room_info = []; integer room; list rstatus; string status; integer lease_start; integer lease_length; integer lease_time; integer leased_room; key tennant_key; key touchy; integer locnum; string tennant; string length; key gQueryId; string gNotecard = "New"; integer gLineNum = 0; list gNotecardData; string addydata; integer startparam; string dest; key addy; integer b = 0; //Functions RESET() { integer link = 0; integer prims = llGetNumberOfPrims(); while (link <= prims) { if (link != LINK_ROOT) { llSetLinkPrimitiveParamsFast(link,[PRIM_COLOR,ALL_SIDES,<0.0,1.0,0.0>,1, PRIM_TEXT,"",ZERO_VECTOR,0, PRIM_FULLBRIGHT,ALL_SIDES,FALSE, PRIM_DESC,""]); } link++; } } string roomdata(integer room, integer index) { list pdesc = llParseString2List(llDumpList2String(llGetLinkPrimitiveParams(room,[PRIM_DESC]),""),[","],[]); return llList2String(pdesc,index); } string time(integer starttime, integer endtime) { integer futtime = starttime + endtime; string realday = llList2String( ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"], futtime % 604800 / 86400 + (futtime >> 31) ); integer realhr = (futtime % 86400) / 3600; integer realmin = (futtime % 3600)/60; string stringmin; if (realmin < 10) { stringmin = "0"+(string)realmin; } else { stringmin = (string)realmin; } string printtime = (string)realday+"::"+(string)realhr +":"+stringmin; return printtime; } default { state_entry() { llListen(dlgchan,"","",""); room_info = []; llSetTimerEvent(1.0); } timer() { integer a = 1; llSetLinkPrimitiveParams(LINK_ROOT,[PRIM_TEXT,(string)b++,ZERO_VECTOR,1]); while (a < 11) { status = roomdata(a,0); if (status == "rented") { lease_time = (integer)roomdata(a,1)+(integer)roomdata(a,2); leased_room = (integer)roomdata(a,3); if (lease_time > llGetUnixTime()) { llSetLinkColor(leased_room,<1.0,0.0,0.0>,ALL_SIDES); } else if (lease_time < llGetUnixTime()) { llSetLinkPrimitiveParamsFast(a,[PRIM_COLOR,ALL_SIDES,<0.0,1.0,0.0>,1, PRIM_TEXT,"",ZERO_VECTOR,0, PRIM_FULLBRIGHT,ALL_SIDES,FALSE, PRIM_DESC,""]); } } a++; } } touch_start(integer num_detected) { integer i; for(i = 0; i < num_detected; ++i) { room = llDetectedLinkNumber(i); rstatus = llCSV2List(llDumpList2String(llGetLinkPrimitiveParams(room,[PRIM_DESC]),"")); key tenn_key = llList2Key(rstatus,4); touchy = llDetectedKey(i); string vacantmsg = "room # " + llGetLinkName(room) + " is Available for Rent"; string rentedmsg = "Sorry this Room is UNAVAILABLE at this time. \n press the info putton to see when it will be available"; string tennantmsg = "Welcome Back. " + llKey2Name(roomdata(room,3))+ "\n Please Choose from one of the options below."; if (llDetectedLinkNumber(i) != LINK_ROOT && llDetectedLinkNumber(i) <= 10 ) { if (roomdata(room,0) == "rented" && tenn_key != llDetectedKey(i)) { llDialog(llDetectedKey(i),rentedmsg,rentedlst,dlgchan); } else if (roomdata(room,0) == "rented" && tenn_key == llDetectedKey(i)) { llDialog(llDetectedKey(i),tennantmsg,tennantlst,dlgchan); } else if (roomdata(room,0) != "rented") { llDialog(llDetectedKey(i),vacantmsg,vacantlst,dlgchan); } else if (roomdata(room,0) == "PENDING" && tenn_key == llDetectedKey(i)) { llDialog(llDetectedKey(i),"Please Right Click and Select Pay",["ok"],dlgchan); } if (roomdata(room,0) == "PENDING" && tenn_key != llDetectedKey(i)) { llDialog(llDetectedKey(i),"This Room is Awaiting Payment",["ok"],dlgchan); } } /*else if (room == LINK_ROOT) { llDialog(llDetectedKey(i),"Please Right Click and Select Pay",["ok"],dlgchan); }*/ else if (touchy == llGetOwnerKey(llGetKey())) { llDialog(llDetectedKey(i),"ADMIN AREA",LandLordlst,dlgchan); } } } listen(integer lchan, string lname, key l_id, string lmsg) { list tmp = llCSV2List(lmsg); if (lchan == dlgchan && lmsg == "1 hour") { llSetLinkPrimitiveParams(room,[PRIM_COLOR,ALL_SIDES,<1.0,0.5,0.0>,1, PRIM_DESC,"PENDING,"+(string)llGetUnixTime()+",3600"+","+(string)room+","+(string)touchy, PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); llSetPayPrice(PAY_HIDE, [10,PAY_HIDE,PAY_HIDE,PAY_HIDE]); } else if (lchan == dlgchan && lmsg == "1 day") { llSetLinkPrimitiveParams(room,[PRIM_COLOR,ALL_SIDES,<1.0,0.5,0.0>,1, PRIM_DESC,"PENDING,"+(string)llGetUnixTime()+",86400"+","+(string)room+","+(string)touchy, PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); llSetPayPrice(PAY_HIDE, [50,PAY_HIDE,PAY_HIDE,PAY_HIDE]); } else if (lchan == dlgchan && lmsg == "1 week") { llSetLinkPrimitiveParams(room,[PRIM_COLOR,ALL_SIDES,<1.0,0.5,0.0>,1, PRIM_DESC,"PENDING,"+(string)llGetUnixTime()+ ",604800"+","+(string)room+","+(string)touchy, PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); llSetPayPrice(PAY_HIDE, [100,PAY_HIDE,PAY_HIDE,PAY_HIDE]); } else if (lchan == dlgchan && lmsg == "info") { llInstantMessage(touchy,"\nStatus: " + roomdata(room,0)+ "\nRoom Number: "+llGetLinkName((integer)roomdata(room,3))+ "\nTime Ending : "+time((integer)roomdata(room,1),(integer)roomdata(room,2))+ "\nTennant: "+llKey2Name((key)roomdata(room,4))); } else if (lchan == dlgchan && lmsg == "Teleport") { integer roomnum = (integer)llGetLinkName((integer)roomdata(room,3)); llOwnerSay((string)roomnum); llMessageLinked(LINK_THIS,255,"TELE",(string)(roomnum -1)+","+llKey2Name((key)roomdata(room,4))); } else if (lchan == dlgchan && lmsg == "RESET") { RESET(); } else if (lchan == dlgchan && lmsg == "UPDATE") { llMessageLinked(LINK_ALL_OTHERS,255,"UPDATE",touchy); } if (llList2String(tmp,0) == "whereto") { list addytmp = llCSV2List(addydata); dest = llList2String(addytmp,0); addy = llList2Key(addytmp,1); llRegionSayTo(addy,-666,"change"); llWhisper(startparam,"goto,"+dest); } } money(key id, integer amount) { if (id == (key)roomdata(room,4) && roomdata(room,0) == "PENDING") { if (roomdata(room,2) == "604800" && amount == 100) { llSetLinkPrimitiveParams(room,[PRIM_COLOR,ALL_SIDES,<1.0,0.0,0.0>,1, PRIM_DESC,"rented,"+(string)llGetUnixTime()+ ",604800"+","+(string)room+","+(string)touchy, PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); } else if (roomdata(room,2) == "3600" && amount == 10) { llSetLinkPrimitiveParams(room,[PRIM_COLOR,ALL_SIDES,<1.0,0.0,0.0>,1, PRIM_DESC,"rented,"+(string)llGetUnixTime()+ ",3600"+","+(string)room+","+(string)touchy, PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); } else if (roomdata(room,2) == "86400" && amount == 50) { llSetLinkPrimitiveParams(room,[PRIM_COLOR,ALL_SIDES,<1.0,0.0,0.0>,1, PRIM_DESC,"rented,"+(string)llGetUnixTime()+ ",86400"+","+(string)room+","+(string)touchy, PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); } } } link_message(integer sender, integer num, string msg, key id) { if (msg == "TELE") { //llSetColor(<1.0,0.0,0.0>,ALL_SIDES); startparam = llGetUnixTime(); llListen(startparam,"~~TPSEAT","",""); list incdata = llCSV2List(id); locnum = llList2Integer(incdata,0); tennant = llList2String(incdata,1); gQueryId = llGetNotecardLine(gNotecard, locnum); } else if (msg == "PORT") { llRezObject("~~TPSEAT",llGetPos()+<-1.5,0.0,-1.0>,ZERO_VECTOR,ZERO_ROTATION,startparam); } } dataserver(key lqueryID, string ldata) { if (gQueryId == lqueryID) { if (ldata != EOF) { addydata = ldata; //llOwnerSay(ldata); llMessageLinked(LINK_SET,255,"PORT",""); } } } object_rez(key id) { llListen(startparam,"~~TPSEAT", id, ""); llRemoteLoadScriptPin(id, "TeleScript", startparam, TRUE, startparam); } }here are some images of the construction. each of the squares is a separate prim. this is VACANT Payment PENDING Room OCCUPIED info stored in desc field
  21. if they are static/ non changing. YES (though technically not a Variable) OR if they are stored in a central loocation(website, server prim) and you have some sort of communication to update the "children". OR the variables change based on a set pattern at a set interval.
  22. the easiest, cheapest & nastiest way is just to have a blade out & a blade in and switch the alpha on/off. like a gun holster. my .02L$
  23. i would check out the sections in the wiki on Message Linked & Listen. they should give you a bit of a start.
×
×
  • Create New...