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);
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
When I have free time, I will update it for version 409.
I might also make some changes, such as allowing you to choose whether you want the berserker at level 1 or 2.
The sale of the pack is valid until 12/31/2024.
The share is prohibited at any time, in any form.
This pack will never be shared by me personally because too many people work on it.
If you bought or will buy the pack not from me, do not expect any claims regarding functionality, answers to questions, help, etc., do not even write))
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.