[Help] Porting Core.
Unsolved
Support
-
here is it
var scriptName = "MatrixAntiBot"; var scriptAuthor = "CzechHek"; var scriptVersion = 3.5; var S38PacketPlayerListItem = Java.type("net.minecraft.network.play.server.S38PacketPlayerListItem"); var S41PacketServerDifficulty = Java.type("net.minecraft.network.play.server.S41PacketServerDifficulty"); var wasAdded; function MatrixAntiBot() { this.getName = function() { return "MatrixAntiBot"; }; this.getDescription = function() { return "antibot (matrix proof)"; }; this.getCategory = function() { return "Combat"; }; this.onPacket = function(e) { if (e.getPacket() instanceof S41PacketServerDifficulty) wasAdded = false; if (e.getPacket() instanceof S38PacketPlayerListItem && e.getPacket().getAction() == "ADD_PLAYER") { var info = e.getPacket().getEntries().get(0); var name = info.getProfile().getName(); if (!wasAdded) { wasAdded = name != mc.thePlayer.getName(); } else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") { chat.print("Removed a bot"); e.cancelEvent(); } } } } var matrixantibot = new MatrixAntiBot(); function onEnable() { moduleManager.registerModule(matrixantibot); }; function onDisable() { moduleManager.unregisterModule(matrixantibot); };
it seems to be working but not sure
it's a 5-months old script it's probs patched tho -
@nvinci said in [Help] Porting Core.:
here is it
if (!wasAdded) { wasAdded = name != mc.thePlayer.getName();
@omnomnom said in [Help] Porting Core.:
if (!wasAdded) wasAdded = name == mc.thePlayer.getName();
-
@czechhek Oh so do I just replace that, and this is what it should be, right?
if (!wasAdded) wasAdded = name == mc.thePlayer.getName(); else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") { chat.print("§2§lRemoved a Matrix bot§a"); e.cancelEvent();