Still issues with hp bars? Try this, put it under the counter in the LogikTimerTick, adjust coordinates and be sure! :cool:
Code:
//An idea at which height we're looking
MouseTools.SendMouseEvent_MoveMouse(BasisX + 20, BasisY + 71);
Busy_till = DateTime.Now.AddMilliseconds(100);
Bitmap bild = Tools.GetBitmap(MainWindow.BasisX + 5, MainWindow.BasisY + 71, 200, 1);
for (int q = 0; q < bild.Width; q++)
{
Color myColor = bild.GetPixel(q, 0);
AddToProtokoll(myColor);
}
Hero_Status = HeroStatus.Pause;
Im just looking at 1 line, not 10 or 5, 1 should be enough. Im not sure if comparing 10 lines is 10 times slower then 1 line, but 1 line is enough for me.
Hit a mob, hit escape, and let the mob bash you. Press start/stop when your full hp, when your orange, when your red and when your dead. You wil now know which RGB values you need to compare with. You can take a look at what the RGB value is in Paint (Colors, Edit colors, Define custom colors) where u can enter the RGB values.
After that, you can check the values your bot gets against the Character window ingame (alt-c), that also gives your hp in %.