Checking durability, how does it work ?
Posted: Sun Mar 28, 2010 10:00 pm
Hello everyone, i followed the tutorials in the solarstrike wiki and was able to make a macro that will check the durability and made paths going to the vendor and back but i am not sure if the durability check is working.
In the bot window i can see that the bot shows how much the durability is but even when it drops below 0.8 the bot wont start the repair path.
Here is the code that checks the durability.
Could somebody tell me how the bot calculates the durability and what does 0.9 represent ?
Also what does this line do ?
if( dura < 0.9 ) then
If durability is lower then 0.9 then set flag true, is that what this line is and if it is then why wont the bot start the repair macro ?
Is it normal to see the durability like "0.8734573645876345 in the bot window ?
Thanks everyone
In the bot window i can see that the bot shows how much the durability is but even when it drops below 0.8 the bot wont start the repair path.
Here is the code that checks the durability.
Code: Select all
<onLeaveCombat>
local dura = inventory:getMainHandDurability();
printf("Durability:%s\n", dura);
if( dura < 0.9 ) then
player.free_flag1 = true;
end
</onLeaveCombat>
Also what does this line do ?
if( dura < 0.9 ) then
If durability is lower then 0.9 then set flag true, is that what this line is and if it is then why wont the bot start the repair macro ?
Is it normal to see the durability like "0.8734573645876345 in the bot window ?
Thanks everyone