{
activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
L2DoorInstance door = (L2DoorInstance) target;
target = null;
if(!activeChar.isInsideRadius(door, INTERACTION_DISTANCE, false, false))
{
activeChar.sendMessage("Door is to far.");
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if(activeChar.getAbnormalEffect() > 0 || activeChar.isInCombat())
{
activeChar.sendMessage("You can`t use the key right now.");
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if(LAST_OPEN + 1800000 > System.currentTimeMillis()) // 30 * 60 * 1000 = 1800000
{
activeChar.sendMessage("You can`t use the key right now.");
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if(!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
return;
if(itemId == 8056)
{
if(door.getDoorId() == 23150003 || door.getDoorId() == 23150004)
{
DoorTable.getInstance().getDoor(23150003).openMe();
DoorTable.getInstance().getDoor(23150004).openMe();
DoorTable.getInstance().getDoor(23150003).onOpen();
DoorTable.getInstance().getDoor(23150004).onOpen();