Conversation
replaces keepalive.sc therefore fixes gnembon#408 and fixes gnembon#388
| 's' -> p~'selected_slot', | ||
| 'c' -> p~'sneaking', | ||
| 'at' -> p~'swinging', | ||
| 'u' -> false, |
There was a problem hiding this comment.
'u' stands for 'using' and this is a planned feature. But I didn't find a way to determine it the player is continuously using an item yet.
There was a problem hiding this comment.
Hello, Rocka84! I have been experimenting with my own version of keepalive.sc or logout_bot.sc. I solve this problem by monitoring __on_player_command(player, command) event. Since controlling bots has to be done with commands, monitoring whether the player sends a command with use continuous or use interval <tick> is a workaround to the problem. However, this workaround fails when using extensions like Gugle Carpet Addition, or GCA for short, because it does not send a command when clicking a button for "use continous". The rest of this workaround contains monitoring player stop commands, player_dies event, and so on.
Your implementation is really inspiring to me, and here is my implementation of logging bots out and in when players logging out and in. This script is pretty buggy but hopefully gives you some ideas.
Hi!
bots.sc is an enhanced replacement for keepalive.sc.
It can save and restore sets of bots (carpet players) and autosave/restore bots on server restart
It functionally replaces keepalive.sc therefore fixes #408 and fixes #388