Skip to content

Commit

Permalink
AntiBot && FamousCheck Update
Browse files Browse the repository at this point in the history
  • Loading branch information
XeContrast committed Nov 2, 2024
1 parent 018737d commit cc50a3e
Show file tree
Hide file tree
Showing 14 changed files with 319 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ class FamousCheck : Module() {
val hackerList = listOf(
//Hacker 包含词
HackerData("A_Equal","A_Equal"),
HackerData("Equal","A_Equal"),
HackerData("AKQ33","A_Equal"),
HackerData("Holiday_","Holiday"),
HackerData("Xe_","Xe及他的儿子"),
HackerData("MouCha","Holiday"),
HackerData("Xe_","Xebook1(Owner)"),
HackerData("longyan","LongYan"),
HackerData("longsir","WanFan"),
HackerData("RealLonbg","WanFan"),
Expand All @@ -36,7 +38,12 @@ class FamousCheck : Module() {
HackerData("Rem_","沭桦Next"),
HackerData("ImSad_","BoySir_"),
HackerData("RN_","Random_Name"),
HackerData("DouSha","豆沙"),
HackerData("Zekruin","蒸菜icu"),

HackerData("Yao_Mao"),
HackerData("Bad_Smoke"),
HackerData("tea_tea"),
)

world.playerEntities.forEach { other ->
Expand All @@ -52,6 +59,28 @@ class FamousCheck : Module() {
}
}
}

val playerInfoMap = mc.netHandler?.playerInfoMap ?: return

val playerInfos = synchronized(playerInfoMap) {
playerInfoMap.mapNotNull { playerInfo ->
playerInfo?.gameProfile?.name?.let { playerName ->
playerName to playerInfo.responseTime
}
}
}

playerInfos.forEach { (player, _) ->
hackerList.forEach { checker ->
if (checker.check(player) && !sentMessages.contains(player) && player != mc.thePlayer.name) {
sentMessages.add(player)
when (sendMode.get().lowercase()) {
"sendchat" -> mc.thePlayer.sendChatMessage("发现Hacker:${player}(${checker.message})")
"alert" -> Chat.alert("发现Hacker:${player}(${checker.message})")
}
}
}
}
}
}
}
Expand Down Expand Up @@ -88,7 +117,7 @@ class FamousCheck : Module() {
}

@EventTarget
private fun onWorld(event: WorldEvent) {
fun onWorld(event: WorldEvent) {
sentMessages.clear()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ object AutoProjectile : Module() {
facingEntity = raycastEntity(range.get().toDouble()) { isSelected(it, true) }
}

if (facingEntity?.let { isSelected(it, true) } == true) {
if (isSelected(facingEntity ?: return, true)) {
throwProjectile = true
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ object AutoRod : Module() {
}
}

if (isSelected(facingEntity!!, true)) {
if (isSelected(facingEntity ?: return, true)) {
// Checks how many enemy is nearby, if <= then should rod.
if (nearbyEnemies?.size!! <= enemiesNearby.get()) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,6 @@ object Criticals : Module() {
if (packet is S08PacketPlayerPosLook) {
flagTimer.reset()
antiDesync = false
if (debugValue.get()) {
alert("FLAG")
}
/*
if (s08FlagValue.get()) {
jState = 0
}
*/
}

if (packet is C03PacketPlayer && (MovementUtils.isMoving || syncTimer.hasTimePassed(1000L) || msTimer.hasTimePassed(
Expand Down
Loading

0 comments on commit cc50a3e

Please sign in to comment.