Compot - Version 0.01

08/05/2009 13:12 fabioaraujo#31
Quote:
Originally Posted by ckret View Post
i knew that
but there seems to be some programming errors in the code
got the hp/mp of my hero showing properly
but the display of the pet isnt still working

its really fun to learn by doing something into the code
To make everything work I've created one pictureBox or each stat (HP/MP Hero/Pet), and adjusted the coords until these stats showing in the pictubeBox properly.
Example:
Code:
Bitmap bild = Tools.GetBitmap(MainWindow.BasisX + X/*489*/, MainWindow.BasisY + Y/*52*/, 196, 5);
MainWindow.mainWindow.picBoxMobHP.Image = bild;
For the Hero stats I get 10 pixels of height and 5 for Pet and Mob. The only problem that I still need to fix is that when the Hero has a red bar his HP go to -1, maybe another problem with the coords again XD
08/05/2009 18:34 hoopyfrood#32
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 %.
08/05/2009 20:47 fabioaraujo#33
This will help a lot ^^ I was comparing with 10 cos when I was comparing with one I got everytime -1

I've never worked with any image like this before, then I still have some doubt how to work with this.
08/05/2009 21:29 ckret#34
im personally just ignoring the pets hp/mp
cause i cant get it working
my bot is working fine since ive put a roation into it
like attacking when the mob has 100% hp etc. etc.
gonna put an example here when i find some time
08/05/2009 23:29 hoopyfrood#35
Quote:
Originally Posted by fabioaraujo View Post
I've never worked with any image like this before, then I still have some doubt how to work with this.
I think one of the missing pieces for you is in the Analyse* routines. When i looked at them i noticed he was getting color values in variable 'c' and later on compares variables like c.R, c.G and c.B. RGB! There is prolly some logic in the comparisons, but not clear to me. So i wrote the few lines of code in my previous post and things became clear for me :D i just adjusted the Analyse routines to my findings (logged off and in, values the same, moved the window, values the same) so check your own findings and adjust the routines if necessary.
Another piece, Hero's and mobs hp start right after and ends before a grey (116,113,111 by head) pixel ;)

My Hero is able to farm fine atm. Just have to get rid of the Thread.Sleep's in there lol. Gertos is advicing not to use Sleep, i'm gonna have to use the counter now i guess. Atm im just checking my Hero_Status and acting accordingly in a nice switch statement :p Just have buffen, panik and deleveln to go .... LOL
08/06/2009 00:35 KentuckyFC#36
That will be a nice bot i see that all the coder works together
08/06/2009 22:01 buhguy#37
im confused how do i install the kernalHotKey

wont do it threw cmd window
08/06/2009 22:30 ckret#38
you download the "kernelhotkey.exe" file
run command window
change directory to where the "kernelhotkey.exe" is placed
and than you type "kernelhotkey.exe /install"
than you restart your pc
08/07/2009 05:06 buhguy#39
ok its installed but when i try to build the project its telling me it cant find the "type or namespace name kernalhotkey"


PS. ive decided this is way over my head ill leave it to smart people lol
08/07/2009 08:35 Gertos#40
@buhguy

please read post #10 inside of this thread.
08/07/2009 10:51 beatle juice#41
well, i just read the topic quickly, i am absolutly lost in this kind of topic and unfortunately i do not have enough time to learn C++ and other things like this.... my job is taking a lot of time but is i can help you and give you some ideas; or a way i can be usefull for you
let me know it would be nice

good luck for the bot
08/07/2009 18:04 Night Dragon#42
Guys don't get discouraged if you don't get it right away. It is a learning process to understand programming. The best way that I have found to learn programming is by playing with example code to see what small changes do to the program, that way you understand what each function does. Just keep taking small steps and you will get there.. 1 foot in front of the other ;)
08/07/2009 19:02 Disappointed#43
guys how get bot in game :D :D pls help me
08/07/2009 19:10 Night Dragon#44
Quote:
Originally Posted by Disappointed View Post
guys how get bot in game :D :D pls help me
Start with the first page of this thread and work your way from there. Also read the .rtf file included in the compot.zip file and it will show you how to start.

This is not a begging section, so I don't want to see any begging/complaining here.
08/07/2009 19:14 Disappointed#45
Quote:
Originally Posted by Night Dragon View Post
Start with the first page of this thread and work your way from there. Also read the .rtf file included in the compot.zip file and it will show you how to start.

This is not a begging section, so I don't want to see any begging/complaining here.
ok im download the file and read thnnc Night