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);
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