Skip to content

Commit

Permalink
fixed bits alert in cookie menu
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenga8533 committed Jan 20, 2024
1 parent 386f941 commit 8511fd6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"- Changed some auction API logic",
"- Changed godroll tracking to only detect Kuudra pieces",
"- Changed item value to include dye",
"- TODO: Recoded skill tracker",
"- Fixed Hide Close Players hiding NPCs",
"- Fixed valuelist only affecting base value",
"- Fixed color syntax"
"- Fixed color syntax",
"- Fixed bits alert in cookie menu"
]
16 changes: 9 additions & 7 deletions features/economy/BitsAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ registerWhen(register("step", () => {
registerWhen(register("guiOpened", () => {
Client.scheduleTask(1, () => {
const container = Player.getContainer();
if (container.getName() !== "SkyBlock Menu") return;

const cookie = container.getStackInSlot(51).getLore();
const active = cookie.find(line => line.includes("Not active!"));
const bits = cookie.find(line => line === "§5§o§7Bits Available: §b0");
if (active === undefined && bits === undefined) return;
if (container.getName() === "SkyBlock Menu") {
const cookie = container.getStackInSlot(51).getLore();
if (!cookie[4].endsWith("Not active!") && cookie[5] !== "§5§o§7Bits Available: §b0") return;
} else if (container.getName() === "Booster Cookie") {
const bits = !container.getStackInSlot(11).getLore()[7].startsWith("§5§o§7Bits Available: §b960");
const active = !container.getStackInSlot(13).getLore()[20] === "§5§o§7§cYou do not currently have a";
if (bits && active) return;
} else return;

if (settings.bitsAlert === 1 || settings.bitsAlert === 3) Client.showTitle(`${DARK_AQUA + BOLD}NO MO BITS!`, "", 10, 50, 10);
if (settings.bitsAlert === 2 || settings.bitsAlert === 3) ChatLib.chat(`${LOGO + DARK_AQUA + BOLD}NO MO BITS!`);
});
}), () => settings.bitsAlert !== 0);
}), () => settings.bitsAlert !== 0);

0 comments on commit 8511fd6

Please sign in to comment.