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

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

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

#1 Post by beanybabe » 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

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

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

#2 Post by beanybabe » Thu Jun 16, 2016 5:53 pm

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

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 10 guests