aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-07-14 00:24:30 +0800
committerGitHub <noreply@github.com>2022-07-14 00:24:30 +0800
commit64442e985ed263593f23806a334fe9082c6d5b2b (patch)
tree51da447aa9fa0bdb2ccbab6e6147f8fc60dc8991 /features
parenta503e9dd2fb936cf94ab79546161401db06acc40 (diff)
parent32298fac6eada2c06a76eb8ed4d92ced83188a8f (diff)
downloadSoopyV2-64442e985ed263593f23806a334fe9082c6d5b2b.tar.gz
SoopyV2-64442e985ed263593f23806a334fe9082c6d5b2b.tar.bz2
SoopyV2-64442e985ed263593f23806a334fe9082c6d5b2b.zip
Merge pull request #30 from EmeraldMerchant/patch-31
separate level up msg
Diffstat (limited to 'features')
-rw-r--r--features/hud/index.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/features/hud/index.js b/features/hud/index.js
index ce56983..25506a3 100644
--- a/features/hud/index.js
+++ b/features/hud/index.js
@@ -196,6 +196,7 @@ class Hud extends Feature {
hudStatTypes["gemstone_powder"] = "Gemstone Powder"
this.extendLevelCap = new ToggleSetting("Hud Stat Ignore Skill Level Cap", "level cap goes over 60 requiring 50m xp per level", false, "hud_ignore_level_cap", this).contributor("EmeraldMerchant")
+ this.showLevelUpMessage = new ToggleSetting("Show level-up message", "Shows skyblock skills level-up message over level 60 in chat", true, "skill_o60_level_message", this).requires(this.extendLevelCap).contributor("EmeraldMerchant")
this.hudStat = []
for (let i = 0; i < 5; i++) {
@@ -542,6 +543,18 @@ class Hud extends Feature {
if (this.apiSoulflow) this.soulflowElement.setText("&6Soulflow&7> &f" + this.numberUtils.numberWithCommas(this.lastStatData.soulflow))
}
+ if (this.showLevelUpMessage.getValue()) {
+ Object.keys(this.skillLevelCaps).forEach(skill => {
+ let skillData = getLevelByXp(this.lastStatData[skill], 0, this.extendLevelCap.getValue() ? Infinity : this.skillLevelCaps[skill])
+ if (this.lastSkillLevel[skill] === skillData.level - 1 && (skillData.level > (this.skillLevelCaps[skill] === 50 ? 50 : 60))) {
+ ChatLib.chat(`&r&3&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬&r`)
+ ChatLib.chat(` &r&b&lSKILL LEVEL UP &3${firstLetterCapital(skill.split("_").pop())} &8${skillData.level - 1}➜&3${skillData.level}&r`)
+ ChatLib.chat(`&r &r&a&lREWARDS&r\n&r &r&6&lSoopy's Respect\n&r&3&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬&r\n`)
+ }
+ this.lastSkillLevel[skill] = skillData.level;
+ })
+ }
+
this.updateHudThingos()
}
@@ -662,10 +675,6 @@ class Hud extends Feature {
Object.keys(this.skillLevelCaps).forEach(skill => {
if (type === skill) {
let skillData = getLevelByXp(this.lastStatData[skill], 0, this.extendLevelCap.getValue() ? Infinity : this.skillLevelCaps[skill])
- if (this.lastSkillLevel[skill] === skillData.level - 1 && (skillData.level > (this.skillLevelCaps[skill] === 50 ? 50 : 60))) {
- //TODO: move to not relying on hud stat & seperate setting
- // ChatLib.chat(`&r&3&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬&r\n &r&b&lSKILL LEVEL UP &3${firstLetterCapital(skill.split("_").pop())} &8${skillData.level - 1}➜&3${skillData.level}&r\n&r &r&a&lREWARDS&r\n&r &r&6&lSoopy's Respect\n&r&3&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬&r\n`)
- }
this.lastSkillLevel[skill] = skillData.level;
string = "&6" + firstLetterCapital(skill.split("_").pop()) + "&7> &f" + (skillData.level + skillData.progress).toFixed(2) + " &7(" + this.numberUtils.numberWithCommas(skillData.xpCurrent) + (skillData.level === this.skillLevelCaps[skill] ? "" : "/" + this.numberUtils.numberWithCommas(skillData.xpForNext)) + ")"
}