Difference between revisions of "TotalControl for LSL/Events/BOT EVENT STATUS REPLY"
From SmartBots Developers Docs
| (2 intermediate revisions by the same user not shown) | |||
| 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 13: | Line 13: | ||
<syntaxhighlight lang="lsl"> | <syntaxhighlight lang="lsl"> | ||
link_message(integer sender,integer cmd, string data, key id) { | link_message(integer sender,integer cmd, string data, key id) { | ||
| − | /////////////////// Bot | + | /////////////////// Bot status 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 | + | // 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); | ||
// Inform user | // Inform user | ||
| − | llOwnerSay(" | + | llOwnerSay("Bot status received:\n"+ |
| − | "code: "+code+"\n"+ | + | "status code: "+code+"\n"+ |
"expiration date: "+date); | "expiration date: "+date); | ||
} | } | ||
Latest revision as of 09:46, 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 status 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);
}
}