Hi!
Im trying to make a small bot as I said in my last post (asking for "despawn"). For the moment, the bot only saves the players and mobs that are in the "range" of my player (distance <= 18) and jump to a specific coords. Now I'm trying to hook the attack function, but I don't get it. I hope you can help me.
This is the Attack Function in Conquer.exe:
[Only registered and activated users can see links. Click Here To Register...]
(I dont know why it doesn't show the image, it is between the [IMG] tags :l
And debugging it I see this:
After a while, I see that there were so much code that I could delete, so I started to delete code until I get this (that works if you try it ingame):
But now I have a problem: How I take the local vars? I made that to see if it would work, and it seems that it sends the packet, but after say "Control 3" in my console, the client crashes :( (Maybe for the local vars?)
BTW:
it's an attempt to make
Thx for read it, hope you know what happens :(
Im trying to make a small bot as I said in my last post (asking for "despawn"). For the moment, the bot only saves the players and mobs that are in the "range" of my player (distance <= 18) and jump to a specific coords. Now I'm trying to hook the attack function, but I don't get it. I hope you can help me.
This is the Attack Function in Conquer.exe:
[Only registered and activated users can see links. Click Here To Register...]
(I dont know why it doesn't show the image, it is between the [IMG] tags :l
And debugging it I see this:
Code:
MOV ECX,ESI CALL 0064E35A //Seems like a bool function, because two lines after it's looking at the value of AL to make a jump, but im not sure what the function does (it differences two types of attack but I don't know the second (type 1C)) LEA ECX,[EBP-440] TEST AL,AL //If 0, goes by the first way, else, the second way JNZ SHORT 00674D66 CALL 00735E3A //First way function call. Takes the values for the packet function call? MOV DWORD PTR SS:[EBP-4],0F MOV EAX,DWORD PTR DS:[ESI+0D8] PUSH 0 //6 Argument PUSH DWORD PTR SS:[EBP-18] //5 Argument: Y coord of the hero LEA ECX,[EBP-440] PUSH DWORD PTR SS:[EBP-14] //4 Argument: X coord of the hero PUSH DWORD PTR DS:[ESI+24C]//3 Argument: UID of the mob PUSH EAX //2 Argument: UID of the hero PUSH 2 //1 Argument: Action type (for the packet) CALL 00736039 //First way func call that makes the action packet (Type 0x02 = 2) JMP SHORT 00674D92 CALL 00735E3A //Second function call. Takes the values for the packet function call? MOV DWORD PTR SS:[LOCAL.73],10 PUSH DWORD PTR DS:[ESI+26C] MOV EAX,DWORD PTR DS:[ESI+0D8] PUSH DWORD PTR DS:[ESI+24C] LEA ECX,[LOCAL.344] PUSH EAX PUSH 1C CALL 00735FA8 //Second way func call that makes the action packet (Type 0x1C = 28) TEST EAX,EAX JZ SHORT 00674DA1 LEA ECX,[EBP-440] CALL 0073626C //Function that does different things. The last one is to send the packet OR DWORD PTR SS:[EBP-4],FFFFFFFF LEA ECX,[EBP-440] CALL 00735E76 //This makes different things, not sure what exactly. Maybe makes the animation? (I found an address from a frameFunction). It also can call a system protect function (IsDebuggerPresent and TerminateProcess) MOV DWORD PTR DS:[ESI+274],1
Code:
LEA ECX,[EBP-440] CALL 00735E3A //Take the values for the next function (maybe?) PUSH 0 //6 Argument PUSH DWORD PTR SS:[EBP-18] //5 Argument: Y coord of the hero LEA ECX,[EBP-440] PUSH DWORD PTR SS:[EBP-14] //4 Argument: X coord of the hero PUSH DWORD PTR DS:[ESI+24C]//3 Argument: UID of the mob PUSH EAX //2 Argument: UID of the hero PUSH 2 //1 Argument: Action type (for the packet) CALL 00736039 //Makes the packet LEA ECX,[EBP-440] CALL 0073626C //Send the packet
PHP Code:
void CO2Farm::Attack(int UID)
{
int X = entMap->myHero.hCoords.X;
int Y = entMap->myHero.hCoords.X;
int hUID = entMap->myHero.UID;
int cEBP = 0x0018FB00 - 0x440;
__asm
{
MOV ECX,cEBP
CALL Properties::Attack_Function_Address_2
}
cout << "Control 1" << endl;
__asm
{
PUSH 0
PUSH Y
MOV ECX,cEBP
PUSH X
PUSH UID
PUSH hUID
PUSH 2
CALL Properties::Attack_Function_Address_3
}
cout << "Control 2" << endl;
__asm
{
MOV ECX,cEBP
CALL Properties::Attack_Function_Address_4
}
cout << "Control 3" << endl;
}
Code:
MOV ECX,cEBP
Code:
LEA ECX,[EBP-440]