|
Post by joefinity on Sept 28, 2016 17:50:45 GMT
Im curently developing a Bot for Kingdom hearts Unchained X it's curently in a pre alpha and i have a problem i hope you can solve As you can see im ingame in a "Battle" phase and i want that the programm recognites it that im in that phase and only finishes the battle script if the enemy is defeated but the problem is there is no real difference between normal phases and Battle phases excet that the enemy has in the Battle phase an Hp bar but the program recognizes my own Hp bar as the enemys one thats why he keeps tapping even if im not in a battle phase my Code looks like this if he doesn't recognizes the Lv bar because of objects before it he recognizes the Tap button wich is blinkin in battle phase but the tap button has no big opacity thats why he isn't recognized perfectly as well wait(1)
a = 0
while (exists("lv.png", 5)) do
click(Location(885, 515))
a = 2
end
if a == 0 then
while (exists("tap.png", 5))do
click(Location(885, 515))
end
end
a = 0
|
|
narke
New Member
Posts: 7
|
Post by narke on Sept 28, 2016 18:01:08 GMT
I've never played, but is the enemy HP bar in a specific area of the screen always? If so you can search just that region (should be more efficient too)
enemy_hp = Region(x, y, xSize, ySize)
while (enemy_hp:exists("tap.png", 5)) do click(Location(885, 515)) end
|
|
|
Post by joefinity on Sept 28, 2016 18:18:04 GMT
It seems to work quite good but after defeating an enemy he still taps once or twice maybe i need to tweak some png's but thanks for the help it is just what i searchet but another question is a method to scan the entire screen ecxept one defined area ?
|
|
narke
New Member
Posts: 7
|
Post by narke on Sept 28, 2016 18:32:56 GMT
Don't think so. What you can do is take the location returned from find and see if it is in your exclusion zone.
|
|
|
Post by ugakikun on Dec 3, 2016 17:38:58 GMT
|
|