Before I go into details I must ask is there still demand for it? At least in the board everyone seems not too enthusiastic about it any more ?
First where are still the problems:
I can't really say where the char is, also not how far away the enemy still is. The direction is also unknown but in a later version I could get the information about direction out of the mini-map. So I can only a made a crazy bot which attack everything on sight and range.( I thought I saw some infos in the title but it is only the zone)
Solved:
The part with window.getPixel(..) I solved it you can't get the values through hwd(Hackshield) you need to use the desktop and run the game in windows mode. We could simple cut out the window from the screen with help of the rectangle filter.
Concept:
Change setting of AA:
*Click to run*
*Run in range when attack*
*Choose closed enemy when attack*
HP/MP: char and enemy:
Get the information out of the screen by using rectangle filter first over the approximated region than use cv.line() to get closer results. If we have that information(we need it only once) I can go over it with r,g,b = cv.getFilterPixel(x,y) to determinate the values in %
Targeting:
First setup with cv.setMaskFilter({p1,p2}) the region we don't care(e.g. chat) they will be black for the bot, the enemies will be found through motion tracking we will click at that position and check if we have a target by checking the enemy LP bar on top(is it there?). If we in a group of enemies we can also simple spawn the attack keys and see if we found some one.
Loot:
The symbol for it is always on the same spot but it could be hard to locate(we using again getFilterPixel) the debug option should be useful for it.(most mobs are run to you...) We could also try to find the light effect of the loot with motion tracking but I'm not sure if this works
How the bot would work:
Pseudo code;
Code: Select all
attack()
if(LP_Bar)then
attack until LP=0
check_loot();
else
motion_tacking()
if(enemy)then
enemy.click()
end
wait until timeout or player_LP shrinks
if(LP_Bar)then
attack until LP=0
check_loot();
end
end
if(no_enemy in 2min)then
try_change_camera 180
end
I also changed motion tracking so that point which are very close together fuse to one object. We need also filter on the lua side all title which are in y distance to something other out.