(itemId == 8598 && activeChar.getExpertiseIndex()==4) || // Scroll: Recovery (A Grade)
(itemId == 8599 && activeChar.getExpertiseIndex()==5)) // Scroll: Recovery (S Grade)
{
if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
return;
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2286, 1, 1, 0));
activeChar.reduceDeathPenaltyBuffLevel();
useScroll(activeChar, 2286, itemId - 8593);
}
else
activeChar.sendPacket(new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE));
return;
}
else if (itemId == 5703 || itemId >= 5803 && itemId <= 5807)
{
if ((itemId == 5703 && activeChar.getExpertiseIndex()==0) || // Lucky Charm (No Grade)
(itemId == 5803 && activeChar.getExpertiseIndex()==1) || // Lucky Charm (D Grade)
(itemId == 5804 && activeChar.getExpertiseIndex()==2) || // Lucky Charm (C Grade)
(itemId == 5805 && activeChar.getExpertiseIndex()==3) || // Lucky Charm (B Grade)
(itemId == 5806 && activeChar.getExpertiseIndex()==4) || // Lucky Charm (A Grade)
(itemId == 5807 && activeChar.getExpertiseIndex()==5)) // Lucky Charm (S Grade)
{
if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
return;
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2168, activeChar.getExpertiseIndex()+1, 1, 0));
useScroll(activeChar, 2168, activeChar.getExpertiseIndex()+1);
activeChar.setCharmOfLuck(true);
}
else
activeChar.sendPacket(new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE));
return;
}
else if (itemId >= 8515 && itemId <= 8520) // Charm of Courage XML: 5041
{
if ((itemId == 8515 && activeChar.getExpertiseIndex()==0) || // Charm of Courage (No Grade)
(itemId == 8516 && activeChar.getExpertiseIndex()==1) || // Charm of Courage (D Grade)
(itemId == 8517 && activeChar.getExpertiseIndex()==2) || // Charm of Courage (C Grade)
(itemId == 8518 && activeChar.getExpertiseIndex()==3) || // Charm of Courage (B Grade)
(itemId == 8519 && activeChar.getExpertiseIndex()==4) || // Charm of Courage (A Grade)
(itemId == 8520 && activeChar.getExpertiseIndex()==5)) // Charm of Courage (S Grade)
{
if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
return;
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 5041, 1, 1, 0));
useScroll(activeChar, 5041, 1);
activeChar.setCharmOfCourage(true);
}
else
activeChar.sendPacket(new SystemMessage(SystemMessageId.INCOMPATIBLE_ITEM_GRADE));
return;
}
else if (itemId >= 8954 && itemId <= 8956)
{
if (activeChar.getLevel() < 76) return;
if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
return;
switch(itemId)
{
case 8954: // Blue Primeval Crystal XML: 2306
activeChar.sendPacket(new MagicSkillUser(playable, playable, 2306, 1, 1, 0));
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2306, 1, 1, 0));
activeChar.addExpAndSp(0, 50000);
break;
case 8955: // Green Primeval Crystal XML: 2306
activeChar.sendPacket(new MagicSkillUser(playable, playable, 2306, 2, 1, 0));
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2306, 2, 1, 0));
activeChar.addExpAndSp(0, 100000);
break;
case 8956: // Red Primeval Crystal XML: 2306
activeChar.sendPacket(new MagicSkillUser(playable, playable, 2306, 3, 1, 0));
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2306, 3, 1, 0));
activeChar.addExpAndSp(0, 200000);
break;
default:
break;
}
return;
}
// for the rest, there are no extra conditions
if (!playable.destroyItem("Consume", item.getObjectId(), 1, null, false))
return;
switch(itemId)
{
case 3926: // Scroll of Guidance XML:2050
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2050, 1, 1, 0));
useScroll(activeChar, 2050, 1);
break;
case 3927: // Scroll of Death Whipser XML:2051
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2051, 1, 1, 0));
useScroll(activeChar, 2051, 1);
break;
case 3928: // Scroll of Focus XML:2052
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2052, 1, 1, 0));
useScroll(activeChar, 2052, 1);
break;
case 3929: // Scroll of Greater Acumen XML:2053
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2053, 1, 1, 0));
useScroll(activeChar, 2053, 1);
break;
case 3930: // Scroll of Haste XML:2054
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2054, 1, 1, 0));
useScroll(activeChar, 2054, 1);
break;
case 3931: // Scroll of Agility XML:2055
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2055, 1, 1, 0));
useScroll(activeChar, 2055, 1);
break;
case 3932: // Scroll of Mystic Enpower XML:2056
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2056, 1, 1, 0));
useScroll(activeChar, 2056, 1);
break;
case 3933: // Scroll of Might XML:2057
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2057, 1, 1, 0));
useScroll(activeChar, 2057, 1);
break;
case 3934: // Scroll of Wind Walk XML:2058
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2058, 1, 1, 0));
useScroll(activeChar, 2058, 1);
break;
case 3935: // Scroll of Shield XML:2059
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2059, 1, 1, 0));
useScroll(activeChar, 2059, 1);
break;
case 4218: // Scroll of Mana Regeneration XML:2064
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2064, 1, 1, 0));
useScroll(activeChar, 2064, 1);
break;
case 5593: // SP Scroll Low Grade XML:2167
activeChar.sendPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
activeChar.addExpAndSp(0, 500);
break;
case 5594: // SP Scroll Medium Grade XML:2167
activeChar.sendPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
activeChar.addExpAndSp(0, 5000);
break;
case 5595: // SP Scroll High Grade XML:2167
activeChar.sendPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2167, 1, 1, 0));
activeChar.addExpAndSp(0, 100000);
break;
case 6037: // Scroll of Waking XML:2170
activeChar.broadcastPacket(new MagicSkillUser(playable, playable, 2170, 1, 1, 0));
useScroll(activeChar, 2170, 1);
break;
case 9146: // Scroll of Guidance - For Event XML:2050
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2050, 1, 1, 0));
useScroll(activeChar, 2050, 1);
break;
case 9147: // Scroll of Death Whipser - For Event XML:2051
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2051, 1, 1, 0));
useScroll(activeChar, 2051, 1);
break;
case 9148: // Scroll of Focus - For Event XML:2052
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2052, 1, 1, 0));
useScroll(activeChar, 2052, 1);
break;
case 9149: // Scroll of Acumen - For Event XML:2053
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2053, 1, 1, 0));
useScroll(activeChar, 2053, 1);
break;
case 9150: // Scroll of Haste - For Event XML:2054
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2054, 1, 1, 0));
useScroll(activeChar, 2054, 1);
break;
case 9151: // Scroll of Agility - For Event XML:2055
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2055, 1, 1, 0));
useScroll(activeChar, 2055, 1);
break;
case 9152: // Scroll of Enpower - For Event XML:2056
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2056, 1, 1, 0));
useScroll(activeChar, 2056, 1);
break;
case 9153: // Scroll of Might - For Event XML:2057
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2057, 1, 1, 0));
useScroll(activeChar, 2057, 1);
break;
case 9154: // Scroll of Wind Walk - For Event XML:2058
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2058, 1, 1, 0));
useScroll(activeChar, 2058, 1);
break;
case 9155: // Scroll of Shield - For Event XML:2059
activeChar.broadcastPacket(new MagicSkillUser(playable, activeChar, 2059, 1, 1, 0));
useScroll(activeChar, 2059, 1);
break;
default:
break;
}