Jump to content

Recommended Posts

How can I show Skill Book in chat box or chat line?

 

Example : https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

Aura of the Sword Skill book

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/16825-how-can-i-show-skill-book-in-chat-box/
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • Premium


 

Packet.h Server
typedef struct packet_item_ground_add
{
	BYTE	bHeader;
	long 	x, y, z;
	DWORD	dwVID;
	DWORD	dwVnum;
} TPacketGCItemGroundAdd;

Add this
int		iSkillIndex;

Item.cpp
	pack.bHeader	= HEADER_GC_ITEM_GROUND_ADD;
	pack.x		= c_pos.x;
	pack.y		= c_pos.y;
	pack.z		= c_pos.z;
	pack.dwVnum		= GetVnum();
	pack.dwVID		= m_dwVID;

Under add this
	if (GetVnum() == 50300) {
		pack.iSkillIndex = GetSocket(0);
	}
	else {
		pack.iSkillIndex = -1;
	}

Client Packet.h
typedef struct packet_ground_add_item
{
    BYTE        bHeader;
    long        lX;
	long		lY;
	long		lZ;

    DWORD       dwVID;
    DWORD       dwVnum;
} TPacketGCItemGroundAdd;

Add this
int			iSkillIndex;

Pythonitem.h
void	CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop=true);
Replace
void	CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop=true, int iSkillIndex=-1);

PythonItem.cpp
Add
#include "PythonSkill.h"
and
void CPythonItem::CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop)
Replace
void CPythonItem::CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop, int iSkillIndex)

	CPythonTextTail& rkTextTail=CPythonTextTail::Instance();
	rkTextTail.RegisterItemTextTail(
		dwVirtualID,
		pItemData->GetName(),
		&pGroundItemInstance->ThingInstance);

Replace like this

	CPythonTextTail& rkTextTail=CPythonTextTail::Instance();
	string name = "";
	if (dwVirtualNumber == 50300) {
		CPythonSkill::SSkillData * c_pSkillData;
		if (CPythonSkill::Instance().GetSkillData(iSkillIndex, &c_pSkillData))
		{
			name = c_pSkillData->GradeData[0].strName.c_str();
			name += " ";
		}
	}
	name += pItemData->GetName();
	rkTextTail.RegisterItemTextTail(
		dwVirtualID,
		name.c_str(),
		&pGroundItemInstance->ThingInstance);

PythonNetwordStreamPhaseGameItem.cpp

	CPythonItem::Instance().CreateItem(packet_item_ground_add.dwVID, 
									   packet_item_ground_add.dwVnum,
									   packet_item_ground_add.lX,
									   packet_item_ground_add.lY,
									   packet_item_ground_add.lZ);

edit like 

	CPythonItem::Instance().CreateItem(packet_item_ground_add.dwVID, 
									   packet_item_ground_add.dwVnum,
									   packet_item_ground_add.lX,
									   packet_item_ground_add.lY,
									   packet_item_ground_add.lZ,
									   true,
									   packet_item_ground_add.iSkillIndex);


Done, caw.

 


 

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.