aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-24 19:00:24 +0800
committerGitHub <noreply@github.com>2022-06-24 19:00:24 +0800
commit30e0e951950bf7001fb3586e6471bc4948566904 (patch)
tree71f99b76eb5e494b9f78a59dfd96132f64c80f11
parentafe2e71b6f8dc19de5abf42cfb499823e3701eea (diff)
parent056ffe36e1fa3c80a77cd4d1d8d03960efb7d779 (diff)
downloadSoopyV2-30e0e951950bf7001fb3586e6471bc4948566904.tar.gz
SoopyV2-30e0e951950bf7001fb3586e6471bc4948566904.tar.bz2
SoopyV2-30e0e951950bf7001fb3586e6471bc4948566904.zip
Merge pull request #18 from EmeraldMerchant/patch-15
finished todo
-rw-r--r--features/slayers/index.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js
index ea592c8..910d0ef 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -24,6 +24,8 @@ class Slayers extends Feature {
this.expOnKill = new ToggleSetting("Show slayer exp on boss kill", "Says your slayer exp in chat when you kill a boss, also says time taken to spawn+kill", true, "slayer_xp", this);
this.slainAlert = new ToggleSetting("Show boss slain alert", "This helps you to not kill mobs for ages with an inactive quest", true, "boss_slain_alert", this);
this.spawnAlert = new ToggleSetting("Show boss spawned alert", "This helps you to not miss your boss when you spawn it", true, "boss_spawn_alert", this);
+ this.bossSpawnKillTime = new ToggleSetting("Show boss spawn and kill time", "tells you your slayer boss speed", true, "Slayer_spawn_kill_time", this).contributor("EmeraldMerchant");
+ this.bossKillTime = new ToggleSetting("Shows you bosses kill time", "tells you your slayer boss kill time", true, "slayer_kill_time", this).requires(this.bossSpawnKillTime).contributor("EmeraldMerchant");
this.slayerXpGuiElement = new ToggleSetting("Render the xp of your current slayer on your screen", "This will help you to know how much xp u have now w/o looking in chat", true, "slayer_xp_hud", this).contributor("EmeraldMerchant");
this.slayerXpElement = new HudTextElement()
.setText("&6Slayer&7> &fLoading...")
@@ -32,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);
@@ -114,7 +116,12 @@ class Slayers extends Feature {
ChatLib.chat("&r &r&a&lSLAYER QUEST COMPLETE!&a&r");
ChatLib.chat("&r &r&aYou have &d" + numberWithCommas(this.slayerExp[this.lastSlayerType]) + " " + this.lastSlayerType + " XP&r&7!&r");
ChatLib.chat("&r &r&aYou have &d" + numberWithCommas(Object.values(this.slayerExp).reduce((a, t) => t + a, 0)) + " total XP&r&7!&r");
- if (Date.now() - this.lastBossSlain < 60000 * 5) ChatLib.chat("&r &r&aBoss took &d" + timeNumber(Date.now() - this.lastBossSlain) + " &ato spawn and kill&r&7!" + /* (" + timeNumber(Date.now()-this.lastBossSpawned) + " to kill) */ "&r"); //TODO: Seperate setting for this
+ if (this.bossSpawnKillTime.getValue() && Date.now() - this.lastBossSlain < 60000 * 5) {
+ ChatLib.chat(`&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSlain)} &ato spawn and kill&r&7!`);
+ }
+ if (this.bossKillTime.getValue() && Date.now() - this.lastBossSpawned < 60000 * 4) {
+ ChatLib.chat(`&r &r&aBoss took &d${timeNumber(Date.now() - this.lastBossSpawned)} &ato kill&r&7!`);
+ }
}
this.lastBossSlain = Date.now();
});
@@ -299,7 +306,7 @@ class Slayers extends Feature {
if (this.BoxAroundMiniboss.getValue() || this.betterHideDeadEntity.getValue()) {
World.getAllEntitiesOfType(net.minecraft.entity.item.EntityArmorStand).forEach(name => {
let MobName = `${name.getName().removeFormatting().split(" ")[0]} ${name.getName().removeFormatting().split(" ")[1]}`
- if (this.BoxAroundMiniboss.getValue() && !this.bossSpawnedMessage && this.Miniboss[this.lastSlayerType]?.has(MobName)) {
+ if (this.BoxAroundMiniboss.getValue() && !this.bossSpawnedMessage && this.Miniboss[this.lastSlayerType]?.has(MobName) && !this.minibossEntity.map(a => a[0].getUUID().toString()).includes(name.getUUID().toString())) {
this.minibossEntity.push([new Entity(name.getEntity()), this.lastSlayerType]);
}
if (this.betterHideDeadEntity.getValue()) {
@@ -385,7 +392,7 @@ class Slayers extends Feature {
if (!this.bossSpawnedMessage && e instanceof net.minecraft.entity.item.EntityArmorStand) {
let mobName = `${e[m.getCustomNameTag]().removeFormatting().split(" ")[0]} ${e[m.getCustomNameTag]().removeFormatting().split(" ")[1]}`
if (this.Miniboss[this.lastSlayerType].has(mobName)) {
- if (this.BoxAroundMiniboss.getValue() && !this.minibossEntity.map(a=>a[0].getUUID().toString()).includes(e[m.getEntityId.Entity]().toString())) {
+ if (this.BoxAroundMiniboss.getValue() && !this.minibossEntity.map(a => a[0].getUUID().toString()).includes(e[m.getEntityId.Entity]().toString())) {
this.minibossEntity.push([new Entity(e), this.lastSlayerType]);
}
}
@@ -659,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();