Thread: [PI] Working Spirit Shield Effects Tutorial [PI]

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 45
  1. #1 [PI] Working Spirit Shield Effects Tutorial [PI] 
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    THIS GUIDE WILL CAUSE YOUR ELYSIAN SPIRIT SHEILD TO REDUCE DAMAGE BY 75% AT A 30% CHANCE IF THE PLAYER HITS OVER 4.
    THIS GUIDE WILL CAUSE YOUR DIVINE SPIRIT SHEILD TO REDUCE DAMAGE BY 15% AT 100% CHANCE IF YOUR PRAYER IS MORE THAN 0 AND THEY HIT MORE THAN 4, IT WILL ALWAYS REDUCE YOUR PRAY POINTS BY 30% OF THEYRE HIT.

    As far as i know this the only Correct and Working spirit shield effect tutorial, and i am doing this give back to the community for helping me so much.

    Difficulty Level 1/10
    Files Needed Editing = 1
    Tested on: Project Insanity , DSKP.

    This Will ALSO fix your Spirit sheilds if your having the error that you cannot kill the player but your effects are working fine, at 1 hp the damage is reduced and does not kill the player.


    Go to player.java

    and create this complete new public damagedrecieved method, just paste all of this just above a public to do the trick.

    Code:
    		public void dealDamage(int damage) {
    		
    		Client c = (Client)this;
    		if(playerEquipment[playerShield] == 13740) { // Divine Spirit Shield Effect
    		    
    			if(prayerPoint >0) {
    			    if(playerLevel[3] > 4) {
    					double damageRecieved = damage * 0.85;
    					int prayerLost = (int) (damage * 0.3);
    					if(prayerPoint >= prayerLost) {
    						damage = (int) damageRecieved;
    						prayerPoint -= prayerLost;
    						if(prayerPoint < 0)
    							prayerPoint = 0;
    							gfx0(247);
    							c.sendMessage("Your shield absorbs 15% damage but your prayer drains...");
    							
    					}
    				}
    			}
    		}
    		if(playerEquipment[playerShield] == 13742) { // Elysian Spirit Shield Effect
    			if(Misc.random(9) <= 3) {
    				if(playerLevel[3] > 4) {
    					double damageRecieved = damage * 0.25;
    					gfx0(247);
    					c.sendMessage("Your shield absorbs 75% of the hit...");
    				}
    			}
    		}
    		if (teleTimer <= 0){
    		    playerLevel[3] -= damage;
    		}else {
    			if (hitUpdateRequired)
    			hitUpdateRequired = false;
    			if (hitUpdateRequired2)
    			hitUpdateRequired2 = false;
    		}
    		
    	}
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    I'm President Carter


    Join Date
    Jan 2011
    Posts
    1,204
    Thanks given
    17
    Thanks received
    222
    Rep Power
    144
    There is no such file called "Player.config"


    Reply With Quote  
     

  4. #3  
    Member [PI] Working Spirit Shield Effects Tutorial [PI] Market Banned

    Join Date
    May 2011
    Age
    29
    Posts
    414
    Thanks given
    16
    Thanks received
    44
    Rep Power
    56
    there is player.java, playerassisant.java, playersave.java and that is it. Unless you have to make new file.
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Sorry my mistake, Player.java Ill update that now
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    If you are getting something where in-game your attacks which are larger than roughly 100 or 10 (if your not using x10 Hits) do not throw the "Drain" effect on the Divine , it is due to the prayer, and the prayer sometimes is a bit iffy, i made a slight change to it on my server to make it more effficient, this will give Divine a 75% chance to Reduce the Dmg by 20% Rather than 100% to reduce by 15. + the prayer effects, on this the prayer effects are removed. i understand that on a lot of server the prayer's drain in melee combat as it does on mine. so i have changed the coding to compensate for this, so try this Code Instead.

    Code:
    public void dealDamage(int damage) {
    		
    		Client c = (Client)this;
    		if(playerEquipment[playerShield] == 13740) { // Divine Spirit Shield Effect
    		    
    			if(prayerPoint >0) {
    			    if(playerLevel[3] > 4) {
    					if(Misc.random(8) <= 6) {
    						double damageRecieved = damage * 0.80;
    							gfx0(247);
    							c.sendMessage("Your shield absorbs 20% of the hit...");
    							
    					}
    				}
    			}
    		}
    		if(playerEquipment[playerShield] == 13742) { // Elysian Spirit Shield Effect
    			if(Misc.random(9) <= 3) {
    				if(playerLevel[3] > 4) {
    					double damageRecieved = damage * 0.20;
    					gfx0(247);
    					c.sendMessage("Your shield absorbs 80% of the hit...");
    				}
    			}
    		}
    		if (teleTimer <= 0){
    		    playerLevel[3] -= damage;
    		}else {
    			if (hitUpdateRequired)
    			hitUpdateRequired = false;
    			if (hitUpdateRequired2)
    			hitUpdateRequired2 = false;
    		}
    		
    	}
    Reply With Quote  
     

  8. Thankful user:


  9. #6  
    Registered Member
    Mr.Client's Avatar
    Join Date
    Jun 2010
    Posts
    2,094
    Thanks given
    100
    Thanks received
    317
    Rep Power
    259
    Looks almost exact to the one kataang released a while ago
    Reply With Quote  
     

  10. #7  
    Member

    Join Date
    Oct 2009
    Posts
    655
    Thanks given
    72
    Thanks received
    43
    Rep Power
    0
    wtf,ely absorbs 80% of the hit,and divine 20%?
    Reply With Quote  
     

  11. #8  
    Registered Member Santi Cazorla's Avatar
    Join Date
    Aug 2009
    Posts
    1,137
    Thanks given
    258
    Thanks received
    55
    Rep Power
    7
    Elysian has a 70% chance of reducing damage by 25%, the Divine shield has a 100% chance of reducing damage by 30%, at the cost of a few prayer points.
    This one also doesn't seem to reduce prayers and you got all the percentages all wrong.
    Reply With Quote  
     

  12. #9  
    Banned

    Join Date
    Feb 2008
    Posts
    592
    Thanks given
    0
    Thanks received
    21
    Rep Power
    0
    divine absorb 30% of the hit everytime if the player has prayer points..
    ely absorb 25% of the hit 75% of the time..

    and there no gfx for it and it doesnt send a message..
    and you dont have to hit more than 4 for it to work lol...
    Reply With Quote  
     

  13. Thankful user:


  14. #10  
    Registered Member RuneWings317's Avatar
    Join Date
    Aug 2010
    Posts
    223
    Thanks given
    24
    Thanks received
    30
    Rep Power
    11
    Never knew spirit shields had an effect... Very nice though
    Reply With Quote  
     

Page 1 of 5 123 ... LastLast

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. [FIX]Spirit Shield Effects[PI]
    By a 0 a 0 a in forum Requests
    Replies: 1
    Last Post: 12-01-2010, 03:51 PM
  3. Spirit Shield Effects HELP!
    By Moronic in forum Help
    Replies: 2
    Last Post: 06-22-2010, 08:28 PM
  4. Divine and Elysian Spirit shield effects.
    By F0rerunner in forum Tutorials
    Replies: 58
    Last Post: 06-07-2010, 04:41 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •