• Ищем качественного (не новичок) разработчиков Xenforo для этого форума! В идеале, чтобы ты был фулл стек программистом. Если у тебя есть что показать, то свяжись с нами по контактным данным: https://t.me/DREDD

Часть функционала Умный AhHelper | exp 3.1 ready

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
30 Сен 2022
Сообщения
87
Реакции
1
Выберите загрузчик игры
  1. Прочие моды
прошу не кидать По мне кирпичами первая тема в жизни
доработал AhHelper на 3.1 expensive,по установке сам гайд - (1) AuctionHelper FunTime exp 3.1 ready | Сайт читов, скриптов и кодов для онлайн игр - YouGame.Biz
SS
Пожалуйста, авторизуйтесь для просмотра ссылки.


сама функция
Код:
Expand Collapse Copy
package im.natrix.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import com.viaversion.viaversion.libs.gson.JsonArray;
import com.viaversion.viaversion.libs.gson.JsonObject;
import com.viaversion.viaversion.libs.gson.JsonParser;
import im.natrix.events.EventUpdate;
import im.natrix.functions.api.Category;
import im.natrix.functions.api.Function;
import im.natrix.functions.api.FunctionRegister;
import im.natrix.functions.settings.impl.BooleanSetting;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;

Getter
setter
@FunctionRegister(name = "AuctionHelper", type = Category.Misc)
public class AhHelper extends Function {

public BooleanSetting three = new BooleanSetting("Подсвечивать 3 слота", true);

public AhHelper() {
addSettings(three);
}

float x = 0;
float y = 0;
float x2 = 0;
float y2 = 0;
float x3 = 0;
float y3 = 0;

Subscribe
public void onUpdate(EventUpdate update) {
if (mc.currentScreen instanceof ChestScreen e) {
if (e.getTitle().getString().contains("Аукцион") || e.getTitle().getString().contains("Поиск:")) {

Container container = e.getContainer();
Slot slot1 = null;
Slot slot2 = null;
Slot slot3 = null;

double fsPrice = Double.MAX_VALUE;
double medPrice = Double.MAX_VALUE;
double thPrice = Double.MAX_VALUE;

for (Slot slot : container.inventorySlots) {
if (slot.slotNumber > 44) continue;

ItemStack stack = slot.getStack();
int totalPrice = extractPriceFromStack(stack);
int count = stack.getCount();

if (totalPrice == -1 || count == 0) continue;

double pricePerItem = (double) totalPrice / count;

if (pricePerItem < fsPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = fsPrice;
slot2 = slot1;

fsPrice = pricePerItem;
slot1 = slot;
} else if (three.get() && pricePerItem < medPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = pricePerItem;
slot2 = slot;
} else if (three.get() && pricePerItem < thPrice) {
thPrice = pricePerItem;
slot3 = slot;
}
}

if (slot1 != null) {
setX(slot1.xPos);
setY(slot1.yPos);
}
if (slot2 != null) {
setX2(slot2.xPos);
setY2(slot2.yPos);
}
if (slot3 != null) {
setX3(slot3.xPos);
setY3(slot3.yPos);
}

} else {
setX(0);
setX2(0);
setX3(0);
}
} else {
setX(0);
setX2(0);
setX3(0);
}
}

protected int extractPriceFromStack(ItemStack stack) {
CompoundNBT tag = stack.getTag();

if (tag != null && tag.contains("display", 10)) {
CompoundNBT display = tag.getCompound("display");

if (display.contains("Lore", 9)) {
ListNBT lore = display.getList("Lore", 8);

for (int j = 0; j < lore.size(); ++j) {
JsonObject object = JsonParser.parseString(lore.getString(j)).getAsJsonObject();

if (object.has("extra")) {
JsonArray array = object.getAsJsonArray("extra");

if (array.size() > 2) {
JsonObject title = array.get(1).getAsJsonObject();

if (title.get("text").getAsString().trim().toLowerCase().contains("ценa")) {
String line = array.get(2).getAsJsonObject().get("text").getAsString().trim()
.substring(1).replaceAll(" ", "").replaceAll(",", "");

try {
return Integer.parseInt(line);
} catch (NumberFormatException e) {
return -1;
}
}
}
}
}
}
}

return -1;
}
}
//holz lox
 
я за хлебом схожу быстрее чем модеры одобрят
 
Я уже сходил за хлебом
 
прошу не кидать По мне кирпичами первая тема в жизни
доработал AhHelper на 3.1 expensive,по установке сам гайд - (1) AuctionHelper FunTime exp 3.1 ready | Сайт читов, скриптов и кодов для онлайн игр - YouGame.Biz
SS
Пожалуйста, авторизуйтесь для просмотра ссылки.


сама функция
Код:
Expand Collapse Copy
package im.natrix.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import com.viaversion.viaversion.libs.gson.JsonArray;
import com.viaversion.viaversion.libs.gson.JsonObject;
import com.viaversion.viaversion.libs.gson.JsonParser;
import im.natrix.events.EventUpdate;
import im.natrix.functions.api.Category;
import im.natrix.functions.api.Function;
import im.natrix.functions.api.FunctionRegister;
import im.natrix.functions.settings.impl.BooleanSetting;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;

Getter
setter
@FunctionRegister(name = "AuctionHelper", type = Category.Misc)
public class AhHelper extends Function {

public BooleanSetting three = new BooleanSetting("Подсвечивать 3 слота", true);

public AhHelper() {
addSettings(three);
}

float x = 0;
float y = 0;
float x2 = 0;
float y2 = 0;
float x3 = 0;
float y3 = 0;

Subscribe
public void onUpdate(EventUpdate update) {
if (mc.currentScreen instanceof ChestScreen e) {
if (e.getTitle().getString().contains("Аукцион") || e.getTitle().getString().contains("Поиск:")) {

Container container = e.getContainer();
Slot slot1 = null;
Slot slot2 = null;
Slot slot3 = null;

double fsPrice = Double.MAX_VALUE;
double medPrice = Double.MAX_VALUE;
double thPrice = Double.MAX_VALUE;

for (Slot slot : container.inventorySlots) {
if (slot.slotNumber > 44) continue;

ItemStack stack = slot.getStack();
int totalPrice = extractPriceFromStack(stack);
int count = stack.getCount();

if (totalPrice == -1 || count == 0) continue;

double pricePerItem = (double) totalPrice / count;

if (pricePerItem < fsPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = fsPrice;
slot2 = slot1;

fsPrice = pricePerItem;
slot1 = slot;
} else if (three.get() && pricePerItem < medPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = pricePerItem;
slot2 = slot;
} else if (three.get() && pricePerItem < thPrice) {
thPrice = pricePerItem;
slot3 = slot;
}
}

if (slot1 != null) {
setX(slot1.xPos);
setY(slot1.yPos);
}
if (slot2 != null) {
setX2(slot2.xPos);
setY2(slot2.yPos);
}
if (slot3 != null) {
setX3(slot3.xPos);
setY3(slot3.yPos);
}

} else {
setX(0);
setX2(0);
setX3(0);
}
} else {
setX(0);
setX2(0);
setX3(0);
}
}

protected int extractPriceFromStack(ItemStack stack) {
CompoundNBT tag = stack.getTag();

if (tag != null && tag.contains("display", 10)) {
CompoundNBT display = tag.getCompound("display");

if (display.contains("Lore", 9)) {
ListNBT lore = display.getList("Lore", 8);

for (int j = 0; j < lore.size(); ++j) {
JsonObject object = JsonParser.parseString(lore.getString(j)).getAsJsonObject();

if (object.has("extra")) {
JsonArray array = object.getAsJsonArray("extra");

if (array.size() > 2) {
JsonObject title = array.get(1).getAsJsonObject();

if (title.get("text").getAsString().trim().toLowerCase().contains("ценa")) {
String line = array.get(2).getAsJsonObject().get("text").getAsString().trim()
.substring(1).replaceAll(" ", "").replaceAll(",", "");

try {
return Integer.parseInt(line);
} catch (NumberFormatException e) {
return -1;
}
}
}
}
}
}
}

return -1;
}
}
//holz lox
умный типо сам будет мне предметы покупать которые типа хуйня а которые не хуйня?
 
умный типо сам будет мне предметы покупать которые типа хуйня а которые не хуйня?
Не он почти нечем не отличается от старого там просто поменяно заместь допустим раньше было если 1 штука обсидиана на аукционе была выставлена за 100к и стак за 110 к то подсвечивало 1 штуку а щяс ну тип он подсвечивает где выгоднее
 
прошу не кидать По мне кирпичами первая тема в жизни
доработал AhHelper на 3.1 expensive,по установке сам гайд - (1) AuctionHelper FunTime exp 3.1 ready | Сайт читов, скриптов и кодов для онлайн игр - YouGame.Biz
SS
Пожалуйста, авторизуйтесь для просмотра ссылки.


сама функция
Код:
Expand Collapse Copy
package im.natrix.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import com.viaversion.viaversion.libs.gson.JsonArray;
import com.viaversion.viaversion.libs.gson.JsonObject;
import com.viaversion.viaversion.libs.gson.JsonParser;
import im.natrix.events.EventUpdate;
import im.natrix.functions.api.Category;
import im.natrix.functions.api.Function;
import im.natrix.functions.api.FunctionRegister;
import im.natrix.functions.settings.impl.BooleanSetting;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;

Getter
setter
@FunctionRegister(name = "AuctionHelper", type = Category.Misc)
public class AhHelper extends Function {

public BooleanSetting three = new BooleanSetting("Подсвечивать 3 слота", true);

public AhHelper() {
addSettings(three);
}

float x = 0;
float y = 0;
float x2 = 0;
float y2 = 0;
float x3 = 0;
float y3 = 0;

Subscribe
public void onUpdate(EventUpdate update) {
if (mc.currentScreen instanceof ChestScreen e) {
if (e.getTitle().getString().contains("Аукцион") || e.getTitle().getString().contains("Поиск:")) {

Container container = e.getContainer();
Slot slot1 = null;
Slot slot2 = null;
Slot slot3 = null;

double fsPrice = Double.MAX_VALUE;
double medPrice = Double.MAX_VALUE;
double thPrice = Double.MAX_VALUE;

for (Slot slot : container.inventorySlots) {
if (slot.slotNumber > 44) continue;

ItemStack stack = slot.getStack();
int totalPrice = extractPriceFromStack(stack);
int count = stack.getCount();

if (totalPrice == -1 || count == 0) continue;

double pricePerItem = (double) totalPrice / count;

if (pricePerItem < fsPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = fsPrice;
slot2 = slot1;

fsPrice = pricePerItem;
slot1 = slot;
} else if (three.get() && pricePerItem < medPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = pricePerItem;
slot2 = slot;
} else if (three.get() && pricePerItem < thPrice) {
thPrice = pricePerItem;
slot3 = slot;
}
}

if (slot1 != null) {
setX(slot1.xPos);
setY(slot1.yPos);
}
if (slot2 != null) {
setX2(slot2.xPos);
setY2(slot2.yPos);
}
if (slot3 != null) {
setX3(slot3.xPos);
setY3(slot3.yPos);
}

} else {
setX(0);
setX2(0);
setX3(0);
}
} else {
setX(0);
setX2(0);
setX3(0);
}
}

protected int extractPriceFromStack(ItemStack stack) {
CompoundNBT tag = stack.getTag();

if (tag != null && tag.contains("display", 10)) {
CompoundNBT display = tag.getCompound("display");

if (display.contains("Lore", 9)) {
ListNBT lore = display.getList("Lore", 8);

for (int j = 0; j < lore.size(); ++j) {
JsonObject object = JsonParser.parseString(lore.getString(j)).getAsJsonObject();

if (object.has("extra")) {
JsonArray array = object.getAsJsonArray("extra");

if (array.size() > 2) {
JsonObject title = array.get(1).getAsJsonObject();

if (title.get("text").getAsString().trim().toLowerCase().contains("ценa")) {
String line = array.get(2).getAsJsonObject().get("text").getAsString().trim()
.substring(1).replaceAll(" ", "").replaceAll(",", "");

try {
return Integer.parseInt(line);
} catch (NumberFormatException e) {
return -1;
}
}
}
}
}
}
}

return -1;
}
}
//holz lox
Спасибо! После этого аукхелпера я узнал что аукхелпер умнее меня
 
Спасибо! После этого аукхелпера я узнал что аукхелпер умнее меня
мне так не кажется я его переделаю с выбором режимов наверн тип за одиночный предмет или за выгоднее всего и тд
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
сколько у него айкью?
 
бляяя он походу умнее меня
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
прошу не кидать По мне кирпичами первая тема в жизни
доработал AhHelper на 3.1 expensive,по установке сам гайд - (1) AuctionHelper FunTime exp 3.1 ready | Сайт читов, скриптов и кодов для онлайн игр - YouGame.Biz
SS
Пожалуйста, авторизуйтесь для просмотра ссылки.


сама функция
Код:
Expand Collapse Copy
package im.natrix.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import com.viaversion.viaversion.libs.gson.JsonArray;
import com.viaversion.viaversion.libs.gson.JsonObject;
import com.viaversion.viaversion.libs.gson.JsonParser;
import im.natrix.events.EventUpdate;
import im.natrix.functions.api.Category;
import im.natrix.functions.api.Function;
import im.natrix.functions.api.FunctionRegister;
import im.natrix.functions.settings.impl.BooleanSetting;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;

Getter
setter
@FunctionRegister(name = "AuctionHelper", type = Category.Misc)
public class AhHelper extends Function {

public BooleanSetting three = new BooleanSetting("Подсвечивать 3 слота", true);

public AhHelper() {
addSettings(three);
}

float x = 0;
float y = 0;
float x2 = 0;
float y2 = 0;
float x3 = 0;
float y3 = 0;

Subscribe
public void onUpdate(EventUpdate update) {
if (mc.currentScreen instanceof ChestScreen e) {
if (e.getTitle().getString().contains("Аукцион") || e.getTitle().getString().contains("Поиск:")) {

Container container = e.getContainer();
Slot slot1 = null;
Slot slot2 = null;
Slot slot3 = null;

double fsPrice = Double.MAX_VALUE;
double medPrice = Double.MAX_VALUE;
double thPrice = Double.MAX_VALUE;

for (Slot slot : container.inventorySlots) {
if (slot.slotNumber > 44) continue;

ItemStack stack = slot.getStack();
int totalPrice = extractPriceFromStack(stack);
int count = stack.getCount();

if (totalPrice == -1 || count == 0) continue;

double pricePerItem = (double) totalPrice / count;

if (pricePerItem < fsPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = fsPrice;
slot2 = slot1;

fsPrice = pricePerItem;
slot1 = slot;
} else if (three.get() && pricePerItem < medPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = pricePerItem;
slot2 = slot;
} else if (three.get() && pricePerItem < thPrice) {
thPrice = pricePerItem;
slot3 = slot;
}
}

if (slot1 != null) {
setX(slot1.xPos);
setY(slot1.yPos);
}
if (slot2 != null) {
setX2(slot2.xPos);
setY2(slot2.yPos);
}
if (slot3 != null) {
setX3(slot3.xPos);
setY3(slot3.yPos);
}

} else {
setX(0);
setX2(0);
setX3(0);
}
} else {
setX(0);
setX2(0);
setX3(0);
}
}

protected int extractPriceFromStack(ItemStack stack) {
CompoundNBT tag = stack.getTag();

if (tag != null && tag.contains("display", 10)) {
CompoundNBT display = tag.getCompound("display");

if (display.contains("Lore", 9)) {
ListNBT lore = display.getList("Lore", 8);

for (int j = 0; j < lore.size(); ++j) {
JsonObject object = JsonParser.parseString(lore.getString(j)).getAsJsonObject();

if (object.has("extra")) {
JsonArray array = object.getAsJsonArray("extra");

if (array.size() > 2) {
JsonObject title = array.get(1).getAsJsonObject();

if (title.get("text").getAsString().trim().toLowerCase().contains("ценa")) {
String line = array.get(2).getAsJsonObject().get("text").getAsString().trim()
.substring(1).replaceAll(" ", "").replaceAll(",", "");

try {
return Integer.parseInt(line);
} catch (NumberFormatException e) {
return -1;
}
}
}
}
}
}
}

return -1;
}
}
//holz lox
Ah helper умный а создатель темы нет
 
нууу вроде норм перенес :3 ток оптимизацю бы бахнуть и кайф
 
Извините за такой тупой вопрос,но куда этот код вставлять,в какую папку сурса
 
прошу не кидать По мне кирпичами первая тема в жизни
доработал AhHelper на 3.1 expensive,по установке сам гайд - (1) AuctionHelper FunTime exp 3.1 ready | Сайт читов, скриптов и кодов для онлайн игр - YouGame.Biz
SS
Пожалуйста, авторизуйтесь для просмотра ссылки.


сама функция
Код:
Expand Collapse Copy
package im.natrix.functions.impl.misc;

import com.google.common.eventbus.Subscribe;
import com.viaversion.viaversion.libs.gson.JsonArray;
import com.viaversion.viaversion.libs.gson.JsonObject;
import com.viaversion.viaversion.libs.gson.JsonParser;
import im.natrix.events.EventUpdate;
import im.natrix.functions.api.Category;
import im.natrix.functions.api.Function;
import im.natrix.functions.api.FunctionRegister;
import im.natrix.functions.settings.impl.BooleanSetting;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;

Getter
setter
@FunctionRegister(name = "AuctionHelper", type = Category.Misc)
public class AhHelper extends Function {

public BooleanSetting three = new BooleanSetting("Подсвечивать 3 слота", true);

public AhHelper() {
addSettings(three);
}

float x = 0;
float y = 0;
float x2 = 0;
float y2 = 0;
float x3 = 0;
float y3 = 0;

Subscribe
public void onUpdate(EventUpdate update) {
if (mc.currentScreen instanceof ChestScreen e) {
if (e.getTitle().getString().contains("Аукцион") || e.getTitle().getString().contains("Поиск:")) {

Container container = e.getContainer();
Slot slot1 = null;
Slot slot2 = null;
Slot slot3 = null;

double fsPrice = Double.MAX_VALUE;
double medPrice = Double.MAX_VALUE;
double thPrice = Double.MAX_VALUE;

for (Slot slot : container.inventorySlots) {
if (slot.slotNumber > 44) continue;

ItemStack stack = slot.getStack();
int totalPrice = extractPriceFromStack(stack);
int count = stack.getCount();

if (totalPrice == -1 || count == 0) continue;

double pricePerItem = (double) totalPrice / count;

if (pricePerItem < fsPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = fsPrice;
slot2 = slot1;

fsPrice = pricePerItem;
slot1 = slot;
} else if (three.get() && pricePerItem < medPrice) {
thPrice = medPrice;
slot3 = slot2;

medPrice = pricePerItem;
slot2 = slot;
} else if (three.get() && pricePerItem < thPrice) {
thPrice = pricePerItem;
slot3 = slot;
}
}

if (slot1 != null) {
setX(slot1.xPos);
setY(slot1.yPos);
}
if (slot2 != null) {
setX2(slot2.xPos);
setY2(slot2.yPos);
}
if (slot3 != null) {
setX3(slot3.xPos);
setY3(slot3.yPos);
}

} else {
setX(0);
setX2(0);
setX3(0);
}
} else {
setX(0);
setX2(0);
setX3(0);
}
}

protected int extractPriceFromStack(ItemStack stack) {
CompoundNBT tag = stack.getTag();

if (tag != null && tag.contains("display", 10)) {
CompoundNBT display = tag.getCompound("display");

if (display.contains("Lore", 9)) {
ListNBT lore = display.getList("Lore", 8);

for (int j = 0; j < lore.size(); ++j) {
JsonObject object = JsonParser.parseString(lore.getString(j)).getAsJsonObject();

if (object.has("extra")) {
JsonArray array = object.getAsJsonArray("extra");

if (array.size() > 2) {
JsonObject title = array.get(1).getAsJsonObject();

if (title.get("text").getAsString().trim().toLowerCase().contains("ценa")) {
String line = array.get(2).getAsJsonObject().get("text").getAsString().trim()
.substring(1).replaceAll(" ", "").replaceAll(",", "");

try {
return Integer.parseInt(line);
} catch (NumberFormatException e) {
return -1;
}
}
}
}
}
}
}

return -1;
}
}
//holz lox
сука пиздец тут ошибок
 

Похожие темы

Ответы
15
Просмотры
1K
Ответы
7
Просмотры
1K
  • Опрос Опрос
Часть функционала AutoFarm FT 3.1 // eva
Ответы
41
Просмотры
3K
Ответы
14
Просмотры
754
Назад
Сверху Снизу