Documente Academic
Documente Profesional
Documente Cultură
_____________________________________________________
On to OllyDbg >>>:<<<
_____________________________________________________
Once you have realoaded the game and have logged back into
the game, go ahead and ALT+TAB back out of the game, go to
the directory where you put your copy OllyDbg. Launch
OllyDbg and attach it to the "TwelveSky.exe" Process in the
Process list. If you do not have OllyDbg just google it,
it is easy to find. The Current "Full" version is 1.10.
You want to get the 1.10 version as 2.0 is still in alpha
stages.
OK I googled for the people that don't have it:
http://www.ollydbg.de/
Note: In this view you can get the base address of the
Module you are working with(in this case TwelveSky.exe).
Here is what it should say:
Base=00400000 Size=00AA0000 (11141120.) Entry=00401000
TwelveSk.<ModuleEntryPoint> Name=TwelveSk
Path=C:\AeriaGames\12Sky\TwelveSky.exe
so if you didn't know before and you should ever need the
base address of a module in the game you are working with
this is where you can find it.
EXAMPLE:
_____________________________________________________
Now we need to know the OFFSET for the Maximum Health Value.
Subract 4 from 168 and that is the OFFSET to the Maxium
Health. So our OFFSETS are:
_____________________________________________________
So, now that we have OFFSETS that point to both our Max and
Cur Health Values we need to know the pointer address of our
character. So we take another look at the instruction:
0xD0A7E0+0x168;
//----------
//address 0xD0A7E0.
//BreakDown:
//----------
-------------
*/
ReadProcessMemory(HANDLE, (void*)(dwPlayerBase+0x168),
&dwCurrentHealth, sizeof(dwCurrentHealth), &dwBytesRead);
//----------
BreakDown:
//----------
//Same as above except now we use our POINTER+OFFSET to
store our CurrentHealth Value into our own Pointer:
dwCurrentHealth
ReadProcessMemory(HANDLE, (void*)dwPlayerBase+0x164),
&dwMaximumHealth, sizeor(dwMaximumHealth), &dwBytesRead);
//----------
BreakDown:
//----------
//Same as above except now we use our POINTER+OFFSET to
store our CurrentHealth Value into our own Pointer:
dwMaximumHealth
_____________________________________________________
/
************************************************************
************************************************************
************************************************************
************************************************************
*****
************************************ TWELVE SKY EXAMPLE DLL
PROJECT
*******************************************************
***********************************
+______________________________+
*******************000000000**************************
***************************************** AUTO HEALING BOT
************************************************************
****
************************************************************
************************************************************
************************************************************
************************************************************
*****/
/*
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <iostream>
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <string.h>
using namespace std;
//witch is set to 0.5 by default. 0.4 40% 0.3 30% 0.6 60%
if(Slot1 > 0) //Make sure Slot1 has pills(Slot1
Greater than 0)
{
SendKeyStroke(VK_1);
//Send the KeyPress
add_log("Your HP was just Restored via
Slot1"); //Add to the log alerting a keypress
}
else if((Slot1 == 0) && (Slot2 > 0)) //If slot1
is empty use and Slot2 has pills use slot2
{
SendKeyStroke(VK_2);
add_log("Your HP was just Restored via
Slot2");
}
else {add_log("Add HP Pills to Slot1 or
Slot2");} //if both slot1 and 2 are empty alert to the log
no pills
}
for(dwCurMP; dwCurMP <= RestoreMP; dwCurMP++)//same as
the HP but using the MP Pointers
{
if(!UseMed) //If Not UseMed(if the bool UseMed
is set to false continue)
{
if(Slot3 > 0) //check slot3 for pills
{
SendKeyStroke(VK_3);
add_log("Your MP was just Restored via
Slot3");
}
else if((Slot3 == 0) && (Slot4 > 0)) //slot3 out
of pills, check slot4 and use it if there are pills
{
SendKeyStroke(VK_4);
add_log("Your MP was just Restored via
Slot4");
}
else {add_log("Add MP Pills to Slot3 or
Slot4");} //Alert out of pills
}
if(UseMed) // if the bool value UseMed is set to
True it will use your meditation skill instead of MPPills
{ // use this when you are poor
SendKeyStroke(MedKey); //use the
sendkeystroke like normal but use the Variable MedKey so
that it can be
//can be custom set
via a config(config to be added at a later time)
add_log("Your MP is being Restored via
Meditation");
}
}
}
Sleep(1000);//Pause for 1000 miliseconds(1second) or
else the thread lags the program horribly
}
return 0;
}
time (¤t_time);
current_tm = localtime (¤t_time);
sprintf (logbuf, "[%02d:%02d:%02d] ", current_tm-
>tm_hour, current_tm->tm_min, current_tm->tm_sec);
/
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
****************/
Now you can find the Pointer and the OFFSETS needed to
update the source code for any future Client Release of
Twelve Sky. This way you should always have a working AUTO
HEAL/MP.RESTORE program for any version.*/
***********************************************
***********************************************
***** COMPILING THE SOURCE CODE INTO A DLL ****
***********************************************
***********************************************