diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-08 18:46:34 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-08 18:46:34 +0800 |
commit | 876a62b421c57ebf93024c6659f687e14b8c3d37 (patch) | |
tree | 2d2b26e7108ee4eaed1e9015730aabf29d4d9bba /features/dungeonSolvers | |
parent | 4aa9741c0ae9fa9e8199b697e4af8bec9d3e7db1 (diff) | |
download | SoopyV2-876a62b421c57ebf93024c6659f687e14b8c3d37.tar.gz SoopyV2-876a62b421c57ebf93024c6659f687e14b8c3d37.tar.bz2 SoopyV2-876a62b421c57ebf93024c6659f687e14b8c3d37.zip |
fire freeze timer
Diffstat (limited to 'features/dungeonSolvers')
-rw-r--r-- | features/dungeonSolvers/index.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js index 1643057..b363e37 100644 --- a/features/dungeonSolvers/index.js +++ b/features/dungeonSolvers/index.js @@ -64,7 +64,11 @@ class DungeonSolvers extends Feature { this.spiritBearSpawnTimer = new ToggleSetting("Timer for when the spirit bear will spawn", "", true, "spirit_bear_spawn_timer", this); this.spiritBearSpawnElement = new HudTextElement().setToggleSetting(this.spiritBearSpawnTimer).setLocationSetting(new LocationSetting("Spirit bear spawn timer location", "Allows you to edit the location of the timer", "spirit_bear_spawn_location", this, [10, 70, 3, 1]).requires(this.spiritBearSpawnTimer).editTempText("&dBear spawned in: &c1.57s")); + this.fireFreezeTimer = new ToggleSetting("Timer for when to fire freeze in m3/f3", "", true, "ff_timer", this); + this.fireFreezeTimerElement = new HudTextElement().setToggleSetting(this.fireFreezeTimer).setLocationSetting(new LocationSetting("Fire freeze timer location", "Allows you to edit the location of the timer", "fire_freeze_location", this, [10, 80, 3, 1]).requires(this.fireFreezeTimer).editTempText("&dFire freeze in: &c1.57s")); + this.hudElements.push(this.spiritBearSpawnElement); + this.hudElements.push(this.fireFreezeTimerElement); this.hudElements.push(this.spiritBowDestroyElement); this.bloodCampAssist = new ToggleSetting("Assist blood camp", "Helps guess where and when blood mobs will spawn", true, "blood_camp_assist", this); @@ -293,6 +297,15 @@ class DungeonSolvers extends Feature { this.loadf7data() + this.ffCountdownTo = 0 + register('chat', (key) => { + this.ffCountdownTo = Date.now() + 5000 + + delay(5000, () => { + this.ffCountdownTo = 0 + }) + }).setCriteria("[BOSS] The Professor: Oh? You found my Guardians one weakness?").setContains(); + this.registerChat("${name} activated a lever! (${start}/${end})", (name, start, end) => { let player = World.getPlayerByName(ChatLib.removeFormatting(name)) @@ -711,6 +724,7 @@ class DungeonSolvers extends Feature { } this.spiritBowPickUps = [] this.bearSpawning = 0 + this.ffCountdownTo = 0 this.startSpawningTime = 0; this.spawnIdThing = 0; this.eMovingThing = {}; @@ -735,6 +749,12 @@ class DungeonSolvers extends Feature { } step2() { + + if (this.ffCountdownTo && this.ffCountdownTo > 0) { + this.fireFreezeTimerElement.setText("&dFire freeze in: &c" + (Math.max(0, this.ffCountdownTo - Date.now()) / 1000).toFixed(2) + "s"); + } else { + this.fireFreezeTimerElement.setText(""); + } if (this.bearSpawning && this.bearSpawning > 0 && this.isInDungeon()) { this.spiritBearSpawnElement.setText("&dBear spawned in: &c" + (Math.max(0, this.bearSpawning - Date.now()) / 1000).toFixed(2) + "s"); } else { @@ -937,6 +957,13 @@ class DungeonSolvers extends Feature { } step() { + + if (this.ffCountdownTo && this.ffCountdownTo > 0) { + this.fireFreezeTimerElement.setText("&dFire freeze in: &c" + (Math.max(0, this.ffCountdownTo - Date.now()) / 1000).toFixed(2) + "s"); + } else { + this.fireFreezeTimerElement.setText(""); + } + if (this.bearSpawning && this.bearSpawning > 0) { this.spiritBearSpawnElement.setText("&dBear spawned in: &c" + (Math.max(0, this.bearSpawning - Date.now()) / 1000).toFixed(2) + "s"); } else { |