Jump to content

Xiija

Resident
  • Posts

    912
  • Joined

  • Last visited

Everything posted by Xiija

  1. The annual BurningMan festival is open now in SL!...Only 4 days left! http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/247/61/24 Come check out the live music, dancing, free gifts..... make new friends, ride the rides, and get in the groove! for chat & info, search BurningMan 2.0 in groups, ...free to join! please descript.... As Much As Possible.....kill the Lag!
  2. The annual BurningMan festival is open now in SL! http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/247/61/24 Come check out the live music, dancing, free gifts..... make new friends, ride the rides, and get in the groove! for chat & info, search BurningMan 2.0 in groups, ...free to join! please descript.... As Much As Possible.....kill the Lag!
  3. make a list of the numbers to change- get the list length- for each member of the list, do a texture change- ----------------------------------------------------------- list myPrims = [1,3,5,7,9]; integer n; integer length = llGetListLength(myPrims); for(;n < length;++n) { llSetLinkPrimitiveParamsFast( llList2Integer(myPrims,n) [PRIM_TEXTURE, ALL_SIDES, "4d304955-2b01-c6c6-f545-c1ae1e618288", <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]); } ?
  4. the global variable Leprekhaun mentioned should work, integer count; ---------- and in your touch event....---- touch_start(integer n) { ++count; if( count < 6) { llGiveInventory(llDetectedKey(0),"sandwich"); } else { llDie(); } }
  5. make an init() function ? on_rez eats the first call to attatch...so it will only fire on detatch //********************************* init() { llResetScript(); } integer k; string sound="wind_up"; default { on_rez(integer st) { linit(); } attach(key id) { init(); } state_entry() { llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION); } run_time_permissions(integer perm) { if(perm & PERMISSION_TRIGGER_ANIMATION) { llStartAnimation("hold"); } } touch_start(integer detected) { k = !k; if (k) {llStopAnimation("hold"); llStartAnimation("shake"); llLoopSound(sound, 0.5);llTargetOmega(<3,0,0>,PI,1.0); } else { llStopAnimation("shake");;llStopSound(); llStartAnimation("hold"); llTargetOmega(<0,0,0>,PI,1.0);} } } //************************* ..or something like that?
  6. Burn2 opens to the public at noon SLT Saturday, October 19. . Come see the amazing builds, enjoy the free rides and tours, and get tons of free gifts! Be a part of Burning Man at the SecondLife Burning man Regional...Burn2 ! Please descript as much as possible to help stamp out LAG! http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/247/61/24
  7. You could make an init() user function, and set both state_entry() { init(); } on_rez() { init(); } and in the init() ... put if(llGetAttached() { // do stuff }
  8. Burn2 opens to the public at noon SLT Saturday, October 19. . Come see the amazing builds, enjoy the free rides and tours, and get tons of free gifts! Be a part of Burning Man at the SecondLife Burning man Regional...Burn2 ! Please descript as much as possible to help stamp out LAG! http://maps.secondlife.com/secondlife/Burning%20Man-%20Deep%20Hole/247/61/24
  9. Xiija

    Tip Jar Script

    http://www.free-lsl-scripts.com/cgi/freescripts.plx?ID=898
  10. use llJson2List ....? state_entry() { purch = llList2Json( JSON_ARRAY, [] ); info = llList2Json (JSON_OBJECT, [ "Purchases", purch ] ); Customers = llList2Json( JSON_OBJECT, [] ); } touch_end( integer num) { name = llDetectedName(0); if (llJsonGetValue (Customers, [name] ) == JSON_INVALID) { Customers = llJsonSetValue (Customers, [name], info); } } ----------- > list purchased = llJson2List (llJsonGetValue (Customers, [name, "Purchases"])); integer length = llGetListLength (purchased)
  11. http://wiki.secondlife.com/wiki/PRIM_PHYSICS_SHAPE_TYPE llSetLinkPrimitiveParamsFast( LINK_ALL_OTHERS, PRIM_PHYSICS_SHAPE_TYPE , PRIM_PHYSICS_SHAPE_NONE ]); you could put this script in the root, and change the linkset and then go back and change only the 3 you need solid with llSetLinkPrimitiveParamsFast( 3, // this will change link number 3...make a loop / list to do more than one PRIM_PHYSICS_SHAPE_TYPE , PRIM_PHYSICS_SHAPE_CONVEX ]); ...root prim has to have a shape of PRIM or CONVEX tho
  12. can you use pathfinding at all? would it be possible to make a pathfinding charcater and have an object follow it? http://wiki.secondlife.com/wiki/LlPatrolPoints
  13. Looking for any suggestions on how to improve this code.... http://community.secondlife.com/t5/LSL-Library/RADIO-JSON-Notecard-reader-with-pagination/m-p/2228961#M732 TY for any help :)
  14. Looking for any suggestions on how to improve this code.... http://community.secondlife.com/t5/LSL-Library/RADIO-JSON-Notecard-reader-with-pagination/m-p/2228961#M732 TY for any help :)
  15. a test of JSON, with pagination code by Void Singer(modified) seems to work okay, but could use some beta testers. Any suggestions welcome :) - for more than one radio in the same area...., please change the channel number :) stations in notecard use the format: Birdsong = http://stardust.wavestreamer.com:8062 Techno = http://81.88.36.42:8010 etc.. /* JSON Notecard Reader RADIO with pagination - by Xiija Dialog code by Void Singer (modified) - http://community.secondlife.com/t5/LSL-Library/Dynamic-Multi-page-Dialog-AKA-Pagination/td-p/708119 */ string Stations; string info; string name; string url; string NC; string TuneIn; key kQuery; integer iLine; integer len; string Curr; list gLstMnu; string txt; key id; integer chan = -222; integer handle; integer idx; list uDlgBtnLst( integer vIdxPag ) { list vLstRtn; if ((gLstMnu != []) > 9) { integer vIntTtl = -~((~([] != gLstMnu)) / 9); //-- Total possible pages integer vIdxBgn = (vIdxPag = (vIntTtl + vIdxPag) % vIntTtl) * 9; //-- first menu index string vStrPag = llGetSubString( " ", 21 - vIdxPag, 21 ); //-- encode page number as spaces vLstRtn = llListInsertList( llList2List( gLstMnu, vIdxBgn, vIdxBgn + 8 ), (list)(" «" + vStrPag), vIdxBgn + 9 ) + "OFF/CLOSE" + (list)(" »" + vStrPag); } else { vLstRtn = gLstMnu + [" ", "OFF/CLOSE"," "] ; } return //-- fix the order for [L2R,T2B] and send it out llList2List( vLstRtn, -3, -1 ) + llList2List( vLstRtn, -6, -4 ) + llList2List( vLstRtn, -9, -7 ) + llList2List( vLstRtn, -12, -10 ); } init() { NC = llGetInventoryName(INVENTORY_NOTECARD,0); info = llList2Json (JSON_OBJECT, [ "URL", JSON_NULL ] ); Stations = llList2Json( JSON_OBJECT, [] ); llSay(0,"Stations Loading....."); kQuery = llGetNotecardLine(NC, iLine); txt = "\n \nRadio Menu\n" + "\nOff - turns off radio" + "\nCLOSE - closes this menu\n" + " \n Currently listening to " + "\n " + Curr; } default { state_entry() { init(); } on_rez(integer param) { init(); } touch_start(integer total_number) { id = llDetectedKey(0); llDialog( id, txt, uDlgBtnLst( 0 ), chan ); handle = llListen(-222,"","",""); llListenControl(handle, TRUE); llSetTimerEvent(20); } dataserver(key query_id, string data) { if (query_id == kQuery) { if (data == EOF) { iLine = 0; llSay(0,"Stations Loaded"); list details = llJson2List ( Stations ); details = llList2ListStrided(details,0,-1,2); gLstMnu = details; } else { if(data != "") { list extract = llParseString2List(data,[" "],["="]); name = llList2String(extract, 0); name = llGetSubString(name, 0, 23) ; url = llList2String(extract, 2); if (llJsonGetValue (Stations, [name] ) == JSON_INVALID) { Stations = llJsonSetValue (Stations, [name], info); Stations = llJsonSetValue (Stations, [name, "URL"], url); } } ++iLine; kQuery = llGetNotecardLine(NC, iLine); } } } listen( integer vIntChn, string vStrNom, key vKeySpk, string vStrMsg ) { if (!llSubStringIndex( vStrMsg, " " )) { llDialog( vKeySpk, txt, uDlgBtnLst( llStringLength( vStrMsg ) + llSubStringIndex( vStrMsg, "»" ) - 2 ), vIntChn ); llSetTimerEvent(20); } else if (vStrMsg == "OFF/CLOSE") { llDialog( vKeySpk, "\n \nPick an option...",["OFF","CLOSE"], vIntChn );} else if (vStrMsg == "CLOSE") { llSetTimerEvent(0.5);} else if (vStrMsg == "OFF") { llSetParcelMusicURL(" "); llSay(0,"Turning Radio off... " ); llSetTimerEvent(0.5); } else { Curr = vStrMsg; txt = "\n \nRadio Menu\n" + "\nOff - turns off radio" + "\nCLOSE - closes this menu\n" + " \n Currently listening to " + "\n " + Curr; llSay(0,"Tuning in to... " + vStrMsg ); TuneIn = llJsonGetValue (Stations, [vStrMsg, "URL"]) ; llSetParcelMusicURL(TuneIn); idx = llListFindList( gLstMnu, (list)vStrMsg ) / 9; llDialog( id, txt, uDlgBtnLst(idx ), chan ); llSetTimerEvent(20); } } timer() { llListenControl(handle, FALSE); llSetTimerEvent(0); } changed(integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } }
  16. a test of JSON, with pagination code by Void Singer(modified) seems to work okay, but could use some beta testers. Any suggestions welcome :) - for more than one radio in the same area...., please change the channel number :) stations in notecard use the format: Birdsong = http://stardust.wavestreamer.com:8062 Techno = http://81.88.36.42:8010 etc.. /* JSON Notecard Reader RADIO with pagination - by Xiija Dialog code by Void Singer (modified) - http://community.secondlife.com/t5/LSL-Library/Dynamic-Multi-page-Dialog-AKA-Pagination/td-p/708119 */ string Stations; string info; string name; string url; string NC; string TuneIn; key kQuery; integer iLine; integer len; string Curr; list gLstMnu; string txt; key id; integer chan = -222; integer handle; integer idx; list uDlgBtnLst( integer vIdxPag ) { list vLstRtn; if ((gLstMnu != []) > 9) { integer vIntTtl = -~((~([] != gLstMnu)) / 9); //-- Total possible pages integer vIdxBgn = (vIdxPag = (vIntTtl + vIdxPag) % vIntTtl) * 9; //-- first menu index string vStrPag = llGetSubString( " ", 21 - vIdxPag, 21 ); //-- encode page number as spaces vLstRtn = llListInsertList( llList2List( gLstMnu, vIdxBgn, vIdxBgn + 8 ), (list)(" «" + vStrPag), vIdxBgn + 9 ) + "OFF/CLOSE" + (list)(" »" + vStrPag); } else { vLstRtn = gLstMnu + [" ", "OFF/CLOSE"," "] ; } return //-- fix the order for [L2R,T2B] and send it out llList2List( vLstRtn, -3, -1 ) + llList2List( vLstRtn, -6, -4 ) + llList2List( vLstRtn, -9, -7 ) + llList2List( vLstRtn, -12, -10 ); } init() { NC = llGetInventoryName(INVENTORY_NOTECARD,0); info = llList2Json (JSON_OBJECT, [ "URL", JSON_NULL ] ); Stations = llList2Json( JSON_OBJECT, [] ); llSay(0,"Stations Loading....."); kQuery = llGetNotecardLine(NC, iLine); txt = "\n \nRadio Menu\n" + "\nOff - turns off radio" + "\nCLOSE - closes this menu\n" + " \n Currently listening to " + "\n " + Curr; } default { state_entry() { init(); } on_rez(integer param) { init(); } touch_start(integer total_number) { id = llDetectedKey(0); llDialog( id, txt, uDlgBtnLst( 0 ), chan ); handle = llListen(-222,"","",""); llListenControl(handle, TRUE); llSetTimerEvent(20); } dataserver(key query_id, string data) { if (query_id == kQuery) { if (data == EOF) { iLine = 0; llSay(0,"Stations Loaded"); list details = llJson2List ( Stations ); details = llList2ListStrided(details,0,-1,2); gLstMnu = details; } else { if(data != "") { list extract = llParseString2List(data,[" "],["="]); name = llList2String(extract, 0); name = llGetSubString(name, 0, 23) ; url = llList2String(extract, 2); if (llJsonGetValue (Stations, [name] ) == JSON_INVALID) { Stations = llJsonSetValue (Stations, [name], info); Stations = llJsonSetValue (Stations, [name, "URL"], url); } } ++iLine; kQuery = llGetNotecardLine(NC, iLine); } } } listen( integer vIntChn, string vStrNom, key vKeySpk, string vStrMsg ) { if (!llSubStringIndex( vStrMsg, " " )) { llDialog( vKeySpk, txt, uDlgBtnLst( llStringLength( vStrMsg ) + llSubStringIndex( vStrMsg, "»" ) - 2 ), vIntChn ); llSetTimerEvent(20); } else if (vStrMsg == "OFF/CLOSE") { llDialog( vKeySpk, "\n \nPick an option...",["OFF","CLOSE"], vIntChn );} else if (vStrMsg == "CLOSE") { llSetTimerEvent(0.5);} else if (vStrMsg == "OFF") { llSetParcelMusicURL(" "); llSay(0,"Turning Radio off... " ); llSetTimerEvent(0.5); } else { Curr = vStrMsg; txt = "\n \nRadio Menu\n" + "\nOff - turns off radio" + "\nCLOSE - closes this menu\n" + " \n Currently listening to " + "\n " + Curr; llSay(0,"Tuning in to... " + vStrMsg ); TuneIn = llJsonGetValue (Stations, [vStrMsg, "URL"]) ; llSetParcelMusicURL(TuneIn); idx = llListFindList( gLstMnu, (list)vStrMsg ) / 9; llDialog( id, txt, uDlgBtnLst(idx ), chan ); llSetTimerEvent(20); } } timer() { llListenControl(handle, FALSE); llSetTimerEvent(0); } changed(integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } }
  17. Black tulip has some... https://marketplace.secondlife.com/stores/42594
  18. ✿✿✿ S.L.R.D.A. Roller Derby Championship Bout ! ✿✿✿ JawBreakers vs M. Inc Riot Bitches Sunday, Sept 8th - 6PM SLT http://maps.secondlife.com/secondlife/Larsen/5/153/1578 ✿ PLEASE descript your avi to 15 scripts or less. ~ this bout may be video recorded, by attending you agree to possibly being on the video :)
  19. ✿✿✿ S.L.R.D.A. Roller Derby Championship Bout ! ✿✿✿ JawBreakers vs M. Inc Riot Bitches Sunday, Sept 8th - 6PM SLT http://maps.secondlife.com/secondlife/Larsen/5/153/1578 ✿ PLEASE descript your avi to 15 scripts or less. ~ this bout may be video recorded, by attending you agree to possibly being on the video :)
  20. There are weekly raffle boards on some *Chung sims that check your profile pics for thier Sim before allowing you to enter the raffle...? Seems like this would be easy to do, just need to do offsite data processing since the response body is limited to 2048 bytes in lsl http request. ...the picks page is plain text. key id = llDetectedKey(0); string URL_PICKS = "http://world.secondlife.com/resident/" + (string)id + "/picks";
  21. list payTemp;default{ state_entry() { llSetPayPrice(PAY_HIDE,[]); payTemp = [25,50,75,100]; } touch(integer num_detected) { llSetPayPrice(PAY_DEFAULT,payTemp); } money(key id, integer amt) { } }
  22. TYSM again LK....took your advice and it's working good now one thing.... does Json return info in a random order? i'm using this, and it works fine, but the info seems to come randomly, i.e. data is defined and added in this order- avatarkey, Rezday, Status, Purchases but is returned with this function in this order: Purchases,Rrezday, Status, avatarkey it's not affecting anything, just odd... getInfo(string person){ list details = llJson2List (llJsonGetValue (Customers,[person]) ); list fields = llList2ListStrided (details, 0, -1, 2); integer len = llGetListLength(fields); integer x; for(;x < len;++x) { string tmp = llList2String(fields,x); llOwnerSay(tmp + " : " + llJsonGetValue (Customers, [person, tmp]) ); }} ETA changed the object names and found out why, Json returns them alphabetically, with capitals coming before lowercase objects i.e. Apple, Bat, Car, animal , bike ... etc .... numbering objexts will return them in order i.e. customerInfo = { "01 avatarKey": 'null', // these "Key"s are as written "02 Rezday": 'null', "03 Online": 'null', "03.5 Date of First Purchase": 'null', // doesn't matter where in the listing this is added "04 Purchases": [] }
  23. integer listenHandle; default { state_entry() { listenHandle = llListen(0, "", "", ""); } listen(integer channel, string name, key id, string msg) { if(llToLower(msg) == "on") { llSetTimerEvent(120); } // 2 minutes = 120 seconds } timer() { llSay(0,"off"); llSetTimerEvent(0); } }
  24. sorry, one more question.... how do you add an object? i'm testing this code, but not sure it's right.. /* Based on JSON array forum example by Dora Gustafson, Studio Dora 2013 Building an 3 by 5 array in a JSON Object Rows are indexed by name and columns are indexed by number = 0,1,2,3,4*/string Customers;tellInfo( string person){ string Js = llJsonGetValue( Customers, [person]); list Jl = llParseString2List( Js,[",","[","]","\""],[]); string output = llDumpList2String( Jl, ", "); llOwnerSay( "\nRecords from "+person+" are: "+output);}key BORNquery;key ONquery;string purch;string info;string name;key id;list newCust;integer x;default{ state_entry() { purch = llList2Json( JSON_ARRAY, ["purchases: "] ); info = llList2Json( JSON_ARRAY, ["blank_key","blank_rezday","blank_online",purch ]); Customers = llList2Json( JSON_OBJECT, [] ); } touch_end( integer num) { ++x; id = llDetectedKey(0); name = llDetectedName(0); if (!~llListFindList(newCust,[name])) { newCust += name; llOwnerSay("\nAdding: " + name ); Customers += llList2Json( JSON_OBJECT, [name, info] ); //is this how to add an object? tellInfo(name); Customers = llJsonSetValue( Customers, [name,0] , id); tellInfo(name); BORNquery = llRequestAgentData(id, DATA_BORN ); ONquery = llRequestAgentData(id, DATA_ONLINE ); llOwnerSay("\ncustomers " + Customers); tellInfo(name); } if(x == 2) { Customers = llJsonSetValue( Customers,[name,3,JSON_APPEND], "cat"); tellInfo(name); } if(x == 3) { Customers = llJsonSetValue( Customers,[name,3,JSON_APPEND], "dog"); tellInfo(name); string bought = llJsonGetValue( Customers, [name,3]); list pets = llParseString2List( bought,[",","[","]","\""],[]); string output = llDumpList2String( pets, ", "); llOwnerSay( "\nAnimals bought by "+name+" are: "+output); } } dataserver(key queryid, string data) { if ( queryid == BORNquery ) { Customers = llJsonSetValue( Customers, [name, 1] , data); tellInfo(name); } if ( queryid == ONquery ) { string status; if(data == (string)0) {status = "Offline";} if(data == (string)1) {status = "Online";} Customers = llJsonSetValue( Customers, [name, 2] , status); tellInfo(name); } }}
×
×
  • Create New...