SmartBots (SmartBots2Life)

Second Life group direct invitation bots


Support Managers

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

AdminBot Examples: Group Inviter Script

Have a question? Ask at SmartBots DevPortal!

DevPortal is a blog and forum for developers. Ask your questions to get a prompt reply!

Continue to DevPortal

This group inviter script demonstrates how to send group invites with AdminBot.

Script does the following:

  1. Sets up the group to use (state_entry event)
  2. Sends out the group invitation (touch_start event)
  3. Parses error messages (link_message event)
// SmartBots AdminBot,
// Documentation and help:
string SB_VERSION="1.92";
// Setup and startup
integer SB_SETUP_SETGROUP=180101;
integer SB_SETUP_DEBUG=180103;
integer SB_STATUS_QUERY=180104;
integer SB_SETUP_DEVICENAME=180111;
integer SB_SETUP_BOTNAME=180112;
integer SB_SETUP_SETOPTIONS=180113;
// Group members control
integer SB_INVITE_SEND=180105;
integer SB_GROUP_EJECT=180107;
integer SB_AVATAR_GROUP=180114;
// Group chat
integer SB_CHAT_SAY=180106;
integer SB_CHAT_LISTEN=180108;
integer SB_CHAT_MUTE=180115;
// Notices
integer SB_NOTICE_SEND=180109;
// Misc. commands
integer SB_RESET_ADMINBOT=9996660;
integer SB_SETUP_SETLINK=180110;
integer SB_COMMAND_FAILED=180201;
integer SB_STATUS_REPLY=180202;
integer SB_CHAT_MESSAGE=180203;
integer SB_SETUP_SUCCESS=180204;
integer SB_SETUP_FAILED=180205;
integer SB_CHAT_SUCCESS=180206;
integer SB_GROUP_CHECKED=180207;
// Group Inviter Script example
  state_entry() {
    // Setup group inviter
    // We'll set our group on start up. Do not forget to place your own "Security Code" here
    llMessageLinked(LINK_SET,SB_SETUP_SETGROUP,"Your group name","SECURITY CODE");
    // AdminBot will issue the link message on success or error - see link_message
  // We will issue the direct group invitation on touch. Do that by sending group invite message.
  touch_start(integer detected) {
    // "FORCE" means to invite existing group members too
  // This event parses different replies from AdminBot (error messages)  
  link_message(integer sender,integer cmd, string data, key id) {
    /////////////////// Group setup failed
      llOwnerSay("AdminBot command failed, error code:\n"+data);
    /////////////////// Group setup failed
      llOwnerSay("AdminBot group setup failed:\n"+data);

Questions, wishes and discussion