[Help] deleting item on character

01/18/2018 05:43 aoyamananami#1
is there a code to delete the item on character?
or query on sql?

please someone help me:handsdown:
01/18/2018 08:25 babyminion#2
Item Wiper? or individual item only?
01/18/2018 10:14 xTwiLightx#3
Quote:
Originally Posted by aoyamananami View Post
is there a code to delete the item on character?
or query on sql?

please someone help me:handsdown:
Pretty annoying if you are still using the inventory strings.
There are plenty of ways, but the ITEM_REMOVE_TBL inside the CHARACTER_DBF might be your weapon of choice when it comes to difficulty.
01/18/2018 10:28 raventh1984#4
is this not what you are searching for?

Code:
BOOL TextCmd_InvenRemove( CScanner& scanner )       
{ 
#ifdef __WORLDSERVER
	CUser* pUser = (CUser*)scanner.dwValue;
	if( IsValidObj( pUser ) )
	{
		int nSize = pUser->m_Inventory.GetMax();
		for( int i = 0 ; i < nSize; ++i )
		{
			CItemElem* pItemElem = pUser->m_Inventory.GetAtId( i );
			if( IsUsableItem( pItemElem ) && !pUser->m_Inventory.IsEquip( pItemElem->m_dwObjId ) && !pItemElem->IsPet() && !pItemElem->IsEatPet() )
				pUser->UpdateItem( i, UI_NUM, 0 );
		}
	}
#endif	// __WORLDSERVER
	return TRUE;
}
If i recall it correctly you only need the slot from the inventory where the item is located. I could be wrong though
01/19/2018 05:56 aoyamananami#5
Quote:
Originally Posted by xTwiLightx View Post
Pretty annoying if you are still using the inventory strings.
There are plenty of ways, but the ITEM_REMOVE_TBL inside the CHARACTER_DBF might be your weapon of choice when it comes to difficulty.
thank you sir ill try this one!
01/27/2018 11:06 aoyamananami#6
Quote:
Originally Posted by xTwiLightx View Post
Pretty annoying if you are still using the inventory strings.
There are plenty of ways, but the ITEM_REMOVE_TBL inside the CHARACTER_DBF might be your weapon of choice when it comes to difficulty.
how can i delete the item sir? because after i close all of .exe from account to worldserver my character get auto close when i try to go ingame.
03/07/2018 10:14 aoyamananami#7
Quote:
Originally Posted by raventh1984 View Post
is this not what you are searching for?

Code:
BOOL TextCmd_InvenRemove( CScanner& scanner )       
{ 
#ifdef __WORLDSERVER
	CUser* pUser = (CUser*)scanner.dwValue;
	if( IsValidObj( pUser ) )
	{
		int nSize = pUser->m_Inventory.GetMax();
		for( int i = 0 ; i < nSize; ++i )
		{
			CItemElem* pItemElem = pUser->m_Inventory.GetAtId( i );
			if( IsUsableItem( pItemElem ) && !pUser->m_Inventory.IsEquip( pItemElem->m_dwObjId ) && !pItemElem->IsPet() && !pItemElem->IsEatPet() )
				pUser->UpdateItem( i, UI_NUM, 0 );
		}
	}
#endif	// __WORLDSERVER
	return TRUE;
}
If i recall it correctly you only need the slot from the inventory where the item is located. I could be wrong though
i want to know how to use this code ingame .
03/07/2018 11:31 KingKeesie#8
Add it into your source first?