LiquidBounce icon indicating copy to clipboard operation
LiquidBounce copied to clipboard

Added AntiBot module.

Open mems01 opened this issue 4 years ago • 13 comments

  • 4 modes: Custom, Matrix, IntaveHeavy and Horizon.
  • Matrix: Tested on Loyisa/Tree/Matrix test servers, Jartex/PikaNetwork.
  • Intave: Tested on Gamster.
  • Horizon: Tested on Loyisa. That anticheat is probably not used anywhere else other than test servers, but I'm adding it just for the sake of its sort of decent bot. If you don't want it, fine by me, I can remove it.

mems01 avatar Oct 18 '21 17:10 mems01

Interesting false positives check, however you could avoid removing players since you can simply edit KillAura's targets filter. That's not possible with scripts. There has to be a better way to detect them.

CzechHek avatar Oct 18 '21 19:10 CzechHek

I don't think there's a better way to detect them even though I have a few more methods to detect these bots, but these checks are more than enough and could easily get the job done with hopefully little to no false positives.

mems01 avatar Oct 18 '21 20:10 mems01

We will make players which are being detected as bots transparent or something, somehow mark them. Fully removing them is very bad.

1zun4secondary avatar Oct 18 '21 20:10 1zun4secondary

That's why I "hardcoded" that mode. I guarantee at least on the servers that I tested for months on, you won't notice false positives. If you do though, then I will put even more checks to it.

mems01 avatar Oct 18 '21 20:10 mems01

  • perhaps more but these are the most popular servers with a matrix anticheat.

Try it on test.matrix.rip

Ali00035 avatar Oct 19 '21 10:10 Ali00035

  • perhaps more but these are the most popular servers with a matrix anticheat.

Try it on test.matrix.rip

Also tested, forgot to put it.

Edited the post.

mems01 avatar Oct 19 '21 10:10 mems01

  • perhaps more but these are the most popular servers with a matrix anticheat.

Try it on test.matrix.rip

Also tested, forgot to put it.

Edited the post.

test.matrix.rip 's Matrix version is different than jartex/pika but ig you already know it

Ali00035 avatar Oct 19 '21 11:10 Ali00035

  • perhaps more but these are the most popular servers with a matrix anticheat.

Try it on test.matrix.rip

Also tested, forgot to put it.

Edited the post.

also can u unblock me on guilded cuz imma suggest some new shit which u can add

Ali00035 avatar Oct 19 '21 16:10 Ali00035

It is safe to say that the Matrix mode has a better accuracy/even less false positives than before. However, as it might not be exactly accurate (In terms of determining if the selected player is really a bot or just a normal player), I'd be better off just marking the player as a bot, just like CzechHek and 1zuna have suggested, but is there an easy way to do so? Because I don't really know what and how to implement that in the CombatExtensions file.

mems01 avatar Oct 23 '21 10:10 mems01

I have a possible solution/attempt with one problem. Without a module. I don't know where to put the event handler

You need 2 lists/maps: private val uuidNameMap = hashMapOf<UUID, String>() private val matrixBotList = ArrayList<UUID>()

a handler`for gathering:

` val packetHandler = handler<PacketEvent> { event -> val packet = event.packet

        if (packet is PlayerListS2CPacket) {
            when (packet.action) {
                PlayerListS2CPacket.Action.ADD_PLAYER -> {
                    for (entry in packet.entries) {


                        // Checks if Name already exist in map (same for world)
                        val duplicated = uuidNameMap.containsValue(entry.profile.name)
                        if (!duplicated)
                            uuidNameMap[entry.profile.id] = entry.profile.name


                        // Saves UUID to botList if duplicated
                        if (entry.latency > 0 && duplicated) {
                            matrixBotList.add(entry.profile.id)
                        }

                    }
                }
                PlayerListS2CPacket.Action.REMOVE_PLAYER -> {
                    for (entry in packet.entries) {
                        uuidNameMap.remove(entry.profile.id)
                    }
                }
            }
        }
    }`

and a simple addition to CombatExtension: ` fun isBot(player: ClientPlayerEntity): Boolean { if (!enabled) { return false }

        // Matrix check
        if (matrixBotList.contains(player.uuid))
            return true

        return false
    }`

But I have no idea how to get it together

bestnub avatar Nov 03 '21 13:11 bestnub

Okay so, my idea is that I essentially move all the antibot related code from CombatExtensions to the AntiBot module, just like how the legacy version has it. As for the Matrix mode, I have already made it work without removing players.

mems01 avatar Mar 17 '22 13:03 mems01

Added IntaveHeavy mode, plus a small Matrix mode improvement.

mems01 avatar Aug 02 '22 18:08 mems01

Plus added a new mixin. It modifies GameMode's class DEFAULT variable, setting its value to null, allowing the client to know a player's actual gamemode. DEFAULT = NOT_SET gamemode type in 1.8.X, but since it's removed on newer versions, they replaced it with that variable.

mems01 avatar Aug 08 '22 20:08 mems01