Difference between revisions of "TotalControl for LSL/Events/BOT EVENT STATUS REPLY"

From SmartBots Developers Docs
Jump to: navigation, search
(Undo revision 1305 by Chevonn Edelmann (talk))
Line 18: Line 18:
 
     list parts=llParseString2List(data,[","],[]);
 
     list parts=llParseString2List(data,[","],[]);
  
     // The part is a status code, and second is the bot expiration date
+
     // The first line is a status code, and second line is the bot expiration date
 
     string code=llList2String(parts,0);
 
     string code=llList2String(parts,0);
 
     string date=llList2String(parts,1);
 
     string date=llList2String(parts,1);

Revision as of 06:49, 20 May 2017

Raised when bot status is recieved.

Reference

This event comes with the following event object:

Variable Required Description
event object properties:
str command status code, bot expiration date
id ---

Example

link_message(integer sender,integer cmd, string data, key id) {
  /////////////////// Bot command status reply event
  if(cmd==BOT_EVENT_STATUS_REPLY) {
    // We split the string parameter
    list parts=llParseString2List(data,[","],[]);

    // The first line is a status code, and second line is the bot expiration date
    string code=llList2String(parts,0);
    string date=llList2String(parts,1);
            
    // Inform user
    llOwnerSay("Got bot status:\n"+
      "code: "+code+"\n"+
      "expiration date: "+date);
  }
}