- [List of built-in Chat Bots](#list-of-built-in-chat-bots)
- [Creating your own](creating-bots.md)
## About
**Minecraft Console Client** has a number of default built in Chat Bots (Scripts/Plugins) which allow for various types of automation.
> **⚠️ IMPORTANT WARNING: Recently we have changed the configuration format from INI to TOML, this part of the documentation has only been partially updated, it's work in progress, for the time being please refer to the `MinecraftClient.ini` for setting names, the descriptions and options should be up to date in most cases, but not guaranteed.**
> **ℹ️ NOTE: Settings refer to settings in the [configuration file](configuration.md)**
If the `min` and `max` are the same, the time interval will be consistent. If the `min` and `max` are the same, the time interval will be consistent. However if they are not the same, the plugin will choose a random number between `min` and `max`, this is useful if you want to have a random interval to trick anti afk plugins.
> **ℹ️ NOTE: You need to enable [Terrain Handling](configuration.md#terrainandmovements) in the settings and it's recommended to put the bot into an enclosure not to wander off. (Recommended size 5x5x5) (Recommended size 5x5x5)**
This is the number of times the bot will try to pathfind, if he can't find a valid path for 20 times, he will use the command method.
> **ℹ️ NOTE: This happens on each trigger of the task, so it does not permanently switch to alternative method.**
-**Default:**`20`
## Auto Attack
-**Description:**
Automatically attacks mobs around you, you can configure it to attack both hostile and passive mobs and only certain mobs or all mobs.
> **ℹ️ NOTE: You need to have [inventoryhandling](configuration.md#inventoryhandling) and [entityhandling](configuration.md#entityhandling) enabled in order for this bot to work.**
-**Settings:**
**Section:****`ChatBot.AutoAttack`**
#### `Enabled`
-**Description:**
This setting specifies if the Auto Attack Chat Bot is enabled.
Automatically craft items in your inventory or in a crafting table.
> **ℹ️ NOTE: You need to have [inventoryhandling](configuration.md#inventoryhandling) enabled in order for basic crafting in the inventory to work, in addition if you want to use a crafting table, you need to enable [terrainandmovements](configuration.md#terrainandmovements) in order for bot to be able to reach the crafting table.**
-**Commands:**
-`/autocraft list`
List all loaded recipes.
-`/autocraft start <name>`
Start the crafting process with the given recipe name you had defined.
This setting is an array/list of material names (strings) that go into an each slot (max 9 elements). Empty slots should be marked with `"Null"` Empty slots should be marked with `"Null"`
> **ℹ️ NOTE: If you have a case where you have to leave some fields empty, use `"Null"` to mark them as empty. Example for stone bricks: `Slots = [ "Stone", "Stone", "Null", "Stone", "Stone", "Null", "Null", "Null", "Null", ]` Example for stone bricks: `Slots = [ "Stone", "Stone", "Null", "Stone", "Stone", "Null", "Null", "Null", "Null", ]`**
> **ℹ️ NOTE: All item types can be found [here](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/Inventory/ItemType.cs).**
> **ℹ️ NOTE: Make sure to provide materials for your bot by placing them in inventory first.**
## Auto Dig
-**Description:**
Automatically digs block on specified locations.
> **ℹ️ NOTE: You need to have [inventoryhandling](configuration.md#inventoryhandling) and [terrainandmovements](configuration.md#terrainandmovements) enabled in order for this bot to work.**
> **ℹ️ NOTE: Since MCC does not yet support accurate calculation of the collision volume of blocks, all blocks are considered as complete cubes when obtaining the position of the lookahead.**
This setting is where you can specify the list of items which you want to drop, or keep.
> **ℹ️ NOTE: All item types can be found [here](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/Inventory/ItemType.cs).**
> **ℹ️ NOTE: You need to have [entityhandling](configuration.md#entityhandling) enabled in order for this bot to work.**
> **ℹ️ NOTE: To use the automatic rod switching and durability check feature, you need to enable [inventoryhandling](configuration.md#inventoryhandling).**
> **ℹ️ NOTE: Note: To adjust the position or angle after catching a fish, you need to enable [terrainandmovements](configuration.md#terrainandmovements).**
> **ℹ️ NOTE: A fishing rod with **Mending enchantment** is strongly recommended.**
**Steps for using this bot (with the default setting)**
1. Hold a fishing rod and aim towards the sea before login with MCC
2. Make sure `AutoFish` is `enabled` in config file
3. Login with MCC
4. You will be able to see the log "Fishing will start in 3.0 second(s).".
For each movement of the fishhook entity (entity movement packet), if the distance on both X and Z axes is below this threshold it will be considered as stationary.
This is to avoid being detected as a bite during the casting of the hook.
**If set too high, it will cause the rod to be reeled in while casting.**
**If set too low, it will result in not detecting a bite.**
For each movement of the fishhook entity (entity movement packet), if it is stationary (check `stationary_threshold`) and its movement on the Y-axis is greater than this threshold, it will be considered to have caught a fish.
If it is set too high, it will cause normal bites to be ignored.
If set too low, it can cause small fluctuations in the hook to be recognized as bites.
When turned on it will be print a log every time a fishhook entity movement packet is received.
If auto-fishing does not work as expected, turn this option on to adjust `stationary_threshold` and `hook_threshold`, or create an issue and attach these logs.
If the `min` and `max` are the same, the time will be consistent, however, if you want a random time, you can set `min` and `max` to different values to get a random time. The time format is in seconds, and the type is double. (eg. `37.0`) The time format is in seconds, and the type is double. (eg. `37.0`)
A list of words which should trigger the Auto Reconnect Chat Bot.
-**Format:**`[ "<keyword>", "<keyword>", ... ]`
-**Type:**`array of strings`
-**Default:**`[ "Connection has been lost", "Server is restarting", "Server is full", "Too Many people", ]`
## Auto Respond
-**Description:**
Run commands or send messages automatically when a specified pattern is detected in the chat.
> **⚠️ WARNING: Server admins can spoof PMs (`/tellraw`, `/nick`) so enable `AutoRespond` only if you trust server admins.**
> **⚠️ WARNING: This bot may get spammy depending on your rules, although the global [messagecooldown](configuration.md#messagecooldown) setting can help you avoiding accidental spam.**
-**Settings:**
**Section:****`ChatBot.AutoRespond`**
#### `Enabled`
-**Description:**
This setting specifies if the Auto Respond Chat Bot is enabled.
This setting specifies the path to the file which contains the list of rules for detecting of keywords and responding on them.
To find out how to configure the rules, take a look at the [`sample-matches.ini`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/sample-matches.ini) which has very detailed examples and a lot of comments.
_PS: In the future we will document the rules here with examples too._
> **ℹ️ NOTE: This file is not created by default, we recommend making a clone of the [`sample-matches.ini`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/sample-matches.ini) and changing it according to your needs.**
> **ℹ️ NOTE: The bot can be slow at times, you need to walk with a normal speed and to sometimes stop for it to be able to keep up with you, it's similar to making animals follow you when you're holding food in your hand. This is due to a slow pathfinding algorithm, we're working on getting a better one. You can tweak the update limit and find what works best for you. (NOTE: Do not but a very low one, because you might achieve the opposite, this might clog the thread for terrain handling) and thus slow the bot even more. This is due to a slow pathfinding algorithm, we're working on getting a better one. You can tweak the update limit and find what works best for you. (NOTE: Do not but a very low one, because you might achieve the opposite, this might clog the thread for terrain handling) and thus slow the bot even more.**
> **ℹ️ NOTE: You need to have [terrainandmovements](configuration.md#terrainandmovements) and [entityhandling](configuration.md#entityhandling) enabled in order for this bot to work.**
-**Settings:**
**Section:****`ChatBot.FollowPlayer`**
#### `Enabled`
-**Description:**
This setting specifies if the Follow Player Chat Bot is enabled.
Do not follow the player if he is in the range of `X` blocks (prevents the bot from pushing a player in an infinite loop).
-**Type:**`float`
-**Default:**`3.0`
## Hangman
-**Description:**
Hangman game is one of the first bots ever written for MCC, to demonstrate ChatBot capabilities.
Create a file with words to guess (examples: [`words-en.txt`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/hangman-en.txt), [`words-fr.txt`](https://github.com/MCCTeam/Minecraft-Console-Client/blob/master/MinecraftClient/config/hangman-fr.txt)) and set it in config inside the `[Hangman]` section.
Also set `enabled` to `true`, then, add your username in the `botowners` INI setting, and finally, connect to the server and use `/tell <bot username> start` to start the game.
> **ℹ️ NOTE: If the bot does not respond to bot owners, see the [Detecting chat messages](https://github.com/MCCTeam/Minecraft-Console-Client/tree/master/MinecraftClient/config#detecting-chat-messages) section.**
-**Settings:**
**Section:****`ChatBot.HangmanGame`**
#### `Enabled`
-**Description:**
This setting specifies if the Hangman Chat Bot is enabled.
-**Available values:**`true` and `false`.
-**Default:**`false`
#### `English`
-**Description:**
This setting specifies if the Hangman Chat Bot should use English.
The bot will automatically deliver the mail when the recipient is online. The bot will automatically deliver the mail when the recipient is online. The bot also offers a /mailer command from the MCC command prompt:
> **⚠️WARNING: The bot identifies players by their name (Not by UUID!). A nickname plugin or a Minecraft rename may cause mails going to the wrong player! Never write something to the bot you wouldn't say in the normal chat (You have been warned!). A nickname plugin or a Minecraft rename may cause mails going to the wrong player! Never write something to the bot you wouldn't say in the normal chat (You have been warned!).**
This setting specifies the path to the file where the Mailer Chat Bot will load people who are to be ignored by the Chat Bot. If you want to prevent someone from using this chat bot, add him in this file by writing his nickname on a new line. If you want to prevent someone from using this chat bot, add him in this file by writing his nickname on a new line.
This Chat Bot allows you to render items maps into `.jpg` images.
This is useful for solving captchas on servers which require it, or saving the map art into an image.
The maps are **rendered** into `Rendered_Maps` folder.
> **⚠️WARNING: This bot has only been tested on Windows 10, it may not work on Linux or Mac OS due to .NET BitMap API. We're looking forward to swap the underlaying Bitmap API dependency with a library.**
-**Commands:**
When enabled will add the `/maps` command.
**Usage**:
```
/maps <list/render<id>> | maps <l/r<id>>
```
-**Settings:**
**Section:****`ChatBot.Map`**
#### `Enabled`
-**Description:**
This setting specifies if the Map Chat Bot is enabled.
This setting specifies if the Map Chat Bot should automatically render maps as they're received from the servers.
> **⚠️WARNING: On some versions older than 1.17 this could cause some performance issue on older hardware if there a lot of maps being rendered, since map updates are sent multiple times a second. Be careful.**
Send MCC console commands to your bot through server PMs (`/tell`).
You need to have [ChatFormat](configuration.md#chat-format) working correctly and add yourself in [botowners](configuration.md#botowners) to use the bot.
> **⚠️WARNING: Server admins can spoof PMs (`/tellraw`, `/nick`) so enable `RemoteControl` only if you trust server admins.**
-**Settings:**
**Section:****`ChatBot.RemoteControl`**
#### `Enabled`
-**Description:**
This setting specifies if the Remote Control Chat Bot is enabled.
Each task is defined as a new subsection `[[ChatBot.ScriptScheduler.TaskList]]` of the section: `[ChatBot.ScriptScheduler]`.
**Subsection format:**
```toml
[[ChatBot.ScriptScheduler.TaskList]]
<setting> = <value>
<setting> = <value>
```
> **ℹ️ NOTE: It is recommended that you align subsections to the right by one tab or 4 spaces for better readability.**
**Avaliable settings/options:**
-`Trigger_On_First_Login`
Will trigger the task when you login the first time.
**Available values**: `true` and `false`
**Type**: `boolean`
-`Trigger_On_Login`
Will trigger the task each time you login.
**Available values**: `true` and `false`
**Type**: `boolean`
-`Trigger_On_Times`
This will enable the task to trigger at exact time(s) you want.
The type of this setting is `inline table`, that has the following sub-settings/options:
-`Enable` - Enables/Disables the setting (Boolean, so either `true` or `false`)
-`Times` - An array/list of times on which the task should run/trigger (each element is of the [Local Time](https://toml.io/en/v1.0.0#local-time) type, eg. `14:00:00`, so: `hours:minutes:seconds`)
This will enable the task to trigger at certain interval which you've defined.
The type of this setting is `inline table`, that has the following sub-settings/options:
-`Enable` - Enables/Disables the setting (Boolean, so either `true` or `false`)
-`MinTime` - Time in seconds (the type is `double`, eg. `3.14`)
-`MaxTime` - Time in seconds (the type is `double`, eg. `3.14`)
**If `MinTime` and `MaxTime` are the same, the interval will be consistent, however if they are not, the ChatBot will generate a random interval in between those two numbers provided, each time the task is run.**