на лонике выкидывает именно руны, с остальным всё нормально
даже со сбросом спринта при свапах
автотатик деф экспы
// если что все вопросы иди к нейросетям я выпилил со своего софта ( прочем старого)
// ну вроде байпасит
@Module.Info(name = "AutoTotem", category = Category.COMBAT)
public class AutoTotem extends Module {
private final Setting<Mode> mode = new Setting<>("Mode", Mode.Normal); // Normal или Soft для Lony
private final Setting<Integer> health = new Setting<>("Health", 16, 1, 20); // HP threshold
private final Setting<Boolean> offhandOnly = new Setting<>("OffhandOnly", true); // Только offhand
private final Setting<Boolean> checkFall = new Setting<>("CheckFall", true); // Totem при фолле
private final Setting<Float> fallDist = new Setting<>("FallDistance", 5.0f, 3.0f, 15.0f);
private final Setting<Boolean> antiDesync = new Setting<>("AntiDesync", true); // Фикс inventory desync на анархии
private final Setting<Integer> delay = new Setting<>("DelayTicks", 2, 0, 10); // Рандом delay для байпаса
enum Mode { Normal, Soft } // Soft - медленнее, но safer на Lony Sloth
@EventHandler
private final Listener<PlayerTickEvent> onTick = new Listener<>(event -> {
if (mc.player == null || mc.world == null) return;
boolean needTotem = mc.player.getHealth() + mc.player.getAbsorptionAmount() <= health.getValue()
|| (checkFall.getValue() && mc.player.fallDistance >= fallDist.getValue());
if (!needTotem && !offhandOnly.getValue()) return; // Если offhandOnly - всегда чек offhand
Item totem = Items.TOTEM_OF_UNDYING;
int totemSlot = findTotemSlot();
if (totemSlot == -1) return; // Нет тотемов
int targetSlot = offhandOnly.getValue() ? 40 : getBestSlot(); // 40 = offhand
if (mc.player.getHeldItemOffhand().getItem() == totem && !needTotem) return;
int randomDelay = ThreadLocalRandom.current().nextInt(0, delay.getValue() + 1);
if (mc.player.ticksExisted % (3 + randomDelay) != 0) return; // Рандом тики для байпаса timer checks
if (mode.getValue() == Mode.Soft) {
if (totemSlot < 9) totemSlot += 36; // Hotbar to inventory
mc.playerController.windowClick(mc.player.inventoryContainer.windowId, totemSlot, 0, ClickType.PICKUP, mc.player);
mc.playerController.windowClick(mc.player.inventoryContainer.windowId, 40 + (offhandOnly.getValue() ? 0 : 5), 0, ClickType.PICKUP, mc.player);
mc.playerController.windowClick(mc.player.inventoryContainer.windowId, totemSlot, 0, ClickType.PICKUP, mc.player);
} else {
InventoryUtil.switchToSlot(targetSlot == 40 ? totemSlot : targetSlot, false);
if (targetSlot == 40) {
mc.playerController.pickItem(totemSlot); // Quick move to offhand
}
}
if (antiDesync.getValue()) {
mc.player.connection.sendPacket(new CPacketPlayerTryUseItem(EnumHand.OFF_HAND));
if (ThreadLocalRandom.current().nextBoolean()) {
mc.player.connection.sendPacket(new CPacketClickWindow(mc.player.inventoryContainer.windowId, 40, 0, ClickType.QUICK_MOVE, new ItemStack(totem), (short)0));
}
}
});
private int findTotemSlot() {
for (int i = 0; i < 36; i++) {
if (mc.player.inventory.getStackInSlot(i).getItem() == Items.TOTEM_OF_UNDYING) {
return i < 9 ? i + 36 : i;
}
}
if (mc.player.getHeldItemOffhand().getItem() == Items.TOTEM_OF_UNDYING) return 40;
return -1;
}
private int getBestSlot() {
if (mc.player.getHeldItemOffhand().getItem() == Items.TOTEM_OF_UNDYING) return 40;
return mc.player.getHeldItemMainhand().getItem() == Items.AIR ? 0 : 40;
}
}