Page 1 of 1

player.MP/player.MaxMP*100 is not working ??

Posted: Tue Jun 14, 2016 11:54 pm
by beanybabe
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

Re: player.MP/player.MaxMP*100 is not working ??

Posted: Thu Jun 16, 2016 5:53 pm
by beanybabe
Figured it out have to spell out Mana.

Code: Select all

print ("mp= ",player.Mana/player.MaxMana*100,player.Mana,player.MaxMana)
			
		--player:updateMP();
	    if 30 > player.Mana/player.MaxMana*100 then
            cprintf(cli.yellow,"\nLow on Mana!!\n")
			inventory:useItem(208485)
        end