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 | |
parent | 4aa9741c0ae9fa9e8199b697e4af8bec9d3e7db1 (diff) | |
download | SoopyV2-876a62b421c57ebf93024c6659f687e14b8c3d37.tar.gz SoopyV2-876a62b421c57ebf93024c6659f687e14b8c3d37.tar.bz2 SoopyV2-876a62b421c57ebf93024c6659f687e14b8c3d37.zip |
fire freeze timer
Diffstat (limited to 'features')
-rw-r--r-- | features/dungeonSolvers/index.js | 27 | ||||
-rw-r--r-- | features/globalSettings/index.js | 2 | ||||
-rw-r--r-- | features/stat_next_to_name/index.js | 10 |
3 files changed, 37 insertions, 2 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 { diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 12ff4c3..1c1381a 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -46,7 +46,7 @@ class GlobalSettings extends Feature { // this.reportErrorsSetting = new ToggleSetting("Send module errors to soopy server", "This will allow me to more effectivly fix them", false, "privacy_send_errors", this) - this.hideFallingBlocks = new ToggleSetting("Hide falling blocks", "NOTE: this may cause more lag because of render entity event", false, "hide_falling_sand", this) + this.hideFallingBlocks = new ToggleSetting("Hide falling blocks", "NOTE: This setting is a bit laggy", false, "hide_falling_sand", this) this.twitchCommands = new ToggleSetting("Ingame twitch bot commands", "Allows u to use twitch bot commands ingame (eg -sa)", true, "twitch_commands_ingame", this) this.itemWorth = new ToggleSetting("(Approximate) Item worth in lore", "Accounts for stuff like enchants/recombs ect", false, "item_worth", this) diff --git a/features/stat_next_to_name/index.js b/features/stat_next_to_name/index.js index 46a7c8b..ad6a68f 100644 --- a/features/stat_next_to_name/index.js +++ b/features/stat_next_to_name/index.js @@ -147,7 +147,7 @@ class StatNextToName extends Feature { nameTagString += " &2[" if (stats.usingSoopyv2) nameTagString += "&d⚝&2" - if (stats.exists && stats[this.statToShow.getValue()]) { + if (stats.exists && stats[this.statToShow.getValue()] !== undefined && stats[this.statToShow.getValue()] !== null) { if (this.decimals[this.statToShow.getValue()] === "small") { nameTagString += numberUtils.addNotation("oneLetters", Math.round(stats[this.statToShow.getValue()])) } else { @@ -174,6 +174,14 @@ class StatNextToName extends Feature { playerStatsLoaded(stats) { stats.bestiary /= 10 this.userStats[stats.uuid] = stats + + + World.getAllPlayers().forEach(player => { + if (player.getUUID().toString().replace(/-/g, "") === stats.uuid) { + this.updatePlayerNametag(player) + return + } + }) } onDisable() { |