I was making waypoint file that goes from a to b and would go back using same line. At the end of the line there is npc and i do check just before that if i would go back or repair.
Code: Select all
<!-- # 57 --><waypoint x="1701" z="-3952"> </waypoint>
<!-- # 58 --><waypoint x="1608" z="-4094">
local dura = inventory:getMainHandDurability();
printf("Durability:%s\n", dura);
if( dura < 90 ) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("gorepair"));
else
__WPL:reverse();
end
</waypoint>
<!-- # 59 --><waypoint x="1666" z="-4163" tag="gorepair"> </waypoint>
<!-- # 60 --><waypoint x="1683" z="-4639"> </waypoint>
<!-- # 61 --><waypoint x="1712" z="-4695">
player:merchant("Isaac Kaid");
__WPL:reverse();
</waypoint>