From b7a68ab7548a81f1b56f124c631694050b097a87 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Tue, 20 Sep 2022 14:55:58 +0800 Subject: meta+ fix god potion alert --- src/features/hud/index.js | 4 ++-- src/metadata.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features/hud/index.js b/src/features/hud/index.js index cb94cbe..97e8a8e 100644 --- a/src/features/hud/index.js +++ b/src/features/hud/index.js @@ -641,7 +641,7 @@ class Hud extends Feature { } text += `&6God potion&7>&f ${timeLeft}\n` - if (this.potsOutAlert.getValue() && godPotTime - Date.now() > 60000 && Date.now() - (this.lastPotAlerts["godpot"] || 0) > 2 * 60000) { + if (this.potsOutAlert.getValue() && godPotTime - Date.now() < 60000 && Date.now() - (this.lastPotAlerts["godpot"] || 0) > 2 * 60000) { this.lastPotAlerts["godpot"] = Date.now() ChatLib.chat(this.FeatureManager.messagePrefix + "Your God potion is about to run out!") } @@ -654,7 +654,7 @@ class Hud extends Feature { let potName = firstLetterCapital(k.replace(/_/g, " ")) - if (this.potsOutAlert.getValue() && potData.time - Date.now() > 60000 && Date.now() - (this.lastPotAlerts[k] || 0) > 2 * 60000) { + if (this.potsOutAlert.getValue() && potData.time - Date.now() < 60000 && Date.now() - (this.lastPotAlerts[k] || 0) > 2 * 60000) { this.lastPotAlerts[k] = Date.now() ChatLib.chat(this.FeatureManager.messagePrefix + "Your " + potName + " is about to run out!") } diff --git a/src/metadata.json b/src/metadata.json index ff1e921..ccf0d60 100644 --- a/src/metadata.json +++ b/src/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.161", - "versionId": 288, + "version": "2.1.162", + "versionId": 289, "requires": [ "soopyApis", "soopyAddonsData", -- cgit