getMainHandDurability() don't work

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
solembum05
Posts: 57
Joined: Tue Jun 19, 2012 8:29 am

getMainHandDurability() don't work

#1 Post by solembum05 »

hi i had a problem with this function (not error) but doesn't work:

Code: Select all

function checkdura()
			local dura = inventory:getMainHandDurability();
			        if 95 > dura 
				        then __WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
			        end 
                        end
My dagger is 105 so i want to repair when she is under 101 for have bonus, but nothing work, i try to change "95" by an other but don't work too...

An idea? or other function for repair ?
Forget yesterday, live today and dream tomorrow.
User avatar
lolita
Posts: 139
Joined: Thu Oct 20, 2011 5:39 am
Location: Serbia

Re: getMainHandDurability() don't work

#2 Post by lolita »

maybe cose

Code: Select all

105/100=1.05
95*1.05=99.75 -- Low Dura
but
96*1.05=100.8 -- High Dura
try

Code: Select all

function checkdura()
	if ( 96 > inventory:getMainHandDurability() ) then 
		__WPL:setWaypointIndex(__WPL:findWaypointTag("mech"))
	end
end
Life is a journey, not destination :D
User avatar
solembum05
Posts: 57
Joined: Tue Jun 19, 2012 8:29 am

Re: getMainHandDurability() don't work

#3 Post by solembum05 »

thx !!! Work perfectly ;)
Forget yesterday, live today and dream tomorrow.
Post Reply