diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-29 12:06:18 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-29 12:06:18 +0800 |
commit | 9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b (patch) | |
tree | aa20f5314241d517b0a50b123926077685fb700e /features/hud | |
parent | a6593709b0e1e99e241b6c163fe66623685b6efc (diff) | |
parent | 51cdd4ca4ea64e1a9a67b99c274693a54f7f535d (diff) | |
download | SoopyV2-9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b.tar.gz SoopyV2-9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b.tar.bz2 SoopyV2-9ec9aa2d495df5a6c48b8edbd5fe31052d20b37b.zip |
Merge branch 'master' of https://github.com/Soopyboo32/SoopyV2
Diffstat (limited to 'features/hud')
-rw-r--r-- | features/hud/index.js | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/features/hud/index.js b/features/hud/index.js index 7d07085..8462963 100644 --- a/features/hud/index.js +++ b/features/hud/index.js @@ -253,10 +253,11 @@ class Hud extends Feature { this.lastSwappedPet = Date.now() }) this.registerChat("&r&aYour &r${pet} &r&alevelled up to level &r&9${level}&r&a!&r", (pet, level) => { - this.petElement.setText("&6Pet&7> &7[Lvl " + (level || "??") + "] " + pet) - this.petText = "&6Pet&7> &7[Lvl " + (level || "??") + "] " + pet - - this.lastSwappedPet = Date.now() + if (this.petText.split("] ")[1] === pet) { + this.petElement.setText("&6Pet&7> &7[Lvl " + (level || "??") + "] " + pet) + this.petText = "&6Pet&7> &7[Lvl " + (level || "??") + "] " + pet + this.lastSwappedPet = Date.now() + } }) this.registerSoopy("apiLoad", this.apiLoad) @@ -450,7 +451,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] } @@ -484,13 +485,6 @@ class Hud extends Feature { this.petElement.setText(this.petText) } - if (Date.now() - this.lastUpdatedStatData > 5 * 60000) { - - this.FeatureManager.features["dataLoader"].class.loadApiData("skyblock", false) - - this.lastUpdatedStatData = Date.now() - } - let soulflowCount = 0 let hasSoulflowItem = false Player.getInventory().getItems().forEach(i => { @@ -642,13 +636,6 @@ class Hud extends Feature { updateHudThingos() { let insb = this.FeatureManager.features["dataLoader"].class.isInSkyblock - if (Date.now() - this.lastUpdatedStatData > 5 * 60000 && this.hudStat[0].enabled.getValue() && (!this.lastStatData || insb || this.hudStat.map(a => (!a.enabled.getValue() || a.onlySb.getValue())).includes(false))) { - - this.FeatureManager.features["dataLoader"].class.loadApiData("skyblock", false) - - this.lastUpdatedStatData = Date.now() - return - } this.hudStat.forEach(stat => { if (stat.enabled.getValue()) { |