player.MP/player.MaxMP*100 is not working ??
Posted: Tue Jun 14, 2016 11:54 pm
im trying to check mana and use a potiion if needed but the value stays at 100. I even try to use player:updateMP();
print ("mp= ",player.MP/player.MaxMP*100,player.MP,player.MaxMP)
hp= 79296 100
mp= 100 100 100
if 30 > player.MP/player.MaxMP*100 then
cprintf(cli.yellow,"\nLow on Mana!!\n")
inventory:useItem(208485)
end
print ("mp= ",player.MP/player.MaxMP*100,player.MP,player.MaxMP)
hp= 79296 100
mp= 100 100 100
if 30 > player.MP/player.MaxMP*100 then
cprintf(cli.yellow,"\nLow on Mana!!\n")
inventory:useItem(208485)
end