DarksTeam Forum

Go Back   DarksTeam Forum > > > >

Reply
 
Thread Tools Display Modes
  (#1) Old
kingteam kingteam is offline
Newbie
 
Posts: 8
Thanked 9 Times in 1 Post
Join Date: Dec 2017
Default Fix Agility Bug for 97d99i - 02-01-2018, 21:30

Hi Guys, for new year, i wish DarkMaster and all of people in forum with family good health and always succesfully in life !

Today i will release source to fix agility bug for server 97d99i of DarkMaster
(only for pro, not for noob)

Repost from IG

Let's go !

SERVER


Code:
//Struct
struct PMSG_CHARINFOMAIN
{
	PBMSG_HEAD h;
	BYTE Code;
	BYTE Class;
	WORD Dexterity;
	WORD AttackSpeed;
	WORD MagicSpeed;
};
Code:
//Functions.cpp
#include "StdAfx.h"

Functions func;

BOOL Functions::gObjSetCharacterEx(LPBYTE lpdata, int aIndex)
{
	BOOL retornar = gObjSetCharacter(lpdata,aIndex);

	if(retornar == TRUE)
	{
		PMSG_CHARINFOMAIN Result;

		Result.h.c = 0xC1;
		Result.h.size = sizeof(Result);
		Result.h.head = 0xFE;
		Result.Code = 0x07;
		Result.Class = gObj[aIndex].Class;
		Result.Dexterity = (WORD)(gObj[aIndex].Dexterity);
		Result.AttackSpeed = (WORD)(gObj[aIndex].m_AttackSpeed);
		Result.MagicSpeed = (WORD)(gObj[aIndex].m_MagicSpeed);

		DataSend(aIndex, (LPBYTE)(&Result), Result.h.size);
	}
	
	return retornar;
}

void Functions::gObjCalCharacterEx(int aIndex)
{
	gObjCalCharacter(aIndex);

	PMSG_CHARINFOMAIN Result;

	Result.h.c = 0xC1;
	Result.h.size = sizeof(Result);
	Result.h.head = 0xFE;
	Result.Code = 0x07;
	Result.Class = gObj[aIndex].Class;
	Result.Dexterity = (WORD)(gObj[aIndex].Dexterity);
	Result.AttackSpeed = (WORD)(gObj[aIndex].m_AttackSpeed);
	Result.MagicSpeed = (WORD)(gObj[aIndex].m_MagicSpeed);

	DataSend(aIndex, (LPBYTE)(&Result), Result.h.size);
}

Code:
//Functions.h:
#pragma once

class Functions
{
public:
	static BOOL gObjSetCharacterEx(LPBYTE lpdata, int aIndex);
	static void gObjCalCharacterEx(int aIndex);
};

extern Functions func;
Code:
//Defines:
#define gObjSetCharacter                ((bool(*)(LPBYTE lpdata, int aIndex)) 0x0045C370)
#define gObjCalCharacter	        ((void(*)(int aIndex)) 0x00451DE0)
Code:
//Hooks:

func.HookThis((DWORD)&Functions::gObjSetCharacterEx,0x004026CB);
func.HookThis((DWORD)&Functions::gObjCalCharacterEx,0x004015AF);

CLIENT


Code:
//Struct
-------------------------------
struct PMSG_CHARINFOMAIN
{
	PBMSG_HEAD h;
	BYTE Code;
	BYTE Class;
	WORD Dexterity;
	WORD AttackSpeed;
	WORD MagicSpeed;
};
Code:
//Naked.h
-------------------------------
#pragma once

DWORD nProtocolCoreBack  = 0x4384FB;
LPBYTE nProtocolCoreData = nullptr;

void __declspec(naked) nProtocolCore()
{
	__asm MOV nProtocolCoreData, EBP;

	ProtocolCore(nProtocolCoreData);

	__asm MOV EDX, DWORD PTR DS : [0x8311134];
	__asm JMP nProtocolCoreBack;
}
Code:
//Protocol.cpp
#include "StdAfx.h"

BYTE PlayerClass = 0;
WORD PlayerDexterity = 0;
WORD PlayerASpeed = 0;
WORD PlayerMSpeed = 0;

void ProtocolCore(LPBYTE aRecv)
{
	if (aRecv[0] == 0xC1 || aRecv[0] == 0xC3)
	{
		switch (aRecv[2])
		{
		case 0xF3:
			{
				switch(aRecv[3])
				{
				case 0x03:
					{
						ApplyDexterityFix();
					}
					break;
				}
			}
			break;
		case 0xFE:
			{
				switch(aRecv[3])
				{
				case 0x07:
					{
						PMSG_CHARINFOMAIN* Info = (PMSG_CHARINFOMAIN*)(aRecv);

						PlayerClass = Info->Class;
						PlayerDexterity = Info->Dexterity;
						PlayerASpeed = Info->AttackSpeed;
						PlayerMSpeed = Info->MagicSpeed;

						ApplyDexterityFix();
					}
					break;
				}
			}
			break;
		}
	}
}

void ApplyDexterityFix()
{
	switch (PlayerClass)
	{
	case 0:
		{
			if (PlayerMSpeed >= 455 && PlayerMSpeed <= 479)
			{
				*eMainSpeedFrame2 = 0.0024700f;
			}
			else if (PlayerMSpeed >= 605 && PlayerMSpeed <= 636)
			{
				*eMainSpeedFrame2 = 0.0019000f;
			}
			else if (PlayerMSpeed >= 637 && PlayerMSpeed <= 668)
			{
				*eMainSpeedFrame2 = 0.0018000f;
			}
			else if (PlayerMSpeed >= 669 && PlayerMSpeed <= 688)
			{
				*eMainSpeedFrame2 = 0.0017000f;
			}
			else if (PlayerMSpeed >= 855 && PlayerMSpeed <= 1040)
			{
				*eMainSpeedFrame2 = 0.0016300f;
			}
			else if (PlayerMSpeed >= 1041 && PlayerMSpeed <= 1104)
			{
				*eMainSpeedFrame2 = 0.0015500f;
			}
			else if (PlayerMSpeed >= 1301 && PlayerMSpeed <= 1500)
			{
				*eMainSpeedFrame2 = 0.0017500f;
			}
			else if (PlayerMSpeed >= 1501 && PlayerMSpeed <= 1524)
			{
				*eMainSpeedFrame2 = 0.0015000f;
			}
			else if (PlayerMSpeed >= 1525 && PlayerMSpeed <= 1800)
			{
				*eMainSpeedFrame2 = 0.0014500f;
			}
			else if (PlayerMSpeed >= 1801 && PlayerMSpeed <= 1999)
			{
				*eMainSpeedFrame2 = 0.0013000f;
			}
			else if (PlayerMSpeed >= 2000 && PlayerMSpeed <= 2167)
			{
				*eMainSpeedFrame2 = 0.0012500f;
			}
			else if (PlayerMSpeed >= 2168 && PlayerMSpeed <= 2354)
			{
				*eMainSpeedFrame2 = 0.0011500f;
			}
			else if (PlayerMSpeed >= 2855 && PlayerMSpeed <= 3011)
			{
				*eMainSpeedFrame2 = 0.0009000f;
			}
			else if (PlayerMSpeed >= 3011)
			{
				*eMainSpeedFrame2 = 0.0008100f;

			}
			else
			{
				*eMainSpeedFrame2 = 0.0020000f;
			}
		}
		break;
	case 1:
		{
			*eMainSpeedFrame1 = 0.0040000f;
			*eMainSpeedFrame2 = 0.0020000f;
		}
		break;
	case 2:
		{
			if (PlayerASpeed >= 509 && PlayerASpeed <= 549)
			{
				*eMainSpeedFrame1 = 0.0026000f;
			} 
			else if (PlayerASpeed >= 550 && PlayerASpeed <= 750) 
			{
				*eMainSpeedFrame1 = 0.0017000f;
			} 
			else 
			{
				*eMainSpeedFrame1 = 0.0040000f;
			}
		}
		break;
	case 3:
		{
			if (PlayerMSpeed >= 455 && PlayerMSpeed <= 479)
			{
				*eMainSpeedFrame2 = 0.0024700f;
			}
			else if (PlayerMSpeed >= 605 && PlayerMSpeed <= 636)
			{
				*eMainSpeedFrame2 = 0.0019000f;
			}
			else if (PlayerMSpeed >= 637 && PlayerMSpeed <= 668)
			{
				*eMainSpeedFrame2 = 0.0018000f;
			}
			else if (PlayerMSpeed >= 669 && PlayerMSpeed <= 688)
			{
				*eMainSpeedFrame2 = 0.0017000f;
			}
			else if (PlayerMSpeed >= 855 && PlayerMSpeed <= 1040)
			{
				*eMainSpeedFrame2 = 0.0016300f;
			}
			else if (PlayerMSpeed >= 1041 && PlayerMSpeed <= 1104)
			{
				*eMainSpeedFrame2 = 0.0015500f;
			}
			else if (PlayerMSpeed >= 1301 && PlayerMSpeed <= 1500)
			{
				*eMainSpeedFrame2 = 0.0017500f;
			}
			else if (PlayerMSpeed >= 1501 && PlayerMSpeed <= 1524)
			{
				*eMainSpeedFrame2 = 0.0015000f;
			}
			else if (PlayerMSpeed >= 1525 && PlayerMSpeed <= 1800)
			{
				*eMainSpeedFrame2 = 0.0014500f;
			}
			else if (PlayerMSpeed >= 1801 && PlayerMSpeed <= 1999)
			{
				*eMainSpeedFrame2 = 0.0013000f;
			}
			else if (PlayerMSpeed >= 2000 && PlayerMSpeed <= 2167)
			{
				*eMainSpeedFrame2 = 0.0012500f;
			}
			else if (PlayerMSpeed >= 2168 && PlayerMSpeed <= 2354)
			{
				*eMainSpeedFrame2 = 0.0011500f;
			}
			else if (PlayerMSpeed >= 2855 && PlayerMSpeed <= 3011)
			{
				*eMainSpeedFrame2 = 0.0009000f;
			}
			else if (PlayerMSpeed >= 3011)
			{
				*eMainSpeedFrame2 = 0.0008100f;
			}
			else
			{
				*eMainSpeedFrame2 = 0.0020000f;
			}
		}
		break;
	}
}
Code:
//Protocol.h
#pragma once

void ProtocolCore(LPBYTE aRecv);
void ApplyDexterityFix();
Code:
//Defines:
#define eMainSpeedFrame1 (float*)(0x54D4BC)
#define eMainSpeedFrame2 (float*)(0x54D8CC)
Code:
//Hook
HookOffset((DWORD)&nProtocolCore,0x4384F5,0xE9);
Reply With Quote
The Following 9 Users Say Thank You to kingteam For This Useful Post:
Dea7h (03-01-2018), DemonuMu (03-01-2018), djagripnos (04-01-2018), goldenfox (06-01-2018), kkovas (22-01-2018), ludlud (11-02-2018), Van_Bom (17-02-2018), WhiteMammoth (05-01-2018), zsnesw (10-01-2018)
  (#2) Old
zsnesw zsnesw is offline
Newbie
 
Posts: 16
Thanked 2 Times in 2 Posts
Join Date: Aug 2015
Default 10-01-2018, 23:07

@DarkMaster , you could put in version 1.0
Reply With Quote
The Following User Says Thank You to zsnesw For This Useful Post:
DemonuMu (10-01-2018)
  (#3) Old
ZabiinoOo ZabiinoOo is offline
Newbie
 
Posts: 34
Thanked 2 Times in 2 Posts
Mood: Sick
Join Date: Feb 2012
Default 17-01-2018, 13:09

for v 1.0?
Reply With Quote
  (#4) Old
zsnesw zsnesw is offline
Newbie
 
Posts: 16
Thanked 2 Times in 2 Posts
Join Date: Aug 2015
Default 18-01-2018, 00:57

DarksTeam MuServer 0.99.60/62T (1.0M)
Reply With Quote
  (#5) Old
kkovas kkovas is offline
Newbie
 
Posts: 4
Thanked 0 Times in 0 Posts
Join Date: Nov 2011
Default 22-01-2018, 05:28

Quote:
Originally Posted by zsnesw View Post
DarksTeam MuServer 0.99.60/62T (1.0M)
I want it too
Reply With Quote
  (#6) Old
kingteam kingteam is offline
Newbie
 
Posts: 8
Thanked 9 Times in 1 Post
Join Date: Dec 2017
Default 22-01-2018, 05:36

Quote:
Originally Posted by kkovas View Post
I want it too
Please find offset on 99.60T and use this code in this topic and apply
Possible )
Reply With Quote
  (#7) Old
c4nhsatcodong c4nhsatcodong is offline
Forum Member
 
Posts: 69
Thanked 7 Times in 6 Posts
Mood: Flirty
Join Date: Jan 2015
Default 22-01-2018, 14:25

do not work for 0.99.60 / 62T (1.0M)


I have been helping you and everyone but they all keep their own when I need them (
Reply With Quote
  (#8) Old
kingteam kingteam is offline
Newbie
 
Posts: 8
Thanked 9 Times in 1 Post
Join Date: Dec 2017
Default 24-01-2018, 17:22

Quote:
Originally Posted by c4nhsatcodong View Post
do not work for 0.99.60 / 62T (1.0M)
Please find offset on 99.60T and use this code in this topic and apply
Possible )
Reply With Quote
  (#9) Old
aybarchu1 aybarchu1 is offline
Newbie
 
Posts: 6
Thanked 2 Times in 2 Posts
Join Date: Jan 2018
Default 25-01-2018, 09:04

Can you please made a guide how to apply this? Its really interesting and helpful
Reply With Quote
  (#10) Old
c4nhsatcodong c4nhsatcodong is offline
Forum Member
 
Posts: 69
Thanked 7 Times in 6 Posts
Mood: Flirty
Join Date: Jan 2015
Default 25-01-2018, 10:48

Friends X_SuperMan has built from source here inviting people to enjoy dll files you can hook with StudPE or LordPE
Can you offset me for version 0.99.60 / 62T (1.0M)
There will be many thanks to you

dll fix agi 97d


I have been helping you and everyone but they all keep their own when I need them (
Reply With Quote
The Following 2 Users Say Thank You to c4nhsatcodong For This Useful Post:
djagripnos (31-01-2018), kkovas (26-01-2018)
  (#11) Old
RwayOwnage RwayOwnage is offline
Newbie
 
Posts: 11
Thanked 1 Time in 1 Post
Join Date: Dec 2015
Default 09-02-2018, 22:26

where i need to hook the client side,and the server side ?


Reply With Quote
  (#12) Old
kingteam kingteam is offline
Newbie
 
Posts: 8
Thanked 9 Times in 1 Post
Join Date: Dec 2017
Default 11-02-2018, 20:40

Quote:
Originally Posted by RwayOwnage View Post
where i need to hook the client side,and the server side ?
dll fix agi 97d
Reply With Quote
  (#13) Old
nelson25 nelson25 is online now
Newbie
 
Posts: 24
Thanked 2 Times in 2 Posts
Join Date: Apr 2017
Default 16-02-2018, 02:49

Quote:
Originally Posted by c4nhsatcodong View Post
Friends X_SuperMan has built from source here inviting people to enjoy dll files you can hook with StudPE or LordPE
Can you offset me for version 0.99.60 / 62T (1.0M)
There will be many thanks to you

dll fix agi 97d
It is already fixed to add to 97d
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2000 - 2018, vBulletin Solutions, Inc.

no new posts