Implemented the Follow Player chat bot.

This commit is contained in:
Milutinke 2022-09-09 15:39:41 +02:00
parent 223c13561c
commit c7ba5e5fa3
5 changed files with 225 additions and 4 deletions

View file

@ -249,3 +249,14 @@ items= # separate each item name with a comma ',': It
# /!\ You SHOULD use /replay stop or exit the program gracefully with /quit OR THE REPLAY FILE MAY GET CORRUPT!
enabled=false
backupinterval=300 # How long should replay file be auto-saved, in seconds. Use -1 to disable
[FollowPlayer]
# Enabled you to make the bot follow you
# NOTE: This is an experimental feature, 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 terain handling) and thus slow the bot even more.
enabled=false
update_limit=10 # The rate at which the bot does calculations (10 = 1s) (Default: 5) (You can tweak this if you feel the bot is too slow)
stop_at_distance=3 # Do not follow the player if he is in the range of 3 blocks (prevents the bot from pushing a player in an infinite loop)

View file

@ -515,6 +515,26 @@ bot.replayCapture.created=Replay file created.
bot.replayCapture.stopped=Record stopped.
bot.replayCapture.restart=Record was stopped. Restart the program to start another record.
# Follow player
cmd.follow.desc=Makes the bot follow a specified player
cmd.follow.usage=follow <player name|stop> [-f] (Use -f to enable un-safe walking)
cmd.follow.already_stopped=Already stopped
cmd.follow.stopping=Stopped following!
cmd.follow.invalid_name=Invalid or empty player name provided!
cmd.follow.invalid_player=The specified player is either not connected out out of the range!
cmd.follow.cant_reach_player=Can\'t reach the player, he is either in chunks that are not loaded, too far away or not reachable by a bot due to obstacles like gaps or water bodies!
cmd.follow.already_following=Already following {0}!
cmd.follow.switched=Switched to following {0}!
cmd.follow.started=Started following {0}!
cmd.follow.unsafe_enabled=Enabled us-safe walking (NOTE: The bot might die or get hurt!)
cmd.follow.note=NOTE: The bot is quite slow, you need to walk slowly and at a close distance for it to be able to keep up, kinda like when you make animals follow you by holding food in your hand. This is a limitation due to a pathfinding algorithm, we are working to get a better one.
cmd.follow.player_came_to_the_range=The player {0} came back to the range!
cmd.follow.resuming=Resuming to follow!
cmd.follow.player_left_the_range=The player {0} has left the range!
cmd.follow.pausing=Pausing!
cmd.follow.player_left=The player {0} left the server!
cmd.follow.stopping=Stopped!
# Script
bot.script.not_found=§8[MCC] [{0}] Cannot find script file: {1}
bot.script.file_not_found=File not found: '{0}'