Jump to content
×
×
  • Create New...

Monster Informations Official like - Lv + AIFlag


Recommended Posts

  • Honorable Member

M2 Download Center

Download Here ( Internal )

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(

Hidden Content

    Give reaction to this post to see the hidden content.
) 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:
 

Spoiler

283009736f4fb927.jpg.c0ed1d9f1856ff486d6

 

Hidden Content

    Give reaction to this post to see the hidden content.

  • Metin2 Dev 63
  • Love 63
  • Love 5
  • Good 31
  • Lmao 1
  • Scream 1
  • Think 3
  • Smile Tear 1
  • Confused 3
  • Angry 1
  • Dislove 1
Link to comment
Share on other sites

  • Honorable Member

Monster-information    [Level]    [Aggressive]
Monsters:
Fekete ork -> Black orc
Szellemfa -> Ghost tree
Ork varázsló -> Orc magician
 

  • Love 1
Link to comment
Share on other sites

  • Premium

Hi, where do you get the : "

Hidden Content

    Give reaction to this post to see the hidden content.
and r7071" From the official client then opened it using IDA ?

Thanks, maybe better than my own ! :D

  • Metin2 Dev 4
  • Good 1
  • Dislove 1
Link to comment
Share on other sites

  • Honorable Member

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.

  • Love 5
Link to comment
Share on other sites

  • Premium

ahahah even after adding it into

CInstanceBase* CNetworkActorManager::__AppendCharacterManagerActor(SNetworkActorData& rkNetActorData)

under

	kCreateData.m_dwLevel=rkNetActorData.m_dwLevel;

i had added this as you said

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

and there is still bug on it the * is not shown

Link to comment
Share on other sites

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;

Works ! Thank you :D

%7Boption%7D

Hidden Content

    Give reaction to this post to see the hidden content.

 

 

Edited by Despero
  • Metin2 Dev 1
  • Good 1
Link to comment
Share on other sites

  • Honorable Member

@Despero:

I can't log into my skype, because of my slow internet bandwith(32kbps).

Optional update:

char_item.cpp>

//1. Search this function: bool CHARACTER::GiveItemFromSpecialItemGroup(DWORD dwGroupNum, std::vector<DWORD> &dwItemVnums, std::vector<DWORD> &dwItemCounts, std::vector <LPITEM> &item_gets, int &count)
//And replace the MOB case of switch (dwVnum) with this:
		case CSpecialItemGroup::MOB:
			{
				sys_log(0, "CSpecialItemGroup::MOB %d", dwCount);
				int x = GetX() + number(-500, 500);
				int y = GetY() + number(-500, 500);

				CHARACTER_MANAGER::instance().SpawnMob(dwCount, GetMapIndex(), x, y, 0, true, -1, true, true);

				bSuccess = true;
			}
			break;

questlua.cpp>

//1. Search the mob_spawn function.
//Replace this:
//############################################################################
mob = CHARACTER_MANAGER::instance().SpawnMob(mob_vnum, ch->GetMapIndex(), x, y, 0);
//############################################################################

//With this:
//############################################################################
mob = CHARACTER_MANAGER::instance().SpawnMob(mob_vnum, ch->GetMapIndex(), x, y, 0, false, -1, true, true);
//############################################################################

//2. Delete this from the mob_spawn function:
//############################################################################
				if (bAggressive)
					mob->SetAggressive();
//############################################################################

Edited by xP3NG3Rx
Update added
  • Love 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 6
    2. 9

      Help in implementing a switch bot

    3. 0

      Special Inventory System Can't Sell To Npc's

    4. 0

      ROV2.GLOBAL | International | Server start 14.05.2022

    5. 75

      Services - System Ard [C ++ / Python / Lua]

    6. 76

      Chatting Window Renewal (Mini Version)

    7. 2

      ItemShop GM ZONE TAB

    8. 9

      Help in implementing a switch bot

  • Recently Browsing

    • No registered users viewing this page.

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.