hello
this command work with __WEAPON_LEVEL system
put an item in 1st inventory slot and use command like /WeaponLevel 100 to put your weapon level to 100
credit : me
this command work with __WEAPON_LEVEL system
Code:
#ifdef __WEAPON_LEVELING
BOOL TextCmd_SetWeaponLevel( CScanner& scanner )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)scanner.dwValue;
if( IsValidObj( pUser ) )
{
CItemElem* pItemElem = pUser->m_Inventory.GetAt(0);
if( pItemElem )
{
ItemProp* pProp = pItemElem->GetProp();
int nLevel = scanner.GetNumber();
int nExp = 0;
if( pProp )
{
if( pProp->dwItemKind == IK1_WEAPON || pProp->dwItemKind3 == IK3_SHIELD )
{
if( nLevel < 1)
nLevel = 1;
if( nLevel > 100 )
nLevel = 100;
if( pUser->IsMode( TRANSPARENT_MODE ) == 0 )
{
g_UserMng.AddCreateSfxObj( pUser, XI_INT_SUCCESS, pUser->GetPos().x, pUser->GetPos().y, pUser->GetPos().z );
pUser->AddPlaySound( SND_INF_UPGRADESUCCESS );
}
pUser->UpdateItem( (BYTE)pItemElem->m_dwObjId, UI_WEAPON_LEVEL, nLevel );
pUser->UpdateItem( (BYTE)pItemElem->m_dwObjId, UI_WEAPON_EXP, nExp );
}
}
}
}
#endif // __WORLDSERVER
return TRUE;
}
#endif // __WEAPON_LEVELING
credit : me