Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenga8533 committed May 24, 2024
2 parents 24af608 + aec8bd4 commit 50f57c3
Show file tree
Hide file tree
Showing 18 changed files with 209 additions and 85 deletions.
4 changes: 3 additions & 1 deletion changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
" - Bazaar",
" - Composter",
"- Added dungeon chest profit",
"- Added max supercraft",
"- Changed rabbit highlight to be selectable",
"- Changed chocolate factory to support 2.0",
"- Changed storage preview to be hoverable",
Expand All @@ -17,8 +18,9 @@
"- Fixed enchanted book calc",
"- Fixed lore rendering",
"- Fixed lore 'ed' spam",
"- Fixed egg reset",
"- Removed image viewer",
"= Removed Gurokinetic features",
"= Removed Gyrokinetic features",
"- Removed Jacob highlight",
"- Removed Primal Fear highlight",
"- Removed Vanquisher sounds",
Expand Down
46 changes: 46 additions & 0 deletions docs/_posts/2024-05-24-v2_9_9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
layout: post
title: v2.9.9 `
gh-repo: zhenga8533/VolcAddons
gh-badge: [star, fork, follow]
tags: [release]
comments: true
author: Volcaronitee
---

## [Changelog](https://github.com/zhenga8533/VolcAddons/releases/tag/v2.9.9) (download by clicking [here](https://github.com/zhenga8533/VolcAddons/releases/download/v2.9.9/VolcAddons.zip))

{: .box-note}
#### New Features
- Added global toggle
- Added socket toggle
- Added additional mining event checks
- Added `/va [npc, zone]` scraped info
- Added `/va preview`
- Added more container value calcs
- Auction
- Bazaar
- Composter
- Added dungeon chest profit
- Added max supercraft

{: .box-warning}
#### Changes/Fixes
- Changed rabbit highlight to be selectable
- Changed chocolate factory to support 2.0
- Changed storage preview to be hoverable
- Changed chest tracker to hide opened
- Fixed socket reconnections
- Fixed enchanted book calc
- Fixed lore rendering
- Fixed lore 'ed' spam
- Fixed egg reset

{: .box-error}
#### Deprecated
- Removed image viewer
= Removed Gyrokinetic features
- Removed Jacob highlight
- Removed Primal Fear highlight
- Removed Vanquisher sounds
- Removed Imepl enlarger
5 changes: 3 additions & 2 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ subtitle: List of every non-gui related commands.
- `/va whitelist`: Set player party invites to auto join.
- `/va binds`: Set slot bindings and their presets.
- `/va buttons`: Set container buttons and their presets.
- `/va preview`: Set storage preview keys.
- **Waypoints**
- `/va cat`: Controls Montezuma Soul Piece waypoints.
- `/va enigma`: Controls Enigma Soul waypoints.
- `/va fairy`: Controls Fairy Soul waypoints.
- `/va npc`: Creates waypoints to user inputted rift NPCs.
- `/va zone`: Creates waypoints to user inputted rift locations.
- `/va npc`: Creates waypoints to user inputted NPCs.
- `/va zone`: Creates waypoints to user inputted locations.
- `/va waypoint`: Creates waypoints to user inputted coordinates.
- **Economy**
- `/va attribute`: Various calculations that deal with attribute values.
Expand Down
13 changes: 5 additions & 8 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ subtitle: List of all features and their related commands.
- Autocorrect Commands
- Custom Emotes (`/va emote`)
- Discord Webhook
- Image Viewer

### <u>Container Features</u>
- **General**
Expand All @@ -43,6 +42,7 @@ subtitle: List of all features and their related commands.
- Armor Display (`/moveArmor`)
- Equipment Display (`/moveEq`)
- Jyrre Timer
- Max Supercraft

### <u>Party Features</u>
- **General**
Expand Down Expand Up @@ -78,9 +78,6 @@ subtitle: List of all features and their related commands.
- Low Health Alert
- Mana Drain Range
- Ragnarok Detection
- **Gyrokinetic Wand**
- Cell Alignment Alert
- Cell Alignment Timer (`/moveGyro`)
- **Slayer**
- Boss Announce
- Boss Highlight
Expand Down Expand Up @@ -110,8 +107,6 @@ subtitle: List of all features and their related commands.
- Composter Display (`/moveCompost`)
- Garden Plot Box
- Garden Visitor Display (`/moveVisitors`)
- Garden Webhook
- Jacob Reward Highlight
- **Pests**
- Desk Highlight
- Infestation Alert
Expand All @@ -129,7 +124,6 @@ subtitle: List of all features and their related commands.
- **Great Spook**
- Math Teacher Solver
- Primal Fear Alert
- Primal Feat Highlight
- **Inquisitor**
- Inquisitor Detect
- Inquisitor Announce
Expand All @@ -155,8 +149,12 @@ subtitle: List of all features and their related commands.
- Vanquisher Detect (`/moveVanq`)

### <u>Dungeons</u>
- **Chests**
- Croesus Highlight
- Dungeon Chest Profit
- **Star Detect**
- Star Mob Highlight
- Star Custom Color

### <u>Kuudra</u>
- **General**
Expand All @@ -180,6 +178,5 @@ subtitle: List of all features and their related commands.
- **Vampire**
- Announce Mania Phase
- Effigy Waypoints
- Enlarge Impel Message
- Vampire Attack Display (`/moveVamp`)
- Vampire Hitbox
4 changes: 2 additions & 2 deletions features/combat/BestiaryDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ registerWhen(register("step", () => {
while (tablist[index].startsWith("§r ") && !tablist[index].endsWith("§r§3§lInfo§r")) {
let beData = tablist[index++].removeFormatting().trim().split(' ');
let levelData = beData[beData.length - 1];
if (levelData === "MAX") continue;

let name = beData.slice(0, -2).join(' ');
if (levelData === "MAX" || name === '') continue;

let count = levelData.split('/');
let now = unformatNumber(count[0]);
let next = unformatNumber(count[1]);
Expand Down
4 changes: 2 additions & 2 deletions features/combat/SlayerDetect.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ registerWhen(register("step", () => {
// Check mobs
World.getAllEntitiesOfType(mobClass).forEach(mob => {
const hp = mob.getEntity().func_110148_a(SMA.field_111267_a).func_111125_b();
if (bossHP == hp) bossWaypoints.push([RED + "Boss", mob]);
else if (miniSet.has(hp)) miniWaypoints.push([RED + "Mini", mob]);
if (bossHP == hp && Settings.bossHighlight) bossWaypoints.push([RED + "Boss", mob]);
else if (miniSet.has(hp) && Settings.miniHighlight) miniWaypoints.push([RED + "Mini", mob]);
});
}).setFps(2), () => Settings.bossHighlight || Settings.miniHighlight);
59 changes: 59 additions & 0 deletions features/container/MaxCraft.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import Settings from "../../utils/Settings";
import { GOLD, YELLOW } from "../../utils/Constants";
import { registerWhen } from "../../utils/RegisterTils";
import { commafy, unformatNumber } from "../../utils/functions/format";


let craftable = 0;

const tooltip = register("preItemRender", (_, __, slot) => {
const button = Player.getContainer().getItems()[slot.getSlotIndex()];
if (!button.getName().startsWith("§aSupercraft")) return;

// Put the max craftable amount into lore
const lore = button.getLore().join('\n').split('\n').slice(1);
const i = lore.findIndex((line, index) =>
line.startsWith("§5§o§7§aCrafting") && !lore[index + 1]?.startsWith(`§5§o${GOLD} Max Craftable:`));
if (i === -1) return;

lore.splice(i + 1, 0, `${GOLD}Max Craftable: ${YELLOW + commafy(craftable)}`);
button.setLore(lore);
}).unregister();

const close = register("guiClosed", () => {
tooltip.unregister();
close.unregister();
}).unregister();

registerWhen(register("guiOpened", () => {
Client.scheduleTask(3, () => {
// Check if the container is a supercrafting table
const container = Player.getContainer();
const button = container.getStackInSlot(32);
const name = button?.getName();
if (!name.startsWith("§aSupercraft")) return;

// Get the max craft amount
maxCraft = Infinity;
button.getLore().forEach(line => {
if (!line.startsWith("§5§o §a✔") && !line.startsWith("§5§o §c✖")) return;

const ratio = line.split(' ')[2].removeFormatting().split('/');
const current = unformatNumber(ratio[0]);
const required = unformatNumber(ratio[1]);

maxCraft = Math.min(maxCraft, Math.floor(current / required));
});
if (maxCraft === Infinity) maxCraft = 0;

// Get empty inventory slots to find the max craftable amount
const crafting = name === "§aSupercraft" ? container.getStackInSlot(25).getStackSize() :
unformatNumber(name.split(' ')[1].removeFormatting().replace(/[x(]/g, ''));
const freeSpace = 64 * Player.getInventory().getItems().reduce((acc, item) => acc + (item === null), 0);
craftable = Math.min(maxCraft * crafting, freeSpace);

// Set registers
tooltip.register();
close.register();
});
}), () => Settings.maxSupercraft);
4 changes: 2 additions & 2 deletions features/container/SlotBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ HOTBAR.forEach(slot => {
});

// Bind slots
registerWhen(register("guiKey", (c, keyCode, gui) => {
if (keyCode !== bindKey.getKeyCode()) return;
registerWhen(register("guiKey", (_, keyCode, gui) => {
if (Player.getContainer().getSize() !== 45 || keyCode !== bindKey.getKeyCode()) return;
const bind = gui?.getSlotUnderMouse()?.field_75222_d;
if (bind === undefined || bind <= 4) return;

Expand Down
24 changes: 13 additions & 11 deletions features/event/HippityHoppity.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,22 @@ let looted = {
"Lunch": false,
"Dinner": false
};
let lastLooted = {
"Breakfast": 0,
"Lunch": 0,
"Dinner": 0
}

// Track if egg was looted.
registerWhen(register("chat", (type) => {
looted[type] = true;
lastLooted[type] = Date.now();
}).setCriteria("You have already collected this Chocolate ${type} Egg! Try again when it respawns!"),
() => (Settings.chocoWaypoints || Settings.eggTimers) && location.getSeason() === "Spring");

registerWhen(register("chat", (type) => {
looted[type] = true;
lastLooted[type] = Date.now();
}).setCriteria("HOPPITY'S HUNT You found a Chocolate ${type} Egg ${loc}!"),
() => (Settings.chocoWaypoints || Settings.eggTimers) && location.getSeason() === "Spring");

Expand All @@ -296,19 +303,14 @@ registerWhen(register("chat", (type) => {

registerWhen(register("tick", () => {
const time = World.getTime() % 24_000;
if (Math.abs(time - 1_000) < 4) looted.Breakfast = false;
else if (Math.abs(time - 8_000) < 4) looted.Lunch = false;
else if (Math.abs(time - 15_000) < 4) looted.Dinner = false;
if (Math.abs(time - 1_000) < 4 || Date.now() - lastLooted.Breakfast > 1_200_000)
looted.Breakfast = false;
else if (Math.abs(time - 8_000) < 4 || Date.now() - lastLooted.Lunch > 1_200_000)
looted.Lunch = false;
else if (Math.abs(time - 15_000) < 4 || Date.now() - lastLooted.Dinner > 1_200_000)
looted.Dinner = false;
}), () => (Settings.chocoWaypoints || Settings.eggTimers) && location.getSeason() === "Spring");

register("worldUnload", () => {
looted = {
"Breakfast": false,
"Lunch": false,
"Dinner": false
};
});

// ArmorStand ESP susge, UAYOR
registerWhen(register("step", () => {
const stands = World.getAllEntitiesOfType(STAND_CLASS);
Expand Down
2 changes: 1 addition & 1 deletion features/general/Autocorrect.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ register("command", () => {
* Parse out uncommon commands/words
*/
try {
if (Player.getName() !== "Volcaronitee") {
if (Date.now() - data.lastJoin > 3_600_000) {
data.wordbanks.forEach(wordbank => {
Object.keys(wordbank).forEach(word => {
wordbank[word] -= 3;
Expand Down
4 changes: 2 additions & 2 deletions features/general/Performance.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import location from "../../utils/Location";
import Settings from "../../utils/Settings";
import toggles from "../../utils/Toggles";
import { AQUA, BOLD, DARK_AQUA, DARK_GRAY, DARK_GREEN, DARK_RED, GOLD, GRAY, GREEN, LOGO, RED, WHITE, YELLOW } from "../../utils/Constants";
import { AQUA, BOLD, DARK_AQUA, DARK_GRAY, DARK_GREEN, DARK_RED, GOLD, GRAY, GREEN, LOGO, RED, YELLOW } from "../../utils/Constants";
import { Overlay } from "../../utils/Overlay";
import { isPlayer } from "../../utils/functions/player";
import { registerWhen } from "../../utils/RegisterTils";
Expand Down Expand Up @@ -87,7 +87,7 @@ try {
calculatePing();
}).setFilteredClasses([S01PacketJoinGame, S37PacketStatistics]);
} catch (err) {
register('packetReceived', () => {
register('packetReceived', (packet) => {
if (packet !== S01PacketJoinGame || packet !== S37PacketStatistics) return;
calculatePing();
});
Expand Down
14 changes: 7 additions & 7 deletions features/mining/EventTracker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import location from "../../utils/Location";
import socket from "../../utils/Socket";
import Socket from "../../utils/Socket";
import { AQUA, DARK_GRAY, GRAY, LOGO, RED, WHITE, WITHER_CLASS, YELLOW } from "../../utils/Constants";
import { formatTime } from "../../utils/functions/format";
import { registerWhen } from "../../utils/RegisterTils";
Expand Down Expand Up @@ -33,7 +33,7 @@ const findEvent = register("step", () => {
words[words.length - 1] = words[words.length - 1][0].toUpperCase() + words[words.length - 1].slice(1);

// Send the event data to the server.
socket.send({
Socket.send({
"command": world,
"request": "post",
"event": words.join(' '),
Expand Down Expand Up @@ -68,7 +68,7 @@ register("chat", (event) => {
loc === "Crystal Hollows" ? "ch" : undefined;
if (world === undefined) return;

socket.send({
Socket.send({
"command": world,
"request": "post",
"event": event
Expand Down Expand Up @@ -96,15 +96,15 @@ export function processEvent(data) {
}

register("command", () => {
socket.send({
Socket.send({
"command": "ch",
"request": "get",
"event": "event"
});
}).setName("chevent");

register("command", () => {
socket.send({
Socket.send({
"command": "dm",
"request": "get",
"event": "event"
Expand All @@ -116,15 +116,15 @@ register("command", () => {
* Alloy tracking.
*/
registerWhen(register("chat", (username) => {
socket.send({
Socket.send({
"command": "alloy",
"request": "post",
"username": username
});
}).setCriteria("ALLOY! ${username} just found a Divan's Alloy!"), () => location.getWorld() === "Crystal Hollows");

register("command", () => {
socket.send({
Socket.send({
"command": "alloy",
"request": "get"
});
Expand Down
Loading

0 comments on commit 50f57c3

Please sign in to comment.