This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..
Question
egzistas
Hey i'm trying to make a script on pvp unequip an item.
i tried this code it works half the way...
if(activeChar.getPvpFlag() > 0)
{
final L2ItemInstance face = activeChar.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FACE);
if (face != null)
{
final L2ItemInstance[] unequipped = activeChar.getInventory().unEquipItemInBodySlotAndRecord(face.getItem().getBodyPart());
final InventoryUpdate iu = new InventoryUpdate();
for (final L2ItemInstance element : unequipped)
iu.addModifiedItem(element);
sendPacket(iu);
}
}
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now