Help with target code

11/25/2008 16:32 WeeMan411#1
Been working on my own bot now, what I've managed to do so far works great, but I can't work out how to make sure the target is in your line of sight. I tried to use pixelsearch to find the blue circle around the mobs, but it just won't pick it up at all.

Any suggestions?
11/25/2008 18:04 Jatacid#2
What i did was made a conditional searching function which means if the target circle is in left of screen, press and hold "a" until the target circle is in the centre of the screen. or if the target circle is in the right of the screen, press and hold "d" until the target circe is in the centre of the screen..

i.e
Code:
If pixelsearch(Left half of screen area coordinates, target circle color) = True Then
Send("{a down}")

While 1
If Pixelsearch(Centre "in front of character" area coordinates, Target circle color) = True Then
Send("{a up}")
Endif
Wend
Endif
Hope this helps:D

Also, the blue target circle can vary in color quite alot, so in the "shade variation" option in the Pixelsearch(x1,y1,x2,y2, blue color, shade variation)
i made mine 50.

The blue color i use is 0x0304F1 with a shade variation of 50 and i havent had a problem yet :)
11/25/2008 20:33 WeeMan411#3
Huge help there, targeting fully working now!!

Just got a few more bits left to do and got it fully working. Thanks again.

Making the bot for my 63 zerker, so anyone with a zerker of similar level who wants a bot to farm easy mobs for potions, give me your email and I can send you the .exe or source.