target.HP fails?
Posted: Wed Oct 17, 2012 5:21 pm
hello there!
Since you`ve been helping me last time so nicely I kindly ask for some more advice...
Here is my problem:
I made a waypoint to farm an instance`s first boss. It`s nasty and the code is ugly but it gets the job done.
But when it comes to bossfight it messes around. So here is what i do:
So i thought the bot should find the boss and shoot in a loop until the evil thingy dies... but it gets stuck in an endless loop trying to shot. SO the boss dies but then i`m stuck on burning a dead body...
What do i do wrong? How can i leave the loop and go on with looting?
Thanks in advance!
Since you`ve been helping me last time so nicely I kindly ask for some more advice...
Here is my problem:
I made a waypoint to farm an instance`s first boss. It`s nasty and the code is ugly but it gets the job done.
But when it comes to bossfight it messes around. So here is what i do:
Code: Select all
<!-- # 11 --><waypoint x="-128" z="-1009" y="1254">
yrest(500)
player:findTarget(targetname);
local target = player:getTarget();
if target and target.Name == targetname then
repeat
player:cast("MAGE_FLAME");
player:cast("MAGE_FIREBALL");
yrest(500)
player:cast("PRIEST_RISING_TIDE");
until 1 > target.HP
else
__WPL:setDirection(WPT_BACKWARD);
end
</waypoint>
What do i do wrong? How can i leave the loop and go on with looting?
Thanks in advance!