Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 07:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++] Pressing F-keys in the background.

Discussion on [C++] Pressing F-keys in the background. within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
clintonselke's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 348
Received Thanks: 2,175
[C++] Pressing F-keys in the background.

Good day fokes, the following might be interesting to anyone wanting to make a background autopotter, xp skill leveler or something.

PHP Code:
void CCO2Functions::triggerFKey(uint32_t num)
{
/*
CPU Disasm
Address   Hex dump             Command                                            Comments
0048921D  |.  A1 B0915D00      MOV EAX,DWORD PTR DS:[5D91B0]
00489222  |.  56               PUSH ESI                                           ; /Arg1
00489223  |.  8D88 089C0800    LEA ECX,[EAX+89C08]                                ; |
00489229  |.  E8 0762FFFF      CALL 0047F435                                      ; \Conquer.0047F435
0048922E  |.  8B0D B4915D00    MOV ECX,DWORD PTR DS:[5D91B4]
00489234  |.  C1E0 08          SHL EAX,8
00489237  |.  0BC7             OR EAX,EDI
00489239  |.  50               PUSH EAX                                           ; /Arg1
0048923A  |.  E8 0B7F0000      CALL 0049114A                                      ; \Conquer.0049114A
*/
    
char opcode[] =
    
"\x60"                     //  0: PUSH AD
    
"\xBF\x00\x00\x00\x00"     //  1: MOV EDI, num
    
"\x89\xFE"                 // MOV ESI, EDI
    
"\x4E"                     // DEC ESI
    
"\xA1\xB0\x91\x5D\x00"     // MOV EAX, DWORD PTR DS:[0x005D91B0]
    
"\x56"                     // PUSH ESI
    
"\x8D\x88\x08\x9C\x08\x00" // LEA ECX,[EAX+0x00089C08]
    
"\xB8\x35\xF4\x47\x00"     // MOV EAX, 0x0047F435
    
"\xFF\xD0"                 // CALL EAX
    
"\x8B\x0D\xB4\x91\x5D\x00" // MOV ECX, DWORD PTR DS:[0x005D91B4]
    
"\xC1\xE0\x08"             // SHL EAX, 8
    
"\x0B\xC7"                 // OR EAX, EDI
    
"\x50"                     // PUSH EAX
    
"\xB8\x4A\x11\x49\x00"     // MOV EAX, 0x0049114A
    
"\xFF\xD0"                 // CALL EAX
    
"\x61"                     // POP AD
    
"\xC3";                    // RET

    
opcode[2] = ((char*)&num)[0];
    
opcode[3] = ((char*)&num)[1];
    
opcode[4] = ((char*)&num)[2];
    
opcode[5] = ((char*)&num)[3];

    
execute((void*)opcodesizeof(opcode));
}

uint32_t CCO2Functions::execute(voidopcodeuint32_t size)
{
    
voidremoteMem VirtualAllocEx(hProcess0sizeMEM_COMMITPAGE_EXECUTE_READWRITE);
    if (
remoteMem == NULL) { return 0; }
    if (!
WriteProcessMemory(hProcessremoteMemopcodesize0)) {
        
VirtualFreeEx(hProcessremoteMem0MEM_RELEASE);
        return 
0;
    }
    
HANDLE hThread CreateRemoteThread(hProcess065536, (LPTHREAD_START_ROUTINE)remoteMem000);
    if (!
hThread) {
        
VirtualFreeEx(hProcessremoteMem0MEM_RELEASE);
        return 
0;
    }
    while (
WaitForSingleObject(hThread1000) != WAIT_OBJECT_0) {}
    
uint32_t retval;
    
GetExitCodeThread(hThread, (DWORD*)&retval);
    
VirtualFreeEx(hProcessremoteMem0MEM_RELEASE);
    
CloseHandle(hThread);
    return 
retval;

void CCO2Functions::triggerFKey(uint32_t num) <-- in this function num is the f-key number ranging from 1 to 10.

Enjoy
clintonselke is offline  
Thanks
2 Users
Old 05/17/2009, 21:01   #2
 
elite*gold: 0
Join Date: Mar 2006
Posts: 5
Received Thanks: 0
oo thanks, if i made an autopotter, and wanted to give source so everyone can see. would you mind if i gave them the CCO2Functions.h and cpp or you want me to not release that?


~griwald
griswald is offline  
Old 05/17/2009, 21:32   #3
 
clintonselke's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 348
Received Thanks: 2,175
Quote:
Originally Posted by griswald View Post
oo thanks, if i made an autopotter, and wanted to give source so everyone can see. would you mind if i gave them the CCO2Functions.h and cpp or you want me to not release that?


~griwald
Sure, be my guest.
clintonselke is offline  
Old 05/18/2009, 11:26   #4
 
elite*gold: 0
Join Date: Jul 2006
Posts: 88
Received Thanks: 0
gratz i try it and give u results
ace_heart is offline  
Reply


Similar Threads Similar Threads
how to avoid DC when pressing start in db bot
08/19/2010 - SRO Private Server - 1 Replies
hi all i've just experienced the same problem with my new char. "blader" i removed the game and reinstalled it and every thing was okay but i'm a little bit hesitated about skills config, so after saving a certain set of skills i reconfigure it again and again then suddenly the problm appeared again so i did the following : 1) empty the settings folder in swsro folder "i don't think this will have any effect but just do it " 2)remove "settings" and...
[Request] Pressing H every minute?
01/18/2010 - Mabinogi - 10 Replies
Hi Cananyone make AutoIt or something that presses Letter H in keyboard Every minute?
L2 crashing when pressing 'Other Control'
08/07/2008 - Lineage 2 - 9 Replies
I've seen people in other topics complain about this problem before and it seems to happen on official as well as on private servers. In every L2Walker for Hellbound that does NOT verify I can open the 'Other Control' tab fine, but it says Verify Failed ofcourse. But with Walkers that are supposed to work, choosing the tab causes L2 to crash. Anyone got a solution for this?
Tbot Crashing when pressing F6!!
12/10/2007 - SRO Hacks, Bots, Cheats & Exploits - 10 Replies
WHen i Coming to the selecting screen of Chararcter i Pressing F6 Then The Tbot Crashed and bcause of that The Patch didnt work Either Some 1 got this Proplem Or can Solve/help me ? Thnx
How to Fix SRO Closing after Pressing F6
11/20/2007 - SRO Guides & Templates - 4 Replies
Like you have all heard about disabling loopback their is a bit of a trick that has worked for me on multiple length named account Load your bot when the Gameguard screen comes up disable the loopback adapter log in with your name and password like normal when you get to the char select screen press F6 and let it patch select your player and let it load to the game screen minimize the screen and re enable your loopback adapter open the game and start training it should then work +Rep...



All times are GMT +1. The time now is 07:18.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.