Difference between revisions of "TotalControl for LSL/Events/BOT EVENT STATUS REPLY"
From SmartBots Developers Docs
(Created page with "{{DISPLAYTITLE:BOT_EVENT_STATUS_REPLY}} <onlyinclude>Raised when bot status is recieved.</onlyinclude> {{API Event Table}} {{API Variable Group|''event'' object properties}}...") |
|||
Line 4: | Line 4: | ||
{{API Event Table}} | {{API Event Table}} | ||
{{API Variable Group|''event'' object properties}} | {{API Variable Group|''event'' object properties}} | ||
− | {{API Variable|str}} | + | {{API Variable|str}} [[AdminBot_for_Bots/Documentation/Status_Codes|command status code]], 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 |
− | list parts=llParseString2List(data,[" | + | list parts=llParseString2List(data,[","],[]); |
// 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("Got bot status:\n"+ |
− | " | + | "code: "+code+"\n"+ |
"expiration date: "+date); | "expiration date: "+date); | ||
} | } |
Revision as of 06:42, 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);
}
}