Jump to content

Devone Carter

Resident
  • Posts

    19
  • Joined

  • Last visited

Reputation

1 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. i managed to whip up a quick example using llgetboundingbox, was hoping to retreive all object uuids on myland without using a sensor, the purpose of this is to prevent greifers from rezzing huge prims at my business, without the need of me disabling anyone can build here. string TargetObject = "devone"; key UUID; default { state_entry() { llSensor(TargetObject, "", ACTIVE | PASSIVE, 20, PI); } sensor(integer n) { UUID = llDetectedKey(0); llSetTimerEvent(5); } timer() { list box = llGetBoundingBox(UUID); vector size = llList2Vector(box, 1) - llList2Vector(box, 0); float X = size.x; float Y = size.y; float Z = size.z; if (size.z > 10 | size.y > 10 | size.x > 10) { llSay(0,"please dont rez megaprims on my land, me no like."); } } }
  2. hello, is thier a way i can check all parcelprimowners on my land and ensure they have rezzed nothing over 10m in size?
  3. default { attach(key id) { if (id) llPlaySound(llGetInventoryName(INVENTORY_SOUND, 0 ), 1.0); } }
  4. hello, i have 3 scripts i want to run in order, i dont want to merge them into a single script because its less confusing to make sence of this way, to me anyway llMessageLinked(LINK_THIS, 0, "groupcheck", ""); i know how to send a message to other scripts in the prim, but question is how do i only listen for messages from scripts also in this prim? other prims are running the same scripts and i dont want them interfering
  5. i see one of the problems so im sitting on linknumber2 my friends sitting on linknumber3 he stands up im presented with the captcha menu again obviusly because thiers been a link change and linknumber2 still isnt blank because im still sitting thier which is why its happening but even tho i know that what can i possibly do about it hmm ??? changed(integer change) { if ((change & CHANGED_LINK) == CHANGED_LINK) { if (llAvatarOnLinkSitTarget(2) != NULL_KEY) { list randomizedList; randomizedList =llList2List(llListRandomize(menu_choices,0),0,8); menu(llAvatarOnLinkSitTarget(2),"\n \nTo earn you must select the word shown in\nyellow floating text from the buttons below.\n \nYou have 15 seconds to select an answer.",randomizedList); randomizedList = llListRandomize(randomizedList, 0); randomWord = llList2String(randomizedList, 0); llSetText(randomWord, <1,1,0>, 1.0); } if (llAvatarOnLinkSitTarget(2) == NULL_KEY) { { clean(); llSetText("Camp", <1,1,1>, 0.6); }}
  6. thanks i managed to do what i want, now i got new problems i have a peice of furniture with 3 poeballs linked, they all contain the same scripts and its causing them to interfere, for example im sitting on 1 poseball ive already answered the captcha successfully, then another person sits down besides me... and its giving me the captcha question again. i got this issue with multiple scripts not just the captcha one, i beleive its to do with this line and llAvatarOnSitTarget() if ((change & CHANGED_LINK) == 2) < linknumber possibly changes when i sit down? if ((change & CHANGED_LINK) == CHANGED_LINK) dont matter what i try i cant seem to make it work the way it should how do other furniture makers manage hmm *EDIT* 5 hours later & i just discovered "llAvatarOnLinkSitTarget" dunno if it`ll be the answer to all my problems yet tho we`ll see nope still happening
  7. please help, im stuck i wanted to make a captcha at the moment it dont realy work because too many buttons causes the script to crash but thats alright. heres the problem when a person sits i wanted to pick 9 random words from the menu_choices and display it on the menu < i dunno how then display 1 random word as yellow floating text then the user must choose the correct word otherwise they unsat integer menu_channel; integer menu_handler; list menu_choices = ["SOAK","GALAXY","PAWS","FOOT","HOWL","BIKE","COMET","SUGAR","DINO","SUN","SOAK","MOON","CANDY","STAR","BIRD","DOG","CAR","CAT","BOAT","SHOE","TRUCK","BARK", "FLOAT","BOOT","SWEET","OWL","STARS","COMET","BIKE","DINO"]; menu(key user,string title,list buttons) { clean(); menu_channel = (integer)(llFrand(99999.0) * -1); menu_handler = llListen(menu_channel,"",user,""); llDialog(user,title,buttons,menu_channel); llSetTimerEvent(15.0); } clean() { llSetTimerEvent(0.0); llListenRemove(menu_handler); } default { listen(integer channel, string name, key id, string message) { } timer() { llSetTimerEvent(0.0); clean(); } changed(integer change) { if(change & CHANGED_LINK) { if (llAvatarOnSitTarget() != NULL_KEY) { list randomizedList; randomizedList = llListRandomize(menu_choices, 0); menu(llAvatarOnSitTarget(),"\n \nTo earn you must select the word shown in\nyellow floating text from the buttons below.\n \nYou have 15 seconds to select an answer.",randomizedList); } } } }
  8. Hi, i have a question im aware you can retreive the linknumber of an object if it consists of several prims linked together. but what about 'coalesced items' is thier anyway to tell the order in which i picked them up? - the annoying thing is.. if i go into edit mode, rez my coalesced item... then pick it up again it doesnt always work as it should So instead i have to keep it all selected, unselect the root prim, select it again then pick it up. and sometimes that works great :) but unfortunatly not 100% of the time so i have to do it the hard way & figure out the order in which i picked each item up is this even possible please advise
  9. ok i got it http_request_id = llHTTPRequest(linkurl,[HTTP_BODY_MAXLENGTH, 16384], ""); why aint this done by default? is thier a downside to having a larger maxlength?
  10. hi, i got a list of 99 stations but for some reason it only displays 52 on the menu, what is the problem? if the list was to large the script would break wouldnt it maybe thiers a http responce character limit?, i dunno hmm integer cmd_channel = 3; integer radio_channel; integer stationcount; list _radioURLs; list _radioStations; integer _linenum = 0; string linkurl = "http://pastebin.com/raw.php?i=Mpjgn3zw"; //----------------------- string http_request_id; key theuser; //---------- integer gMenuPosition; // Index number of the first button on the current page integer gLsn; // Dialog Listen Handle Menu() { integer Last; list Buttons; integer All = llGetListLength(_radioStations); if(gMenuPosition >= 9) //This is NOT the first menu page { Buttons += " <----"; if((All - gMenuPosition) > 11) // This is not the last page { Buttons += " ---->"; } else // This IS the last page { Last = TRUE; } } else if (All > gMenuPosition+9) // This IS the first page { if((All - gMenuPosition) > 11) // There are more pages to follow { Buttons += " ---->"; } else // This IS the last page { Last = TRUE; } } if (All > 0) { integer b; integer len = llGetListLength(Buttons); // This bizarre test does the important work ...... for(b = gMenuPosition + len + Last - 1 ; (len < 12)&&(b < All); ++b) { Buttons = Buttons + [llList2String(_radioStations,b)]; len = llGetListLength(Buttons); } } radio_channel = (integer)(llFrand(99999.0) * -1); gLsn = llListen(radio_channel,"","",""); llSetTimerEvent(60.0); llDialog(theuser," ",Buttons,radio_channel); } //---------- get_stations() { http_request_id = llHTTPRequest(linkurl, [], ""); } add_station(string line) { list words = llParseString2List(line, [" ", " ", "="], []); if (llGetListLength(words) < 2) { return; } string url = llList2String(words, llGetListLength(words) - 1); string station = ""; integer i; for (i=0; i<llGetListLength(words) - 1; i++) { if (llStringLength(station) > 0) { station += " "; } station += llList2String(words, i); } stationcount = stationcount + 1; _radioURLs += [url]; _radioStations += [station]; } call_radio() { if (stationcount == 0) { get_stations(); } if (stationcount != 0) { Menu(); } } list shrink(list in) { list out; integer i; integer j = llGetListLength(in); for (; i < j; i++) { out += llGetSubString( llList2String(in,i), 0, 23);// V1.1 longer names } return out; } //----------------------- default { on_rez(integer start_param) { llResetScript(); } state_entry() { stationcount = 0; _radioURLs = [ "" ]; _linenum = 0; llListen(cmd_channel,"","",""); } touch_start(integer touchNumber) { theuser = llDetectedKey(0); call_radio(); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == http_request_id) { integer i; list lbody=llParseString2List(body,["\n"],[]); integer count=llGetListLength(lbody); //This turns newline characters char(10) into new lines in chat //These are Unix/LSL style end of lines, use \r\n in place of \n for // Windows style end of line from web server. for(i=0;i<count;i++) { //llSay(0,body); add_station(llList2String(lbody,i)); } llListenRemove(gLsn); _radioStations = shrink(_radioStations); gMenuPosition = 0; Menu(); } } listen(integer channel, string name, key id, string msg) { if (channel == cmd_channel && llToLower(msg) == "radio") { theuser = id; call_radio(); } if (channel == radio_channel) { if (~llSubStringIndex(msg,"---->")) { gMenuPosition += 10; Menu(); } else if (~llSubStringIndex(msg,"<----")) { gMenuPosition -= 10; Menu(); } else { llListenRemove(gLsn); llSetTimerEvent(0.0); string newURL = llList2String(_radioURLs, llListFindList(_radioStations, [msg])); llSetParcelMusicURL(newURL); llSay(0, msg + " ---> " + newURL); } } } timer() { llSetTimerEvent(0.0); llListenRemove(gLsn); } }
  11. cheers, problem occurs again if you only have 11 items in the list
  12. hi, this code is from the lsl library section, i spotted a problem, can anybody help fix it, it works fine until thiers 21 items in the list i`ll take pics to show you. list gNames = ["1","2","3","4","5","6","7", "8","9","10","11","12","13","14","15","16","17","18", "19","20","21"]; this is the second page when thiers twenty one items in the list, thier shouldnt be a >>> button http://s10.postimg.org/rpqxxw8w9/image.jpg so we have a third page which is blank http://s29.postimg.org/xenx81c6f/3page21.jpg // Simple Multipage Menu -- Rolig Loon -- August 2013 // The Menu routine in this script will parse your input list (gNames) into menu pages // of 12 buttons each, including a forward button and a back button, as appropriate. // It generates a page's buttons on demand, so that the list of button labels is // never more than 12 items long. // It does NOT trim potential menu items to fit the 25-character limit (or the // 12-character display limit), nor does it sort buttons or do other fancy things // that you are free to add for yourself. list gNames = ["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"]; // Your list of potential menu choices integer gMenuPosition; // Index number of the first button on the current page integer gLsn; // Dialog Listen Handle Menu() { integer Last; list Buttons; integer All = llGetListLength(gNames); if(gMenuPosition >= 9) //This is NOT the first menu page { Buttons += " <----"; } if (All > gMenuPosition+9) //If there are menu pages beyond this one .... { Buttons += " ---->"; } else // This is the last menu page { Last = TRUE; } if (All > 0) { integer b; integer len = llGetListLength(Buttons); // This bizarre test does the important work ...... for(b = gMenuPosition + len + Last - 1 ; (len < 12)&&(b < All); ++b) { Buttons = Buttons + [llList2String(gNames,b)]; len = llGetListLength(Buttons); } } gLsn = llListen(-12345,"","",""); llSetTimerEvent(10.0); llDialog(llGetOwner()," \n",Buttons,-12345); } default { touch_start(integer num) { llListenRemove(gLsn); gMenuPosition = 0; Menu(); } listen(integer channel, string name, key id, string msg) { llListenRemove(gLsn); llSetTimerEvent(0.0); if (~llSubStringIndex(msg,"---->")) { gMenuPosition += 10; Menu(); } else if (~llSubStringIndex(msg,"<----")) { gMenuPosition -= 10; Menu(); } else { //Do whatever the selected button directs..... your choice } } timer() { llSetTimerEvent(0.0); llListenRemove(gLsn); } }
  13. thier seems to be an unnessacery blank third page, if you have 21 items in the list.. not sure how to fix
  14. i used your second snippet of code, i had to change llGetUsername(i) back to llDetectedName otherwise i couldnt get it to compile.. it was causing "function call mismatches type or number of arguments" i also couldnt use GetPPicID because GetPPicID = GetProfilePic(llList2Key(detected,counter)); was causing "Type mismatch" so i had to comment out things like if (req == GetPPicID ) anyway with all that said i got it to work in the end the main problem is if i set showowner to 0, false - then the gadget stops working altogether if im nearby. because of the return; it doesnt skip me and carry on with the other names it may have detected in the scan, aslong as im present it refuses to check anybody else
×
×
  • Create New...