Thread: [help] Divine spirit shield

Results 1 to 4 of 4
  1. #1 [help] Divine spirit shield 
    Registered Member
    Join Date
    Dec 2016
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    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!

    Reply With Quote  
     

  2. #2 This worked for me 
    Registered Member RSPS 2016's Avatar
    Join Date
    Dec 2016
    Posts
    73
    Thanks given
    13
    Thanks received
    13
    Rep Power
    15
    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);
    			}
    		}
    Quote Originally Posted by Blake721 View Post
    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
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2016
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thank you so much!!!!

    Merry Xmas!
    Reply With Quote  
     

  4. #4  
    Registered Member RSPS 2016's Avatar
    Join Date
    Dec 2016
    Posts
    73
    Thanks given
    13
    Thanks received
    13
    Rep Power
    15
    Merry Christmas to you also hope all is well. You are very welcome I had to re add all this for my divine also.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] Elysian and Divine Spirit Shield Effects
    By TheRedArmy in forum Snippets
    Replies: 29
    Last Post: 03-24-2011, 01:02 AM
  2. [req] help with spirit shields
    By GamminOner in forum Help
    Replies: 2
    Last Post: 03-10-2011, 02:45 AM
  3. Divine Spirit Shield
    By pk nation in forum Requests
    Replies: 3
    Last Post: 12-13-2010, 09:39 AM
  4. Replies: 0
    Last Post: 02-24-2010, 10:48 AM
  5. Help with spirit shield making
    By TaylorRawr in forum Help
    Replies: 5
    Last Post: 12-06-2009, 07:46 AM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •