Jire / Charlatano

Proves JVM cheats are viable on native games, and demonstrates the longevity against anti-cheat signature detection systems
GNU Affero General Public License v3.0
674 stars 205 forks source link

Make aimbot/triggerbot work on team #374

Open hubslave opened 7 years ago

hubslave commented 7 years ago

Hi, I'm playing on a server in which everyone is on T side, and I've yet to find a way to make the aimbot/triggerbot work on non-enemy players.

I've tried removing && me.team() != team() in \src\main\kotlin\com\charlatano\scripts\aim\General.kt:

internal fun Entity.canShoot()
        = spotted()
        && !dormant()
        && !dead()
        && me.team() != team()
        && !me.dead()

As well as replacing it by && me.team() == entity.team(), but that didn't work. Any ideas? Thanks

moofMonkey commented 7 years ago

idk, try to search all same conditions. May be there's already array with only enemies?

hubslave commented 7 years ago

OK so I found an array with team members: ccsPlayer (in EntityType.kt) Seems to me like this piece of code (in General.kt) has something to do with what I'm looking for:

    forEntities(ccsPlayer) {
        val entity = it.entity
        if (entity <= 0) return@forEntities
        if (!entity.canShoot()) return@forEntities

        val ePos: Angle = entity.bones(boneID)
        val distance = position.distanceTo(ePos)

        val dest = calculateAngle(me, ePos)

        val pitchDiff = Math.abs(angle.x - dest.x)
        val yawDiff = Math.abs(angle.y - dest.y)
        val delta = Math.abs(Math.sin(Math.toRadians(yawDiff)) * distance)
        val fovDelta = Math.abs((Math.sin(Math.toRadians(pitchDiff)) + Math.sin(Math.toRadians(yawDiff))) * distance)

        if (fovDelta <= lockFOV && delta < closestDelta) {
            closestDelta = delta
            closestPlayer = entity
            closestFOV = fovDelta
        }
    }

Removing ! in if (!entity.canShoot()) return@forEntities somewhat worked but with unexpected behavior (no aimbot, triggerbot gets triggered randomly). Any help? @Jire @Austin72