Approch to prevent AFK bots.

Discussion in 'Spigot Plugin Development' started by fujiboy4, Jun 6, 2017.

  1. Me (The Developer) and the owner of a server are coming across a problem with AFK bots in the factions server. Players make Iron Golem spawners in their bases and then make it automatic in which they only need to open the chest and retrieve the iron. From what we have researched, they seem to be using a Macro/keybind mod and then scripting their own programs to move their players around and sell iron for them while afk. One player has tons of money while doings.

    Here are some of the known bots:


    AFK Iron Golem Spawner Seller:
    They will use different keybinds to walk up to their chests, open them, and get the iron. Then they execute /home selliron (i.e) and sell the iron at the signs. Then they use the /home iron to go back and repeat for hours...
    I was thinking we could use the approach of checking the commands and see if they are used over and over again. Or maybe something where they can only type a command only every other command. Although, that would probably be easily avoidable.


    ChatBot:
    This is similar to most other bots that include bots that will respond to the player that mentions it's name. Although, it's creative, it could end up in a bad situations in which players can put their bots to say whatever the heck they want.

    I am hoping you guys can help me come up with a solution. Thanks!
     
    #1 fujiboy4, Jun 6, 2017
    Last edited: Jun 7, 2017
  2. Why not send a quick capcha-style confirmation to any players that seem to be idling in certain conditions, something like "enter the sum of four and seven to prove you are not a bot", swap sum for other simple math and use random numbers in a textual representation, or do a "which of the following does not belong" question (absolutely botproof but a bit unusual).

    As far as detecting them, maybe just keep an eye on people who are not moving normally or staying in one spot near a hopper.
     
    • Like Like x 1
  3. I actually really like that idea. Maybe instead of detecting weird movements, I could check every i.e. 10 minutes and ask them a simple math problem or to retype a word in chat. And if they don't respond in 10 minutes, then you can kick them. It would also get rid of afk farming for the people who sit near spawners afk.
     
  4. What I'd do is check for the player's yaw and pitch. Yaw and pitch hasn't changed in a while, they are considered afk. This method stops players using water as an anti-afk method or just not moving at all.
     
    • Like Like x 2
  5. Yeah that seems like a pretty clever method of doing that kind of check.
     
  6. These both might work. If the chat bot is just sitting afk, then it can be easily kicked if the yaw/pitch isn't changed. And then the other one will confirm the afk bot will be kicked.
     
  7. I also have another idea. Maybe if I make the player click in the chat, using the ChatComponet. I looked into the Macro / Keybind mod and it doesn't look like you can click in chat.
     
  8. U can click in chat with macros
    I like the Captcha idea a lot
     
    • Like Like x 1
  9. I'm currently looking at this: http://mkb.bplaced.net/wiki/commands
    From what it says, there doesn't seem to be a function for an AFK player to be able to click on text in minecraft.

    Granted, I know this would be annoying for some players on and off but it's to the point where players are using these macros like kill aura :/
     
  10. For the automated selling of iron, you could check if they open a chest (full of iron) and then open up a captcha inventory. Basically it gives you an inventory with all kinds of different items and it will ask you to click a certain one, if you click the wrong one or if you leave it open for to long, you could kick the player. Ofcourse you shouldn't open up the captcha every time they open up a chest of iron, but just make it random.
     
    • Like Like x 1
  11. I like it. But they can read chat and choose which item to pick. Maybe inventory titles?
     
  12. That could be a good anti bot. Open up a GUI named with random characters for 5 seconds then open up an anvil and ask the player to type those characters into the item name box.
     
    • Like Like x 1
  13. Yes exactly put the material you want them to pick in the title of your inventory
     
    • Like Like x 1
  14. Splazeing

    Supporter

    Also try that plugin to only allow X online alts/players per IP on your bungeecord.
     
    • Like Like x 1