From e9f6cc426ad7d5ac9d07879c2d58ee3538acd4b4 Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Sat, 25 Jun 2022 14:51:14 +0800 Subject: Reduce lag moved some functions to 3fps step to reduce lag --- features/slayers/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'features') diff --git a/features/slayers/index.js b/features/slayers/index.js index 910d0ef..9388bc1 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -116,10 +116,10 @@ class Slayers extends Feature { ChatLib.chat("&r &r&a&lSLAYER QUEST COMPLETE!&a&r"); ChatLib.chat("&r &r&aYou have &d" + numberWithCommas(this.slayerExp[this.lastSlayerType]) + " " + this.lastSlayerType + " XP&r&7!&r"); ChatLib.chat("&r &r&aYou have &d" + numberWithCommas(Object.values(this.slayerExp).reduce((a, t) => t + a, 0)) + " total XP&r&7!&r"); - if (this.bossSpawnKillTime.getValue() && Date.now() - this.lastBossSlain < 60000 * 5) { + if (this.bossSpawnKillTime.getValue() && Date.now() - this.lastBossSlain < 60000 * 10) { ChatLib.chat(`&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSlain)} &ato spawn and kill&r&7!`); } - if (this.bossKillTime.getValue() && Date.now() - this.lastBossSpawned < 60000 * 4) { + if (this.bossKillTime.getValue() && Date.now() - this.lastBossSpawned < 60000 * 4.6) { ChatLib.chat(`&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSpawned)} &ato kill&r&7!`); } } @@ -200,7 +200,7 @@ class Slayers extends Feature { this.registerEvent("tick", this.tick); this.registerEvent("renderWorld", this.renderWorld); this.registerEvent("worldLoad", this.worldLoad); - this.registerStep(true, 2, this.step); + this.registerStep(true, 3, this.step); } slayerLocationData(loc, user) { @@ -296,7 +296,7 @@ class Slayers extends Feature { this.todoE2.push(event.entity); } - tick() { + step() { if (this.hideSummonsForLoot.getValue() && this.hideSummons) { this.renderEntityEvent.register(); } else if (this.hideSummonsForLoot.getValue()) { @@ -320,8 +320,9 @@ class Slayers extends Feature { } }); } + } - + tick() { if (this.FeatureManager.features["dataLoader"].class.isInSkyblock) { if (!this.entityAttackEventLoaded) { this.entityAttackEventLoaded = true; -- cgit From 6b9634041be94691ca38920da732691ba33b5d81 Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Sat, 25 Jun 2022 15:12:16 +0800 Subject: fixed a step ^ --- features/slayers/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'features') diff --git a/features/slayers/index.js b/features/slayers/index.js index 9388bc1..590970a 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -200,7 +200,8 @@ class Slayers extends Feature { this.registerEvent("tick", this.tick); this.registerEvent("renderWorld", this.renderWorld); this.registerEvent("worldLoad", this.worldLoad); - this.registerStep(true, 3, this.step); + this.registerStep(true, 2, this.step); + this.registerStep(true, 4, this.step_4fps); } slayerLocationData(loc, user) { @@ -296,7 +297,7 @@ class Slayers extends Feature { this.todoE2.push(event.entity); } - step() { + step_4fps() { if (this.hideSummonsForLoot.getValue() && this.hideSummons) { this.renderEntityEvent.register(); } else if (this.hideSummonsForLoot.getValue()) { -- cgit