Jump to content

Xiija

Resident
  • Content Count

    656
  • Joined

  • Last visited

Community Reputation

172 Excellent

2 Followers

About Xiija

  • Rank
    Lotus Eater

Recent Profile Visitors

951 profile views
  1. If you drop this in the cylinder, it should rotate only the cylinder? default { state_entry() { llSetLinkPrimitiveParamsFast(LINK_THIS, [ PRIM_OMEGA ,<0.0, 0.0, 1.0>*llGetRot(), 0.1, 0.01 ]); } } you may need to stop the spin in the root, if that is where your spin is coming from? just add this line to state entry in the root: llTargetOmega(ZERO_VECTOR, 0, 0);
  2. llSetRot( llEuler2Rot( (<0,0,90>*DEG_TO_RAD) ));
  3. You could cheat a bit.... llSound("SoundName1",1.0,TRUE,TRUE); llLoopSound("SoundName2", 1.0);
  4. I recently got to play around with these... we tried tp, coms, and url persistence .. very handy ! I only got to test because a friend has premium, otherwise i'd never have a chance. It would be nice if every account got at least 1 key-val to use outside of experiences.. oh well
  5. menbbe using SLPPF ... SetLinkPrimitiveParamsFast . with the LINK_THIS flag? it's hard to answer with such a vague question
  6. Mebbe like a vendor system, once you click a generator, it is "in use" and no one else can click it till it is done, and once a person has clicked one, it sends a msg to all other generators that this person is already using another generator in the system?
  7. for a temp fix, you could hack the end of the borken JSOn ? key XMLRequest; default { state_entry() { } touch_start(integer total_number) { llOwnerSay("Sending HTTP Request, ..."); string tail = "Malachi 3:2"; // "joshua1:9"; // Malachi 3:2 tail = llEscapeURL(tail); string URL = "http://bible-api.com/"; XMLRequest = llHTTPRequest( URL + tail , [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE, "application/json;charset=utf-8", // "text/plain;charset= CP-1252", ISO-8859-1, utf-8 HTTP_BODY_MAXLENGTH,16384, HTTP_PRAGMA_NO_CACHE,TRUE], ""); } http_response(key k,integer status, list meta, string body) { if(k == XMLRequest) { if(status != 200) { llOwnerSay("\nRrror code : " + (string)status); return; } else { body = llDeleteSubString(body, -5, -1); // ***hack off end, ** body = body + "\":'non'}"; // ***and add json ending tag*** llOwnerSay("\nVerse: \n" + llJsonGetValue( body, ["text"]) ); } } } }
  8. I did a fake json file to test functionality.. works ok, so it's all on the API dood key XMLRequest; default { state_entry() { } touch_start(integer total_number) { llOwnerSay("Sending HTTP Request, ..."); string URL2 = "https://my-json-server.typicode.com/Xiija/FakeDB/db"; XMLRequest = llHTTPRequest( URL2 , [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE, "application/json;charset=utf-8", HTTP_BODY_MAXLENGTH,16384, HTTP_PRAGMA_NO_CACHE,TRUE], ""); } http_response(key k,integer status, list meta, string body) { if(k == XMLRequest) { if(status != 200) { llOwnerSay("\nRrror code : " + (string)status); return; } else { llOwnerSay("returnedJSON: \n" + llJsonGetValue( body, ["comments","0","body"]) ); } } } } the return was... [07:12] http get api thing 2: Sending HTTP Request, ... [07:13] http get api thing 2: returnedJSON: My body is ONE! from my JSON file ... https://github.com/Xiija/FakeDB/blob/master/db.json
  9. I'm not sure what you mean by truncated?.. i put my script in a box, and it gives me the full verse? the params in the request are just basic ones i use for generic requests. I'll test the json thing and see how that goes heh ETA: tested, i see why the JSON is not working, and the truncation now... the end of the json should be.... "translation_note": "Public Domain"} but all that is getting thru is ...... "translation_not ...( making the JSON invalid) mebbe the timeout or content length on the API side? the Joshua one is 578 bytes, ...and the content length set at the api is is 509 ::shrugs::
  10. mebbe parse the body? It seems to be using either ISO-8859-1 or CP-1252 charset from the API ? no idea how to fix that except to use a string replace func? (this is a prim- touch to GET, change for your needs ) string strReplace(string str, string search, string replace) { return llDumpList2String(llParseStringKeepNulls((str = "") + str, [search], []), replace); } key XMLRequest; default { state_entry() { } touch_start(integer total_number) { llOwnerSay("Sending HTTP Request, ..."); string tail = "joshua1:9"; // "joshua1:9"; // Malachi 3:2 tail = llEscapeURL(tail); string URL = "http://bible-api.com/"; XMLRequest = llHTTPRequest( URL + tail , [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE, "application/json;charset=utf-8", // "text/plain;charset= CP-1252", ISO-8859-1, utf-8 HTTP_BODY_MAXLENGTH,16384, HTTP_PRAGMA_NO_CACHE,TRUE], ""); } http_response(key k,integer status, list meta, string body) { if(k == XMLRequest) { if(status != 200) { llOwnerSay("\nRrror code : " + (string)status); return; } else { string txt = llGetSubString(body, llSubStringIndex(body, "\"text\":" )+ llStringLength( "\"text\":"), llSubStringIndex(body, "}]," )-5); // replace non utf-8 characters... â , â , â, â txt = strReplace(txt, "â", "'"); txt = strReplace(txt, "â", " "); txt = strReplace(txt, "â", " "); llOwnerSay("Verse: \n" + txt); } } } }
  11. Are you set on using path finding?.. or have you tried a sensor repeat with MoveToTarget?
  12. for the RGB stuff, mebbe this will help? http://wiki.secondlife.com/wiki/Category:LSL_Color
  13. non binary toggle... integer x; integer num = 9; default { state_entry() { } touch_start(integer total_number) { if( x=x^num ) llOwnerSay("On: " + (string)x); // says ON: 9 else llOwnerSay("Off: " + (string)x); // says Off: 0 } }
  14. It's been so long since i used this, i can't remember if i made it or not lol... Non Sensor Range Checker: integer range(vector vec1, vector vec2, float rng) { if( vec1.x >= (vec2.x - rng) && vec1.x <= (vec2.x + rng) && vec1.y >= (vec2.y - rng) && vec1.y <= (vec2.y + rng) ) return TRUE; else return FALSE; } vector target = <175.0, 32.0, 3023.70508>; integer area = 5; default { state_entry() { llSetTimerEvent(5.0); } touch_start(integer total_number) { } timer() { vector pos = llGetPos(); if( range( pos, target, area) ) { llOwnerSay("In Range"); } else { llOwnerSay("Not In Range"); } } }
×
×
  • Create New...