Im just gonna give you the code even though its spoonfeeding...
Go to NPCvsPlayer class
Find this line:
Code:
public void RangeAttack(Player p, NPC n) {
in that method find this part:
Code:
if (IsSpecial(n.getId())) {
SpecialNpcs(p, n);
return;
}
Below that add this:
Code:
if (p.DeflectRange == true) {
if (rangeDamage > 3) {
n.hit(rangeDamage / 4);
p.graphics(2229);
p.animate(12573);
} else {
n.hit(p, 1);
p.graphics(2229);
p.animate(12573);
}
}
Now you have deflect range working..
Find this line :
Code:
public void MeleeAttack(final Player p, NPC n) {
In that method find this part
Code:
if (IsSpecial(n.getId())) {
SpecialNpcs(p, n);
return;
}
final int meleeDamage = Misc.random(n.getMaxHit());
Below that add this:
Code:
if (p.DeflectMelee == true) {
if (meleeDamage > 3) {
n.hit(meleeDamage / 4);
p.graphics(2230);
p.animate(12573);
} else {
n.hit(p, 1);
p.graphics(2230);
p.animate(12573);
}
}
Thats all i have right now, Try to create deflect mage from what i gave you.. and your welcome