Difference between revisions of "TotalControl for LSL/Events/BOT EVENT LISTEN DIALOG"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:BOT_EVENT_LISTEN_DIALOG}} <onlyinclude>Raised when Bot receives a dialog menu</onlyinclude> {{API Event Table}} {{API Variable Group|''event'' object propertie...")
 
 
Line 15: Line 15:
 
     /////////////////// Bot listen dialog event
 
     /////////////////// Bot listen dialog event
 
     if(num==BOT_EVENT_LISTEN_DIALOG) {
 
     if(num==BOT_EVENT_LISTEN_DIALOG) {
         // Split details with a semi colon "\n"
+
         // Split details with a newline "\n"
 
         list details = llParseString2List(str, ["\n"], []);
 
         list details = llParseString2List(str, ["\n"], []);
 
     llOwnerSay("Channel: " + llList2String(details,0));
 
     llOwnerSay("Channel: " + llList2String(details,0));
 
     llOwnerSay("Object Name: " + llList2String(details,1));
 
     llOwnerSay("Object Name: " + llList2String(details,1));
 
     llOwnerSay("Owner Name: " + llList2String(details,2));
 
     llOwnerSay("Owner Name: " + llList2String(details,2));
     llOwnerSay("Dialog Message: " + llList2String(details,2));
+
     llOwnerSay("Dialog Message: " + llList2String(details,3));
     llOwnerSay("Buttons: " + llList2String(details,2));
+
     llOwnerSay("Buttons: " + llList2String(details,4));
 
     llOwnerSay("Object UUID: " + (string)id);
 
     llOwnerSay("Object UUID: " + (string)id);
 
     }
 
     }

Latest revision as of 16:58, 20 March 2019

Raised when Bot receives a dialog menu

Reference

This event comes with the following event object:

Variable Required Description
event object properties:
str Dialog details in the format "channel\nObjectName\nOwnerName\nDialogMsg\nButtons"
id UUID of object that sent dialog

Example

link_message( integer sender_num, integer num, string str, key id ) {
    /////////////////// Bot listen dialog event
    if(num==BOT_EVENT_LISTEN_DIALOG) {
        // Split details with a newline "\n"
        list details = llParseString2List(str, ["\n"], []);
    	llOwnerSay("Channel: " + llList2String(details,0));
    	llOwnerSay("Object Name: " + llList2String(details,1));
    	llOwnerSay("Owner Name: " + llList2String(details,2));
    	llOwnerSay("Dialog Message: " + llList2String(details,3));
    	llOwnerSay("Buttons: " + llList2String(details,4));
    	llOwnerSay("Object UUID: " + (string)id);
    }
}