L2JMobius

High Five Item on inventory for buff time!

oRiGiNaL · 1 · 2087

Offline oRiGiNaL

  • Black Sheep
  • Knight
  • ***
    • Posts: 68
Ello folks, i want to ask if this method added on Skill.java do what i want. What i want? A item keeped on inventory by player and for change bufftime to 2 hours in this case. If SkillDurationList it;s 1 hour, with this Item ( 2 hours ) Total i want to be 3 hours.
Here it is method. ( I don't know if it's good as method )

Code: [Select]
if (player.getInventory().getItemByItemId(17423) != null)
{
if (player.getInventory().getInventoryItemCount(17423, -1, false) < 1)
{
player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2);
return;
}

int duration = 7200;

abnormalTime = abnormalTime + duration;
}