Lava Titan
Developer
hey, can some1 help me with this math?
I changed some lines on player events in TFS 1.2
everything Works fine except that I can't manage to get it showing correct "current" health
example:
HP: 1kk / 10kk <-- this is fine
but if player has less than 1kk hp but his max health is over 1kk the current health will display like
HP: 0kk / 10kk
I'm trying to make it do like for example if you have 800k/10kk
HP: 8kk / 10kk
HP: 800k / 10kk
HP: 80k/10kk
HP: 8k/10kk
HP: 800/10kk
HP: 8/10kk
I changed some lines on player events in TFS 1.2
everything Works fine except that I can't manage to get it showing correct "current" health
example:
HP: 1kk / 10kk <-- this is fine
but if player has less than 1kk hp but his max health is over 1kk the current health will display like
HP: 0kk / 10kk
I'm trying to make it do like for example if you have 800k/10kk
HP: 8kk / 10kk
HP: 800k / 10kk
HP: 80k/10kk
HP: 8k/10kk
HP: 800/10kk
HP: 8/10kk
Code:
if thing:isCreature() then
local str1k = "%s\nHP: %dk / %dk"
local str1kk = "%s\nHP: %dkk / %dkk"
if thing:getMaxMana() > 0 and thing:getMaxMana() < 1000000 then
str = string.format("%s & MP: %dk / %dk", str1k, (thing:getMana()/1000), (thing:getMaxMana()/1000))
print("1")
else
str = string.format("%s & MP: %dkk / %dkk", str1kk, (thing:getMana()/1000000), (thing:getMaxMana()/1000000))
print("2")
end
if thing:getMaxHealth() > 0 and thing:getMaxHealth() < 1000000 then
description = string.format(str1k, description, (thing:getHealth()/1000), (thing:getMaxHealth()/1000)) .. "."
print("3")
else
description = string.format(str1kk, description, (thing:getHealth()/1000000), (thing:getMaxHealth()/1000000)) .. "."
print("4")
end
end
Last edited: