aboutsummaryrefslogtreecommitdiff
path: root/features/dungeonSolvers
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-01-12 14:28:02 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-01-12 14:28:02 +0800
commit4710b28c65736fc1d7c53dcfa264a8ffb1759752 (patch)
tree52157af28d9cd32456667ba7e6238c7cc5746121 /features/dungeonSolvers
parentcf83a37b5e6e6ea049dc6aa2fc4a7de8396c429d (diff)
downloadSoopyV2-4710b28c65736fc1d7c53dcfa264a8ffb1759752.tar.gz
SoopyV2-4710b28c65736fc1d7c53dcfa264a8ffb1759752.tar.bz2
SoopyV2-4710b28c65736fc1d7c53dcfa264a8ffb1759752.zip
add f4 spirit bow distroyed timer
Diffstat (limited to 'features/dungeonSolvers')
-rw-r--r--features/dungeonSolvers/index.js24
1 files changed, 22 insertions, 2 deletions
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js
index bdeff6e..f5e5584 100644
--- a/features/dungeonSolvers/index.js
+++ b/features/dungeonSolvers/index.js
@@ -39,8 +39,20 @@ class DungeonSolvers extends Feature {
this.lividFindChat = new ToggleSetting("Say correct livid in chat", "Sends the correct livid in chat", false, "livid_chat_enabled", this).requires(this.lividFindEnabled)
this.lividFindBox = new ToggleSetting("Put a box around the correct livid", "This helps to locate it in the group", true, "livid_box_enabled", this).requires(this.lividFindEnabled)
this.lividFindNametags = new ToggleSetting("Hide the nametags of incorrect livids", "This helps to locate it in the group", true, "livid_nametags_enabled", this).requires(this.lividFindEnabled)
-
- this.hudElements.push(this.lividHpElement)
+
+ this.spiritBowDestroyTimer = new ToggleSetting("Timer for when the spirit bow will self destruct", "", true, "spirit_bow_destroy_timer", this)
+ this.spiritBowDestroyElement = new HudTextElement()
+ .setToggleSetting(this.spiritBowDestroyTimer)
+ .setLocationSetting(new LocationSetting("Spirit bow destroy timer location", "Allows you to edit the location of the timer", "spirit_destroy_location", this, [10, 70, 3, 1])
+ .requires(this.spiritBowDestroyTimer)
+ .editTempText("&dBow Destroyed in: &c15s"))
+
+ this.hudElements.push(this.spiritBowDestroyElement)
+
+ this.spiritBowPickUps = []
+ this.registerChat("&r&aYou picked up the &r&5Spirit Bow&r&a! Use it to attack &r&cThorn&r&a!&r", ()=>{
+ this.spiritBowPickUps.push(Date.now())
+ })
this.registerStep(true, 2, this.step)
this.registerEvent("worldLoad", this.onWorldLoad)
@@ -146,6 +158,14 @@ class DungeonSolvers extends Feature {
this.unregisterEvent(this.renderEntityEvent)
}
}
+
+ this.spiritBowPickUps = this.spiritBowPickUps.filter(pickUp => Date.now() - pickUp < 20000)
+ if(this.spiritBowPickUps[0]){
+ this.spiritBowDestroyElement.setText("&dBow Destroyed in: &c" + Math.round((this.spiritBowPickUps[0] + 20000 - Date.now()) / 1000) + "s")
+ }else{
+ this.spiritBowDestroyElement.setText("")
+ }
+ // this.spiritBowPickUps
}
initVariables(){