Okay, so I have vengeance added in, there's just one problem. Players who don't have 94 mage/40 def/the runes, etc. do the anim/forcedchat when they click the button, but veng doesn't actually work. I want it so that they don't do the anim/forcedchat, I don't know what's wrong with my code, but here it is, please help!
Code:
case 118098: // Vengeance
c.getPA().vengMe();
if (c.playerLevel[6] < 94) {
c.sendMessage("You need a magic level of 94 to cast this spell.");
break;
}
else if (c.playerLevel[1] < 40) {
c.sendMessage("You need a defence level of 40 to cast this spell.");
break;
}
else if (!c.getItems().playerHasItem(9075, 4)
|| !c.getItems().playerHasItem(557, 10)
|| !c.getItems().playerHasItem(560, 2)) {
c.sendMessage("You don't have the required runes to cast this spell.");
break;
}
else if (System.currentTimeMillis() - c.lastCast < 30000) {
c.sendMessage("You can only cast vengeance every 30 seconds.");
break;
} else {
c.sendMessage("You cast vengeance.");
c.forcedChat(""+ c.playerName + " casts vengeance!");
break;
}
fixed.