problem on auto repairing based on dura
Posted: Mon Jan 25, 2010 10:52 am
Code: Select all
<!-- # 16 --><waypoint x="-18218" z="6095">
if( player.free_flag1 == true ) then
player.free_flag1 = false;
loadPaths("ret_k.xml");
end
</waypoint>
Code: Select all
<onLeaveCombat><![CDATA[
local dura = inventory:getMainHandDurability();
printf("Durability:%s\n", dura);
if( dura < 0.9 ) then
player.free_flag1 = true;
end
]]></onLeaveCombat>
By the way i think you should redo the auto repairing part of the bot because the time and the fight based auto repairing doesnt work either.
Thanks.
Edit: Fixed it, the problem seems to be in the condition, this part: <
i replaced it with "< (Enter number here)" and it compiled properly, i'll check how it works now and update you
Update:
Works like a charm

Update 2:
it seems the game sends the dura in percent like 0.95 or whatever so dont write the dura number write the percent