Jump to content

Monster Informations Official like - Lv + AIFlag


Recommended Posts

  • Honorable Member

Hi, developers!

Before you start, create a backup from your source files immediately!


Today I'm gonna share with you my last work. I have read every informations from the official binary from beta(metin2client_r11185) and r7071. It was not an easy task to understand functions but successed. I will not write down the implementation step by step, but I wrote some informations into the files what you should to do to implement the system. If you do not understand the steps I put original(from dev branch) and modified files into the archive to compare the original and the changed files with notepad++ or something else comparer tool to see the changes.

- There are some files which optional changes to show the mob-aiflag on those monsters which are not aggressive but summoned by aggressive with "/ma" command.
- There was a little problem with Python 2.7.3 therefore I split asunder the gui-script. And be careful, the main script is using True and False variables.
- You can disable the whole system in common/service.h and UserInterface/Locale_inc.h with undefined or with commented macro.
 

I hope everything are understandable and I did not miss something from the release, and sorry for my bad english.
Special thanks to TheSLZ for test the implementation.

And last but not least here is the result:
736f4fb927.jpg

 

This is the hidden content, please

good job bro :)

 

Hi, developers!

Before you start, create a backup from your source files immediately!


Today I'm gonna share with you my last work. I have read every informations from the official binary from beta(metin2client_r11185) and r7071. It was not an easy task to understand functions but successed. I will not write down the implementation step by step, but I wrote some informations into the files what you should to do to implement the system. If you do not understand the steps I put original(from dev branch) and modified files into the archive to compare the original and the changed files with notepad++ or something else comparer tool to see the changes.

- There are some files which optional changes to show the mob-aiflag on those monsters which are not aggressive but summoned by aggressive with "/ma" command.
- There was a little problem with Python 2.7.3 therefore I split asunder the gui-script. And be careful, the main script is using True and False variables.
- You can disable the whole system in common/service.h and UserInterface/Locale_inc.h with undefined or with commented macro.
 

I hope everything are understandable and I did not miss something from the release, and sorry for my bad english.
Special thanks to TheSLZ for test the implementation.

And last but not least here is the result:
736f4fb927.jpg

 

This is the hidden content, please

good job bro :)

D9lrBo.jpg

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 1

 

Link to comment
Share on other sites

  • 2 weeks later...

First of all sorry for lately reply.
Yes I know already TheSLZ informed me, sorry for that but I missed out something from the UserInterface/NetworkActorManager.cpp, I will update the archive within some minutes after I had recheck everything again.

CInstanceBase* CNetworkActorManager::__AppendCharacterManagerActor(SNetworkActorData& rkNetActorData)

	kCreateData.m_dwLevel=rkNetActorData.m_dwLevel;
#if defined(WJ_SHOW_MOB_INFO)
	kCreateData.m_dwAIFlag=rkNetActorData.m_dwAIFlag;
#endif
	kCreateData.m_dwGuildID=rkNetActorData.m_dwGuildID;

 

The IsPet() part same with IsPC() if you follow the line in back(Go to definition in VS) just the different is that the Pets(the new growable pets) have new instance type (TYPE_PET = 10, pc is 6 etc).

gameLib/ActorInstance.cpp + Header file into class CActorInstance

		bool IsPet();
bool CActorInstance::IsPet()
{
	if (TYPE_PET == m_eActorType)
		return true;

	return false;
}

UserInterface/InstanceBase.cpp + Header file into class CInstanceBase

		BOOL					IsPet();
BOOL CInstanceBase::IsPet()
{
	return m_GraphicThingInstance.IsPet();
}

gameLib/ActorInstance.h

		enum EType
		{
			TYPE_ENEMY,
			TYPE_NPC,
			TYPE_STONE,
			TYPE_WARP,
			TYPE_DOOR,
			TYPE_BUILDING,
			TYPE_PC,
			TYPE_POLY,
			TYPE_HORSE,
			TYPE_GOTO,
			TYPE_PET,

			TYPE_OBJECT, // Only For Client
		};

 

@koray: Sorry but I do not know what does it mean the WJ tag.

@galet I have an unpacked r7071 but the imports are not corrected and crash when starts, but can load it in ida, and the (already not actual) r11185(from beta) able to debug with attach process when ... I do not want to tell that because "they" are reading this forum as Shogun said and I do not want to change this state, because I want to bebug the new binaries in the future continuously :).

About: Module object has no attribute "blablabla". Check your pythonsystemmodule.cpp file again and add the new variable if you did not do yet.

here you go

  • Love 1
Link to comment
Share on other sites

  • Former Staff

First of all sorry for lately reply.
Yes I know already TheSLZ informed me, sorry for that but I missed out something from the UserInterface/NetworkActorManager.cpp, I will update the archive within some minutes after I had recheck everything again.

CInstanceBase* CNetworkActorManager::__AppendCharacterManagerActor(SNetworkActorData& rkNetActorData)

	kCreateData.m_dwLevel=rkNetActorData.m_dwLevel;
#if defined(WJ_SHOW_MOB_INFO)
	kCreateData.m_dwAIFlag=rkNetActorData.m_dwAIFlag;
#endif
	kCreateData.m_dwGuildID=rkNetActorData.m_dwGuildID;

 

The IsPet() part same with IsPC() if you follow the line in back(Go to definition in VS) just the different is that the Pets(the new growable pets) have new instance type (TYPE_PET = 10, pc is 6 etc).

gameLib/ActorInstance.cpp + Header file into class CActorInstance

		bool IsPet();
bool CActorInstance::IsPet()
{
	if (TYPE_PET == m_eActorType)
		return true;

	return false;
}

UserInterface/InstanceBase.cpp + Header file into class CInstanceBase

		BOOL					IsPet();
BOOL CInstanceBase::IsPet()
{
	return m_GraphicThingInstance.IsPet();
}

gameLib/ActorInstance.h

		enum EType
		{
			TYPE_ENEMY,
			TYPE_NPC,
			TYPE_STONE,
			TYPE_WARP,
			TYPE_DOOR,
			TYPE_BUILDING,
			TYPE_PC,
			TYPE_POLY,
			TYPE_HORSE,
			TYPE_GOTO,
			TYPE_PET,

			TYPE_OBJECT, // Only For Client
		};

 

@koray: Sorry but I do not know what does it mean the WJ tag.

@galet I have an unpacked r7071 but the imports are not corrected and crash when starts, but can load it in ida, and the (already not actual) r11185(from beta) able to debug with attach process when ... I do not want to tell that because "they" are reading this forum as Shogun said and I do not want to change this state, because I want to bebug the new binaries in the future continuously :).

About: Module object has no attribute "blablabla". Check your pythonsystemmodule.cpp file again and add the new variable if you did not do yet.

here you go

I saw that yesterday. (facepalm)
Kids don't do drugs.

Thanks.

Link to comment
Share on other sites

well i made it but as the guys mentioned before the name does not hide when i click the button and the * does not appear to the name of the aggressive mobs... here is my syserr

1029 00:33:06728 :: Traceback (most recent call last):

1029 00:33:06775 ::   File "ui.py", line 1128, in OnToggleDown

1029 00:33:06775 ::   File "uiGameOption.py", line 432, in __OnClickShowMobLevelButton

1029 00:33:06776 :: NameError
1029 00:33:06776 :: : 
1029 00:33:06776 :: global name 'True' is not defined
1029 00:33:06776 :: 

1029 00:33:07680 :: Traceback (most recent call last):

1029 00:33:07681 ::   File "ui.py", line 1128, in OnToggleDown

1029 00:33:07681 ::   File "uiGameOption.py", line 441, in __OnClickShowMobAIFlagButton

1029 00:33:07681 :: NameError
1029 00:33:07681 :: : 
1029 00:33:07681 :: global name 'True' is not defined
1029 00:33:07681 :: 

1029 00:33:08504 :: Traceback (most recent call last):

1029 00:33:08505 ::   File "ui.py", line 1124, in OnToggleUp

1029 00:33:08505 ::   File "uiGameOption.py", line 441, in __OnClickShowMobAIFlagButton

1029 00:33:08505 :: NameError
1029 00:33:08505 :: : 
1029 00:33:08505 :: global name 'True' is not defined
1029 00:33:08505 :: 

1029 00:33:09133 :: Traceback (most recent call last):

1029 00:33:09133 ::   File "ui.py", line 1124, in OnToggleUp

1029 00:33:09133 ::   File "uiGameOption.py", line 432, in __OnClickShowMobLevelButton

1029 00:33:09133 :: NameError
1029 00:33:09133 :: : 
1029 00:33:09133 :: global name 'True' is not defined
1029 00:33:09133 :: 

 

Link to comment
Share on other sites

well i made it but as the guys mentioned before the name does not hide when i click the button and the * does not appear to the name of the aggressive mobs... here is my syserr

1029 00:33:06728 :: Traceback (most recent call last):

1029 00:33:06775 ::   File "ui.py", line 1128, in OnToggleDown

1029 00:33:06775 ::   File "uiGameOption.py", line 432, in __OnClickShowMobLevelButton

1029 00:33:06776 :: NameError
1029 00:33:06776 :: : 
1029 00:33:06776 :: global name 'True' is not defined
1029 00:33:06776 :: 

1029 00:33:07680 :: Traceback (most recent call last):

1029 00:33:07681 ::   File "ui.py", line 1128, in OnToggleDown

1029 00:33:07681 ::   File "uiGameOption.py", line 441, in __OnClickShowMobAIFlagButton

1029 00:33:07681 :: NameError
1029 00:33:07681 :: : 
1029 00:33:07681 :: global name 'True' is not defined
1029 00:33:07681 :: 

1029 00:33:08504 :: Traceback (most recent call last):

1029 00:33:08505 ::   File "ui.py", line 1124, in OnToggleUp

1029 00:33:08505 ::   File "uiGameOption.py", line 441, in __OnClickShowMobAIFlagButton

1029 00:33:08505 :: NameError
1029 00:33:08505 :: : 
1029 00:33:08505 :: global name 'True' is not defined
1029 00:33:08505 :: 

1029 00:33:09133 :: Traceback (most recent call last):

1029 00:33:09133 ::   File "ui.py", line 1124, in OnToggleUp

1029 00:33:09133 ::   File "uiGameOption.py", line 432, in __OnClickShowMobLevelButton

1029 00:33:09133 :: NameError
1029 00:33:09133 :: : 
1029 00:33:09133 :: global name 'True' is not defined
1029 00:33:09133 :: 

 

 

Change True to TRUE

Edited by Denis
Link to comment
Share on other sites

well i made it but as the guys mentioned before the name does not hide when i click the button and the * does not appear to the name of the aggressive mobs... here is my syserr

1029 00:33:06728 :: Traceback (most recent call last):

1029 00:33:06775 ::   File "ui.py", line 1128, in OnToggleDown

1029 00:33:06775 ::   File "uiGameOption.py", line 432, in __OnClickShowMobLevelButton

1029 00:33:06776 :: NameError
1029 00:33:06776 :: : 
1029 00:33:06776 :: global name 'True' is not defined
1029 00:33:06776 :: 

1029 00:33:07680 :: Traceback (most recent call last):

1029 00:33:07681 ::   File "ui.py", line 1128, in OnToggleDown

1029 00:33:07681 ::   File "uiGameOption.py", line 441, in __OnClickShowMobAIFlagButton

1029 00:33:07681 :: NameError
1029 00:33:07681 :: : 
1029 00:33:07681 :: global name 'True' is not defined
1029 00:33:07681 :: 

1029 00:33:08504 :: Traceback (most recent call last):

1029 00:33:08505 ::   File "ui.py", line 1124, in OnToggleUp

1029 00:33:08505 ::   File "uiGameOption.py", line 441, in __OnClickShowMobAIFlagButton

1029 00:33:08505 :: NameError
1029 00:33:08505 :: : 
1029 00:33:08505 :: global name 'True' is not defined
1029 00:33:08505 :: 

1029 00:33:09133 :: Traceback (most recent call last):

1029 00:33:09133 ::   File "ui.py", line 1124, in OnToggleUp

1029 00:33:09133 ::   File "uiGameOption.py", line 432, in __OnClickShowMobLevelButton

1029 00:33:09133 :: NameError
1029 00:33:09133 :: : 
1029 00:33:09133 :: global name 'True' is not defined
1029 00:33:09133 :: 

 

 

Change True to TRUE

Thank you so much :D now the * somebody please?

Link to comment
Share on other sites

  • Former Staff

Hello @xP3NG3Rx and great job :)

I was wondering if you could help me about the aggressive flag (*) it's not working and as I saw other people have the same problem... I repeated all your steps in the files i downloaded and what i have seen in the comments and still the problem remains...

Again great job :)

Compare his files with yours.

This is working.

Link to comment
Share on other sites

Hello @xP3NG3Rx and great job :)

I was wondering if you could help me about the aggressive flag (*) it's not working and as I saw other people have the same problem... I repeated all your steps in the files i downloaded and what i have seen in the comments and still the problem remains...

Again great job :)

Compare his files with yours.

This is working.

I compared every file... It did not work :/

There must be something else... But the point is what... Can anybody help me?

Link to comment
Share on other sites

  • 1 month later...
  • Honorable Member

I tested with poison, slow and stun but I've never got that problem.

333b379147.jpg

90a85e5b21.jpg

Just the name of monster which is got poison effect is jumping up, and when the poison is gone jump down -_-

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 3 weeks later...

Hi.

@xP3NG3Rx, first of all I'd like to say thanks for this nice tutorial (added on server some time ago).

Also I have little suggestion for IsPet():

Spoiler

Probably it's not a best way..

In InstanceBase.h

after "BOOL                    IsDoor();"
add "BOOL                    IsPet();"

In InstanceBase.cpp

after whole "BOOL CInstanceBase::IsDoor()"
add this:

BOOL CInstanceBase::IsPet()
{
    int vnum = GetVirtualNumber();
    if (vnum >= 34001 && vnum <= 34100) //range with mob vnums from db
        return true;
    else
        return false;
}

Result:

yarwbYR.png

Regards.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • 5 weeks later...

Announcements



×
×
  • 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.