Jump to content

Xiija

Resident
  • Posts

    919
  • Joined

  • Last visited

Everything posted by Xiija

  1. the only way i know to do it is in chat? touch_start(integer total_number) { llSay(0, "secondlife:///app/agent/85987995-ab09-42db-9bd0-e0c558aa8c14/im " ); } that puts a clickable link in chat, which opens an IM when clicked
  2. to rotate the root, ( and the whole linkset..) 90 degrees... llSetLinkPrimitiveParamsFast(1,[PRIM_ROTATION,llGetLocalRot() * llEuler2Rot(<0,0,90>*DEG_TO_RAD)]); llSetLinkPrimitiveParamsFast(1,[PRIM_POSITION,llGetLocalPos() + <0.0 ,0.2, 0.0> ]); // if you need to move, do it here to IM someone from a link in a script... put this in a string and "say" it on your button click? ( using my UUID, replace with yer own ) secondlife:///app/agent/06451596-818c-4975-8bc0-058ab2fe8274/im
  3. if you want to try a single prim with a texture - touch detect, here is a small example to play with? integer numberOfColumns = 3; integer numberOfRows = 3; default { touch_start(integer num_detected) { key id = llDetectedKey(0); integer face = llDetectedTouchFace(0); vector touchST = llDetectedTouchST(0); integer currentCellNumber = llFloor(touchST.x*numberOfColumns) + (numberOfRows -llCeil(touchST.y*numberOfRows))*numberOfColumns + 1; llOwnerSay((string)currentCellNumber); if(currentCellNumber == 1) { } if(currentCellNumber == 2) { } } }
  4. ah okay thanks If I did, i guess the first page I would edit is the one that says how anyone can create a page lol
  5. any info on how to create a wiki user page?. i watched the vids etc, but my page says " you do not have permission to create this page. " weird?
  6. Xiija

    JSON help?

    Thanks, i kept at it and finally think I got it was a combination of bad syntax, code errors, and ..."i've been staring at this too long" here is the multi NC reader I would post a link in the wiki, but don't know if I can?
  7. a Multi notecard reader using JSON . There may be monsters ( or bugs) , but it shows how to nest JSON objects and call their values... notecard lines are in the format: Birdsong = http://stardust.wavestreamer.com:8062 /* Xiija Resident, 2017 Json Radio example with moded VoidSinger Dialog code */ string station; string NC; string TuneIn; integer iLine; integer len; string Curr; list gLstMnu; string txt; key id; integer chan ; integer handle; integer idx; integer ttlPG; integer currPG = 1; // ---------------------- string name; integer ttl_NC; integer NC_lines; key query_id; integer count; string CurrNC; list myNCs; integer card_index; key kQuery; integer index; string stations; string notecards; string title; string url; 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() { chan = 0x80000000 | (integer)("0x"+(string)llGetOwner()); // unique channel based on owners UUID stations = llList2Json (JSON_OBJECT, [] ); notecards = llList2Json( JSON_OBJECT, [] ); ttl_NC = llGetInventoryNumber( INVENTORY_NOTECARD ); CurrNC = llGetInventoryName(INVENTORY_NOTECARD,0); llSay(0,"Stations Loading....."); kQuery = llGetNotecardLine(CurrNC, count); txt = "\n Radio Menu\nPage : " + (string) currPG + " of " + (string)ttlPG + "\n \nOff - turns off radio\nCLOSE - closes this menu\n \nCurrently listening to " + "\n " + Curr; } read_card() { CurrNC = llGetInventoryName(INVENTORY_NOTECARD,card_index); kQuery = llGetNotecardLine(CurrNC, count); } get_NC_names() // *******************get notecard names { myNCs = []; list details = llJson2List ( notecards ); list fields = llList2ListStrided (details, 0, -1, 2); integer len = llGetListLength(fields); integer x; for(;x < len;++x) { string tmp = llList2String(fields,x); myNCs += tmp; } gLstMnu = myNCs; } card_2_buttons( string card) // *************populate butn list { string Js = llJsonGetValue( notecards, [card]); list Jl = llParseString2List( Js, [ "," , "[" , "]", "{", "}" ], [] ); Jl = llList2ListStrided (Jl, 0, -1, 2); gLstMnu = Jl; integer c = llGetListLength(gLstMnu); ttlPG = llCeil(c/9.0 ); txt = "\n Radio Menu\nPage : " + (string) currPG + " of " + (string)ttlPG + "\n \nOff - turns off radio\nCLOSE - closes this menu\n \nCurrently listening to " + "\n " + Curr; llDialog( id, txt, uDlgBtnLst( 0 ), chan ); } default { state_entry() { init(); } on_rez(integer param) { init(); } touch_start(integer total_number) { id = llDetectedKey(0); get_NC_names(); llDialog( id, txt, uDlgBtnLst( 0 ), chan ); handle = llListen(chan,"","",""); llListenControl(handle, TRUE); llSetTimerEvent(20); } dataserver(key query_id, string data) { if (query_id == kQuery) { if (data == EOF) { count = 0; ++card_index; llOwnerSay( CurrNC + " - Notecard loaded - "); if( card_index < ttl_NC) { read_card(); } else { llOwnerSay( " ALL Notecards loaded"); card_index = 0; } } else { if(data != "") { if (llJsonGetValue (notecards, [CurrNC] ) == JSON_INVALID) { notecards = llJsonSetValue (notecards, [CurrNC] , stations) ; // *** add names to notecard object llOwnerSay("adding NC : " + CurrNC ); } list extract = llParseString2List(data,[" "],["="]); title = llList2String(extract, 0); title = llGetSubString(title, 0, 13) ; // a check ..if !( name = 0 < button_text_length < 13) url = llList2String(extract, 2); if (llJsonGetValue (notecards, [CurrNC,title] ) == JSON_INVALID) { notecards = llJsonSetValue (notecards, [CurrNC , title, "URL"], url); // add title and url } } ++count; kQuery = llGetNotecardLine(CurrNC, count); } } } listen( integer vIntChn, string vStrNom, key vKeySpk, string vStrMsg ) { if (!llSubStringIndex( vStrMsg, " " )) { integer SSI = llSubStringIndex(vStrMsg, "»"); if(SSI == 1) { ++currPG; if(currPG > ttlPG) { currPG = 1;} } else { --currPG; if(currPG < 1) { currPG = ttlPG;} } txt = "\n Radio Menu\nPage : " + (string) currPG + " of " + (string)ttlPG + "\n \nOff - turns off radio\nCLOSE - closes this menu\n \nCurrently listening to " + "\n " + Curr; 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") { llListenControl(handle, FALSE); llSetParcelMusicURL(" "); llSay(0,"Turning Radio off... " ); llSetTimerEvent(0); llMessageLinked(LINK_THIS, 0, TuneIn, ""); // for a seperate titler script perhaps? } else { if (~llListFindList( myNCs,[vStrMsg]) ) // if Dialog sent a NC name { card_2_buttons( vStrMsg ); return; } Curr = vStrMsg; llSay(0,"Tuning in to... " + vStrMsg ); TuneIn = llJsonGetValue (stations, [vStrMsg, "URL"]) ; llSetParcelMusicURL(TuneIn); idx = llListFindList( gLstMnu, (list)vStrMsg ) / 9; txt = "\n Radio Menu\nPage : " + (string) currPG + " of " + (string)ttlPG + "\n \nOff - turns off radio\nCLOSE - closes this menu\n \nCurrently listening to " + "\n " + Curr; llDialog( id, txt, uDlgBtnLst(idx ), chan ); llSetTimerEvent(20); llMessageLinked(LINK_THIS, 1, TuneIn, ""); // for a seperate titler script perhaps? } } timer() { llListenControl(handle, FALSE); llSetTimerEvent(0); } changed(integer change) { if (change & (CHANGED_REGION_START | CHANGED_OWNER | CHANGED_INVENTORY) ) { llOwnerSay("Radio Resetting..."); llResetScript(); } } }
  8. Xiija

    JSON help?

    erm ok, can anyone please give a demonstration of how to nest a JSON obect in another object or an array? i'm not talking about the visualization of it, I.E. { "alpha": 1, "beta": [ "x", "y", "z" ], "gamma": { "a": 3.2, "b": true } } i'm talking about, how to write it in LSL.. i need to nest either an obect in an object, or an object in an array. right now I can do an object ( called stations) which I can set the key value pairs of "name" and "url" for multple entries in a notecard, ... what i'm trying to do is read Multiple notecards, and so have a higher level object or array to hold those notecard names, which will then hold the stations for that notecard. ... and how to call the info with llJsonGetValue() ....hope that is clearer? thanx for any help, X.
  9. for the HOLD ...mebbe something like if((change & CONTROL_UP) && (held & CONTROL_UP)) { // moving } if((change & CONTROL_UP) && !(held & CONTROL_UP)) { // stopped }
  10. Xiija

    JSON help?

    trying to do nested objects, tried arrays but failed there too... premise: 2 notecards, one named rock, site1 # url1 site2 # url2 one named jazz site1 # url1 site2 # url2 ------- possible pre definitions? ------- info = llList2Json (JSON_OBJECT, [ "TITLE", JSON_NULL, "URL", JSON_NULL ] ); notecards = llList2Json( JSON_OBJECT, [] ); --------------------------------------------------------------------------------- example: CurrNC = rock, string title = site1, string url = url1 in the data server event: if (llJsonGetValue (notecards, [CurrNC] ) == JSON_INVALID) { notecards = llJsonSetValue (notecards, [CurrNC] ,info) ; // trying to create a "ROCK" object in the notecards object } title = site1; url = url1; if (llJsonGetValue (CurrNC, [title] ) == JSON_INVALID) // if there is not a JSON key-value pair in the JSON object, add one { notecards = llJsonSetValue (notecards, [CurrNC, "URL"] ,url) ; notecards = llJsonSetValue (notecards, [CurrNC, "TITLE"] ,title) ; } and then trying to get the syntax to get these infos? getInfo(string card) { list details = llJson2List (llJsonGetValue ( notecards,[card] ) ); list fields = llList2ListStrided (details, 0, -1, 2); list send = []; integer len = llGetListLength(fields); integer x; for(;x < len;++x) { string tmp = llList2String(fields,x); send += tmp + " @ " + llJsonGetValue (notecards, [card, tmp]); } llSay(0,"\nInfo for " + card + "\n" + llDumpList2String(send,"\n")); } thanx for any help
  11. here is a small script that may help show how to choose which way it's facing.... not sure if your timer event being 1 second, and your move being 5 seconds will matter, also you get the beginning pos, not the current obj pos for your move?... ( drop in a box and touch to start/stop, timer & move both at 5 seconds) integer k; vector pos; vector vPosTarget; move() { vPosTarget = llGetPos() ; vPosTarget.x += llFrand(6.0) - 3.0; //Random number between -5 and 5 vPosTarget.y += llFrand(6.0) - 3.0; //Random number between -5 and 5 llSleep(0.3); llRotLookAt( llRotBetween( < 1.0, 0.0, 0.0>, llVecNorm( vPosTarget - llGetPos() ) ), 1.0, 0.5 ); llMoveToTarget(vPosTarget,5); llSetStatus(STATUS_PHYSICS, TRUE); } default { state_entry() { pos = llGetPos(); llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y , FALSE); llSetStatus(STATUS_PHYSICS, TRUE); llSetHoverHeight(pos.z - llGround(ZERO_VECTOR) + 0.7, FALSE, 1.0); llSleep(5); llSetStatus(STATUS_PHYSICS,FALSE); } touch_start(integer total_number) { if(k = !k) { llSetStatus(STATUS_PHYSICS, TRUE); move(); llSetTimerEvent(5.0); } else { llStopMoveToTarget(); llSetTimerEvent(0.0); llSetStatus(STATUS_PHYSICS,FALSE); } } timer() { move(); } }
  12. you could make an object with a sensor ( 96m area max) and add something like... list details = llGetObjectDetails(id, ([OBJECT_NAME, OBJECT_ROOT, OBJECT_OWNER, OBJECT_GROUP, OBJECT_CREATOR])); and move it around , adding to list only if it is not in the list already?
  13. Ooo good call Arton, i may have fixed it tysm !
  14. the reason i'm doing this is , I have been trying to make a sit target setter HUD,... you drop the script into any furniture cushion, wear the HUD, and use a keypad to move the avatar and set the sit target for that cushion. I made a bunch of mesh bean bags and chairs, and was looking to be able to just drop in a script, use a HUD and *presto* lol. i'll try subtracting or dividing the cushion pos & rot from the avatar stuff and see if that helps... mebbe the AVsitter code will have some insights too . ************** The sit target offset would have to be local to the child prim. *************** mebbe something like....? SetPositionLocalToCurrentPosition(vector local_position) { llSetPos( llGetLocalPos() + (local_position * llGetLocalRot() ) ); } or vector pos2_obj = (pos_region - llGetRootPosition()) / llGetRootRotation(); rotation rot2_obj = rot_region / llGetRootRotation(); ::shrugs:: **edit: a function from AV sitter ... string convert_to_world_positions(integer num) { list details = llGetObjectDetails(llGetLinkKey(llGetLinkNumber()), [OBJECT_POS, OBJECT_ROT]); rotation target_rot = llEuler2Rot(llList2Vector(ROT_LIST, num) * DEG_TO_RAD) * llList2Rot(details, 1); vector target_pos = llList2Vector(POS_LIST, num) * llList2Rot(details, 1) + llList2Vector(details, 0); return (string)target_pos + "|" + (string)target_rot; }
  15. i hope when AVsitter is released i can just play with that, untill then - rez 2 boxes, link em and put this script in the child. if i sit on the child and click that box, it moves my avatar, ... and is supposed to renew the sitTarget, but when i stand and sit back down, the sit target is way off? tried everything i can think of thanx for any advice, X vector sitPos; vector sitRot; integer avLink; string anim ; list local; vector mypos; rotation myrot; rotation R_avRot; rotation V2Rrot; updateSitTrg(integer link,vector avPos, vector avRot) { key user = llAvatarOnLinkSitTarget(LINK_THIS); vector size = llGetAgentSize(user); R_avRot = llEuler2Rot(avRot * DEG_TO_RAD ); if(size) { local = llGetLinkPrimitiveParams(link, [PRIM_POS_LOCAL, PRIM_ROT_LOCAL]); ; mypos = llList2Vector(local,0); myrot = llList2Rot(local,1); mypos += avPos; myrot *= R_avRot; mypos.z -= ( (size.z/2) - 0.375 ); // height adjust? llSetLinkPrimitiveParamsFast(link, [PRIM_POS_LOCAL, mypos , PRIM_ROT_LOCAL, myrot ]); llOwnerSay("\n Sit Target after: \nPosition - " + (string)mypos + "\nRotation - " + (string)myrot); llLinkSitTarget(LINK_THIS,mypos * myrot , myrot); } } default { state_entry() { sitPos = <0.0, 0.0, 0.5>; sitRot = <0.0, 0.0, 0.0>; V2Rrot = llEuler2Rot(sitRot * DEG_TO_RAD ); llLinkSitTarget(LINK_THIS,sitPos, V2Rrot); } touch_start(integer total_number) { llOwnerSay("\n Sit Target before: \nPosition - " + (string)mypos + "\nRotation - " + (string)myrot); // sitPos += <0.05, 0.0, 0.0>; sitRot += <0.0, 0.0, 10.0>; updateSitTrg(avLink,sitPos,sitRot); } changed(integer change) { if (llAvatarOnSitTarget() != NULL_KEY) { llRequestPermissions(llAvatarOnSitTarget(), PERMISSION_TRIGGER_ANIMATION); llSetClickAction(CLICK_ACTION_TOUCH); avLink = llGetNumberOfPrims(); } else { llSetClickAction(CLICK_ACTION_SIT); avLink = 0; } } run_time_permissions(integer perm) { anim = llGetInventoryName(INVENTORY_ANIMATION, 0); if (anim != "") { llStopAnimation("sit"); llStartAnimation(anim); } } }
  16. the script is totally do-able using a timer, dialog box, llGetRegionAgentCount and llTeleportAgentHome .
  17. you need a return after the else... add an ...integer returnVal; and change your statements like ... return first - len; .... to ....returnVal = first - len; ( for all your return calls) and after the end of the ELSE... do... return returnVal;
  18. most xml pages specify the type... <?xml version="1.0" encoding="UTF-8"?> i dunno, i just try to get in the habit of specifying the charset HTTP_MIMETYPE, "application/xml;charset=utf-8",
  19. for testing purposes, the line ... url = URL7; should be in touch_start, not state entry ....
  20. lol deeded, it's SO early, i'm not awake TY :;gets coffee::
  21. simple code, tested on different regions... is this broke?.. or am I lol default { state_entry() { } touch_start(integer total_number) { string url = llGetParcelMusicURL(); llOwnerSay("got." + url); } }
  22. no way to delete duplicate posts?.. this was caused by an error timeout & bad gateway when posting
  23. just a heads up on another change to http coming soon, posted by Rider Linden in this thread ... https://community.secondlife.com/forums/topic/409237-change-transparency-of-prims-with-the-use-of-audio-stream/
  24. the changed script for testing ... not sure if there are any stream types i'm missing? list StatusCodes =[ 100,"Continue", 101,"Switching Protocols", 200,"OK", 201,"Created", 202, "Accepted", 203, "Non-Authoritative Information", 204, "No Content", 205, "Reset Content", 206, "Partial Content", 300, "Multiple Choices", 301, "Moved Permanently", 302, "Found", 303, "See Other", 304, "Not Modified", 305, "Use Proxy", 306, "(Unused)", 307, "Temporary Redirect", 400, "Bad Request", 401, "Unauthorized", 402, "Payment Required", 403, "Forbidden", 404, "Not Found", 405, "Method Not Allowed", 406, "Not Acceptable", 407, "Proxy Authentication Required", 408, "Request Timeout", 409, "Conflict", 410, "Gone", 411, "Length Required", 412, "Precondition Failed", 413, "Request Entity Too Large", 414, "Request-URI Too Long", 415, "Unsupported Media Type", 416, "Requested Range Not Satisfiable", 417, "Expectation Failed", 488, "Client closed request", 500, "Internal Server Error", 501, "Not Implemented", 502, "Bad Gateway", 503, "Service Unavailable", 504, "Gateway Timeout", 505, "HTTP Version Not Supported"]; string url; string URL; string URL2; string URL3 = "http://indiespectrum.com:9000"; string URL4 ; string URL5 ; string URL6 ; string URL7 = "http://ice1.somafm.com/secretagent-128-mp3"; string URL8 = "http://bigdaddys.digistream.info:20368" ; string URL9 ; string URL10 = "http://www.ebm-radio.org:7000"; string URL11 = "http://74.208.197.50:8087"; string URL12 = "http://radio.108.pl:8004"; string URL13 ; string URL14; string URL15 ; key HTTPRequest; key XMLRequest; string feed; string xml = "/stats?sid=1"; string htp = "/7.html"; string somas = "/index.html"; string tag = "/played.html"; string currSongTitle; string lastSongTitle; list feedList; string oldsong; list chunk; string Curr; integer ISsoma; string artist; string song; string album; integer debug; default { state_entry() { url = URL7; // change this to test different types of streams above ... i. e. url = URL10; } touch_start(integer total_number) { llOwnerSay("sending request..."); // Soma check integer x; x = llSubStringIndex( url, "-128-mp3"); if( x != -1 ) { url = llDeleteSubString( url, x , -1); url += "/songhistory.html"; integer y; y = llSubStringIndex( url, "ice1."); url = llDeleteSubString( url, y , y + llStringLength( "ice1." ) -1 ); ISsoma = 1; } if(ISsoma) { XMLRequest = llHTTPRequest( url , [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE, "application/xml;charset=utf-8", HTTP_BODY_MAXLENGTH,16384, HTTP_PRAGMA_NO_CACHE,TRUE], ""); return; } XMLRequest = llHTTPRequest( url + xml, [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE,"application/xml;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("error code\n"); integer index = llListFindList(StatusCodes, [status]); string msg = llList2String(StatusCodes,index+1); llOwnerSay("\nStatus; " + (string)status + "\nCode: " + msg ); return; } else { if( ISsoma ) // Soma HACK { string playing = llGetSubString(body,llSubStringIndex(body, "<!-- line 1 -->") + llStringLength("<!-- line 1 -->"), llSubStringIndex(body,"<!-- line 2 -->") -1); playing = llUnescapeURL( playing ); playing = llDeleteSubString(playing , 0 , llSubStringIndex(playing,"<a") + llStringLength("<a") - 1 ); playing = llDeleteSubString(playing , 0 , llSubStringIndex(playing,">") + llStringLength(">") - 1 ); artist = llGetSubString(playing, 0, llSubStringIndex(playing, "</a>" ) -1 ); playing = llDeleteSubString(playing , 0 , llSubStringIndex(playing,"<td>") + llStringLength("<td>") - 1 ); song = llGetSubString(playing, 0, llSubStringIndex(playing, "</td>" ) -1 ); playing = llDeleteSubString(playing , 0 , llSubStringIndex(playing,"<a") + llStringLength("<a") - 1 ); playing = llDeleteSubString(playing , 0 , llSubStringIndex(playing,">") + llStringLength(">") - 1 ); album = llGetSubString(playing, 0, llSubStringIndex(playing, "</a>" ) -1 ); llSetText( "\nArtist: " + artist + "\nSong: " + song + " \nAlbum: " + album, <0,1,0>,1.0); ISsoma = 0; return; } integer invalid = llSubStringIndex(body, "<meta http-equiv"); //. if /stats?sid=1 doesn't work, try 7.html call integer invalid2 = llSubStringIndex(body, "Invalid resource"); if( invalid != -1 || invalid2 != -1 ) { llOwnerSay("invalidated ...trying 7.html"); HTTPRequest = llHTTPRequest( url + "/7.html", [HTTP_USER_AGENT, "XML-Getter/1.0 (Mozilla Compatible)", HTTP_METHOD, "GET", HTTP_MIMETYPE, "text/plain;charset=utf-8", HTTP_BODY_MAXLENGTH,16384, HTTP_PRAGMA_NO_CACHE,TRUE], ""); ; return; } string ver; // SHOUTcast version syntax - 2.5.1.724 (posix(linux x64)) , ... 2.2.1.109 (win32) string version = llGetSubString(body,llSubStringIndex(body, "<VERSION>") + llStringLength("<VERSION>"), llSubStringIndex(body,"</VERSION>>") -1); if( llGetSubString( version, 0,0 ) == "2") { ver = "2"; } // llOwnerSay("vers - " + ver); DEBUG for version changes string Genre = llGetSubString(body,llSubStringIndex(body, "<SERVERGENRE>") + llStringLength("<SERVERGENRE>"), llSubStringIndex(body,"</SERVERGENRE>") -1); string server = llGetSubString(body,llSubStringIndex(body, "<SERVERTITLE>") + llStringLength("<SERVERTITLE>"), llSubStringIndex(body,"</SERVERTITLE>") -1); string SongTitle = llGetSubString(body,llSubStringIndex(body, "<SONGTITLE>") + llStringLength("<SONGTITLE>"), llSubStringIndex(body,"</SONGTITLE>") -1); llSetText( "\nGenre: " + Genre + "\nStation: " + server + " \nSong Title: " + SongTitle, <0,1,0>,1.0); } } if(k == HTTPRequest) // 7.html HACK { list tmp = llCSV2List(body); string cap = llList2String(tmp,6); string by = llGetSubString(cap, 0, llSubStringIndex(cap, "-" ) -1 ); string sang = llGetSubString(cap, llSubStringIndex(cap, "-") + 1, llSubStringIndex(cap, "</body>") -1); llSetText("Artist : " + by + "\nSong : " + sang, <0,1,0>,1.0); } } }
  25. walking has newanimation while running has lastanimation ? or ...try changing timer to .. timer() { string newAnimation = llGetAnimation(gOwner); // the define here resets the string each pulse if (newAnimation == "Walking") { llLoopSound( SOUND_WALK, 1.0); } else if (newAnimation == "Running") { llLoopSound( SOUND_RUN, 1.0); } else llStopSound(); }
×
×
  • Create New...