Jump to content
  • 0

Code that removes armor


Question

Posted

Ok guys i need a code that removes your armor when you make subclass.. i guess it must be here in L2VillageMasterInstance

 

                    player.setActiveClass(paramOne);

 

                    content.append("Change Subclass:<br>Your active sub class is now a <font color=\"LEVEL\">"

                        + CharTemplateTable.getClassNameById(player.getActiveClass()) + "</font>.");

 

                    player.sendPacket(new SystemMessage(SystemMessageId.SUBCLASS_TRANSFER_COMPLETED)); // Transfer completed.

 

and

for (L2Effect e : player.getAllEffects()) is for buffs, whats for armor?

9 answers to this question

Recommended Posts

  • 0
Posted

player.getInventory().unEquipItemInSlot(int slot)

You can get all slots numbers from com.l2jserver.gameserver.itemcontainer.Inventory (they are final int fields)

you may need to broadcast char & userinfo

  • 0
Posted

player.getInventory().unEquipItemInSlot(int slot)

You can get all slots numbers from com.l2jserver.gameserver.itemcontainer.Inventory (they are final int fields)

you may need to broadcast char & userinfo

so what slot is for armor(chest), cant find this thing: com.l2jserver.gameserver.itemcontainer.Inventory

  • 0
Posted

L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);

this just gets it doesnt disarm it..

  • 0
Posted
	L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
		if (chest != null)
		{
			L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
			InventoryUpdate iu = new InventoryUpdate();
			for (L2ItemInstance element : unequipped)
				iu.addModifiedItem(element);
			sendPacket(iu);
		}

  • 0
Posted

	L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
		if (chest != null)
		{
			L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
			InventoryUpdate iu = new InventoryUpdate();
			for (L2ItemInstance element : unequipped)
				iu.addModifiedItem(element);
			sendPacket(iu);
		}

and where i paste this?

  • 0
Posted

setActiveClass method from PcInstance

ok done, works perfect. Thanks another one time xAddytzu!

Request to lock.

Guest
This topic is now closed to further replies.


×
×
  • Create New...