If the bot acquires a target and cannot attack it due to an obstacle, he will switch to another target. Problem is the other target is also behind an obstacle. He then switches back to original target that is still behind an obstacle. This creates an infinite loop of targets he can't attack.
The conditions seems to be limited when 2 of the closest targets are behind an obstacle. And most likely only applies to casters using range attack. My temp fix is to reduce the combat distance to bypass the obstacle. However this doesn't work every time.
Is there a way for the bot to try and target something else? Or at least make him move a little when he gets stuck due to target issues.
Cannot see target, perma-stuck
-
swietlowka
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: Cannot see target, perma-stuck
it happends always when i bot for liquid energy outside hos... and its really annoying, it would be nice to have a mark to mark allready not accesible targets to do not target them for some time, but i cant see it comming anytime soon imho
Re: Cannot see target, perma-stuck
Why not? its actually not that hard. I just didn't give a lot of thought into it. The reason I am asking is so we can all pitch in a solution.swietlowka wrote:but i cant see it comming anytime soon imho
Here is one. Put this in your onskillcast
Code: Select all
player:update()
if player.Fighting then
if( os.difftime(os.time(), player.lastHitTime) > 5 ) then -- more than 5 sec without damaging target
keyboardHold(key.VK_W);
yrest(1000)
keyboardRelease(key.VK_W);
end
end
There is literally hundreds of solutions. Hell you can make him turn a bit then go forward if you want.
-
swietlowka
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: Cannot see target, perma-stuck
maybe this would be better?
Code: Select all
player:update()
if player.Fighting then
if( os.difftime(os.time(), player.lastHitTime) > 5 ) then -- more than 5 sec without damaging target
player:unstick();
yrest(1000);
end
endRe: Cannot see target, perma-stuck
Yeah the unstick thing totally works. I guess this mystery is solved.