Jump to content

showroom1

Resident
  • Posts

    6
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

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

  1. I don't know how to get the data in the card note.
  2. key kQuery; integer iLine; integer listener; list AvKeys; string Display; integer ON = TRUE; integer i; integer newsum; integer oldsum; integer Dlisten; integer DFlag; key name_q; key online_q; key KeyNow; key user; string status; string owner1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; string email_address = "email@yahoo.com"; default { state_entry() { if (llGetInventoryNumber(INVENTORY_NOTECARD) > 0) { iLine = 0; kQuery = llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0), iLine); } else { llOwnerSay("The UUID notecard is missing from this device."); } } on_rez ( integer startup) { llResetScript(); } changed (integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } dataserver(key query_id, string data) { if (query_id == kQuery) { if (data != EOF) { key newkey = (key)llStringTrim(data, STRING_TRIM); if (newkey) { AvKeys += newkey; iLine++; kQuery = llGetNotecardLine(llGetInventoryName(INVENTORY_NOTECARD,0), iLine); } else { llOwnerSay ( "Invalid key in the notecard: \"" + (string) newkey + "\". Initialization cancelled."); } } else { state running; // Finished reading UUIDs from notecard } } } } state running { state_entry() { llSetColor(<0,1,0>, 5); DFlag = TRUE; llSetTimerEvent(10); } on_rez( integer startup) { llResetScript(); } timer() { llSetText(Display,<1,1,1>,1.0* DFlag); if (oldsum != newsum) // Notify owner of any change in online status { llInstantMessage(llGetOwner(),"Online Status Change \n" + Display); } Display = ""; i = 0; KeyNow = (key)llList2String(AvKeys,0); name_q = llRequestAgentData(KeyNow,DATA_NAME); oldsum = newsum; newsum = 0; } dataserver(key query, string data) { string name; string status; if(name_q == query) { name = data; Display += name; online_q = llRequestAgentData(KeyNow,DATA_ONLINE); } else if (online_q == query) { //status = (string)data; if (data == "0") { status = "Offline"; } else if (data == "1") { status = "Online"; } //llSay(0,(string) status); //newsum += status; Display += " : " +(string) status + "\n"; if ( ++i <= llGetListLength(AvKeys) ) { KeyNow = (key)llList2String(AvKeys,i); name_q = llRequestAgentData(KeyNow,DATA_NAME); } } } touch_start(integer total_number) // Switch timer ON/OFF, activate dialog options { llListenRemove(listener);//A previous user may not have responded. Make sure we don't leak! integer channel = ~(integer)llFrand(1000.0); listener = llListen(channel,"","",""); user = llKey2Name(llDetectedKey(0)); llTextBox(llDetectedKey(0),"Type a message here",channel); } listen (integer channel, string name, key id, string message) { if (status = "Online") { llInstantMessage(owner1, (string) user +" says "+ message); llInstantMessage(owner2, (string) user +" says "+ message); } else if (status = "Offline") { llEmail( email_address, "Email Subject", (string) user + " sent this message \n\n\n"+ message); llEmail( email_address1, "Email Subject", (string) user + " sent this message \n\n\n"+ message); } llListenRemove(listener); } changed (integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } } string owner1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; string email_address = "email@yahoo.com"; read from the note card.
  3. Yes I tried. the samples I tried . but the result is failed . in this example, can you help ? my english is a little bad . I'm sorry.
  4. Hi .I'm just learning. I have looked at this example .and I don't understand .I wanted to help her on a small sample.I'm doing a trial for 3 days, but the result is failed.thanks.
  5. Hi all .I want to read data from a notecard . but I couldn't. can we make a small example ? default { state_entry() { llSay(0, "Hello, Avatar!"); } touch_start(integer total_number) { llSay(0, "Touched."); } } ------------------------------------------ for notecard :(notecard name=msj) hello = what is the message ? avatar = avatar key I don't want anyone else to see the contents of the file command.Thank you very much.
×
×
  • Create New...