Jump to content

Chantellena

Resident
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

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

  1. thanks for that Rolig, got it working with the exception of it takes 10 minutes before it will turn off fullbright when the person logs off key user_key = "6b7fa7ed-c451-4642-8d38-43b23046a30b"; //integer time = 10; // time within the message should be written. string url = "http://world.secondlife.com/resident/"; string name; //key toucher; string status; string profile_key_prefix = "<meta name=\"imageid\" content=\""; integer profile_key_prefix_length; default { state_entry() { profile_key_prefix_length = llStringLength(profile_key_prefix); // profile_img_prefix_length = llStringLength(profile_img_prefix); llSetText("", <1,0,0>, 1.0); // llSetTexture(blank, ALL_SIDES); llRequestAgentData( user_key, DATA_NAME); } dataserver(key queryid, string data) { name = data; llSetObjectName(name + "'s Online Detector"); state show; } } state show { state_entry() { llSetTimerEvent(2); } timer() { llHTTPRequest( url + (string)user_key,[HTTP_METHOD,"GET"],""); llRequestAgentData( user_key, DATA_ONLINE); } dataserver(key queryid, string data) { if (data == "1" ) llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,TRUE]); if (data == "0" ) llSetPrimitiveParams([PRIM_FULLBRIGHT,ALL_SIDES,FALSE]); } } cant see where ive gone wrong, it should work..... and ela, the key user_key = "00000000-0000-0000-0000-000000000000"; is called an example honey, and im rather glad i really dont give a crap about your code review. *Smiles*
  2. ok i have in one prim the following online script. what im trying and failing miserably at doing, is having a second smaller prim underneath it go to fullbright when the person is online, and no fullbright when offline. any ideas? is it even possible? ________________________________________________________________________________________ key user_key = "00000000-0000-0000-0000-000000000000"; // must be agent UUID whose status it will indicate integer time = 30; // time within the message should be written. string url = "http://world.secondlife.com/resident/"; key blank = TEXTURE_BLANK; string name; key toucher; string status; // VD 2009-11-24 workaround for WEB-1383, use <meta> instead of <**Only uploaded images may be used in postings**_response(key request_id,integer status, list metadata, string body) { string profile_pic; integer s1 = llSubStringIndex(body, profile_key_prefix); integer s1l = profile_key_prefix_length; if(s1 == -1) { // second try s1 = llSubStringIndex(body, profile_img_prefix); s1l = profile_img_prefix_length; } if (s1 == -1) { // still no match? profile_pic = blank; } else { profile_pic = llGetSubString(body,s1 + s1l, s1 + s1l + 35); if (profile_pic == (string)NULL_KEY) { profile_pic = blank; } } llSetTexture(profile_pic, ALL_SIDES); } dataserver(key queryid, string data) { if ( data == "1" ) { status = " is online"; llSetText(name + status, <0,1,0>, 1.0); } else if (data == "0") { status = " is offline"; llSetText(name + status, <1,0,0>, 1.0); } } touch_start(integer num_detected) { toucher = llDetectedKey(0); state msg; } } state msg { state_entry() { llListen(0,"",toucher,""); llInstantMessage(toucher, "write your message to " + name +" - you have " +(string)time + " seconds"); llInstantMessage(toucher, "to see " + name +"'s profile, click this link here: secondlife:///app/agent/" + (string)user_key + "/about"); llSetTimerEvent(time); } listen(integer ch, string name, key id, string msg) { llInstantMessage(user_key, llKey2Name(toucher) + " sent you a message from " + llGetRegionName() + ": " + msg); llInstantMessage(toucher, "message is sent."); llListenRemove(0); state show; } timer() { llInstantMessage(toucher, "time is up - touch again to write a message"); llListenRemove(0); state show; } } _______________________________________________________________________________________
×
×
  • Create New...