Skip to content

Commit

Permalink
Fix level up skill stat flash
Browse files Browse the repository at this point in the history
  • Loading branch information
GregHib committed Dec 9, 2024
1 parent d07bc28 commit 54697b2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/definitions/variables-player.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ skill_stat_flash:
id: 1179
persist: true
format: bitwise
values: [ Attack, Strength, Defence, Ranged, Prayer, Magic, Constitution, Agility, Herblore, Thieving, Crafting, Fletching, Mining, Smithing, Fishing, Cooking, Firemaking, Woodcutting, Runecrafting, Slayer, Farming, Construction, Hunter, Summoning, Dungeoneering ]
values: [ attack, strength, defence, ranged, prayer, magic, constitution, agility, herblore, thieving, crafting, fletching, mining, smithing, fishing, cooking, firemaking, woodcutting, runecrafting, slayer, farming, construction, hunter, summoning, dungeoneering ]
level_up_details:
id: 1230
format: int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ interfaceOption("View", id = "stats") {
val skill = valueOf(component.toSentenceCase())
val menuIndex = menu.indexOf(skill) + 1
player.closeInterfaces()
if (player.containsVarbit("skill_stat_flash", skill.name.toSnakeCase())) {
if (player.containsVarbit("skill_stat_flash", skill.name.lowercase())) {
val extra = 0//0 - normal, 2 - combat milestone, 4 - total milestone
player["level_up_details"] = menuIndex * 8 + extra
player.open("skill_level_details")
player.removeVarbit("skill_stat_flash", skill.name.toSnakeCase())
player.removeVarbit("skill_stat_flash", skill.name.lowercase())
} else {
player["skill_guide"] = menuIndex
player["active_skill_guide"] = menuIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ adminCommand("setlevel") {
target.experience.set(skill, Level.experience(skill, level))
player.levels.set(skill, level)
player.softQueue("", 1) {
target.removeVarbit("skill_stat_flash", skill.name.toSnakeCase())
target.removeVarbit("skill_stat_flash", skill.name.lowercase())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ maxLevelChange { player ->
}
player.playJingle("level_up_${skill.name.lowercase()}${if (unlock) "_unlock" else ""}", 0.5)
player.setGraphic("level_up")
player.addVarbit("skill_stat_flash", skill.name.toSnakeCase())
player.addVarbit("skill_stat_flash", skill.name.lowercase())
levelUp(skill, """
Congratulations! You've just advanced${skill.name.an()} ${skill.name} level!
You have now reached level ${to}!
Expand Down

0 comments on commit 54697b2

Please sign in to comment.