Links
|
| Thread:
aoc combo pack source code
|
|
General Coding Forum Impressed by the releases of others? You want to do it yourself? This forum is for you then! |
 |
 |
|
 |
|
|
Join Date: 04 May 2007
Location: AgeRage.net Cosmos
Posts: 2
|

04-05-2007, 07:43
|
|
Recruited Rager
|
|
|
|
aoc combo pack source code
i want to learn how to make a cheat for aoc.could i got the aoc cp source code?
|
|
|
Join Date: 27 Jan 2005
Location: Australia, Sydney
Age: 20
Posts: 1,385
|

29-07-2007, 02:27
|
|
AR Veteran
|
|
|
|
Speak some better grammer? you have the source code?
|
Mattoman Agerage.. Veteran
|
|
|
Join Date: 26 Jan 2005
Location: Book of Shadows
Age: 20
Posts: 302
|

30-07-2007, 07:40
|
|
Dark Lord
|
|
|
|
I doubt he has it. He is asking for help on how to code hacks
|
|
|
Join Date: 02 Aug 2007
Location: AgeRage.net Cosmos
Posts: 36
|

02-08-2007, 16:36
|
|
Rager
|
|
|
Quote:
Originally Posted by suyuke
i want to learn how to make a cheat for aoc.could i got the aoc cp source code?
|
I believe you'd need to receive the source code for tormentium himself, which i doubt he'd do mind you  .
|
|
|
Join Date: 20 Jan 2007
Location: AgeRage.net Cosmos
Posts: 116
|

02-08-2007, 16:38
|
|
Magician Apprentice
|
|
|
|
I don't think he would since he is working on an anti-hack with IGZ right now.
|
|
|
Join Date: 04 May 2007
Location: AgeRage.net Cosmos
Posts: 2
|

10-10-2007, 05:11
|
|
Recruited Rager
|
|
|
|
I just need some tut or source........
|
|
|
Join Date: 04 Dec 2007
Location: AgeRage.net Cosmos
Posts: 2
|

04-12-2007, 17:17
|
|
Recruited Rager
|
|
|
Quote:
Originally Posted by Mattoman
Speak some better grammer? you have the source code?
|
Learn to spell?
|
|
|
Join Date: 24 Nov 2007
Location: AgeRage.net Cosmos
Posts: 11
|

16-01-2008, 17:33
|
|
Recruited Rager
|
|
|
|
Check around, the source code should be around, otherwise, I'd say it's unavailable...
|
|
|
Join Date: 29 Mar 2007
Location: AgeRage.net Cosmos
Posts: 14
|

07-02-2008, 12:35
|
|
Recruited Rager
|
|
|
|
AoC Maphack
AoC maphack in C++
Do not use it on igz, this one will get you banned.
I am not gonna translate it to English so try to use altavista (Dutch to English, if you think my notes can be useful).
Code:
main.cpp
#include <windows.h> //windows.h includen, het bestand dat dit mogelijk maakt, de <> eromheen geven aan dat het gewoon ergens in je WINDOWS map staat..
#include <stdio.h>
#include <string.h>
#include "Process.h"
#define ID_TIMER 1 // ID voor de timer
#define TIMER_INTERRUPT 600 // timer msg interval-tijd in msec
///////////////
// Addresses //
///////////////
//Adressen
#define AOC_MINI_MAPHACK_NOPE 0x4336E6
#define AOC_MINI_MAPHACK_JMP 0x4336E8
#define AOC_MAPHACK 0x586252
// WAARDES VOOR ADRESSEN
//Maphack aan
BYTE NOPNOP[2] = {144,144}; //Maphack en nope van overbodige instructie.
BYTE SPRING[12] = {233 , 237, 255, 255, 255, 255}; //Jump back naar adres voor minimaphack
//Maphach uit
BYTE FIXNOP1[2] = {133,216};
BYTE FIXSPRING[6] = {15, 132, 164, 1, 0, 0};
BYTE FIXNOP2[2] = {117, 6};
HINSTANCE hInstance; // Komt van cw.hInstance bij de configuratie van de window?
CProcess gameProcess;
/* Naam voor de windowtekst */
char wndText[30];
BYTE poke;
const char g_szClassName[] = "myWindowClass"; //Naam van eigen window.
// Step 4: the Window Procedure
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) // Zeggen voor welk window het geld
{
switch(msg)
{
case WM_CREATE:
hwndLives = CreateWindow("Button", "Map-Hack-On", WS_CHILD|WS_VISIBLE, 20,10, /* Button */
100,20,hwnd,(HMENU)1,hInstance,NULL);
hwndAbout = CreateWindow("Button", "About", WS_CHILD|WS_VISIBLE, 140,70, /* Button */
100,20,hwnd,(HMENU)2,hInstance,NULL);
hwndBy = CreateWindow("Static", "By. Aedan", WS_CHILD|WS_TABSTOP|WS_VISIBLE, 20,70, /* Button */
100,20,hwnd,NULL,hInstance,NULL);
break;
//case WM_TIMER: // Als de timer gestart wordt
// WriteMem(hwnd, opt); /*Maak dan van BYTE opt in WriteMem de waarde 0*/
// opt = 0;
//break;
case WM_COMMAND: // Als er iets geselecteerd wordt in een menu
WriteMem(hwnd, opt);
case BN_CLICKED: // Als er iets aangeklikt wordt
WriteMem(hwnd, opt);
switch(LOWORD(wParam))
{
//----
case 1: // Als de knop freeze lifes bediend wordt
GetWindowText(hwndLives, wndText, 30); /* Laad de momentele windowstekst */
if(strcmp("Map-Hack-On",wndText) == 0) /* Als die tekst [Map-Hack-On] is verander die naar Map-Hack-Off */
{
SetWindowText(hwndLives, "Map-Hack-Off");
poke = 1; /* Verander poke in 0 */
}
else if(strcmp("Map-Hack-Off", wndText) == 0) /* Het omgekeerde van hierboven */
{
SetWindowText(hwndLives, "Map-Hack-On");
poke = 0; /* Verander poke in 1 */
}
break;
//----
case 2:
MessageBox(hwnd,
"This is a trainer, made by Aedan for the game:\n"
"\"Age of Empires 2 The Conquerors\"\n\n"
"Quote: "
"Hacking is more than just a crime. It's a survival trait.\n\n"
,"Untitled - Notepad", MB_OK);
break;
default: { break;}
}
break; // van WM_COMMAND
break; // van BN_CLICKED
case WM_CLOSE: //
DestroyWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
return 0;
}
#define OBTE() \
asm_ {mov eax,fs: [00000018]};\
asm_ {mov eax, [eax+0x30]};\
asm_ {cmp byte ptr [eax+0x2], 0};\
asm_ {je RunProgram};\
//1------------------------------------------------------------------------------------------------------------------------
//Hier ga ik het window definieren
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASSEX wc; /* Data-structuur voor de windowclass */
HWND hwnd; /* De handle voor mijn window */
MSG Msg; /* Berichten naar de applicaties worden hier bewaard */
//Stap 1a: Structuur van het window
wc.hInstance = hInstance;
wc.cbSize = sizeof(WNDCLASSEX); /* size of structuir */
wc.lpszClassName = g_szClassName; /* Naam om de class mee te definieren */
wc.style = CS_DBLCLKS; /* Onderschep dubbel-klikken */
wc.lpfnWndProc = WndProc; /* Dit is de pointer naar de windows procedure voor deze window class */
//Stap 1b: Gebruik standaard icoon en muis-aanwijzer
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); /* NULL, IDI_APPLICATION = kan ook // Grooter icoon als de gebruiker Alt+Tab drukt */
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+22); /* Gebruik de standaard windows background kleur */
wc.lpszMenuName = NULL; /* Geen menu */
wc.cbClsExtra = 0; /* Geen extra bytes na de window class */
wc.cbWndExtra = 0; /* Structure or the window instance */
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); /* NULL, IDI_APPLICATION = kan ook // Smal icoontje in de bovenhoek */
if(!RegisterClassEx(&wc)) // Registreer de window class en als die faalt stop dan het programma
{
MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
// Stap 2: Hier ga ik het windows scherm uitvoeren
hwnd = CreateWindowEx(
WS_EX_CLIENTEDGE,
g_szClassName, /* Class-naam */
"Untitled - Notepad", /* Titel natuurlijk */
WS_OVERLAPPED|WS_SYSMENU|WS_CAPTION, /* WS_OVERLAPPEDWINDOW = zou een standaard window zijn */
CW_USEDEFAULT, /* Windows bepaald the positie */
CW_USEDEFAULT, /* waar het scherm verschijnt */
270, /* Breedte in pixels */
150, /* Hoogte in pixels */
NULL, /* The window is a child-window to desktop */
NULL, /* Geen menu */
hInstance, /* Programma Instance handler */
NULL /* Geen window data */
);
if(hwnd == NULL) //Creeer het window en indien dit faalt: stop dan het programma.
{
MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
return 0;
}
else SetTimer(hwnd, ID_TIMER, TIMER_INTERRUPT, NULL); //Definieer mijn timer
ShowWindow(hwnd, nCmdShow); // Maak het window zichtbaar op het scherm
UpdateWindow(hwnd);
// Stap 3: Message Loop
while(GetMessage(&Msg, NULL, 0, 0) > 0)
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}
//2------------------------------------------------------------------------------------------------------------------------
void WriteMem(HWND hwnd, BYTE opt) // De opt is 1 als ...
{
bool bOk = gameProcess.IsRunning(); /* Komt van class */
if (!bOk)
bOk = gameProcess.FindProcess("Age of Empires II Expansion"); /* Komt van class */
if (bOk)
{
if (poke == 0)
{
gameProcess.Write2Bytes(AOC_MINI_MAPHACK_NOPE, NOPNOP);
gameProcess.Write6Bytes(AOC_MINI_MAPHACK_JMP, SPRING);
gameProcess.Write2Bytes(AOC_MAPHACK, NOPNOP);
}
if (poke == 1)
{
gameProcess.Write2Bytes(AOC_MINI_MAPHACK_NOPE, FIXNOP1);
gameProcess.Write6Bytes(AOC_MINI_MAPHACK_JMP, FIXSPRING);
gameProcess.Write2Bytes(AOC_MAPHACK, FIXNOP2);
}
}
}
Code:
void WriteMem(HWND hwnd, BYTE opt); // Hier gaan we mijn hwnd van game en mijn BYTE opt bemachtigen. Die in main word opgeroepen.
BYTE opt;
static HWND hwndPoints, hwndBy, hwndLives, hwndAbout;
class CProcess
{
public:
CProcess();
virtual ~CProcess();
bool IsRunning(); /* proces al gevonden? */
bool FindProcess(char *p_WindowTitle); /* zoek proces */
BYTE ReadByte(DWORD p_Address); /* 1 byte lezen van memory */
WORD ReadWord(DWORD p_Address);
DWORD ReadDword(DWORD p_Address);
bool WriteByte(DWORD p_Address, BYTE p_Value); /* 1 byte naar memory */
bool Write2Bytes(DWORD p_Address, BYTE *array);
bool Write6Bytes(DWORD p_Address, BYTE *array);
bool IsKeyPressed(int p_iKey);
bool IsSpyRunning(char *p_WindowTitle);
HANDLE m_hProcess;
private:
HANDLE OpenProcess(char *p_ClassName, char *p_WindowTitle);
bool m_bGameRunning;
};
CProcess::CProcess() // We gaan hier zeggen dat we geen handle hebben en dat het process niet loopt
{
m_hProcess = NULL;
m_bGameRunning = false; /* Game is niet opgestart */
}
CProcess::~CProcess()
{}
bool CProcess::IsRunning()
{
return m_bGameRunning;
}
HANDLE CProcess::OpenProcess(char *p_ClassName, char *p_WindowTitle) // Te vinden in private
{
HWND hWindow;
DWORD pid;
hWindow = FindWindow(p_ClassName, p_WindowTitle); /* Vind window met deze class-naam en window-titel */
if (hWindow) /* Als window gevonden is */
{
GetWindowThreadProcessId(hWindow, &pid); /* Get process ID */
return ::OpenProcess(PROCESS_ALL_ACCESS, false, pid); /* Stuur dit terug naar de class */
}
return NULL;
}
bool CProcess::FindProcess(char *p_WindowTitle) // We gaan zoeken naar het process
{
if (m_hProcess == NULL) /* Als m_hProcess == 0 wat we geporgrammeerd hebben dan gaan we verder */
{
m_hProcess = this->OpenProcess(NULL, p_WindowTitle); /* De handle m_hProcess krijgt dit window */
if (m_hProcess)
m_bGameRunning = true;
return m_bGameRunning; /* Geef de waarde 1 terug aan de bool m_bGameRunning */
}
else
return false;
}
bool CProcess::Write2Bytes(DWORD p_Address, BYTE *array) // 2 BYTES schrijven
{
DWORD bytes;
if (m_bGameRunning)
return (WriteProcessMemory(m_hProcess, (void*)p_Address, array, 2, 0) != 0);
return false;
}
bool CProcess::Write6Bytes(DWORD p_Address, BYTE *array) // 6 BYTES schrijven
{
DWORD bytes;
if (m_bGameRunning)
return (WriteProcessMemory(m_hProcess, (void*)p_Address, array, 6, 0) != 0);
return false;
}
BYTE CProcess::ReadByte(DWORD p_Address) // 1 Byte lezen
{
DWORD bytes;
BYTE tmpValue;
if (m_bGameRunning)
{
if (ReadProcessMemory(m_hProcess, (void*)p_Address,(void *)&tmpValue, 1, 0) == 0)
return 0;
else
return tmpValue;
}
return 0;
}
WORD CProcess::ReadWord(DWORD p_Address) // 1 Woord lezen
{
DWORD bytes;
WORD tmpValue;
if (m_bGameRunning)
{
if (ReadProcessMemory(m_hProcess, (void*)p_Address,(void *)&tmpValue, 2, 0) == 0)
return 0;
else
return tmpValue;
}
return 0;
}
DWORD CProcess::ReadDword(DWORD p_Address) // Dubbel woord lezen
{
DWORD bytes;
DWORD tmpValue;
if (m_bGameRunning)
{
if (ReadProcessMemory(m_hProcess, (void*)p_Address,(void *)&tmpValue, 4, 0) == 0)
return 0;
else
return tmpValue;
}
return 0;
}
bool CProcess::IsKeyPressed(int iKey)
{
return ((GetAsyncKeyState(iKey) & 1) == 1);
}
cheating is lame
|
|
Last edited by beer__; 07-02-2008 at 12:46..
|
|
|
Join Date: 29 Mar 2007
Location: AgeRage.net Cosmos
Posts: 14
|

07-02-2008, 12:39
|
|
Recruited Rager
|
|
|
|
Sorry I see the code tags **** things up a little
|
|
|
Join Date: 31 Mar 2008
Location: AgeRage.net Cosmos
Posts: 6
|

31-03-2008, 14:56
|
|
Recruited Rager
|
|
|
|
Very cool beer, thanks for posting that..
|
|
|
Join Date: 02 Sep 2008
Location: Somewhere out there
Posts: 4
|

05-09-2008, 20:14
|
|
Recruited Rager
|
|
|
|
Can that things work to create a hack for aoc 1.0 version ?
i'm very noob at this u_u
|
|
|
Join Date: 15 Sep 2008
Location: AgeRage.net Cosmos
Posts: 6
|

19-09-2008, 12:18
|
|
Banned by warning points
|
|
|
|
Nice, thanks for posting that beer
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|