Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    838
  • Joined

  • Days Won

    392
  • Feedback

    100%

Posts posted by xP3NG3Rx

  1. 7jSbtEh.jpeg

     

    This is the hidden content, please
     (
    This is the hidden content, please
    ) (
    This is the hidden content, please
    )

    Contents:

    • root-meta, dumped binary, locales with protos
    • new monsters, maps, dungeon, armors, 2021 easter costumes and mount
    • the package contains the separated folders(m00xxx) and the unpacked files together in one folder.

     

    FAf5tGV.jpg

    • Metin2 Dev 147
    • kekw 1
    • Eyes 5
    • Dislove 3
    • Angry 2
    • Not Good 1
    • Sad 1
    • Smile Tear 2
    • Think 1
    • Confused 2
    • Scream 2
    • Lmao 2
    • Good 52
    • Love 17
    • Love 119
  2. Hmm.... 🤔

    Spoiler
    
    typedef struct STPacketDSTable {
    	BYTE		bHeader;				// sizeof 1
    	int		iType;					// sizeof 4
    	int		iApplyCount;				// sizeof 4
    	int		iBasicApplyValue[255];			// sizeof 4*255=1020
    	int		iAditionalApplyValue[255];		// sizeof 4*255=1020
    	float		fWeight;				// sizeof 4
    } TPacketDSTable;
    
    sizeof(TPacketDSTable) 						// sizeof 2053 * 1~6 -> 2053 ~ 12.318

    WX3onGI.png

     

    Except the network usage at every activate deck, it seems good.

    • Lmao 2
    • Love 1
  3. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hello everyone.

     

    Yesterday @Doonqa asked me if I could reverse this function of the game from the official binary.

    Known fact these functions are necessary and obligatory for the multilanguage systems and I have them since years ago, here they are.

     

    173623g00mF3Y.gif173623OA591I3.gif  

     

    This is the hidden content, please

     

    Edit:
    I have found something related to the arabic codepage, so I just post it here:

    <! It has not been tested. !>

    Spoiler

    244802zFJUWyR.png

    And here is the code for it:

    
    	// EterPythonLib/PythonWindow.cpp
    	void CWindow::GetMouseLocalPosition(long & rlx, long & rly)
    	{
    		CWindowManager::Instance().GetMousePosition(rlx, rly);
    
    		if (GetDefaultCodePage() == CP_ARABIC && m_bWindowType == WINDOW_TYPE_TEXTLINE)
    		{
    			rlx = m_rect.right - rlx;
    			rly -= m_rect.top;
    		}
    		else
    		{
    			rlx = rlx - m_rect.left;
    			rly = rly - m_rect.top;
    		}
    	}

    And here are some parts that I have forgotten:
    1.) Open the EterPythonLib/PythonWindow.h and add the followings into the CWindow class as you can see here:

    
    namespace UI
    {
    	class CWindow
    	{
    		// [...]
    		public:
    			enum WindowTypes
    			{
    				WINDOW_TYPE_WINDOW,
    				WINDOW_TYPE_TEXTLINE,
    				WINDOW_TYPE_MAX_NUM
    			};
    
    		protected:
    			BYTE				m_bWindowType;
    	}
    }

    2.1.) Open the EterPythonLib/PythonWindow.cpp and add the following to the CWindow constructor as the following example shows:

    
    	CWindow::CWindow(PyObject * ppyObject):
    		// [...]
    	{
    		// [...]
    		m_bWindowType = WINDOW_TYPE_WINDOW;
    	}

    2.2.) Then repeat the previous step in the the CTextLine constructor too:

    
    		m_bWindowType = WINDOW_TYPE_TEXTLINE;

     

     

    Any problem appears, comment box is down below ⬇

    Cheers!

    • Metin2 Dev 65
    • Eyes 1
    • Think 1
    • Scream 2
    • Lmao 3
    • Good 11
    • Love 3
    • Love 46
  4. This is the hidden content, please
     (
    This is the hidden content, please
    )

    Contents:

    • Locales with decrypted protos
    • root+meta, uiscript, dumped binary

    About the protos: I'm not sure if the structs are 100% right because I did not find any reference in the binary about the new values but here are the changes I found:

    1. Item proto: Sockets increased to 6 from 3 | Added elemental refine element values
    2. Mob proto: Definetely unsure, sungmahee stats and exp, reorganised raceflags
    string arMRFVRaceFlag[] = {
    	"ANIMAL",
    	"UNDEAD",
    	"DEVIL",
    	"HUMAN",
    	"ORC",
    	"MILGYO",
    	"INSECT",
    	"DESERT",
    	"TREE",
    	"DECO",
    	"HIDE",
    	"ZODIAC",
    	"AWEAKEN",
    	"SUNGMAHEE",
    	"OUTPOST",
    };

     

    • Metin2 Dev 35
    • Eyes 1
    • Think 1
    • Confused 3
    • Lmao 1
    • Good 14
    • Love 3
    • Love 52
  5. Hello everybody.

     

    Long time ago I reversed this codes from the official binary and I would like to share it with you.

    These are the official new motion event types for the wolfman class.

    You might have an alternative way for this, in that case you need to take care how you install this, and how you replace the old one.

     

    Spoiler

    GameLib/RaceMotionData.h

    Spoiler

    1.1.) Extend the EMotionEventType enum with these:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    			MOTION_EVENT_TYPE_RELATIVE_MOVE_ON,
    			MOTION_EVENT_TYPE_RELATIVE_MOVE_OFF,
    #endif

    1.2.) A bit below declare the new types:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    		typedef struct NMotionEvent::SMotionEventDataRelativeMoveOn		TMotionRelativeMoveOn;
    		typedef struct NMotionEvent::SMotionEventDataRelativeMoveOff	TMotionRelativeMoveOff;
    #endif

     

    GameLib/RaceMotionDataEvent.h

    Spoiler

    1.1.) Add the following to the bottom of the NMotionEvent namespace:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    	// RelativeMoveOn
    	typedef struct SMotionEventDataRelativeMoveOn : public SMotionEventData
    	{
    		int baseVelocity;
    
    		SMotionEventDataRelativeMoveOn() : baseVelocity(0)
    		{}
    		virtual ~SMotionEventDataRelativeMoveOn() {}
    
    		void Save(FILE* File, int iTabs){}
    		bool Load(CTextFileLoader& rTextFileLoader)
    		{
    			if (!rTextFileLoader.GetTokenInteger("basevelocity", &baseVelocity))
    			{
    				return false;
    			}
    
    			return true;
    		}
    	} TMotionEventDataRelativeMoveOn;
    
    	// RelativeMoveOff
    	typedef struct SMotionEventDataRelativeMoveOff : public SMotionEventData
    	{
    		SMotionEventDataRelativeMoveOff() {}
    		virtual ~SMotionEventDataRelativeMoveOff() {}
    
    		void Save(FILE* File, int iTabs) {}
    		bool Load(CTextFileLoader& rTextFileLoader) { return true; }
    	} TMotionEventDataRelativeMoveOff;
    #endif

     

    GameLib/RaceMotionData.cpp

    Spoiler

    1.1.) In the CRaceMotionData::LoadMotionData function extend the switch of the motion event types with the followings:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    					case MOTION_EVENT_TYPE_RELATIVE_MOVE_ON:
    						pData = new TMotionRelativeMoveOn;
    						break;
    					case MOTION_EVENT_TYPE_RELATIVE_MOVE_OFF:
    						pData = new TMotionRelativeMoveOff;
    						break;
    #endif

     

    GameLib/ActorInstanceMotionEvent.cpp

    Spoiler

    1.1.) In the CActorInstance::MotionEventProcess function extend the switch with the followings:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    		case CRaceMotionData::MOTION_EVENT_TYPE_RELATIVE_MOVE_ON:
    			ProcessMotionEventRelativeMoveOn(c_pData);
    			break;
    
    		case CRaceMotionData::MOTION_EVENT_TYPE_RELATIVE_MOVE_OFF:
    			ProcessMotionEventRelativeMoveOff(c_pData);
    			break;
    #endif

    1.2.) Add the following functions anywhere you want:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    void CActorInstance::ProcessMotionEventRelativeMoveOn(const CRaceMotionData::TMotionEventData * c_pData)
    {
    	if (CRaceMotionData::MOTION_EVENT_TYPE_RELATIVE_MOVE_ON != c_pData->iType)
    		return;
    
    	const CRaceMotionData::TMotionRelativeMoveOn * c_pRelativeMoveOnData = (const CRaceMotionData::TMotionRelativeMoveOn *)c_pData;
    
    	static const float sc_fDistanceFromTarget = 270.0f;
    
    	if (m_kFlyTarget.IsValidTarget())
    	{
    		D3DXVECTOR3 v3MainPosition(m_x, m_y, m_z);
    		const D3DXVECTOR3 & c_rv3TargetPosition = __GetFlyTargetPosition();
    		D3DXVECTOR3 v3Distance = c_rv3TargetPosition - v3MainPosition;
    		D3DXVECTOR3 v3DistanceNormal(0.0f, 0.0f, 0.0f);
    		D3DXVec3Normalize(&v3DistanceNormal, &v3Distance);
    		float fDot = D3DXVec3Dot(&v3DistanceNormal, &v3Distance);
    		m_fRelativeMoveMul = (fDot - sc_fDistanceFromTarget) / static_cast<float>(c_pRelativeMoveOnData->baseVelocity);
    		m_bIsRelativeMoveMode = true;
    	}
    }
    
    void CActorInstance::ProcessMotionEventRelativeMoveOff(const CRaceMotionData::TMotionEventData * c_pData)
    {
    	if (CRaceMotionData::MOTION_EVENT_TYPE_RELATIVE_MOVE_OFF != c_pData->iType)
    		return;
    
    	m_bIsRelativeMoveMode = false;
    }
    #endif

     

    GameLib/ActorInstanceMotion.cpp

    Spoiler

    1.1.) In the CActorInstance::__IsNeedFlyTargetMotion function add the following into the for-cycle:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    		if (c_pData->iType == CRaceMotionData::MOTION_EVENT_TYPE_RELATIVE_MOVE_ON)
    			return true;
    #endif

    1.2.) Do the same in the CActorInstance::__HasMotionFlyEvent with this:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    		if (c_pData->iType == CRaceMotionData::MOTION_EVENT_TYPE_RELATIVE_MOVE_ON)
    			return true;
    #endif

    1.3.) Make the changes in the CActorInstance::__MotionEventProcess function like this:

    
    
    void CActorInstance::__MotionEventProcess(BOOL isPC)
    {
    	if (isAttacking())
    	{
    		// [...]
    	}
    	else
    	{
    #ifdef ENABLE_WOLFMAN_CHARACTER
    		m_bIsRelativeMoveMode = false;
    #endif
    		// [...]
    	}
    }

     

    GameLib/ActorInstance.h

    Spoiler

    1.1.) Add the following declarations at the bottom of the CActorInstance class:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    	protected:
    		bool	m_bIsRelativeMoveMode;
    		float	m_fRelativeMoveMul;
    	protected:
    		void	ProcessMotionEventRelativeMoveOn(const CRaceMotionData::TMotionEventData* c_pData);
    		void	ProcessMotionEventRelativeMoveOff(const CRaceMotionData::TMotionEventData* c_pData);
    #endif

     

    GameLib/ActorInstance.cpp

    Spoiler

    1.1.) Make the changes in the CActorInstance::__AccumulationMovement function like this way:

    
    
    void CActorInstance::__AccumulationMovement(float fRot)
    {
    	// [...]
    #ifdef ENABLE_WOLFMAN_CHARACTER
    	if (m_bIsRelativeMoveMode)
    		AddMovement(m_fRelativeMoveMul * s_matRotationZ._41, m_fRelativeMoveMul * s_matRotationZ._42, m_fRelativeMoveMul * s_matRotationZ._43);
    	else
    #endif
    		AddMovement(s_matRotationZ._41, s_matRotationZ._42, s_matRotationZ._43);
    }

    1.2.) Add the followings into the CActorInstance::__InitializeMotionData function:

    
    
    #ifdef ENABLE_WOLFMAN_CHARACTER
    	m_fRelativeMoveMul = 0.0f;
    	m_bIsRelativeMoveMode = false;
    #endif

     

     

     

    IDA demo:

    Spoiler

     

     

    • Love 16
  6. Ahh okay, I see.

    Old shit class from 2004:

    Spoiler
    
    class ToggleButton(Button):
    	def __init__(self):
    		Button.__init__(self)
    
    		self.eventUp = None
    		self.eventDown = None
    
    	def __del__(self):
    		Button.__del__(self)
    
    		self.eventUp = None
    		self.eventDown = None
    
    	def SetToggleUpEvent(self, event):
    		self.eventUp = event
    
    	def SetToggleDownEvent(self, event):
    		self.eventDown = event
    
    	def RegisterWindow(self, layer):
    		self.hWnd = wndMgr.RegisterToggleButton(self, layer)
    
    	def OnToggleUp(self):
    		if self.eventUp:
    			self.eventUp()
    
    	def OnToggleDown(self):
    		if self.eventDown:
    			self.eventDown()

     

    From 2018:

    Spoiler
    
    class ToggleButton(Button):
    	def __init__(self):
    		Button.__init__(self)
    
    		self.eventUp = None
    		self.eventDown = None
    
    		self.eventUpArgs = None
    		self.eventDownArgs = None
    
    	def __del__(self):
    		Button.__del__(self)
    
    		self.eventUp = None
    		self.eventDown = None
    
    	def SetToggleUpEvent(self, event, *args):
    		self.eventUp = event
    		self.eventUpArgs = args
    
    	def SetToggleDownEvent(self, event, *args):
    		self.eventDown = event
    		self.eventDownArgs = args
    
    	def RegisterWindow(self, layer):
    		self.hWnd = wndMgr.RegisterToggleButton(self, layer)
    
    	def OnToggleUp(self):
    		if self.eventUp:
    			if self.eventUpArgs:
    				apply(self.eventUp, self.eventUpArgs)
    			else:
    				self.eventUp()
    
    	def OnToggleDown(self):
    		if self.eventDown:
    			if self.eventDownArgs:
    				apply(self.eventDown, self.eventDownArgs)
    			else:
    				self.eventDown()

     

     

    • Metin2 Dev 1
    • Good 1
    • Love 4
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.