Jump to content
  • 0

[Help] armor restriction


Question

Posted

Hello, i have added this :

 

		if (item.getItemType() == L2ArmorType.HEAVY)
		{
			if ((activeChar.getClassId().getId() == 93) || (activeChar.getClassId().getId() == 101) || (activeChar.getClassId().getId() == 108) || (activeChar.getClassId().getId() == 8) || (activeChar.getClassId().getId() == 36) || (activeChar.getClassId().getId() == 9) || (activeChar.getClassId().getId() == 37) || (activeChar.getClassId().getId() == 24) || (activeChar.getClassId().getId() == 92) || (activeChar.getClassId().getId() == 102) || (activeChar.getClassId().getId() == 109) || (activeChar.getClassId().getId() == 114))
			{
				activeChar.sendPacket(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION);
				return;
			}
		}

		if (item.getItemType() == L2WeaponType.BOW)
		{
			if ((activeChar.getClassId().getId() == 5) || (activeChar.getClassId().getId() == 6) || (activeChar.getClassId().getId() == 90) || (activeChar.getClassId().getId() == 91) || (activeChar.getClassId().getId() == 20) || (activeChar.getClassId().getId() == 32) || (activeChar.getClassId().getId() == 106) || (activeChar.getClassId().getId() == 99) || (activeChar.getClassId().getId() == 114) || (activeChar.getClassId().getId() == 93))
			{
				activeChar.sendPacket(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION);
				return;
			}
		}

 

in useitem.java but why it dosen't work ? when i wear an heavy armor i get the message but the armor dosen't unequip :)

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock