Jump to content

Recommended Posts

  • Active+ Member

Im a player and its frickin crazy that combo is disabled right after rewarp, crash etc.. Might be done in python easily, but any #tryhard player use more than 1 client ?

Here's small q&l 

This is the hidden content, please

Metin2 Download

 
 
 

 

 

 

 

  • Metin2 Dev 70
  • Eyes 2
  • Good 9
  • Love 1
  • Love 16
Link to comment
https://metin2.dev/topic/31819-keep-the-combo-enabled-after-relog-etc/
Share on other sites

Edit: It does not work, the skills disappear and on old account I get UNKNOWN PACKET HEADER.

GIF: https://metin2.download/video/hqmgJNMnQrJw4E3fgrHmGUZCB4SNEKKh/.mp4



I did the issues.cpp part of the tutorial, but that did not change anything.
 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Premium
13 minutes ago, SCOOB said:

Edit: It does not work, the skills disappear and on old account I get UNKNOWN PACKET HEADER.

GIF: https://metin2.download/video/hqmgJNMnQrJw4E3fgrHmGUZCB4SNEKKh/.mp4



I did the issues.cpp part of the tutorial, but that did not change anything.
 

I didn't really look into the source code, but the packet error made it easy to find the cause.
You also need to rewrite TPlayerSkill in binary source code.

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

c++latest, latest libs...

20 minutes ago, flatik said:

I didn't really look into the source code, but the packet error made it easy to find the cause.
You also need to rewrite TPlayerSkill in binary source code.

yes, I figured eventually it was from binary.

FIX:

Do the same from tables.h to Packet.h (binary). Everything works now perfectly. ?

  • 1 year later...

Hello, the tutorial is missing the client src part, here are the additions needed in order for the fix to work (probably still missing something).

Locale_inc.h

#define ENABLE_COMBO_ALWAYS_ENABLED


Packet.h

typedef struct SPlayerSkill
{
	BYTE bMasterType;
	BYTE bLevel;
	time_t tNextRead;
#ifdef ENABLE_COMBO_ALWAYS_ENABLED
	bool	bComboStatus;
#endif
} TPlayerSkill;


PythonNetworkStreamPhaseGame.cpp (needed to enter old accounts)

bool CPythonNetworkStream::RecvSkillLevelNew()
{
	TPacketGCSkillLevelNew packet;

	if (!Recv(sizeof(TPacketGCSkillLevelNew), &packet))
	{
		Tracen("CPythonNetworkStream::RecvSkillLevelNew - RecvError");
		return false;
	}

	CPythonPlayer& rkPlayer=CPythonPlayer::Instance();

	rkPlayer.SetSkill(7, 0);
	rkPlayer.SetSkill(8, 0);

	for (int i = 0; i < SKILL_MAX_NUM; ++i)
	{
		TPlayerSkill & rPlayerSkill = packet.skills[i];

#ifndef ENABLE_COMBO_ALWAYS_ENABLED
		if (i >= 112 && i <= 115 && rPlayerSkill.bLevel)
			rkPlayer.SetSkill(7, i);

		if (i >= 116 && i <= 119 && rPlayerSkill.bLevel)
			rkPlayer.SetSkill(8, i);
#endif

		rkPlayer.SetSkillLevel_(i, rPlayerSkill.bMasterType, rPlayerSkill.bLevel);
	}

	__RefreshSkillWindow();
	__RefreshStatus();
	//Tracef(" >> RecvSkillLevelNew\n");
	return true;
}


This change in ClientManagerPlayer.cpp (db) seems to not be needed, default works for TMP4 Files.

static char text[4096 + 1]; ➝ static char text[8192 + 1]
Edited by KronosG
  • Active+ Member
On 10/12/2025 at 12:52 PM, KronosG said:

Hello, the tutorial is missing the client src part, here are the additions needed in order for the fix to work (probably still missing something).

Locale_inc.h

#define ENABLE_COMBO_ALWAYS_ENABLED


Packet.h

typedef struct SPlayerSkill
{
	BYTE bMasterType;
	BYTE bLevel;
	time_t tNextRead;
#ifdef ENABLE_COMBO_ALWAYS_ENABLED
	bool	bComboStatus;
#endif
} TPlayerSkill;


PythonNetworkStreamPhaseGame.cpp (needed to enter old accounts)

bool CPythonNetworkStream::RecvSkillLevelNew()
{
	TPacketGCSkillLevelNew packet;

	if (!Recv(sizeof(TPacketGCSkillLevelNew), &packet))
	{
		Tracen("CPythonNetworkStream::RecvSkillLevelNew - RecvError");
		return false;
	}

	CPythonPlayer& rkPlayer=CPythonPlayer::Instance();

	rkPlayer.SetSkill(7, 0);
	rkPlayer.SetSkill(8, 0);

	for (int i = 0; i < SKILL_MAX_NUM; ++i)
	{
		TPlayerSkill & rPlayerSkill = packet.skills[i];

#ifndef ENABLE_COMBO_ALWAYS_ENABLED
		if (i >= 112 && i <= 115 && rPlayerSkill.bLevel)
			rkPlayer.SetSkill(7, i);

		if (i >= 116 && i <= 119 && rPlayerSkill.bLevel)
			rkPlayer.SetSkill(8, i);
#endif

		rkPlayer.SetSkillLevel_(i, rPlayerSkill.bMasterType, rPlayerSkill.bLevel);
	}

	__RefreshSkillWindow();
	__RefreshStatus();
	//Tracef(" >> RecvSkillLevelNew\n");
	return true;
}


This change in ClientManagerPlayer.cpp (db) seems to not be needed, default works for TMP4 Files.

static char text[4096 + 1]; ➝ static char text[8192 + 1]

So far it is not recommended to implement this on live server. Otherwise just truncate player table

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.