alien56
26th July 2008, 02:01
Hello,
This is for Client 1.10 and works as of July 25, 2008.
Here is an Auto HP/MP Pill or Meditation program I've been working on. Place HP Pills in the 1st or 2nd Pill slots and MP Pills in the 3rd and 4th Pill slots. You can also choose to enable auto meditation instead to restore your MP. You will need to set the Key to your meditation key(F1-F8). The default setting is F5 for the MedKey and Meditation is on by default. You can also set the HP/MP percent, the percent of depletion at witch to begin healing/medding. The default percent is 50%. You can find the log and config in C:\ drive.
Also here are the offsets for anyone interested:
PlayerPointer Addr: 0x D0A7E0
GM Enable Pointer Addr: 0x5579AC // Enables use of /find "Playername" and /movezone "zonecode" commands and also draws the player level over the name of every player. The rest of the GM commands will disconnect you unless you can bypass the extra check.
OFFSETS:
MaximumHealth: PlayerPointer + 0x164
CurrentHealth : PlayerPointer + 0x168
Maximum MP : PlayerPointer + 0x16C
Current MP : PlayerPointer + 0x170
Pill Slot Addrs:
Slot1 = A93864
Slot2 = A9386C
Slot3 = A93874
Slot4 = A9387C
alien56
26th July 2008, 23:29
/Bump: added Temp Link on RapidShare until a mod approves. Check uc-forums other/mmorpg sections for the scan report if you are unsure about it. It gives a couple flags, but I beleive it is only associated with the Keybd_Event function used to automatically send keypresses to the game for autoheal/mprecovery.
if you still don't trust it here is the full source, you can compile it yourself. To compile you will need to either include the Winject Source, or Remove the PID functions and the PID logging in dll main.
If a mod wants to merge this later with the original post that would be good, I just wanted to make sure anybody who might actually care sees that its added.
Not that its anything special or that many people are actually interested but, I decided to post the source of what I have done so far. Hopefully I can get some "constructive" criticism on anything I may done in vein. Also thanks to Quicktime and Zoomgod for their input in the thread I made in the C++ forum asking how I would get it to loop threw these functions to keep it updated with the game. I wasn't exactly sure how I would hook this game for this particular purpose so I just went with a thread.
Also something maybe someone could help me with is how I might get it to only add to the log once when I want to log a function within a Loop. See the source below for what I mean. Thanks.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <iostream>
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <vector>
#include <fstream>
#include <istream>
#include <string.h>
#include <detours.h>
#include <Tlhelp32.h>
#include "winject.h"
using namespace std;
#define FILELOCATION "C:12Sky.log"
#define INILOC "C:12Sky.ini"
void __cdecl add_log(const char * fmt, ...);
HANDLE TwelveSky = GetCurrentProcess();
HWND SkyWnd = FindWindow(0, "TwelveSky");
DWORD PID = GetPIDbyTitle("TwelveSky"); //from winject source credits mcMike
DWORD PID2 = GetPIDbyClass("TwelveSky");
DWORD dwBytesread;
DWORD dwCurHealth;
DWORD dwMaxHealth;
DWORD dwPlayerBase;
DWORD dwPlayerGM[2] = {};
DWORD dwPlayerGMRead;
DWORD dwCurMP;
DWORD dwMaxMP;
DWORD Slot1;
DWORD Slot2;
DWORD Slot3;
DWORD Slot4;
bool UseMed = true;
BYTE MedKey = VK_F5;
float HPPercent = 0.5;
float MPPercent = 0.5;
#define VK_1 0x31
#define VK_2 0x32
#define VK_3 0x33
#define VK_4 0x34
int SendKeyStroke(BYTE TheKeyToSend) //got this from quicktimes post in the C++ forum
{
keybd_event(TheKeyToSend, //msdn
MapVirtualKey(TheKeyToSend, 0),
0,
0);
keybd_event(TheKeyToSend,
MapVirtualKey(TheKeyToSend, 0),
KEYEVENTF_KEYUP, //msdn
0);
return 1;
}
DWORD ReadThread(LPVOID lpArgs)
{
add_log("Thread Started.");
while(1)
{
//005579AC GM OFFSET
ReadProcessMemory(TwelveSky, (void*)(0xD0A7E0), &dwPlayerBase, sizeof(dwPlayerBase), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(dwPlayerBase+0x164), &dwMaxHealth, sizeof(dwMaxHealth), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(dwPlayerBase+0x168), &dwCurHealth, sizeof(dwCurHealth), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(dwPlayerBase+0x170), &dwCurMP, sizeof(dwCurMP), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(dwPlayerBase+0x16C), &dwMaxMP, sizeof(dwMaxMP), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(0xA93864), &Slot1, sizeof(Slot1), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(0xA9386C), &Slot2, sizeof(Slot2), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(0xA93874), &Slot3, sizeof(Slot3), &dwBytesread);
ReadProcessMemory(TwelveSky, (void*)(0xA9387C), &Slot4, sizeof(Slot4), &dwBytesread);
DWORD HealHealth = dwMaxHealth * HPPercent;
DWORD RestoreMP = dwMaxMP * MPPercent;
if(SkyWnd == GetForegroundWindow())
{
for(dwCurHealth; dwCurHealth <= HealHealth; dwCurHealth++)
{
if(Slot1 > 0)
{
SendKeyStroke(VK_1);
add_log("Your HP was just Restored via Slot1");
}
else if((Slot1 == 0) && (Slot2 > 0))
{
SendKeyStroke(VK_2);
add_log("Your HP was just Restored via Slot2");
}
else {add_log("Add HP Pills to Slot1 or Slot2");}
}
for(dwCurMP; dwCurMP <= RestoreMP; dwCurMP++)
{
if(!UseMed)
{
if(Slot3 > 0)
{
SendKeyStroke(VK_3);
add_log("Your MP was just Restored via Slot3");
}
else if((Slot3 == 0) && (Slot4 > 0))
{
SendKeyStroke(VK_4);
add_log("Your MP was just Restored via Slot4");
}
else {add_log("Add MP Pills to Slot3 or Slot4");}
}
if(UseMed)
{
SendKeyStroke(MedKey);
add_log("Your MP is being Restored via Meditation");
}
}
}
Sleep(1000);
}
return 0;
}
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
DeleteFile(FILELOCATION);
CreateThread( NULL, NULL,(LPTHREAD_START_ROUTINE) ReadThread , NULL, NULL, NULL);
add_log("--------------------------");
add_log("--------------------------");
add_log("----New Log Started-------");
add_log("Attached to 12Sky Client");
add_log("--------------------------");
add_log("--------------------------");
add_log("Thread Created.");
add_log("PID = %d", PID);
add_log("PID = %d", PID2);
add_log("GM MODE INITIATED");
}
if (dwAttached == DLL_PROCESS_DETACH)
{
add_log("DLL Detached from 12Sky Client");
}
return 1;
}
void __cdecl add_log(const char * fmt, ...)
{
#ifndef _NO_ADD
va_list va_alist;
char logbuf[256];
FILE * fp;
struct tm * current_tm;
time_t current_time;
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);
va_start (va_alist, fmt);
_vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
va_end (va_alist);
if ( (fp = fopen ( FILELOCATION , "a")) != NULL )
{
fprintf ( fp, "%sn", logbuf );
fclose (fp);
}
#endif _NO_ADD
}
Lisa
27th July 2008, 18:01
12Sky.rar (105.2 KB) approved.
Wilkness
9th August 2008, 17:49
um sorry for such a noobie question but where do i have to put the dll and how to change the % i dont know rly much bout such things im only playing this game and was wondering if there is an autoheal
spektra
15th August 2008, 06:05
yeh some more detail and help would be nice.. there isnt even a readme
rafaelcost2
15th August 2008, 16:51
we need info how we can use it
alien56
18th August 2008, 08:05
sorry I didn't respond...took so long before anybody responded I just stopped watching the thread. I never even knew anybody responded to it until now. Seemed like noone had any interest so there was no point in me having interest. This current file is out of date though and the game has been patched at least 4 times that I know of since I released it. I have updated my own personal version and it still works just fine. The only thing that has changed is the PlayerPointer address and the Pill slots addresses. The offsets are still the same however.
As far as using it goes, I thought it was pretty self explanitory. A .exe and .dll, Extract anywhere on your HD and launch the exe after you've logged into your character.
Currently I don't though I do not plan to release another version to the public, because practically nobody gives a crap and since I've decided to start playing again I don't want to give away too much of an advantage(as Im already disadvantaged enough as it is).
However since I'm since I am fairly lost on a good amount of things(105 Level +) such as boss hunting and whatnot, Keeping my funds up and among other things, If you have a good high level character on serenity and could offer me some assistance I may be inclined to help you out by providing you with the binary I use myself(including teleportation).
What I need information on is this:
Good Bosses and where to find them, also when is best times. What they give and so forth. If you have a master lvl character I can access a zone that spawns I beleive up to 5 bosses every 3 hours. The only problem is it takes me up to 30-50 minutes to kill just one on my own. They drop 5.5mil and rares every kill however and if possible to kill faster could yield good profit. The zone I refer to is called Pegyan Training Hall Number 3.
I am completely clueless at this point where to find other bosses though that most other players are killing and need information that nobody seems willing to give me.
Also looking for where I might find consistant spawns of bosses for 105 Characters besides Heolgo witch I keep getting blocked from going to because of this Player limit.
PM me for more details.
Halfway1
18th August 2008, 08:52
Dang...Thought i was about to get a bot to.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.