//key HEALING [0] = healing [1] = MinHealth [2] = MaxHealth [3] = Item [4] = UsedItem case 385: //Shark //keyend //healing check if (healing[0] > 0) { healing(); } healing[1] = 30; healing[2] = 30; healing[3] = -1; break; /*HEALING*/ public boolean healing() { if (actionTimer == 0 && healing[0] == 1) { actionAmount++; actionTimer = 4; OriginalShield = playerEquipment[playerShield]; OriginalWeapon = playerEquipment[playerWeapon]; playerEquipment[playerShield] = -1; playerEquipment[playerWeapon] = -1; setAnimation(0x33D); healing[0] = 2; } if (actionTimer == 0 && healing[0] == 2) { deleteItem(healing[4], GetItemSlot(healing[4]), 1); int Heal = healing[1]; int HealDiff = (healing[2] - healing[1]); if (HealDiff > 0) { Heal += misc.random(HealDiff); } if (healing[3] != -1) { addItem(healing[3], 1); } NewHP = (playerLevel[playerHitpoints] + Heal); if (NewHP > getLevelForXP(playerXP[playerHitpoints])) { NewHP = getLevelForXP(playerXP[playerHitpoints]); } sendMessage("You eat the "+GetItemName(healing[4])+"."); playerEquipment[playerWeapon] = OriginalWeapon; playerEquipment[playerShield] = OriginalShield; OriginalWeapon = -1; OriginalShield = -1; resetAnimation(); resetHE(); } return true; } public boolean resetHE() { healing[0] = 0; healing[1] = 0; healing[2] = 0; healing[3] = -1; healing[4] = -1; IsUsingSkill = false; return true; }