What's new

New messages New topics Systems Serverfiles 3D Models Web Scripting

🛠️ [FULL TUTORIAL] Show Weapon + Weapon Glow in Character Select

RESOURCES HUB

Premium
📅 Joined Jul 22, 2025
💬 Messages 201
👍 Thanks 1,428
🏆 Points 425
📍 Location London
🌐 Website metin2global.to

1) Send Weapon Data from Server​


File:
UserInterface/PythonNetworkStreamPhaseSelect.cpp


Search for:


Code:
kNetRetPackCharSelect.kChanList[i].dwPartMain = pInst->dwPartMain;


Add this directly below:


Code:
// Add Weapon Part
kNetRetPackCharSelect.kChanList[i].dwPartWeapon = pInst->dwPartWeapon;


Important:
If dwPartWeapon already exists in your structure, skip this step.




2) Equip Weapon in Character Select (Client Side)​


File:
root/introSelect.py


Search for:


Code:
chr.SelectInstance(slot)
chr.SetReserverValue(shape)


Immediately below those lines (or near chr.SetRotation) add:


Code:
[HEADING=2]Equip weapon (Part) to character[/HEADING]

chr.SetPart(chr.PART_WEAPON, weapon)




IMPORTANT – Define the Weapon Variable​


If weapon is not defined inside the function, find:


Code:
(name, job, level, exp, str, ht, dx, iq, race, shape, hair) = net.GetCharacterSlot(slot)


Replace it with:


Code:
(name, job, level, exp, str, ht, dx, iq, race, shape, hair, weapon) = net.GetCharacterSlot(slot)


Make sure weapon is included in the returned values.




3) Enable Weapon Glow in Select Phase​


File:
UserInterface/InstanceBase.cpp


Search for:


Code:
void CInstanceBase::SetWeapon(DWORD eWeapon)


Inside this function, locate something similar to:


Code:
if (IsPC())


If refined effects are restricted to Game Phase only, modify the logic and make sure this block exists:


Code:
// Allow refined effects in Select Phase as well
if (m_GraphicThingInstance.IsPC())
{
__GetRefinedEffect(pItemData);
}


This allows weapon glow to load in the Character Select screen.




Common Problems & Fixes​


1) Weapon Not Visible​


Check if weapon is 0.


Add this for debugging:


Code:
dbg.LogBox(str(weapon))


If it prints 0, the weapon is not being sent correctly from the server.




2) SelectInstance Error​


Always call:


Code:
chr.SelectInstance(slot)


BEFORE:


Code:
chr.SetPart(chr.PART_WEAPON, weapon)


Order is important.
 

Latest posts

shape1
shape2
shape3
shape4
shape5
shape6
Top