#XP Percentage
1 messages · Page 1 of 1 (latest)
trigger:
set {_currentLevel} to player's level
set {_currentXP} to player's experience points
set {_xpNeededForNextLevel} to 0
# Calculate the total XP required to reach the next level
if {_currentLevel} < 16:
set {_totalXPForNextLevel} to (2 * {_currentLevel} + 7) + (level of player * level of player + 6 * level of player) / 2
else if {_currentLevel} < 31:
set {_totalXPForNextLevel} to (5 * {_currentLevel} - 38) + (level of player * level of player + 6 * level of player) / 2
else:
set {_totalXPForNextLevel} to (9 * {_currentLevel} - 158) + (level of player * level of player + 6 * level of player) / 2
set {_xpNeededForNextLevel} to {_totalXPForNextLevel} - {_currentXP}
send "You need %{_xpNeededForNextLevel}% more XP to reach the next level." to player```
This doesnt work but it is smth like that.
“It should also match the player's level bar and xp points”
Why not just use the normal xp bar then?
I am, but i also want the percentage of how far they are into that level
Use this and the experience expression
im lkooking for smth like this
im abit special and dont know how to make that into what i need
but this doesnt work for some reason
you need an addon for that...
just plug in their level and see how much xp points that is