SmartBots (SmartBots2Life)

Second Life group direct invitation bots

Contents

Support Managers

Chunkygravy online
English
Cybergothdragon online
English, German
Lance Swain online
English
Rehnaeaislinn online
English
show offline managers
English, Japanese, Russian

Set custom box button (SSTI API Example)

This code sets the custom button:

// Server API
// Commands:
integer SSTI_SERV_API_CUSTOM_BUTTON=-45050001;
integer SSTI_SERV_API_GET_GROUP=-45050002;
integer SSTI_SERV_API_GET_CLOUD=-45050003;
integer SSTI_SERV_API_BOX_CUSTOM_BUTTON=-45050004;
integer SSTI_SERV_API_GET_PARAM=-45050005;
integer SSTI_SERV_API_CUSTOM_HTTP_BUTTONS=-45050006;
integer SSTI_SERV_API_HTTP_REPLY=-45050007;
 
// Events:
integer SSTI_SERV_EVENT_INITIALIZED=-45060001;
integer SSTI_SERV_EVENT_CUSTOM_BUTTON=-45060002;
integer SSTI_SERV_EVENT_GROUP=-45060003;
integer SSTI_SERV_EVENT_CLOUD=-45060004;
integer SSTI_SERV_EVENT_BOX_CUSTOM_BUTTON=-45060005;
integer SSTI_SERV_EVENT_PARAM=-45060006;
integer SSTI_SERV_EVENT_RESET=-45060007;
integer SSTI_SERV_EVENT_LOCALURL=-45060008;
integer SSTI_SERV_EVENT_HTTPBUTTON=-45060009;
integer SSTI_SERV_EVENT_TENANT=-45060010;
integer SSTI_SERV_EVENT_NEW_GUESTPARTNER=-45060011;
integer SSTI_SERV_EVENT_GUESTPARTNER_REMOVED=-45060012;
//
// Set the menu button
setSSTIButton() {
    llMessageLinked(LINK_SET, SSTI_SERV_API_BOX_CUSTOM_BUTTON, "Custom!", NULL_KEY);
    llOwnerSay("SSTI button set");
}
 
default {
    state_entry() {
        // Set the menu button when this script restarts
        setSSTIButton();
    }
 
    link_message(integer sender, integer cmd, string str, key id) {
        if(cmd == SSTI_SERV_EVENT_INITIALIZED) {
            // Also catch the server initialization and re-set the menu
            setSSTIButton();
        }
 
        if(cmd == SSTI_SERV_EVENT_BOX_CUSTOM_BUTTON) {
            llOwnerSay("Tenant " + (string)id + 
                " has pressed the menu button: " + str);
        }
    }
}

The resulting menu:

SSTI box with menu.png

Questions, wishes and discussion