Compot - Version 0.01

08/03/2009 19:08 fabioaraujo#16
Just to make a little easy for everyone I translated some comments that was in german and put the translation next to the original comment...
Just didn't found hte translation for langsamm. regelmäsig and NachKampf.

And just to know, how can we post a new version of this bot? Or we will just post new methods like hoopyfrood and who wanna add this method will have to do this manually?
08/03/2009 22:50 Hauie#17
Quote:
Originally Posted by fabioaraujo View Post
Just didn't found hte translation for langsamm. regelmäsig and NachKampf.
langsam = slow
regelmäßig = regularly, regular, periodical, frequent
nach Kampf = after fight
08/04/2009 01:36 hoopyfrood#18
Quote:
Originally Posted by fabioaraujo View Post
And just to know, how can we post a new version of this bot? Or we will just post new methods like hoopyfrood and who wanna add this method will have to do this manually?
I've been thinking about this too. If i'm correct Gertos meant this to be a learning project for the people that choose to learn from this.

I've posted my routine, well, to get things started :D You will only be able to use it if you at least gave it a try to understand whats in that rar file.

All i had before i started with this was some rusty coding experience and i raced through C# for Dummies :p

It would be cool to make it a project at sourceforge (or alike) but we will end up having a ready to compile bot, which was not the purpose of this project.

People who start editing this code will probably run into the same issues, so when questions arise, someone like them will probably be able to help.

I feel like Compot is a puzzle with missing pieces, alot of usefull info can be found in the code by just reading it and trying to understand what is happening there. I never seen a construction like the LogikTimer_Tick
and i love exploring its possibilities.

My hero hasn't killed a single mob yet, but he certainly knows (and is able) to find one and check the mobs hp. For now i'm more interested in making this code work just to, well, get it working. Solving the puzzle.

At the moment i have a routine to check if i really selected a mob after pressing tab. It works flawless, but i used an on disk bmp file (10x10/24bit) of the small closing square (with an x in it) which u can click to deselect the mob. Im using the bmp to compare with a partial screenshot (30x30) in the SucheBildimBild routine. Like i said, it works flawless and seems fast, but is it the right way to do it. How do you do it? Which logic do you use to determine if u really selected a mob after pressing tab? Tell us ;)
08/04/2009 11:02 ckret#19
i figured out how to fix the problem with the mob hp

but i still have problems with pet mp/hp and character hp/mp
08/04/2009 18:03 Night Dragon#20
#Stickied

I'm happy to see everyone working together so well towards a common goal. Good work!
08/04/2009 19:51 buhguy#21
damn yall are rockin
08/04/2009 20:32 Gertos#22
Is the position of the Mob-HP / Hero-HP / Hero-MP ... always the same ?

e.g. if you use a diffrent screen resolution or betwenn the German and the US Version of the Game.

I think no, so a frist step should be that we remove the absolute Numbers from the Code and write them for example into a file.

I would use here a XML file.
08/04/2009 20:40 KentuckyFC#23
You can write with autoit a setposition script that set the window position to the bot position
08/04/2009 21:03 fabioaraujo#24
One interesting to put in compot to help find the coords would be to see in some place of our form what is in the selected coord. Then after giving some coords to Hero HP we could see what is in this place to put a plus one or two...

While we didn't make this, I did a new "screen" to put the coords manually, then we can change this in time of execution, and a method to save to disk and load from it. Now we don't need to recompile to fix coords ^^

Quote:
Is the position of the Mob-HP / Hero-HP / Hero-MP ... always the same ?

e.g. if you use a diffrent screen resolution or betwenn the German and the US Version of the Game.

I think no, so a frist step should be that we remove the absolute Numbers from the Code and write them for example into a file.

I would use here a XML file.
I have used a normal txt file =p, and made overload methods to analyse hp/mp for who still wanna use absolute numbers from code for some reason.
08/04/2009 21:24 gabriel_cucick#25
Quote:
Originally Posted by Gertos View Post
Is the position of the Mob-HP / Hero-HP / Hero-MP ... always the same ?

e.g. if you use a diffrent screen resolution or betwenn the German and the US Version of the Game.

I think no, so a frist step should be that we remove the absolute Numbers from the Code and write them for example into a file.

I would use here a XML file.
Yes =/, it change X,Y position with resolution change.

Quote:
Originally Posted by KentuckyFC View Post
You can write with autoit a setposition script that set the window position to the bot position
OK, almost outlaw, but it was to be a exe file.. hehe :) ..

It put rappelz screen upper-left, used autoit, almost the same as used on kevzor project.

Quote:
Originally Posted by fabioaraujo View Post
I have used a normal txt file =p, and made overload methods to analyse hp/mp for who still wanna use absolute numbers from code for some reason.
Nhamy... let me add it on mine project ^.^ :handsdown:
08/04/2009 21:58 fabioaraujo#26
Just to explain something that I did... I think the X, Y between the Hero HP and Hero MP is the same to the Pet HP and Pet MP, then I did some calc to not need to input the Pet MP X and Y based on the coords from the Hero HP/MP...
I hope this work... When I get in home I'll test this too :p
08/04/2009 22:04 Gertos#27
Quote:
Originally Posted by KentuckyFC View Post
You can write with autoit a setposition script that set the window position to the bot position
Quote:
Originally Posted by gabriel_cucick View Post
It put rappelz screen upper-left, used autoit, almost the same as used on kevzor project.
You don't need to place the window into a specific position.
The tool is doing a search for the icon inside of the title of the game.

Take a look into the function Tools.SucheRappelzWindow();

The function will store the location here:
MainWindow.BasisX
MainWindow.BasisY

-------------
And one hint:

You can see what the tool is looking at , if you active inside of function

GetBitmap(int x, int y, int dx, int dy)

this line:
// MainWindow.mainWindow.pictureBox1.Image = screenCopy;
Just remove the "//"

Now the HP/MP Diagram shows also all the Bars / and other things.
08/04/2009 23:23 Night Dragon#28
Quote:
Originally Posted by Gertos View Post
You don't need to place the window into a specific position.
The tool is doing a search for the icon inside of the title of the game.

Take a look into the function Tools.SucheRappelzWindow();

The function will store the location here:
MainWindow.BasisX
MainWindow.BasisY
Wow that is genius and yet so elementary! Well done Gertos!
08/05/2009 02:18 fabioaraujo#29
Quote:
Originally Posted by Gertos View Post
this line:
// MainWindow.mainWindow.pictureBox1.Image = screenCopy;
lol XD Its really easy =p
Now I got my coords and.....

Working bot ^^
Just the basic, tab, f1, f2 but its a begin =D

I've used the AnalyseMob method a lot here, if after 2 sec attacking a mob he still at 100% this maybe is a Trap, then send tab. Before send tab send a few F2 to make sure I got everything. And thats my idea, using Busy_still var a lot too to give time for my char move in the map.

Lets continue this project, I really enjoy this.
08/05/2009 10:07 ckret#30
Quote:
Originally Posted by Gertos View Post
You don't need to place the window into a specific position.
The tool is doing a search for the icon inside of the title of the game.

Take a look into the function Tools.SucheRappelzWindow();

The function will store the location here:
MainWindow.BasisX
MainWindow.BasisY
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