diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/slayers/index.js | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js index 31f19f0..35fe3c4 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -39,6 +39,7 @@ class Slayers extends Feature { 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).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.MinibossOffWhenBoss = new ToggleSetting("Disable miniboss features when your boss spawned", "this will boost your fps a little bit during boss", true, "miniboss_off_when_boss", 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); @@ -65,10 +66,11 @@ class Slayers extends Feature { this.whenToShowHitsLeft = new TextSetting("Show hits left timing", "At how much hp should the hits left thing be visible", "", "eman_hp_left", this, "How much hp (Unit: M, enter a valid value 0-300)", false).requires(this.rcmDaeAxeSupport).contributor("EmeraldMerchant"); this.thunderLevel = new TextSetting("Thunderlord Level", "What thunderlord level you have on your hyperion", "", "thunderlord_level", this, "Thunderlord level (only supports 5/6/7)", false).requires(this.rcmDaeAxeSupport).contributor("EmeraldMerchant"); - this.summonsHideNametag = new ToggleSetting("Hide your summons' nametags", "so u can see your boss more clearly", false, "hide_summons_nametags", this).contributor("EmeraldMerchant"); - this.summonsShowNametag = new ToggleSetting("Renders your summons' HP on screen", "this shows your summons' hp on screen", false, "show_summons_hp", this).contributor("EmeraldMerchant"); - this.summonsLowWarning = new ToggleSetting("Warns you when a summon is low", "this warns you after a delay after each bosses, until you respawn them", false, "warn_when_summon_low", this).contributor("EmeraldMerchant"); - this.summonHPGuiElement = new ToggleSetting("Render the HP of your summons on your screen", "This will help you to know how much HP your summons have left while hide summons nametags is on", false, "summon_hp_hud", this).contributor("EmeraldMerchant"); + this.summonFeatureMaster = new ToggleSetting("Summon Features Main Toggle", "enable this to use summon features", false, "hide_summons_nametags", this).contributor("EmeraldMerchant"); + this.summonsHideNametag = new ToggleSetting("Hide your summons' nametags", "so u can see your boss more clearly", false, "hide_summons_nametags", this).requires(this.summonFeatureMaster).contributor("EmeraldMerchant"); + this.summonsShowNametag = new ToggleSetting("Renders your summons' HP on screen", "this shows your summons' hp on screen", false, "show_summons_hp", this).requires(this.summonFeatureMaster).contributor("EmeraldMerchant"); + this.summonsLowWarning = new ToggleSetting("Warns you when a summon is low", "this warns you after a delay after each bosses, until you respawn them", false, "warn_when_summon_low", this).requires(this.summonFeatureMaster).contributor("EmeraldMerchant"); + this.summonHPGuiElement = new ToggleSetting("Render the HP of your summons on your screen", "This will help you to know how much HP your summons have left while hide summons nametags is on", false, "summon_hp_hud", this).requires(this.summonFeatureMaster).contributor("EmeraldMerchant"); this.summonHPElement = new HudTextElement() .setText("") .setToggleSetting(this.summonHPGuiElement) @@ -175,8 +177,15 @@ class Slayers extends Feature { } this.registerChat("&r&aYou have spawned your ${soul} &r&asoul! &r&d(${mana} Mana)&r", (soul, mana) => { + if (!this.summonFeatureMaster || (this.summonFeatureMaster && (this.summonsHideNametag || this.summonsShowNametag || this.summonHPGuiElement || this.summonsLowWarning))) return if (!soul.removeFormatting().includes("Tank Zombie")) { - ChatLib.chat("&6[MVP&0++&6] Soopyboo32&7: &dMy mod only support Tank Zombie summons!\n&6[MVP&0++&6] Soopyboo32&7: &cPlease either use them or DISABLE the feature!\n&6[MVP&0++&6] Soopyboo32&7: &c&lDon't dm me i didn't make this warning LMAO!") + if (!this.wrongSummons) { + delay(300, () => { + ChatLib.chat("&6[MVP&0++&6] Soopyboo32&7: &dMy mod only support Tank Zombie summons!\n&6[MVP&0++&6] Soopyboo32&7: &cPlease either use them or DISABLE the feature!\n&6[MVP&0++&6] Soopyboo32&7: &c&lDon't dm me i didn't make this warning LMAO!") + this.wrongSummons = false + }) + } + this.wrongSummons = true return } if (this.summonAtHPShouldWarn != 0 && !this.canCaptureSummonHPInfo) { @@ -211,6 +220,7 @@ class Slayers extends Feature { this.summonAtHPShouldWarn = 0 this.warnAfterBoss = false this.canCaptureSummonHPInfo = false + this.wrongSummons = false this.Miniboss = { zombie: new Set(["Revenant Sycophant", "Revenant Champion", "Deformed Revenant", "Atoned Champion", "Atoned Revenant"]), @@ -386,6 +396,7 @@ class Slayers extends Feature { this.cannotFindEmanBoss = false } } + if (this.MinibossOffWhenBoss.getValue() && !this.bossSpawnedMessage) return let nameSplit = name.getName().removeFormatting().split(" ") let MobName = `${nameSplit[0]} ${nameSplit[1]}` if (this.BoxAroundMiniboss.getValue() && !this.bossSpawnedMessage && this.Miniboss[this.lastSlayerType]?.has(MobName) && !this.minibossEntity.map(a => a[0].getUUID().toString()).includes(name.getUUID().toString())) { |