Difference between revisions of "TotalControl for LSL/Events/BOT EVENT STATUS REPLY"
From SmartBots Developers Docs
(Undo revision 1305 by Chevonn Edelmann (talk)) |
(Undo revision 1304 by Chevonn Edelmann (talk)) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:BOT_EVENT_STATUS_REPLY}} | {{DISPLAYTITLE:BOT_EVENT_STATUS_REPLY}} | ||
− | <onlyinclude>Raised when bot status is | + | <onlyinclude>Raised when bot status is received.</onlyinclude> |
{{API Event Table}} | {{API Event Table}} | ||
{{API Variable Group|''event'' object properties}} | {{API Variable Group|''event'' object properties}} | ||
− | {{API Variable|str}} [[ | + | {{API Variable|str}} first line - [[Usage/Status_Codes|command status code]]<br>second line - bot expiration date |
{{API Variable|id}} --- | {{API Variable|id}} --- | ||
Line 15: | Line 15: | ||
/////////////////// Bot command status reply event | /////////////////// Bot command status reply event | ||
if(cmd==BOT_EVENT_STATUS_REPLY) { | if(cmd==BOT_EVENT_STATUS_REPLY) { | ||
− | // We split the string parameter | + | // We split the string parameter to the lines |
− | list parts=llParseString2List(data,[" | + | list parts=llParseString2List(data,["\n"],[]); |
// The first line is a status code, and second line is the bot expiration date | // The first line is a status code, and second line is the bot expiration date | ||
Line 23: | Line 23: | ||
// Inform user | // Inform user | ||
− | llOwnerSay(" | + | llOwnerSay("Bot status received:\n"+ |
− | "code: "+code+"\n"+ | + | "status code: "+code+"\n"+ |
"expiration date: "+date); | "expiration date: "+date); | ||
} | } |
Revision as of 06:51, 20 May 2017
Raised when bot status is received.
Reference
This event comes with the following event object:
Variable | Required | Description | |
---|---|---|---|
event object properties: | |||
str | first line - command status code second line - 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 to the lines
list parts=llParseString2List(data,["\n"],[]);
// 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("Bot status received:\n"+
"status code: "+code+"\n"+
"expiration date: "+date);
}
}