Healing
Replace your similar code with this
Code:
public Hit getMeleeHit(Player player, int damage) {
int shieldId = player.getEquipment().getShieldId();
if (shieldId == SHIELDID) {
int heal = (int) (damage * 0.20);
if (Utils.getRandom(100) <= 85) {
player.heal(heal);
}
}
return new Hit(player, damage, HitLook.MELEE_DAMAGE);
}
Find this under
player.java
Code:
else if (shieldId == 13740) { // divine
int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
if (prayer.getPrayerpoints() >= drain) {
hit.setDamage((int) (hit.getDamage() * 0.70));
prayer.drainPrayer(drain);
}
Then add this where it says shield ID add the id of the ss you are using
Code:
else if (shieldId == 29992) {
int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
if (prayer.getPrayerpoints() >= drain) {
hit.setDamage((int) (hit.getDamage() * 0.75));
prayer.drainPrayer(drain);
}
}
Originally Posted by
Blake721
So currently having an issue trying to get the 30% damage negation bonus to work with the divine spirit shield [matrix 718 source]
if (shieldId == 13740) { int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2); if (prayer.getPrayerpoints() >= drain) { hit.setDamage((int) (hit.getDamage() * 0.75)); prayer.drainPrayer(drain);
I'm not sure what to change here or if something is missing but basically I need help.
I am brand new here and I would be very grateful if someone who has done this could just tell me what's wrong or simply just paste the coding for this?
Thanks for viewing this!
Next time you need help on a 718 post in the 503+ help section
http://pastebin.com/bqAjr4bp