# Commands

All commands are invoked using the LSL function `llMessageLinked`:

```csharp
llMessageLinked(integer linknum, integer num, string str, key id);
```

* `num` — The code of the command (see below).
* `str` and `id` — Parameters that depend on the specific command.

See the [**examples**](/doc/examples-hXsET8az4A) section for usage patterns.


---

## Commands List

| **Startup commands** |
|------------------|
| [`BOT_SETUP_SETBOT`](/doc/bot_setup_setbot-ojcvi28wUW) | Sets the working personal Bot. Other commands require this command to be invoked first. |
| [`BOT_STATUS_QUERY`](/doc/bot_status_query-WFtwbugPQj) | Queries the selected bot status (useful to determine the subscription length). |
| [`BOT_RESET_TOTALCONTROL`](/doc/bot_reset_totalcontrol-qVXkHn37kw) | Invokes `llResetScript()` for the TotalControl script. |
| **Bot Status commands** |
| [`BOT_LOGIN`](/doc/bot_login-7pp1AfqB8J) | Initiates bot login process. |
| [`BOT_LOGOUT`](/doc/bot_logout-Wf1BodzgBl) | Initiates bot logout process. |
| [`BOT_LOCATION`](/doc/bot_location-Dokm8bly0V) | Returns the location of the bot. |
| **Device settings commands** |
| [`BOT_SETUP_SETOPTIONS`](/doc/bot_setup_setoptions-BrjAd0d9Ol) | Sets various options for TotalControl. |
| [`BOT_SETUP_DEVICENAME`](/doc/bot_setup_devicename-1lFWfN6nwQ) | Sets the device name and device creator for statistics purposes (visible in your SmartBots panel). |
| [`BOT_SETUP_SETLINK`](/doc/bot_setup_setlink-cBLIZs0HzG) | Commands TotalControl to use a specific link number for `llMessageLinked` calls instead of `LINK_SET`. |
| **Communication commands** |
| [`BOT_SAY_CHAT`](/doc/bot_say_chat-hfFUVheiLv) | Commands bot to say a message on the specified channel. |
| [`BOT_INSTANT_MESSAGE`](/doc/bot_instant_message-WKMqIiPSls) | Commands bot to send an instant message to an avatar. |
| [`BOT_SAY_GROUP_CHAT`](/doc/bot_say_group_chat-PuDgRV2MUn) | Commands bot to send a message to a specified group. |
| [`BOT_SEND_NOTICE`](/doc/bot_send_notice-abaoScZsi8) | Commands bot to send a notice to a specified group. |
| [`BOT_OFFER_TELEPORT`](/doc/bot_offer_teleport-HwmeaM6Ycs) | Commands bot to send a teleport offer to the given avatar UUID. |
| [`BOT_LISTEN_LOCAL_CHAT`](/doc/bot_listen_local_chat-D6I9wfQBZ6) | Commands bot to listen to messages in local chat and send them to the script. |
| [`BOT_LISTEN_IM`](/doc/bot_listen_im-2QHZDDSRdP) | Commands bot to listen to IMs sent to the bot and send them to the script. |
| **Movement commands** |
| [`BOT_WALK`](/doc/bot_walk-kdetnUBssy) | Commands bot to move/turn in the specified direction. |
| [`BOT_WALKTO`](/doc/bot_walkto-hSZyVVVf2V) | Commands bot to walk to the specified coordinates. |
| [`BOT_TELEPORT`](/doc/bot_teleport-cO1XhLCEFX) | Commands bot to teleport to a specified location. |
| [`BOT_FLY`](/doc/bot_fly-jKTBCnZX6A) | Commands bot to start flying. |
| [`BOT_SIT`](/doc/bot_sit-UOy3htTq8H) | Commands bot to sit on a prim. |
| [`BOT_STAND`](/doc/bot_stand-D9KEYhjSPW) | Commands bot to stand up. If a permanent sit UUID is set, this command will clear it. |
| **Group Management commands** |
| [`BOT_LIST_GROUPS`](/doc/bot_list_groups-caei0kxuan) | Retrieves a list of all the groups the bot is in. |
| [`BOT_LIST_GROUP_ROLES`](/doc/bot_list_group_roles-XLuRsiKOh0) | Retrieves a list of all role names and UUIDs for a group the bot is a member of. |
| [`BOT_GROUP_JOIN`](/doc/bot_group_join-aZYHHG7QKY) | Commands bot to join the specified group. |
| [`BOT_GROUP_LEAVE`](/doc/bot_group_leave-EBAsxndubD) | Commands bot to leave the specified group. |
| [`BOT_ACTIVATE_GROUP`](/doc/bot_activate_group-UsQvkzLPvb) | Commands bot to activate a group with the given group UUID. |
| [`BOT_GROUP_SET_ROLE`](/doc/bot_group_set_role-QUkl5x6LaZ) | Commands bot to add a group member to the specified role. *(Note: the avatar must already be in the group.)* |
| [`BOT_GROUP_INVITE`](/doc/bot_group_invite-XN5pea6eIw) | Commands bot to invite a resident to a group. |
| [`BOT_GROUP_EJECT`](/doc/bot_group_eject-UHbcOZP1Hg) | Commands bot to eject a resident from a group. |
| [`BOT_SELECT_GROUP_TAG`](/doc/bot_select_group_tag-32a3ghmnlK) | Changes the active group tag/title to the corresponding role UUID. |
| **Friendship commands** |
| [`BOT_OFFER_FRIENDSHIP`](/doc/bot_offer_friendship-SIbt2akcAG) | Commands bot to offer friendship to someone. |
| [`BOT_UNFRIEND`](/doc/bot_unfriend-wyXnljdhQo) | Commands bot to remove a friend. |
| [`BOT_FRIENDSHIP_CAN_EDIT`](/doc/bot_friendship_can_edit-6qmBBW4OyI) | Controls a friend's ability to edit/take objects owned by the bot. |
| [`BOT_FRIENDSHIP_SEE_ONLINE`](/doc/bot_friendship_see_online-IKQ4ER5xyK) | Controls a friend's ability to see the bot's online status. |
| [`BOT_FRIENDSHIP_SEE_ON_MAP`](/doc/bot_friendship_see_on_map-SSnR4BnaS9) | Controls a friend's ability to see the bot's location on the map. |
| **Money and Inventory commands** |
| [`BOT_LISTEN_INVENTORY_OFFER`](/doc/bot_listen_inventory_offer-fsRH50hdUD) | Commands bot to listen to inventory offers. |
| [`BOT_LISTEN_MONEY_PAYMENTS`](/doc/bot_listen_money_payments-kVmadKu0nT) | Commands bot to notify the script every time it receives a payment. |
| [`BOT_GIVE_INVENTORY`](/doc/bot_give_inventory-OVVJgb1srt) | Commands bot to give an inventory object to someone. |
| [`BOT_GIVE_MONEY`](/doc/bot_give_money-Q75mjcUbgf) | Commands bot to give money to a specified UUID. |
| [`BOT_GIVE_MONEY_OBJECT`](/doc/bot_give_money_object-xdcr9I3gin) | Commands bot to give money to a specified object UUID. |
| [`BOT_GET_BALANCE`](/doc/bot_get_balance-v8VvSdJmns) | Requests the current L$ balance of the bot. |
| [`BOT_INVENTORY_DELETE`](/doc/bot_inventory_delete-Bzqs00vmeU) | Commands bot to delete an inventory item by its UUID. |
| [`BOT_NOTECARD_CREATE`](/doc/bot_notecard_create-WjD4Q2b991) | Commands bot to create a notecard in its inventory. |
| [`BOT_NOTECARD_EDIT`](/doc/bot_notecard_edit-963DTLhhn3) | Commands bot to edit the contents of a notecard by UUID. |
| [`BOT_NOTECARD_READ`](/doc/bot_notecard_read-DytBvZHgil) | Commands bot to return the contents of a notecard. |
| **Bot Appearance commands** |
| [`BOT_WEAR`](/doc/bot_wear-EwSVs3YXLE) | Commands bot to wear or add a specified item. |
| [`BOT_TAKEOFF`](/doc/bot_takeoff-Uenb9SdM0a) | Removes a clothing item, body part, or attachment. |
| [`BOT_REBAKE`](/doc/bot_rebake-s07SqzAnuw) | Commands bot to rebake its appearance (reload clothing and textures). |
| [`BOT_ATTACHMENTS`](/doc/bot_attachments-M3cR6t20fh) | Requests a list of attachments currently worn by the bot. |
| **Sim Management commands** |
| [`BOT_SIM_RESTART_START`](/doc/bot_sim_restart_start-3ruuDUW0L8) | Commands bot to begin a sim restart. |
| [`BOT_SIM_RESTART_STOP`](/doc/bot_sim_restart_stop-SUxFT3WXBp) | Commands bot to stop a sim restart. |
| [`BOT_SIM_SEND_MESSAGE`](/doc/bot_sim_send_message-cpedqPPwr0) | Sends a message to all avatars in the region (bot must be an estate manager). |
| [`BOT_SIM_KICK`](/doc/bot_sim_kick-102ntPKgRW) | Kicks an avatar from the region (bot must be an estate manager). |
| [`BOT_SIM_ACCESS`](/doc/bot_sim_access-f5BZ5vUXG8) | Controls access to a sim (requires estate manager). |
| [`BOT_SIM_ACCESS_ALL_ESTATES`](/doc/bot_sim_access_all_estates-xj12YZSRnH) | Controls access to all sims in the estate (requires estate manager). |
| **Misc. commands** |
| [`BOT_LISTEN_DIALOG`](/doc/bot_listen_dialog-yCJVr2brln) | Commands bot to send dialog requests to the script. |
| [`BOT_TOUCH_OBJECT`](/doc/bot_touch_object-NExdbDnE3e) | Commands bot to touch an object. |
| [`BOT_ATTACHMENT_OBJECT`](/doc/bot_attachment_object-isYprLdoX9) | Commands bot to touch an object currently being worn. |
| [`BOT_DIALOG_REPLY`](/doc/bot_dialog_reply-bMiB1Hj4YO) | Commands bot to reply to a dialog menu. |


---

**Note:**  
The numeric values for all commands and events are [available here](/doc/header-variables-Tikneu2QHc).

---

**Documents**

- [BOT_ACTIVATE_GROUP](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_activate_group-UsQvkzLPvb)
- [BOT_ATTACHMENT_OBJECT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_attachment_object-isYprLdoX9)
- [BOT_ATTACHMENTS](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_attachments-M3cR6t20fh)
- [BOT_DIALOG_REPLY](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_dialog_reply-bMiB1Hj4YO)
- [BOT_FLY](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_fly-jKTBCnZX6A)
- [BOT_FRIENDSHIP_CAN_EDIT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_friendship_can_edit-6qmBBW4OyI)
- [BOT_FRIENDSHIP_SEE_ON_MAP](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_friendship_see_on_map-SSnR4BnaS9)
- [BOT_FRIENDSHIP_SEE_ONLINE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_friendship_see_online-IKQ4ER5xyK)
- [BOT_GET_BALANCE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_get_balance-v8VvSdJmns)
- [BOT_GIVE_INVENTORY](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_give_inventory-OVVJgb1srt)
- [BOT_GIVE_MONEY](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_give_money-Q75mjcUbgf)
- [BOT_GIVE_MONEY_OBJECT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_give_money_object-xdcr9I3gin)
- [BOT_GROUP_EJECT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_group_eject-UHbcOZP1Hg)
- [BOT_GROUP_INVITE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_group_invite-XN5pea6eIw)
- [BOT_GROUP_JOIN](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_group_join-aZYHHG7QKY)
- [BOT_GROUP_LEAVE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_group_leave-EBAsxndubD)
- [BOT_GROUP_SET_ROLE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_group_set_role-QUkl5x6LaZ)
- [BOT_INSTANT_MESSAGE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_instant_message-WKMqIiPSls)
- [BOT_INVENTORY_DELETE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_inventory_delete-Bzqs00vmeU)
- [BOT_LIST_GROUP_ROLES](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_list_group_roles-XLuRsiKOh0)
- [BOT_LIST_GROUPS](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_list_groups-caei0kxuan)
- [BOT_LISTEN_DIALOG](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_listen_dialog-yCJVr2brln)
- [BOT_LISTEN_IM](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_listen_im-2QHZDDSRdP)
- [BOT_LISTEN_INVENTORY_OFFER](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_listen_inventory_offer-fsRH50hdUD)
- [BOT_LISTEN_LOCAL_CHAT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_listen_local_chat-D6I9wfQBZ6)
- [BOT_LISTEN_MONEY_PAYMENTS](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_listen_money_payments-kVmadKu0nT)
- [BOT_LOCATION](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_location-Dokm8bly0V)
- [BOT_LOGIN](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_login-7pp1AfqB8J)
- [BOT_LOGOUT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_logout-Wf1BodzgBl)
- [BOT_NOTECARD_CREATE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_notecard_create-WjD4Q2b991)
- [BOT_NOTECARD_EDIT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_notecard_edit-963DTLhhn3)
- [BOT_NOTECARD_READ](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_notecard_read-DytBvZHgil)
- [BOT_OFFER_FRIENDSHIP](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_offer_friendship-SIbt2akcAG)
- [BOT_OFFER_TELEPORT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_offer_teleport-HwmeaM6Ycs)
- [BOT_REBAKE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_rebake-s07SqzAnuw)
- [BOT_RESET_TOTALCONTROL](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_reset_totalcontrol-qVXkHn37kw)
- [BOT_SAY_CHAT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_say_chat-hfFUVheiLv)
- [BOT_SAY_GROUP_CHAT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_say_group_chat-PuDgRV2MUn)
- [BOT_SELECT_GROUP_TAG](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_select_group_tag-32a3ghmnlK)
- [BOT_SEND_NOTICE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_send_notice-abaoScZsi8)
- [BOT_SETUP_DEBUG](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_setup_debug-4vQJ2uDHDI)
- [BOT_SETUP_DEVICENAME](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_setup_devicename-1lFWfN6nwQ)
- [BOT_SETUP_SETBOT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_setup_setbot-ojcvi28wUW)
- [BOT_SETUP_SETLINK](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_setup_setlink-cBLIZs0HzG)
- [BOT_SETUP_SETOPTIONS](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_setup_setoptions-BrjAd0d9Ol)
- [BOT_SIM_ACCESS](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_sim_access-f5BZ5vUXG8)
- [BOT_SIM_ACCESS_ALL_ESTATES](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_sim_access_all_estates-xj12YZSRnH)
- [BOT_SIM_KICK](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_sim_kick-102ntPKgRW)
- [BOT_SIM_RESTART_START](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_sim_restart_start-3ruuDUW0L8)
- [BOT_SIM_RESTART_STOP](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_sim_restart_stop-SUxFT3WXBp)
- [BOT_SIM_SEND_MESSAGE](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_sim_send_message-cpedqPPwr0)
- [BOT_SIT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_sit-UOy3htTq8H)
- [BOT_STAND](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_stand-D9KEYhjSPW)
- [BOT_STATUS_QUERY](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_status_query-WFtwbugPQj)
- [BOT_TAKEOFF](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_takeoff-Uenb9SdM0a)
- [BOT_TELEPORT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_teleport-cO1XhLCEFX)
- [BOT_TOUCH_OBJECT](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_touch_object-NExdbDnE3e)
- [BOT_UNFRIEND](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_unfriend-wyXnljdhQo)
- [BOT_WALK](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_walk-kdetnUBssy)
- [BOT_WALKTO](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_walkto-hSZyVVVf2V)
- [BOT_WEAR](https://sb-docs-dev.getoutline.com/s/dev/doc/bot_wear-EwSVs3YXLE)