diff options
author | EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> | 2022-06-23 22:54:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 22:54:55 +0800 |
commit | 33d232312fcc83f878a3bab1944019924d7009aa (patch) | |
tree | c3420b0a811f33bcb017f6a5cbd8282abff9e3e8 /features/slayers | |
parent | 16db0e981896c256ecc55db8ac872d8f89a1ec1e (diff) | |
download | SoopyV2-33d232312fcc83f878a3bab1944019924d7009aa.tar.gz SoopyV2-33d232312fcc83f878a3bab1944019924d7009aa.tar.bz2 SoopyV2-33d232312fcc83f878a3bab1944019924d7009aa.zip |
small fix
- made boss kill time actually works
Diffstat (limited to 'features/slayers')
-rw-r--r-- | features/slayers/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js index 11413f0..65abe37 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -34,7 +34,7 @@ class Slayers extends Feature { this.hudElements.push(this.slayerXpElement); this.MinibossAlert = new ToggleSetting("Alert when miniboss spawned nearby", "Pops up notification when a miniboss spawned", false, "miniboss_title_ping", this).contributor("EmeraldMerchant"); - this.MinibossPing = new ToggleSetting("Also make a sound when miniboss spawned", "Sound ping when a miniboss spawned", false, "miniboss_sound_ping", this).requires(this.MinibossAlert).contributor("EmeraldMerchant"); + this.MinibossPing = new ToggleSetting("Also make a sound when miniboss spawned", "Sound ping when a miniboss spawned", false, "miniboss_sound_ping", this).contributor("EmeraldMerchant"); this.BoxAroundMiniboss = new ToggleSetting("Draws boxes around minibosses.", "If they are too far away it doesnt draw.", false, "box_around_miniboss", this).contributor("EmeraldMerchant"); this.betterHideDeadEntity = new ToggleSetting("Also hides mob nametag when it's dead.", "An improvement for Skytils's hide dead entity", false, "hide_dead_mob_nametag", this); @@ -118,10 +118,10 @@ class Slayers extends Feature { ChatLib.chat("&r &r&aYou have &d" + numberWithCommas(Object.values(this.slayerExp).reduce((a, t) => t + a, 0)) + " total XP&r&7!&r"); let bossKillTimeMessage = undefined if (this.bossSpawnKillTime.getValue() && Date.now() - this.lastBossSlain < 60000 * 5) { - bossKillTimeMessage = `&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSlain)} &ato spawn and kill&r&7!` - if (this.bossKillTime.getValue()) bossKillTimeMessage += `(${timeNumber(Date.now() - this.lastBossSpawned)} to kill)&r`; - ChatLib.chat(bossKillTimeMessage) + bossKillTimeMessage += `&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSlain)} &ato spawn and kill&r&7!` } + if (this.bossKillTime.getValue()) bossKillTimeMessage += `(${timeNumber(Date.now() - this.lastBossSpawned)} to kill)&r`; + if (bossKillTimeMessage !== undefined) ChatLib.chat(bossKillTimeMessage) } this.lastBossSlain = Date.now(); }); @@ -666,6 +666,7 @@ class Slayers extends Feature { if (line.getName().includes("Slay the boss!")) { if (!this.bossSpawnedMessage) { socketConnection.sendSlayerSpawnData({ loc: [Math.round(Player.getX()), Math.round(Player.getY()), Math.round(Player.getZ())] }); + this.lastBossSpawned = Date.now(); } if (!this.bossSpawnedMessage && !this.emanBoss) { this.nextIsBoss = Date.now(); |