From 2dfbf0cb12dcaebf8dd52b9066fcc70ef6d14f49 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 13 Aug 2022 19:14:55 +0800 Subject: small fixes --- features/eventsGUI/index.js | 2 +- features/slayers/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'features') diff --git a/features/eventsGUI/index.js b/features/eventsGUI/index.js index af7a4f2..f7d20ed 100644 --- a/features/eventsGUI/index.js +++ b/features/eventsGUI/index.js @@ -26,7 +26,7 @@ class EventsGui extends Feature { // this.registerChat("&9&m-----------------------------------------------------&r&9${*}&r&9 ${*} &6Friends (Page ${pagenum} of ${maxpages})${friendslist}&r&9&m-----------------------------------------------------&r", (...args) => { this.GuiPage.friendListMessageEvent.call(this.GuiPage, ...args) }) this.registerStep(true, 5, () => { this.GuiPage.regenGuiElements.call(this.GuiPage) }) - this.registerStep(false, 60, () => { this.GuiPage.pollData.call(this.GuiPage) }) + this.registerStep(false, 10, () => { this.GuiPage.pollData.call(this.GuiPage) }) } eventsDataUpdated(data) { diff --git a/features/slayers/index.js b/features/slayers/index.js index e7da81b..fb3cc33 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -790,7 +790,7 @@ class Slayers extends Feature { let runsperHour = (60000 * 60) / averageLength; let expPerHour = averageExp * runsperHour; - if (Date.now() - this.lastSlayerFinishes[this.lastSlayerFinishes.length - 1] < 60000 * 5 || (this.FeatureManager.features["dataLoader"]?.class?.slayerXpToSpawn && this.FeatureManager.features["dataLoader"].class.slayerXpToSpawn[0] !== 0)) { + if (this.FeatureManager.features["dataLoader"] && Date.now() - this.lastSlayerFinishes[this.lastSlayerFinishes.length - 1] < 60000 * 5 || (this.FeatureManager.features["dataLoader"].class?.slayerXpToSpawn && this.FeatureManager.features["dataLoader"].class.slayerXpToSpawn[0] !== 0)) { if (this.lastSlayerFinishes.length > 1) { this.slayerSpeedRatesElement.setText("&6Slayer speed&7> &f" + Math.floor(averageLength / 60000) + ":" + ((Math.floor(averageLength / 1000) % 60 < 10 ? "0" : "") + (Math.floor(averageLength / 1000) % 60)) + "\n&6Exp/hour&7> &f" + numberWithCommas(Math.round(expPerHour)) + "\n&6Kills/hour&7> &f" + Math.floor(runsperHour)); } else { -- cgit