From 740d3e1d2cf3bcc664438e864b926210896145ee Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 24 May 2022 15:59:26 +0800 Subject: + gemstone $/h tracker --- features/mining/index.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'features/mining') diff --git a/features/mining/index.js b/features/mining/index.js index a05552d..1c1eb5f 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -7,7 +7,8 @@ import * as utils from "../../utils/utils" import HudTextElement from "../hud/HudTextElement"; import LocationSetting from "../settings/settingThings/location"; import ToggleSetting from "../settings/settingThings/toggle"; -import { numberWithCommas } from "../../utils/numberUtils"; +import { numberWithCommas, timeSince } from "../../utils/numberUtils"; +import { fetch } from "../../utils/networkUtils"; class Mining extends Feature { constructor() { @@ -42,6 +43,14 @@ class Mining extends Feature { this.hudElements.push(this.compactHudElement) this.compactProgressHudOnlyWhenMoreThan0 = new ToggleSetting("Only show compact progress when it is above 0", "So that you dont need to disable it when you start doing something else", true, "compact_progress_disable_0", this).requires(this.compactProgressHud) + this.gemstoneMoneyHud = new ToggleSetting("Show $/h made from gemstone mining", "This will add a HUD element with the gemstone $/h", true, "gemstone_money_hud", this) + this.gemstoneMoneyHudElement = new HudTextElement() + .setToggleSetting(this.gemstoneMoneyHud) + .setLocationSetting(new LocationSetting("HUD Location", "Allows you to edit the location of the gemstone $/h", "gemstone_money_location", this, [10, 60, 1, 1]) + .requires(this.gemstoneMoneyHud) + .editTempText("&6$/h&7> &f$12,345,678\n&6$ made&7> &f$123,456,789\n&6Time tracked&7> &f123m")) + this.hudElements.push(this.gemstoneMoneyHudElement) + this.seenBalDamages = [] this.balHP = 250 this.lastBalAlive = 0 @@ -76,6 +85,52 @@ class Mining extends Feature { this.registerChat("&r&c&oThe boss looks weak and tired and retreats into the lava...&r", () => { this.balHP = 0 }) + + let startingTime = -1 + let money = 0 + let gemstoneCosts = {} + let lastMined = 0 + this.registerChat("&r&d&lPRISTINE! &r&fYou found &r${*} &r&aFlawed ${type} Gemstone &r&8x${num}&r&f!&r", (type, num) => { + let id = "FLAWED_" + type.toUpperCase() + "_GEM" + let number = parseInt(num) + + lastMined = Date.now() + + if (!this.gemstoneMoneyHud.getValue()) return + + if (startingTime === 0) return + if (startingTime === -1) { + startingTime = 0 + fetch("https://api.hypixel.net/skyblock/bazaar").json(data => { + startingTime = Date.now() + + Object.keys(data.products).forEach(id => { + if (id.startsWith("FLAWED_")) { + gemstoneCosts[id] = Math.max(240, data.products[id].quick_status.sellPrice) + console.log(id + ": " + gemstoneCosts[id]) + } + }) + }) + return + } + + money += gemstoneCosts[id] * number + + console.log(money) + let moneyPerHour = Math.floor(money / ((Date.now() - startingTime) / (1000 * 60 * 60))) + let moneyMade = Math.floor(money) + let timeTracked = timeSince(startingTime) + + this.gemstoneMoneyHudElement.setText("&6$/h&7> &f$" + numberWithCommas(moneyPerHour) + "\n&6$ made&7> &f$" + numberWithCommas(moneyMade) + "\n&6Time tracked&7> &f" + timeTracked) + }) + this.registerStep(false, 30, () => { + if (lastMined && Date.now() - lastMined > 60000) { + money = 0 + startingTime = -1 + lastMined = 0 + this.gemstoneMoneyHudElement.setText("") + } + }) } itemTooltipEvent(lore, item, event) { -- cgit From e822810c47267b4a8e8d6dc89084a8c3fb0d006a Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 24 May 2022 19:33:34 +0800 Subject: + CH current event indicator thingo --- features/mining/index.js | 28 ++++++++++++++++++++++++++-- metadata.json | 4 ++-- socketConnection.js | 14 +++++++++++++- 3 files changed, 41 insertions(+), 5 deletions(-) (limited to 'features/mining') diff --git a/features/mining/index.js b/features/mining/index.js index 1c1eb5f..d557aed 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -9,6 +9,7 @@ import LocationSetting from "../settings/settingThings/location"; import ToggleSetting from "../settings/settingThings/toggle"; import { numberWithCommas, timeSince } from "../../utils/numberUtils"; import { fetch } from "../../utils/networkUtils"; +import socketConnection from "../../socketConnection"; class Mining extends Feature { constructor() { @@ -51,6 +52,14 @@ class Mining extends Feature { .editTempText("&6$/h&7> &f$12,345,678\n&6$ made&7> &f$123,456,789\n&6Time tracked&7> &f123m")) this.hudElements.push(this.gemstoneMoneyHudElement) + this.nextChEvent = new ToggleSetting("Show the current and next crystal hollows event", "(syncs the data between all users in ch)", true, "chevent_hud", this) + this.nextChEventElement = new HudTextElement() + .setToggleSetting(this.nextChEvent) + .setLocationSetting(new LocationSetting("HUD Location", "Allows you to edit the location of the hud element", "chevent_hud_location", this, [10, 70, 1, 1]) + .requires(this.nextChEvent) + .editTempText("&6Event&7> &fGONE WITH THE WIND &7->&f 2X POWDER")) + this.hudElements.push(this.nextChEventElement) + this.seenBalDamages = [] this.balHP = 250 this.lastBalAlive = 0 @@ -116,7 +125,6 @@ class Mining extends Feature { money += gemstoneCosts[id] * number - console.log(money) let moneyPerHour = Math.floor(money / ((Date.now() - startingTime) / (1000 * 60 * 60))) let moneyMade = Math.floor(money) let timeTracked = timeSince(startingTime) @@ -128,8 +136,24 @@ class Mining extends Feature { money = 0 startingTime = -1 lastMined = 0 - this.gemstoneMoneyHudElement.setText("") + this.gemstoneMoneyHudElement.setText("&6Event&7> &f" + socketConnection.chEvent.join(" &7->&f ")) } + + this.nextChEventElement.setText() + }) + + // 2X POWDER ENDED! + // Passive Active Event + // 2X POWDER STARTED! + //&r&r&r &r&9&lGONE WITH THE WIND ENDED!&r + //§r§r§r §r§b§l2X POWDER ENDED!§r + //§r§r§r §r§b§l2X POWDER STARTED!§r + + this.registerChat("&r&r&r ${spaces}&r&${color}&l${event} ENDED!&r", (spaces, color, event) => { + socketConnection.sendCHEventData(event.trim(), false) + }) + this.registerChat("&r&r&r ${spaces}&r&${color}&l${event} STARTED!&r", (spaces, color, event) => { + socketConnection.sendCHEventData(event.trim(), true) }) } diff --git a/metadata.json b/metadata.json index 1978a48..efba9b7 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.83", - "versionId": 210, + "version": "2.1.84", + "versionId": 211, "requires": [ "soopyApis", "soopyAddonsData", diff --git a/socketConnection.js b/socketConnection.js index 7e6bb99..e8aa796 100644 --- a/socketConnection.js +++ b/socketConnection.js @@ -26,6 +26,8 @@ class SoopyV2Server extends WebsiteCommunicator { this.cookieData = undefined this.cookieDataUpdated = 0 + this.chEvent = ["???", "???"] + register("step", () => { if (this.cookieDataUpdated && Date.now() - this.cookieDataUpdated > 60000) { this.cookieData = 0 @@ -85,7 +87,9 @@ class SoopyV2Server extends WebsiteCommunicator { if (data.type === "pollEvent") { if (global.soopyv2featuremanagerthing && global.soopyv2featuremanagerthing.features.eventsGUI) global.soopyv2featuremanagerthing.features.eventsGUI.class.pollEventData(data.admin) } - + if (data.type === "chEvent") { + this.chEvent = data.event + } } onConnect() { @@ -220,6 +224,14 @@ class SoopyV2Server extends WebsiteCommunicator { code }) } + + sendCHEventData(event, started) { + this.sendData({ + type: "chEvent", + event, + started + }) + } } if (!global.soopyV2Server) { -- cgit From 062f87c1acca16a40c8944de27efaac9741b44e6 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 24 May 2022 19:37:17 +0800 Subject: oops i edited the wrong thing --- features/mining/index.js | 4 ++-- metadata.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'features/mining') diff --git a/features/mining/index.js b/features/mining/index.js index d557aed..eb1c434 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -136,10 +136,10 @@ class Mining extends Feature { money = 0 startingTime = -1 lastMined = 0 - this.gemstoneMoneyHudElement.setText("&6Event&7> &f" + socketConnection.chEvent.join(" &7->&f ")) + this.gemstoneMoneyHudElement.setText("") } - this.nextChEventElement.setText() + this.nextChEventElement.setText("&6Event&7> &f" + socketConnection.chEvent.join(" &7->&f ")) }) // 2X POWDER ENDED! diff --git a/metadata.json b/metadata.json index efba9b7..9449f9f 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.84", - "versionId": 211, + "version": "2.1.85", + "versionId": 212, "requires": [ "soopyApis", "soopyAddonsData", -- cgit From 7d40a943f3148979f0572e17d2a4f6a7c49beeb7 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 24 May 2022 20:13:39 +0800 Subject: + fix showing dwarven mines events on crystal hollows events thingo (oops) --- features/mining/index.js | 22 ++++++++++++++++------ metadata.json | 4 ++-- socketConnection.js | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) (limited to 'features/mining') diff --git a/features/mining/index.js b/features/mining/index.js index eb1c434..b8eb9c9 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -16,6 +16,11 @@ class Mining extends Feature { super() } + isInCH() { + if (!this.FeatureManager || !this.FeatureManager.features["dataLoader"]) return false + return this.FeatureManager.features["dataLoader"].class.area === "Crystal Hollows" + } + onEnable() { this.initVariables() @@ -142,17 +147,22 @@ class Mining extends Feature { this.nextChEventElement.setText("&6Event&7> &f" + socketConnection.chEvent.join(" &7->&f ")) }) - // 2X POWDER ENDED! - // Passive Active Event - // 2X POWDER STARTED! - //&r&r&r &r&9&lGONE WITH THE WIND ENDED!&r - //§r§r§r §r§b§l2X POWDER ENDED!§r - //§r§r§r §r§b§l2X POWDER STARTED!§r + let lastWorldChange = 0 + + this.registerEvent("worldLoad", () => { + lastWorldChange = Date.now() + }) this.registerChat("&r&r&r ${spaces}&r&${color}&l${event} ENDED!&r", (spaces, color, event) => { + if (Date.now() - lastWorldChange < 5000) return + if (!this.isInCH()) return + socketConnection.sendCHEventData(event.trim(), false) }) this.registerChat("&r&r&r ${spaces}&r&${color}&l${event} STARTED!&r", (spaces, color, event) => { + if (Date.now() - lastWorldChange < 5000) return + if (!this.isInCH()) return + socketConnection.sendCHEventData(event.trim(), true) }) } diff --git a/metadata.json b/metadata.json index 9449f9f..7fd48da 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.85", - "versionId": 212, + "version": "2.1.86", + "versionId": 213, "requires": [ "soopyApis", "soopyAddonsData", diff --git a/socketConnection.js b/socketConnection.js index e8aa796..7cea440 100644 --- a/socketConnection.js +++ b/socketConnection.js @@ -227,7 +227,7 @@ class SoopyV2Server extends WebsiteCommunicator { sendCHEventData(event, started) { this.sendData({ - type: "chEvent", + type: "chEvent2", event, started }) -- cgit From d24e54df28d92afebcd6d890e579340df84a010b Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Thu, 26 May 2022 12:35:28 +0800 Subject: + fix gemstoneMoneyHud for some people + fix scan current pet from pets menu --- features/dungeonMap/index.js | 1 + features/hud/index.js | 2 +- features/mining/index.js | 7 ++++--- metadata.json | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'features/mining') diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js index bdaaf23..9c28fd9 100644 --- a/features/dungeonMap/index.js +++ b/features/dungeonMap/index.js @@ -95,6 +95,7 @@ class DungeonMap extends Feature { this.bloodOpened = false this.registerChat("&r&cThe &r&c&lBLOOD DOOR&r&c has been opened!&r", () => { this.bloodOpened = true + this.keys-- }) this.registerChat("&r${*}&r&f &r&ehas obtained &r&a&r&${*} Key&r&e!&r", () => { diff --git a/features/hud/index.js b/features/hud/index.js index c6254d4..f375d41 100644 --- a/features/hud/index.js +++ b/features/hud/index.js @@ -458,7 +458,7 @@ class Hud extends Feature { if (Date.now() - this.lastSwappedPet > 1000) { inv[i].getLore().forEach(line => { - if (line.includes("Click to despawn.")) { + if (line.includes("Click to despawn!")) { this.petElement.setText("&6Pet&7> &7" + inv[i].getName().split("(")[0]) this.petText = "&6Pet&7> &7" + inv[i].getName().split("(")[0] } diff --git a/features/mining/index.js b/features/mining/index.js index b8eb9c9..dec8728 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -76,7 +76,7 @@ class Mining extends Feature { this.armourstandClass = Java.type("net.minecraft.entity.item.EntityArmorStand").class - this.registerEvent("renderOverlay", this.renderOverlay).registeredWhen(() => this.balRespawnHud.getValue() || this.compactProgressHud.getValue()) + this.registerEvent("renderOverlay", this.renderOverlay).registeredWhen(() => this.balRespawnHud.getValue() || this.compactProgressHud.getValue() || this.gemstoneMoneyHud.getValue()) this.registerEvent("tick", this.tick) this.registerEvent("itemTooltip", this.itemTooltipEvent).registeredWhen(() => this.showContainedGemstoneSlots.getValue() || this.showUnlockedGemstoneSlots.getValue()) this.registerEvent("renderWorld", this.renderWorld).registeredWhen(() => this.guessBalHp.getValue()) @@ -104,7 +104,8 @@ class Mining extends Feature { let money = 0 let gemstoneCosts = {} let lastMined = 0 - this.registerChat("&r&d&lPRISTINE! &r&fYou found &r${*} &r&aFlawed ${type} Gemstone &r&8x${num}&r&f!&r", (type, num) => { + this.registerChat("&r&d&lPRISTINE! &r&fYou found &r${*} &r&aFlawed ${type} Gemstone &r&8x${num}&r&f!&r", (type, num, event) => { + let id = "FLAWED_" + type.toUpperCase() + "_GEM" let number = parseInt(num) @@ -136,7 +137,7 @@ class Mining extends Feature { this.gemstoneMoneyHudElement.setText("&6$/h&7> &f$" + numberWithCommas(moneyPerHour) + "\n&6$ made&7> &f$" + numberWithCommas(moneyMade) + "\n&6Time tracked&7> &f" + timeTracked) }) - this.registerStep(false, 30, () => { + this.registerStep(false, 10, () => { if (lastMined && Date.now() - lastMined > 60000) { money = 0 startingTime = -1 diff --git a/metadata.json b/metadata.json index 7fd48da..b4402c4 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.86", - "versionId": 213, + "version": "2.1.87", + "versionId": 214, "requires": [ "soopyApis", "soopyAddonsData", -- cgit From a0ae59e33748047377b5ae65df675759a10bff18 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Thu, 26 May 2022 19:56:02 +0800 Subject: + fix sending boss into to wrong players sometimes + fix next ch event display for some people + change gemstone $/h to show both hours + minuites instead of just minuites / just hours --- features/dataLoader/index.js | 6 +++--- features/mining/index.js | 6 +++--- socketConnection.js | 6 ++++-- utils/numberUtils.js | 42 +++++++++++++++++++++++++----------------- 4 files changed, 35 insertions(+), 25 deletions(-) (limited to 'features/mining') diff --git a/features/dataLoader/index.js b/features/dataLoader/index.js index f0ede23..b933e31 100644 --- a/features/dataLoader/index.js +++ b/features/dataLoader/index.js @@ -151,11 +151,11 @@ class DataLoader extends Feature { this.area = this.stats["Area"] - if (this.lastServer !== this.FeatureManager.features["dataLoader"].class.stats.Server || Date.now() - this.lastSentServer > 60000 * 5) { - this.lastServer = this.FeatureManager.features["dataLoader"].class.stats.Server; + if (this.lastServer !== this.stats.Server || Date.now() - this.lastSentServer > 60000 * 5) { + this.lastServer = this.stats.Server; this.lastSentServer = Date.now() - socketConnection.setServer(this.FeatureManager.features["dataLoader"].class.stats.Server); + socketConnection.setServer(this.stats.Server, this.area, this.areaFine); } } diff --git a/features/mining/index.js b/features/mining/index.js index dec8728..9a9a881 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -76,7 +76,7 @@ class Mining extends Feature { this.armourstandClass = Java.type("net.minecraft.entity.item.EntityArmorStand").class - this.registerEvent("renderOverlay", this.renderOverlay).registeredWhen(() => this.balRespawnHud.getValue() || this.compactProgressHud.getValue() || this.gemstoneMoneyHud.getValue()) + this.registerEvent("renderOverlay", this.renderOverlay).registeredWhen(() => this.balRespawnHud.getValue() || this.compactProgressHud.getValue() || this.gemstoneMoneyHud.getValue() || this.nextChEvent.getValue()) this.registerEvent("tick", this.tick) this.registerEvent("itemTooltip", this.itemTooltipEvent).registeredWhen(() => this.showContainedGemstoneSlots.getValue() || this.showUnlockedGemstoneSlots.getValue()) this.registerEvent("renderWorld", this.renderWorld).registeredWhen(() => this.guessBalHp.getValue()) @@ -133,12 +133,12 @@ class Mining extends Feature { let moneyPerHour = Math.floor(money / ((Date.now() - startingTime) / (1000 * 60 * 60))) let moneyMade = Math.floor(money) - let timeTracked = timeSince(startingTime) + let timeTracked = timeSince2(startingTime) this.gemstoneMoneyHudElement.setText("&6$/h&7> &f$" + numberWithCommas(moneyPerHour) + "\n&6$ made&7> &f$" + numberWithCommas(moneyMade) + "\n&6Time tracked&7> &f" + timeTracked) }) this.registerStep(false, 10, () => { - if (lastMined && Date.now() - lastMined > 60000) { + if (lastMined && Date.now() - lastMined > 2 * 60000) { money = 0 startingTime = -1 lastMined = 0 diff --git a/socketConnection.js b/socketConnection.js index 7cea440..6479dee 100644 --- a/socketConnection.js +++ b/socketConnection.js @@ -189,10 +189,12 @@ class SoopyV2Server extends WebsiteCommunicator { }) } - setServer(server) { + setServer(server, area, areaFine) { this.sendData({ type: "server", - server: server + server, + area, + areaFine }) } diff --git a/utils/numberUtils.js b/utils/numberUtils.js index 96a6b74..82a6805 100644 --- a/utils/numberUtils.js +++ b/utils/numberUtils.js @@ -1,11 +1,11 @@ module.exports = { - numberWithCommas: function(x){ + numberWithCommas: function (x) { if (x === undefined) { return "" } var parts = x.toString().split("."); parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); return parts.join("."); }, - addNotation: function(type, value) { + addNotation: function (type, value) { let returnVal = value; let notList = []; if (type === "shortScale") { @@ -47,14 +47,14 @@ module.exports = { return returnVal; }, - timeSince:function (date) { + timeSince: function (date) { if (typeof date !== 'object') { date = new Date(date); } - - var seconds = Math.floor((new Date()-date) / 1000); + + var seconds = Math.floor((new Date() - date) / 1000); var intervalType; - + var interval = Math.floor(seconds / 31536000); interval = Math.floor(seconds / 86400); if (interval >= 1) { @@ -73,21 +73,29 @@ module.exports = { } } } - + return interval + '' + intervalType; }, - timeNumber: function(time){ - let mins = Math.floor(time/1000/60) - let secs = Math.floor(time/1000)%60 - - if(mins === 0) return secs + "s" + timeSince2: function (date) { + let time = Date.now() - date + + if (time > 30 * 60000) { + return this.timeNumber2(time) + } + return this.timeNumber(time) + }, + timeNumber: function (time) { + let mins = Math.floor(time / 1000 / 60) + let secs = Math.floor(time / 1000) % 60 + + if (mins === 0) return secs + "s" return `${mins}m ${secs}s` }, - timeNumber2: function(time){ - let hours = Math.floor(time/1000/60/60) - let mins = Math.floor(time/1000/60)%60 - - if(hours === 0) return mins + "m" + timeNumber2: function (time) { + let hours = Math.floor(time / 1000 / 60 / 60) + let mins = Math.floor(time / 1000 / 60) % 60 + + if (hours === 0) return mins + "m" return `${hours}h ${mins}m` } } \ No newline at end of file -- cgit From d017ab83bb7ffbc10e7cde0014116464c725f37f Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 28 May 2022 10:00:15 +0800 Subject: + fix gemstone $/h from when i made it show both hours and minuites (i love not testing updates BatChamp) --- features/betterGuis/index.js | 2 +- features/dungeonSolvers/index.js | 2 +- features/events/index.js | 2 +- features/mining/index.js | 2 +- metadata.json | 4 ++-- socketConnection.js | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'features/mining') diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js index cb0b5a0..2d188bf 100644 --- a/features/betterGuis/index.js +++ b/features/betterGuis/index.js @@ -24,7 +24,7 @@ class BetterGuis extends Feature { this.reliableSbMenuClicks = { getValue: () => false }//removed because hypixel fixed, code kept incase hypixel adds back bug later //new ToggleSetting("Make SBMENU clicks reliable", "This will delay clicks on sbmenu to time them so they dont get canceled", true, "sbmenu_time", this) this.museumGuiEnabled = new ToggleSetting("Custom Museum GUI", "Custom gui for the Museum", true, "custom_museum_enabled", this) - this.dungeonReadyGuiEnabled = new ToggleSetting("Custom Dungeon Ready GUI (UNFINISHED)", "Custom gui for the dungeon ready up menu", false, "custom_dungeon_ready_enabled", this) + this.dungeonReadyGuiEnabled = new ToggleSetting("Custom Dungeon Ready GUI", "Custom gui for the dungeon ready up menu", false, "custom_dungeon_ready_enabled", this) this.chestSearchBar = new ToggleSetting("Inventory Search Bar", "u can use '&' to make it filter buy stuff that contains multiple things", false, "inv_search", this) diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js index 5b675a7..54c0849 100644 --- a/features/dungeonSolvers/index.js +++ b/features/dungeonSolvers/index.js @@ -70,7 +70,7 @@ class DungeonSolvers extends Feature { .setToggleSetting(this.runSpeedRates) .setLocationSetting(new LocationSetting("Run speed and exp rates location", "Allows you to edit the location of the information", "run_speed_rates_location", this, [10, 100, 1, 1]).requires(this.runSpeedRates).editTempText("&6Run speed&7> &f4:30\n&6Exp/hour&7> &f1,234,567\n&6Runs/hour&7> &f17")); - this.scoreCalculation = new ToggleSetting("Show score calculation", "NOTE: doesent include mimic or spirit pet yet", true, "run_score_calc", this); + this.scoreCalculation = new ToggleSetting("Show score calculation", "", true, "run_score_calc", this); this.scoreElement = new HudTextElement().setToggleSetting(this.scoreCalculation).setLocationSetting(new LocationSetting("Score calculation location", "Allows you to edit the location of the score calc", "score_calc_location", this, [10, 130, 1, 1]).requires(this.scoreCalculation).editTempText("&dScore: 120\n&aS+ ??\n&aS ??")); this.hudElements.push(this.runSpeedRatesElement); diff --git a/features/events/index.js b/features/events/index.js index e3decc5..d1a075d 100644 --- a/features/events/index.js +++ b/features/events/index.js @@ -382,7 +382,7 @@ class Events extends Feature { }) } - if (!this.potentialParticleLocs[locstr]) this.potentialParticleLocs[locstr] = { enchant: 0, crit: 0, step: 0, isMob: 0, timestamp: Date.now() } + if (!this.potentialParticleLocs[locstr] || Date.now() - this.potentialParticleLocs[locstr].timestamp > 30000) this.potentialParticleLocs[locstr] = { enchant: 0, crit: 0, step: 0, isMob: 0, timestamp: Date.now() } if (foundEnchant) this.potentialParticleLocs[locstr].enchant++ if (foundCrit) this.potentialParticleLocs[locstr].crit++ diff --git a/features/mining/index.js b/features/mining/index.js index 9a9a881..767bc82 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -7,7 +7,7 @@ import * as utils from "../../utils/utils" import HudTextElement from "../hud/HudTextElement"; import LocationSetting from "../settings/settingThings/location"; import ToggleSetting from "../settings/settingThings/toggle"; -import { numberWithCommas, timeSince } from "../../utils/numberUtils"; +import { numberWithCommas, timeSince2 } from "../../utils/numberUtils"; import { fetch } from "../../utils/networkUtils"; import socketConnection from "../../socketConnection"; diff --git a/metadata.json b/metadata.json index 90ee130..a7c52f5 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.89", - "versionId": 216, + "version": "2.1.90", + "versionId": 217, "requires": [ "soopyApis", "soopyAddonsData", diff --git a/socketConnection.js b/socketConnection.js index 6479dee..70609ec 100644 --- a/socketConnection.js +++ b/socketConnection.js @@ -170,14 +170,14 @@ class SoopyV2Server extends WebsiteCommunicator { this.sendData({ type: "slayerSpawnData", data: data, - name: Player.getDisplayName().text + name: ChatLib.removeFormatting(Player.getDisplayName().text) }) } sendInquisData(data) { this.sendData({ type: "inquisData", data: data, - name: Player.getDisplayName().text + name: ChatLib.removeFormatting(Player.getDisplayName().text) }) } @@ -185,7 +185,7 @@ class SoopyV2Server extends WebsiteCommunicator { this.sendData({ type: "vancData", data: data, - name: Player.getDisplayName().text + name: ChatLib.removeFormatting(Player.getDisplayName().text) }) } -- cgit From 0985bdd291c3b2889c1e2fbc20f51cd4d7bc1e96 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 28 May 2022 10:13:46 +0800 Subject: + Ok actually fix it this time (i tested) --- features/mining/index.js | 2 +- metadata.json | 4 ++-- utils/numberUtils.js | 15 ++++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'features/mining') diff --git a/features/mining/index.js b/features/mining/index.js index 767bc82..ce71e6d 100644 --- a/features/mining/index.js +++ b/features/mining/index.js @@ -122,7 +122,7 @@ class Mining extends Feature { Object.keys(data.products).forEach(id => { if (id.startsWith("FLAWED_")) { gemstoneCosts[id] = Math.max(240, data.products[id].quick_status.sellPrice) - console.log(id + ": " + gemstoneCosts[id]) + // console.log(id + ": " + gemstoneCosts[id]) } }) }) diff --git a/metadata.json b/metadata.json index a7c52f5..94aa816 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.90", - "versionId": 217, + "version": "2.1.91", + "versionId": 218, "requires": [ "soopyApis", "soopyAddonsData", diff --git a/utils/numberUtils.js b/utils/numberUtils.js index 82a6805..597a538 100644 --- a/utils/numberUtils.js +++ b/utils/numberUtils.js @@ -1,4 +1,4 @@ -module.exports = { +let utils = { numberWithCommas: function (x) { if (x === undefined) { return "" } var parts = x.toString().split("."); @@ -76,26 +76,27 @@ module.exports = { return interval + '' + intervalType; }, - timeSince2: function (date) { + timeSince2: (date) => { let time = Date.now() - date if (time > 30 * 60000) { - return this.timeNumber2(time) + return utils.timeNumber2(time) } - return this.timeNumber(time) + return utils.timeNumber(time) }, - timeNumber: function (time) { + timeNumber: (time) => { let mins = Math.floor(time / 1000 / 60) let secs = Math.floor(time / 1000) % 60 if (mins === 0) return secs + "s" return `${mins}m ${secs}s` }, - timeNumber2: function (time) { + timeNumber2: (time) => { let hours = Math.floor(time / 1000 / 60 / 60) let mins = Math.floor(time / 1000 / 60) % 60 if (hours === 0) return mins + "m" return `${hours}h ${mins}m` } -} \ No newline at end of file +} +module.exports = utils \ No newline at end of file -- cgit