Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Code Examples

Status
Not open for further replies.
Skilled Illusionist
Joined
Oct 31, 2008
Messages
341
Reaction score
294
Have Fun.


Buff
Code:
namespace CIOCriticalSection
	{
		static void (__thiscall *Enter)(void *Section) = (void (__thiscall*)(void*))0x00423640;
		static void (__thiscall *Leave)(void *Section) = (void (__thiscall*)(void*))0x004236d0;
}
namespace CLink
	{
		static void (__thiscall* MoveTo)(void *Object,int x) = (void (__thiscall*)
(void*,int))0x00438C40;
}
namespace CChar
{
static void (__thiscall *CancelBuff)(void*,int a5) = (void (__thiscall*)(void*,int a5))0x0040B6A0;
static int (__cdecl* CreateBuff)(int BuffIndex, __int32 BuffCooldown, int StatIncrease, int a4) = (int (__cdecl*)(int,__int32,int,int))0x00402610;
}
const int Timer = 1800; // 30 min
unsigned long __stdcall BuffSystem( void* )
{
	int Time = 0;
	for(;;)
	{
		if( Time >= Timer )
		{
			CIOCriticalSection::Enter((void*)0x4e2078);
			CIOCriticalSection::Enter((void*)0x4e2098);
			CLink::MoveTo((void*)0x4e200c,(int)0x4e2004);
			CIOCriticalSection::Leave((void*)0x4e2098);
			void* Playerp = 0;
			for ( unsigned long i = *(unsigned long*)0x4e2004; i != 0x4e2004; i = *(unsigned long*)i)
			{
				Playerp = (void*)(i-428);

				CChar::CancelBuff(Playerp,36);
				CChar::CancelBuff(Playerp,37);
				CChar::CancelBuff(Playerp,46);
				CChar::CancelBuff(Playerp,47);
				CChar::CancelBuff(Playerp,48);
				CChar::CancelBuff(Playerp,49);
				CChar::CancelBuff(Playerp,50);
				CChar::CancelBuff(Playerp,12);
				int Buff = 0;
				Buff = CChar::CreateBuff(36, 1000, 190, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);

				Buff = CChar::CreateBuff(37, 1000, 190, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);

				Buff = CChar::CreateBuff(46, 1000, 50, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);

				Buff = CChar::CreateBuff(47, 1000, 50, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);

				Buff = CChar::CreateBuff(48, 1000, 50, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);

				Buff = CChar::CreateBuff(49, 1000, 50, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);

				Buff = CChar::CreateBuff(50, 1000, 23, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);

				Buff = CChar::CreateBuff(12, 3600, 120, 0);
				(*(int (__thiscall **)(void*, unsigned long))(*(unsigned long *)Playerp + 180))(Playerp, Buff);
			}
			CIOCriticalSection::Leave((void*)0x4e2078);
			Time = 0;
		}
		Sleep(1000);
		Time++;
	}
}
Code:
/*
class cPlayer;

class cPlayer
{
public:
char _0x0000[32];
char Name[20]; //0x0020 
char _0x0034[8];
BYTE Level; //0x003C 
char _0x003D[3];
WORD Strength; //0x0040 
char _0x0042[2];
WORD Health; //0x0044 
char _0x0046[2];
WORD Intelligence; //0x0048 
char _0x004A[2];
WORD Wisdom; //0x004C 
char _0x004E[2];
WORD Agility; //0x0050 
char _0x0052[2];
WORD MaxHealth; //0x0054 
char _0x0056[2];
WORD Maxmana; //0x0058 
char _0x005A[30];
WORD OTP; //0x0078 
char _0x007A[2];
WORD Evasion; //0x007C 
char _0x007E[2];
WORD minPhy; //0x0080 
char _0x0082[2];
WORD maxPhy; //0x0084 
char _0x0086[2];
WORD minMagic; //0x0088 
char _0x008A[2];
WORD maxMagic; //0x008C 
char _0x008E[2];
WORD Defense; //0x0090 
char _0x0092[2];
WORD Defense_; //0x0094 
char _0x0096[2];
WORD Absorb; //0x0098 
char _0x009A[6];
BYTE FireRe; //0x00A0 
char _0x00A1[3];
BYTE IceRe; //0x00A4 
char _0x00A5[3];
BYTE EleRes; //0x00A8 
char _0x00A9[3];
BYTE LightRes; //0x00AC 
char _0x00AD[3];
BYTE CurseRes; //0x00B0 
char _0x00B1[95];
WORD CurHealth; //0x0110 
char _0x0112[2];
WORD CurMana; //0x0114 
char _0x0116[54];
DWORD X; //0x014C 
DWORD Y; //0x0150 
DWORD Z; //0x0154 
char _0x0158[104];
DWORD UID; //0x01C0 
DWORD PID; //0x01C4 
BYTE AdminLevel; //0x01C8 
char _0x01C9[3];
BYTE Class; //0x01CC 
char _0x01CD[3];
BYTE Job; //0x01D0 
char _0x01D1[7];
DWORD EXP; //0x01D8 
char _0x01DC[68];
WORD StatPoints; //0x0220 
char _0x0222[2];
WORD SkillPoints; //0x0224 
char _0x0226[2];

};//Size=0x0228







*/

class cPlayer
{
public:
	signed int getMinMagic(int PlayerPointer);
	signed int getMaxMagic(int PlayerPointer);
	signed int getMinPhy(int PlayerPointer);
	signed int getMaxPhy(int PlayerPointer);
	short getAdmin(int PlayerPointer);
private:
};

signed int cPlayer::getMinPhy(int PlayerPointer)
{
	return *(signed short*)(PlayerPointer + 0x80);
}
signed int cPlayer::getMaxPhy(int PlayerPointer)
{
	return *(signed short*)(PlayerPointer + 0x84);
}
signed int cPlayer::getMinMagic(int PlayerPointer)
{
	return *(signed short*)(PlayerPointer + 0x88);
}
signed int cPlayer::getMaxMagic(int PlayerPointer)
{
	return *(signed short*)(PlayerPointer + 0x8C);
}
short cPlayer::getAdmin(int PlayerPointer)
{
	return *(short*)(PlayerPointer + 0x1C8);
}
1hh fix
Code:
namespace CMonster
{
static signed int (__thiscall *CMonsterRealApplyDamage)(void* _this,int a5, int a6, int a7, int a8, int a9, int a10, int a11) = (signed int (__thiscall*)(void*,int a5, int a6, int a7, int a8, int a9, int a10,int a11))0x0043E950;
}
void __fastcall CMonsterRealDamage(void *_this,void*,int Player, int a3, int Damage, int a5, int a6, int a7, int a8)
{
	bool forward = true;
	
	Interface<cPlayer> PlayerTool;
	if(
		( PlayerTool->getMaxMagic(Player) > 6000) || 
		( PlayerTool->getMinPhy(Player) > 6000) || 
		( PlayerTool->getMaxPhy(Player) > 6000) || 
		( PlayerTool->getMinMagic(Player) > 6000) ||
		( PlayerTool->getMaxMagic(Player) < 0) || 
		( PlayerTool->getMinPhy(Player) < 0) || 
		( PlayerTool->getMaxPhy(Player) < 0) || 
		( PlayerTool->getMinMagic(Player) < 0) ||
		( Damage > 30000)
	  )
	{
		forward = false;
		CMonster::CMonsterRealApplyDamage(_this,Player,a3,0,a5,a6,a7,a8);
	}

	if( forward == true )
	{
		CMonster::CMonsterRealApplyDamage(_this,Player,a3,Damage,a5,a6,a7,a8);	
	}
}

	Memory->Hook(0x0043AC5D,CMonsterRealDamage);
	Memory->Hook(0x0043F2F1,CMonsterRealDamage);
	Memory->Hook(0x004424BD,CMonsterRealDamage);
	Memory->Hook(0x00443A1D,CMonsterRealDamage);
	Memory->Hook(0x00444EDD,CMonsterRealDamage);
Check Z Value
Code:
namespace CIOCriticalSection
	{
		static void (__thiscall *Enter)(void *Section) = (void (__thiscall*)(void*))0x00423640;
		static void (__thiscall *Leave)(void *Section) = (void (__thiscall*)(void*))0x004236d0;
}
namespace CLink
	{
		static void (__thiscall* MoveTo)(void *Object,int x) = (void (__thiscall*)
(void*,int))0x00438C40;
}
namespace CChar
{
static void (__cdecl *Write)(void *Player, unsigned char Type, const char* Format, ...) = (void (__cdecl*)(void*, unsigned char, const char*, ...))0x00452e60;
}
namespace Console
{
static BOOL (__cdecl* WriteRed)(char* text,  ...) = (BOOL (__cdecl*)(char* text, ...))0x004328C0;
}
const int Timer = 15; // Check every 15 sec
unsigned long __stdcall CheckZ( void * )
{
	int Time = 0;
	for(;;)
	{
		if( Time >= Timer )
		{
			CIOCriticalSection::Enter((void*)0x4e2078);
			CIOCriticalSection::Enter((void*)0x4e2098);
			CLink::MoveTo((void*)0x4e200c,(int)0x4e2004);
			CIOCriticalSection::Leave((void*)0x4e2098);
			void* Playerp = 0;
			for ( unsigned long i = *(unsigned long*)0x4e2004; i != 0x4e2004; i = *(unsigned long*)i)
			{
				Playerp = (void*)(i-428);
				if( ( *(unsigned long*)((int)Playerp + 0x154) >= 60000) || ( *(unsigned long*)((int)Playerp + 0x154) < 0))
				{
					char* Players = (char*)((i-428) + 0x20);
					Console::WriteRed("Player [%s] kicked out for Under/overground [%d]",Players,*(unsigned long*)((int)Playerp + 0x154));
					CChar::Write(Playerp,45,"b",1);
				}
			}
			CIOCriticalSection::Leave((void*)0x4e2078);
			Time = 0;
		}
		Sleep(1000);
		Time++;
	}
}
CPlayer Levelup
Code:
namespace CPlayer
{
	static void (__thiscall *SaveAllProperty)(void*,int a5) = (void (__thiscall*)(void*,int a5))0x004586A0;
	static void (__thiscall *MLMPayMoney)(void*,int a5) = (void (__thiscall*)(void*,int a5))0x00467080; 
	static void (__thiscall *MLMLevelUp)(void*) = (void (__thiscall*)(void*))0x004674D0; 
}
namespace Unknown
{
	static void (__thiscall *sub_47FF00)(void*,int a5) = (void (__thiscall*)(void*,int a5))0x0047FF00;
}
void __fastcall CPlayer__Levelup(unsigned long _this,void*)
{
	(*(void (__cdecl **)(unsigned long, unsigned long, unsigned long, unsigned long))(*(unsigned long *)_this + 88))(_this, 26, 1, 1);// Level ?
	(*(void (__cdecl **)(unsigned long, unsigned long, unsigned long, unsigned long))(*(unsigned long *)_this + 88))(_this, 23, 1, 5);//stats
	(*(void (__cdecl **)(unsigned long, unsigned long, unsigned long, unsigned long))(*(unsigned long *)_this + 88))(_this, 24, 1, *(unsigned long*)(_this + 60) / 10); // Level / 10 = Skill Points
	*((unsigned long *)_this + 138) = 0;
	CPlayer::SaveAllProperty((void*)_this,1);
	Unknown::sub_47FF00((void*)_this,0);
	CPlayer::MLMPayMoney((void*)_this,2);
	
	CPlayer::MLMLevelUp((void*)_this);
}
Memory->HookAPI(0x0045CC00,CPlayer__Levelup);
Egg Exp

with this u can level eggs up to lvl 99999 or what ever u want.

u also can easy add Egg Exp stones with FindBuff.
Code:
namespace CItem
{
	static LONG (__thiscall *SendItemInfo)(void *a5,int, char a6) = (LONG (__thiscall*)(void *a5, int, char a6))0x00427430; 
	static int (__thiscall *IsState)(int thispointer, int a2) = (int (__thiscall*)(int thispointer, int a2))0x00427130;
}
namespace CItemTransform
{
	static void (__thiscall *SaveInfo)(int,int a4) = (void (__thiscall*)(int,int a4))0x0042F2C0; 
}
int EggExpTable[101];

void loadexp()
{
	EggExpTable[0]=0;
	EggExpTable[1]=7900;
	EggExpTable[2]=9120;
	EggExpTable[3]=11520;
	EggExpTable[4]=14880;
	EggExpTable[5]=19200;
	EggExpTable[6]=24480;
	EggExpTable[7]=30720;
	EggExpTable[8]=37920;
	EggExpTable[9]=46080;
	EggExpTable[10]=55200;
	EggExpTable[11]=65280;
	EggExpTable[12]=76320;
	EggExpTable[13]=88320;
	EggExpTable[14]=101280;
	EggExpTable[15]=115200;
	EggExpTable[16]=130080;
	EggExpTable[17]=145920;
	EggExpTable[18]=162720;
	EggExpTable[19]=180480;
	EggExpTable[20]=199200;
	EggExpTable[21]=218880;
	EggExpTable[22]=239520;
	EggExpTable[23]=261120;
	EggExpTable[24]=283680;
	EggExpTable[25]=307200;
	EggExpTable[26]=331680;
	EggExpTable[27]=357120;
	EggExpTable[28]=383520;
	EggExpTable[29]=410880;
	EggExpTable[30]=439200;
	EggExpTable[31]=468480;
	EggExpTable[32]=498720;
	EggExpTable[33]=529920;
	EggExpTable[34]=562080;
	EggExpTable[35]=595200;
	EggExpTable[36]=629280;
	EggExpTable[37]=664320;
	EggExpTable[38]=700320;
	EggExpTable[39]=737280;
	EggExpTable[40]=775200;
	EggExpTable[41]=814080;
	EggExpTable[42]=853920;
	EggExpTable[43]=894720;
	EggExpTable[44]=936480;
	EggExpTable[45]=979200;
	EggExpTable[46]=1022880;
	EggExpTable[47]=1067520;
	EggExpTable[48]=1113120;
	EggExpTable[49]=1159680;
	EggExpTable[50]=1207200;
	EggExpTable[51]=1255680;
	EggExpTable[52]=1305120;
	EggExpTable[53]=1355520;
	EggExpTable[54]=1406880;
	EggExpTable[55]=1459200;
	EggExpTable[56]=1512480;
	EggExpTable[57]=1566720;
	EggExpTable[58]=1621920;
	EggExpTable[59]=1678080;
	EggExpTable[60]=1735200;
	EggExpTable[61]=1793280;
	EggExpTable[62]=1852320;
	EggExpTable[63]=1912320;
	EggExpTable[64]=1973280;
	EggExpTable[65]=2035200;
	EggExpTable[66]=2098080;
	EggExpTable[67]=2161920;
	EggExpTable[68]=2226720;
	EggExpTable[69]=2292480;
	EggExpTable[70]=2359200;
	EggExpTable[71]=2426880;
	EggExpTable[72]=2495520;
	EggExpTable[73]=2565120;
	EggExpTable[74]=2635680;
	EggExpTable[75]=2707200;
	EggExpTable[76]=2779680;
	EggExpTable[77]=2853120;
	EggExpTable[78]=2927520;
	EggExpTable[79]=3002880;
	EggExpTable[80]=3079200;
	EggExpTable[81]=3156480;
	EggExpTable[82]=3234720;
	EggExpTable[83]=3313920;
	EggExpTable[84]=3394080;
	EggExpTable[85]=3475200;
	EggExpTable[86]=3557280;
	EggExpTable[87]=3640320;
	EggExpTable[88]=3724320;
	EggExpTable[89]=3809280;
	EggExpTable[90]=3895200;
	EggExpTable[91]=3982080;
	EggExpTable[92]=4069920;
	EggExpTable[93]=4158720;
	EggExpTable[94]=4248480;
	EggExpTable[95]=4339200;
	EggExpTable[96]=4430880;
	EggExpTable[97]=4523520;
	EggExpTable[98]=4617120;
	EggExpTable[99]=4711680;
	EggExpTable[100]=4807200;
}
void __fastcall EggExp(int *ItemArray,void*, int *PlayerArray, int Type)
{
	int result; 
	if ( PlayerArray[113] != ItemArray[8] || (result = CItem::IsState((int)ItemArray,1), !result) || (result = (int)ItemArray, ItemArray[23] >= 100) )
		ItemArray[25] = 0;

	if ( Type == 1 )
	{
		ItemArray[25] += 1;

		if ( ItemArray[25] >= 180 )
		{
			ItemArray[25] = 0;
			ItemArray[24] += PlayerArray[15] * 4;
			CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);
		}
	}
	else
	{
		ItemArray[24] += PlayerArray[15];
		CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);	
	}
	if ( ItemArray[24] >= EggExpTable[ItemArray[23]] )
	{
		if ( PlayerArray[15] <= ItemArray[23] ){}
		ItemArray[24] -= EggExpTable[ItemArray[23]];
		ItemArray[23] += 1;

		CItemTransform::SaveInfo((int)ItemArray,1);
		CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);
	}

}
Memory->HookAPI(0x0042F030,EggExp);
Fix Geon F/L with Price

Code:
namespace CPlayer
{
static int (__thiscall* SendMail)(void*,int, int, char *, char, int, int, int, int, int, int) = (int (__thiscall*)(void*,int, int, char *, char, int, int, int, int, int, int))0x00468280;
}
int __fastcall myMail(void* Player,void* _edx,int a1, int a2, char * Recvivername, char Text, int a5, int a6, int Index, int a8, 
int Anzahl, int Price)
{
	if((Index == 31) && (Price >=1))	
		return 0;

	return CPlayer::SendMail(Player,a1,a2,Recvivername,Text,a5,a6,Index,a8,Anzahl,Price);
}
 
Last edited:
Elite Diviner
Joined
Feb 8, 2012
Messages
439
Reaction score
867
Just some notes (not a criticism):

Code:
CChar::Write(Playerp,45,"b",1);
Is that enough for kick an player? Isnt it needed to clear the Player Pointer / Socket Serverside?

Code:
( PlayerTool->getMaxMagic(Player) > 6000) || 
        ( PlayerTool->getMinPhy(Player) > 6000) || 
        ( PlayerTool->getMaxPhy(Player) > 6000) || 
        ( PlayerTool->getMinMagic(Player) > 6000) ||
        ( PlayerTool->getMaxMagic(Player) < 0) || 
        ( PlayerTool->getMinPhy(Player) < 0) || 
        ( PlayerTool->getMaxPhy(Player) < 0) || 
        ( PlayerTool->getMinMagic(Player) < 0) ||
        ( Damage > 30000)
A little bit static, i would get it via config.
Code:
const int Timer = 15; // Check every 15 sec
unsigned long __stdcall CheckZ( void * )
{
    int Time = 0;
    for(;;)
Better CPlayer::Ontimer Hook instead of Thread.

cPlayer
with Hex Offsets nice. Striker use array index and me finally now use __asm
Example:
Code:
void Player::SetLevel(int level)
{
    __asm mov eax, [ecx]
    __asm mov ecx, [ebp+8]
    __asm sub ecx, 1
    __asm mov [eax+60], ecx
    __asm xor ecx, ecx
    __asm mov edx, 0x0045CC00
    __asm mov ecx, eax
    __asm call edx
}

int Player::GetLevel()
{
    __asm mov eax, [ecx]
    __asm mov eax, [eax+60]
}
doesnt look it really nice? I love it ^^

Code:
(*(void (__cdecl **)(unsigned long, unsigned long, unsigned long, unsigned long))(*(unsigned long *)_this + 88))
arghh :p cout << this+88; pls and then using the Address is maybe better
And guys a little Hint:
Memory->HookAPI is like DetourAttach, and Memory->Hook is an Inst_Call Intercept for Caller Hook.

Thank you very much bloodx, would be nice to see more code release in the future from other person too here on ragezone.
 
Last edited:
Banned
Banned
Joined
Jan 16, 2013
Messages
23
Reaction score
9
Thanks for release :)

Some things i know from int that is pretty cool, not sure if its released before but i dont think so.

Geon event, increasse geon drop by xx %
Drop event, increasse drop rates by x %

Keep it up!
 
Skilled Illusionist
Joined
Oct 31, 2008
Messages
341
Reaction score
294
@MadKnight

#1 Actually I dont think u need mainserver gonna clean it up by his own for sure.

#2 Sure it's static atm but I did just want to show how People can check for 1hh :)

#3 hmmm maybe :p

#4 hehe Like I told u I dont like to use asm when its not a must have.

#5 uhm yeah :p it's just Pseudo C code from Hex Ray.
 
Junior Spellweaver
Joined
Dec 16, 2012
Messages
187
Reaction score
29
Great Bloodx, Pretty useful release.. waiting for more of these useful codes.
Egg Exp gonna be great lesson for me aswell.

Okay, some questions here..
Why did you use Sleep at Buff since Sleep is pretty dangerous to use with Mainserver?
Also what's the use of putting statics into namespaces?
Thanks =)
 
Legendary Battlemage
Joined
Jul 11, 2012
Messages
621
Reaction score
235
what about crashs ??
i mean anything can stop these crashs
 
Joined
Jun 23, 2006
Messages
782
Reaction score
399
what about crashs ??
i mean anything can stop these crashs

Yea it can fix a few of them. But what you need for this is a fully working brain + you should know how to use it.
Without months(or weeks, if you're good) of learning you won't be able to do a poop.

how i can add this code?

Learn C++.

I think you both shouldn't ask your questions here...This release is for people who know C or Asm...
 
Elite Diviner
Joined
Feb 8, 2012
Messages
439
Reaction score
867
Okay, some questions here..
Why did you use Sleep at Buff since Sleep is pretty dangerous to use with Mainserver?
Sleep is not dangerous, if you use it it in an extra Thread and its needed if you make an extra Thread, else you have 100% CPU usage on 1 core for your Thread, even Sleep(1); reduce CPU Core usage from 100% to 0-1%.

Sleep is dangerous, if you inject it into the Mainserver Thread, because then the whole Mainserver execution could stop for the amount of Sleep Time you putted in.

A new Thread is a big Overhead for a thing like Buff or Z check, thats why its beser to hook the build in Mainserver timed checks like CPlayer::Ontimer instead of an own Thread. And an extra Thread can produce parallel processing errors, for example if your own Thread and another Thread (from u or another DLL) wants to access the same Data at same Time without entering an CriticalSection.

Also what's the use of putting statics into namespaces?
Thanks =)
For better understanding and reading without Namepaces you couldnt see the difference for example between:
CAuthSocket::Write
CPlayer::Write
CDBSocket::Write
CIOSocket::Write
Console::Write

without namespaces all would be named only Write. I dont know if it even compile, maybe C++ thinks overloaded function ^^


 
Skilled Illusionist
Joined
Oct 31, 2008
Messages
341
Reaction score
294
Egg Exp

with this u can level eggs up to lvl 99999 or what ever u want.

u also can easy add Egg Exp stones with FindBuff.
Code:
namespace CItem
{
	static LONG (__thiscall *SendItemInfo)(void *a5,int, char a6) = (LONG (__thiscall*)(void *a5, int, char a6))0x00427430; 
	static int (__thiscall *IsState)(int thispointer, int a2) = (int (__thiscall*)(int thispointer, int a2))0x00427130;
}
namespace CItemTransform
{
	static void (__thiscall *SaveInfo)(int,int a4) = (void (__thiscall*)(int,int a4))0x0042F2C0; 
}
int EggExpTable[101];

void loadexp()
{
	EggExpTable[0]=0;
	EggExpTable[1]=7900;
	EggExpTable[2]=9120;
	EggExpTable[3]=11520;
	EggExpTable[4]=14880;
	EggExpTable[5]=19200;
	EggExpTable[6]=24480;
	EggExpTable[7]=30720;
	EggExpTable[8]=37920;
	EggExpTable[9]=46080;
	EggExpTable[10]=55200;
	EggExpTable[11]=65280;
	EggExpTable[12]=76320;
	EggExpTable[13]=88320;
	EggExpTable[14]=101280;
	EggExpTable[15]=115200;
	EggExpTable[16]=130080;
	EggExpTable[17]=145920;
	EggExpTable[18]=162720;
	EggExpTable[19]=180480;
	EggExpTable[20]=199200;
	EggExpTable[21]=218880;
	EggExpTable[22]=239520;
	EggExpTable[23]=261120;
	EggExpTable[24]=283680;
	EggExpTable[25]=307200;
	EggExpTable[26]=331680;
	EggExpTable[27]=357120;
	EggExpTable[28]=383520;
	EggExpTable[29]=410880;
	EggExpTable[30]=439200;
	EggExpTable[31]=468480;
	EggExpTable[32]=498720;
	EggExpTable[33]=529920;
	EggExpTable[34]=562080;
	EggExpTable[35]=595200;
	EggExpTable[36]=629280;
	EggExpTable[37]=664320;
	EggExpTable[38]=700320;
	EggExpTable[39]=737280;
	EggExpTable[40]=775200;
	EggExpTable[41]=814080;
	EggExpTable[42]=853920;
	EggExpTable[43]=894720;
	EggExpTable[44]=936480;
	EggExpTable[45]=979200;
	EggExpTable[46]=1022880;
	EggExpTable[47]=1067520;
	EggExpTable[48]=1113120;
	EggExpTable[49]=1159680;
	EggExpTable[50]=1207200;
	EggExpTable[51]=1255680;
	EggExpTable[52]=1305120;
	EggExpTable[53]=1355520;
	EggExpTable[54]=1406880;
	EggExpTable[55]=1459200;
	EggExpTable[56]=1512480;
	EggExpTable[57]=1566720;
	EggExpTable[58]=1621920;
	EggExpTable[59]=1678080;
	EggExpTable[60]=1735200;
	EggExpTable[61]=1793280;
	EggExpTable[62]=1852320;
	EggExpTable[63]=1912320;
	EggExpTable[64]=1973280;
	EggExpTable[65]=2035200;
	EggExpTable[66]=2098080;
	EggExpTable[67]=2161920;
	EggExpTable[68]=2226720;
	EggExpTable[69]=2292480;
	EggExpTable[70]=2359200;
	EggExpTable[71]=2426880;
	EggExpTable[72]=2495520;
	EggExpTable[73]=2565120;
	EggExpTable[74]=2635680;
	EggExpTable[75]=2707200;
	EggExpTable[76]=2779680;
	EggExpTable[77]=2853120;
	EggExpTable[78]=2927520;
	EggExpTable[79]=3002880;
	EggExpTable[80]=3079200;
	EggExpTable[81]=3156480;
	EggExpTable[82]=3234720;
	EggExpTable[83]=3313920;
	EggExpTable[84]=3394080;
	EggExpTable[85]=3475200;
	EggExpTable[86]=3557280;
	EggExpTable[87]=3640320;
	EggExpTable[88]=3724320;
	EggExpTable[89]=3809280;
	EggExpTable[90]=3895200;
	EggExpTable[91]=3982080;
	EggExpTable[92]=4069920;
	EggExpTable[93]=4158720;
	EggExpTable[94]=4248480;
	EggExpTable[95]=4339200;
	EggExpTable[96]=4430880;
	EggExpTable[97]=4523520;
	EggExpTable[98]=4617120;
	EggExpTable[99]=4711680;
	EggExpTable[100]=4807200;
}
void __fastcall EggExp(int *ItemArray,void*, int *PlayerArray, int Type)
{
	int result; 
	if ( PlayerArray[113] != ItemArray[8] || (result = CItem::IsState((int)ItemArray,1), !result) || (result = (int)ItemArray, ItemArray[23] >= 100) )
		ItemArray[25] = 0;

	if ( Type == 1 )
	{
		ItemArray[25] += 1;

		if ( ItemArray[25] >= 180 )
		{
			ItemArray[25] = 0;
			ItemArray[24] += PlayerArray[15] * 4;
			CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);
		}
	}
	else
	{
		ItemArray[24] += PlayerArray[15];
		CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);	
	}
	if ( ItemArray[24] >= EggExpTable[ItemArray[23]] )
	{
		if ( PlayerArray[15] <= ItemArray[23] ){}
		ItemArray[24] -= EggExpTable[ItemArray[23]];
		ItemArray[23] += 1;

		CItemTransform::SaveInfo((int)ItemArray,1);
		CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);
	}

}
Memory->HookAPI(0x0042F030,EggExp);
 
Legendary Battlemage
Joined
Jul 11, 2012
Messages
621
Reaction score
235
Egg Exp

with this u can level eggs up to lvl 99999 or what ever u want.

u also can easy add Egg Exp stones with FindBuff.
Code:
namespace CItem
{
	static LONG (__thiscall *SendItemInfo)(void *a5,int, char a6) = (LONG (__thiscall*)(void *a5, int, char a6))0x00427430; 
	static int (__thiscall *IsState)(int thispointer, int a2) = (int (__thiscall*)(int thispointer, int a2))0x00427130;
}
namespace CItemTransform
{
	static void (__thiscall *SaveInfo)(int,int a4) = (void (__thiscall*)(int,int a4))0x0042F2C0; 
}
int EggExpTable[101];

void loadexp()
{
	EggExpTable[0]=0;
	EggExpTable[1]=7900;
	EggExpTable[2]=9120;
	EggExpTable[3]=11520;
	EggExpTable[4]=14880;
	EggExpTable[5]=19200;
	EggExpTable[6]=24480;
	EggExpTable[7]=30720;
	EggExpTable[8]=37920;
	EggExpTable[9]=46080;
	EggExpTable[10]=55200;
	EggExpTable[11]=65280;
	EggExpTable[12]=76320;
	EggExpTable[13]=88320;
	EggExpTable[14]=101280;
	EggExpTable[15]=115200;
	EggExpTable[16]=130080;
	EggExpTable[17]=145920;
	EggExpTable[18]=162720;
	EggExpTable[19]=180480;
	EggExpTable[20]=199200;
	EggExpTable[21]=218880;
	EggExpTable[22]=239520;
	EggExpTable[23]=261120;
	EggExpTable[24]=283680;
	EggExpTable[25]=307200;
	EggExpTable[26]=331680;
	EggExpTable[27]=357120;
	EggExpTable[28]=383520;
	EggExpTable[29]=410880;
	EggExpTable[30]=439200;
	EggExpTable[31]=468480;
	EggExpTable[32]=498720;
	EggExpTable[33]=529920;
	EggExpTable[34]=562080;
	EggExpTable[35]=595200;
	EggExpTable[36]=629280;
	EggExpTable[37]=664320;
	EggExpTable[38]=700320;
	EggExpTable[39]=737280;
	EggExpTable[40]=775200;
	EggExpTable[41]=814080;
	EggExpTable[42]=853920;
	EggExpTable[43]=894720;
	EggExpTable[44]=936480;
	EggExpTable[45]=979200;
	EggExpTable[46]=1022880;
	EggExpTable[47]=1067520;
	EggExpTable[48]=1113120;
	EggExpTable[49]=1159680;
	EggExpTable[50]=1207200;
	EggExpTable[51]=1255680;
	EggExpTable[52]=1305120;
	EggExpTable[53]=1355520;
	EggExpTable[54]=1406880;
	EggExpTable[55]=1459200;
	EggExpTable[56]=1512480;
	EggExpTable[57]=1566720;
	EggExpTable[58]=1621920;
	EggExpTable[59]=1678080;
	EggExpTable[60]=1735200;
	EggExpTable[61]=1793280;
	EggExpTable[62]=1852320;
	EggExpTable[63]=1912320;
	EggExpTable[64]=1973280;
	EggExpTable[65]=2035200;
	EggExpTable[66]=2098080;
	EggExpTable[67]=2161920;
	EggExpTable[68]=2226720;
	EggExpTable[69]=2292480;
	EggExpTable[70]=2359200;
	EggExpTable[71]=2426880;
	EggExpTable[72]=2495520;
	EggExpTable[73]=2565120;
	EggExpTable[74]=2635680;
	EggExpTable[75]=2707200;
	EggExpTable[76]=2779680;
	EggExpTable[77]=2853120;
	EggExpTable[78]=2927520;
	EggExpTable[79]=3002880;
	EggExpTable[80]=3079200;
	EggExpTable[81]=3156480;
	EggExpTable[82]=3234720;
	EggExpTable[83]=3313920;
	EggExpTable[84]=3394080;
	EggExpTable[85]=3475200;
	EggExpTable[86]=3557280;
	EggExpTable[87]=3640320;
	EggExpTable[88]=3724320;
	EggExpTable[89]=3809280;
	EggExpTable[90]=3895200;
	EggExpTable[91]=3982080;
	EggExpTable[92]=4069920;
	EggExpTable[93]=4158720;
	EggExpTable[94]=4248480;
	EggExpTable[95]=4339200;
	EggExpTable[96]=4430880;
	EggExpTable[97]=4523520;
	EggExpTable[98]=4617120;
	EggExpTable[99]=4711680;
	EggExpTable[100]=4807200;
}
void __fastcall EggExp(int *ItemArray,void*, int *PlayerArray, int Type)
{
	int result; 
	if ( PlayerArray[113] != ItemArray[8] || (result = CItem::IsState((int)ItemArray,1), !result) || (result = (int)ItemArray, ItemArray[23] >= 100) )
		ItemArray[25] = 0;

	if ( Type == 1 )
	{
		ItemArray[25] += 1;

		if ( ItemArray[25] >= 180 )
		{
			ItemArray[25] = 0;
			ItemArray[24] += PlayerArray[15] * 4;
			CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);
		}
	}
	else
	{
		ItemArray[24] += PlayerArray[15];
		CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);	
	}
	if ( ItemArray[24] >= EggExpTable[ItemArray[23]] )
	{
		if ( PlayerArray[15] <= ItemArray[23] ){}
		ItemArray[24] -= EggExpTable[ItemArray[23]];
		ItemArray[23] += 1;

		CItemTransform::SaveInfo((int)ItemArray,1);
		CItem::SendItemInfo((void*)ItemArray,(int)PlayerArray, 92);
	}

}
Memory->HookAPI(0x0042F030,EggExp);

what about crashs fix ?
 
Junior Spellweaver
Joined
Dec 16, 2012
Messages
187
Reaction score
29
Thanks Bloodx & MadKnight, for some reason.. your codes seem quite easy to be understood for me.. so grateful.
 
Skilled Illusionist
Joined
Oct 31, 2008
Messages
341
Reaction score
294
Fix Geon F/L with Price

Code:
namespace CPlayer
{
static int (__thiscall* SendMail)(void*,int, int, char *, char, int, int, int, int, int, int) = (int (__thiscall*)(void*,int, int, char *, char, int, int, int, int, int, int))0x00468280;
}
int __fastcall myMail(void* Player,void* _edx,int a1, int a2, char * Recvivername, char Text, int a5, int a6, int Index, int a8, 
int Anzahl, int Price)
{
	if((Index == 31) && (Price >=1))	
		return 0;

	return CPlayer::SendMail(Player,a1,a2,Recvivername,Text,a5,a6,Index,a8,Anzahl,Price);
}
 
Junior Spellweaver
Joined
Dec 16, 2012
Messages
187
Reaction score
29
Great fix =)
Thanks blood, is there a way to make new Exp stone with higher percentage than 30% EXP?
 
Junior Spellweaver
Joined
Dec 16, 2012
Messages
187
Reaction score
29
Yep but I just don't get the idea about it =)
 
Joined
Jun 23, 2006
Messages
782
Reaction score
399
Just allot exp and allot party exp there's a multiplier (*30) and this one is the exp stone
 
Status
Not open for further replies.
Back
Top