Skip to content

Comments

added bots.sc#426

Open
Rocka84 wants to merge 2 commits intognembon:masterfrom
Rocka84:bots
Open

added bots.sc#426
Rocka84 wants to merge 2 commits intognembon:masterfrom
Rocka84:bots

Conversation

@Rocka84
Copy link

@Rocka84 Rocka84 commented May 17, 2025

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

replaces keepalive.sc therefore fixes gnembon#408 and fixes gnembon#388
's' -> p~'selected_slot',
'c' -> p~'sneaking',
'at' -> p~'swinging',
'u' -> false,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

keepalive.sc not working properly keepalive.sc doesn't load fake players past the first one

3 participants