Исходник Reconnect ReallyWorld || expensive 2.0

Начинающий
Статус
Оффлайн
Регистрация
29 Ноя 2022
Сообщения
11
Реакции[?]
0
Поинты[?]
0
Reconnect на гриф риливорлда (noad) функцией.

Java:
package wtf.expensive.modules.impl.util;

import net.minecraft.inventory.container.ClickType;
import net.minecraft.scoreboard.ScoreObjective;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.player.EventUpdate;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.util.misc.TimerUtil;

@FunctionAnnotation(name = "Reconnect", type = Type.Util)
public class ReconnectFunction extends Function {
    private String grief;
    private int oldId;
    private int step;
    private final TimerUtil timerUtil = new TimerUtil();

    public ReconnectFunction() {}

    @Override
    public void onEvent(Event event) {
        if (event instanceof EventUpdate) {
            if (step == 0) {
                timerUtil.reset();
                grief = "1";
                for (ScoreObjective team : mc.world.getScoreboard().getScoreObjectives()) {
                    String gr = team.getDisplayName().getString();
                    if (gr.contains("ГРИФ #")) {
                        grief = gr.split("ГРИФ #")[1];
                        grief = grief.replaceAll(" ","");
                    }
                }
                mc.player.sendChatMessage("/hub");

                step = 1;
            } else if (step == 1) {
                if (timerUtil.hasTimeElapsed(1000)) {
                    timerUtil.reset();
                    step = 2;
                    mc.gameSettings.keyBindUseItem.setPressed(true);
                }
            } else if (step == 2) {
                if (timerUtil.hasTimeElapsed(500)) {
                    timerUtil.reset();
                    step = 3;
                    mc.gameSettings.keyBindUseItem.setPressed(false);
                }
            } else if (step == 3) {

                if (mc.player.openContainer.windowId != 0 && timerUtil.hasTimeElapsed(400)) {
                    timerUtil.reset();
                    step = 4;
                    oldId = mc.player.openContainer.windowId;
                    mc.playerController.windowClick(oldId, 22, 0, ClickType.PICKUP, mc.player);
                }
            } else if (step == 4) {
                if (timerUtil.hasTimeElapsed(1100) && mc.player.openContainer.windowId != oldId) {
                    timerUtil.reset();
                    int griefInt = Integer.parseInt(grief);
                    if (griefInt < 8) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 15) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 2, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 22) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 4, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 29) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 6, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 36) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 8, 0, ClickType.PICKUP, mc.player);
                    }
                    step = 0;
                    toggle();
                }

            }
        }
    }


}
 
Начинающий
Статус
Оффлайн
Регистрация
1 Май 2023
Сообщения
90
Реакции[?]
4
Поинты[?]
4K
Забаненный
Статус
Оффлайн
Регистрация
14 Фев 2023
Сообщения
70
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
10 Июн 2022
Сообщения
51
Реакции[?]
1
Поинты[?]
1K
да блин, я еще вообще не шарю, я смотрю как люди делают и пытаюсь разобраться
кто сможет объяснить как функции новые добавить, в менеджер функций че делать
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
22 Янв 2024
Сообщения
79
Реакции[?]
0
Поинты[?]
0
Reconnect на гриф риливорлда (noad) функцией.

Java:
package wtf.expensive.modules.impl.util;

import net.minecraft.inventory.container.ClickType;
import net.minecraft.scoreboard.ScoreObjective;
import wtf.expensive.events.Event;
import wtf.expensive.events.impl.player.EventUpdate;
import wtf.expensive.modules.Function;
import wtf.expensive.modules.FunctionAnnotation;
import wtf.expensive.modules.Type;
import wtf.expensive.util.misc.TimerUtil;

@FunctionAnnotation(name = "Reconnect", type = Type.Util)
public class ReconnectFunction extends Function {
    private String grief;
    private int oldId;
    private int step;
    private final TimerUtil timerUtil = new TimerUtil();

    public ReconnectFunction() {}

    @Override
    public void onEvent(Event event) {
        if (event instanceof EventUpdate) {
            if (step == 0) {
                timerUtil.reset();
                grief = "1";
                for (ScoreObjective team : mc.world.getScoreboard().getScoreObjectives()) {
                    String gr = team.getDisplayName().getString();
                    if (gr.contains("ГРИФ #")) {
                        grief = gr.split("ГРИФ #")[1];
                        grief = grief.replaceAll(" ","");
                    }
                }
                mc.player.sendChatMessage("/hub");

                step = 1;
            } else if (step == 1) {
                if (timerUtil.hasTimeElapsed(1000)) {
                    timerUtil.reset();
                    step = 2;
                    mc.gameSettings.keyBindUseItem.setPressed(true);
                }
            } else if (step == 2) {
                if (timerUtil.hasTimeElapsed(500)) {
                    timerUtil.reset();
                    step = 3;
                    mc.gameSettings.keyBindUseItem.setPressed(false);
                }
            } else if (step == 3) {

                if (mc.player.openContainer.windowId != 0 && timerUtil.hasTimeElapsed(400)) {
                    timerUtil.reset();
                    step = 4;
                    oldId = mc.player.openContainer.windowId;
                    mc.playerController.windowClick(oldId, 22, 0, ClickType.PICKUP, mc.player);
                }
            } else if (step == 4) {
                if (timerUtil.hasTimeElapsed(1100) && mc.player.openContainer.windowId != oldId) {
                    timerUtil.reset();
                    int griefInt = Integer.parseInt(grief);
                    if (griefInt < 8) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 15) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 2, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 22) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 4, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 29) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 6, 0, ClickType.PICKUP, mc.player);
                    } else if (griefInt < 36) {
                        mc.playerController.windowClick(mc.player.openContainer.windowId, griefInt + 8, 0, ClickType.PICKUP, mc.player);
                    }
                    step = 0;
                    toggle();
                }

            }
        }
    }


}
это только на 1 гриф?
 
Начинающий
Статус
Оффлайн
Регистрация
10 Мар 2024
Сообщения
36
Реакции[?]
0
Поинты[?]
0
Сверху Снизу