Thread: PI Divine effect glitch

Results 1 to 8 of 8
  1. #1 PI Divine effect glitch 
    Registered Member Harambe_'s Avatar
    Join Date
    Jul 2007
    Posts
    504
    Thanks given
    15
    Thanks received
    22
    Rep Power
    13
    Okay, when you have 0 prayer your can't get hit while in combat how heres the code.

    Code:
    if (playerEquipment[playerShield] == 16002 && damage > 0) { //Divine
    			int prayerDamage = (int)(damage * .15);
    			if (playerLevel[5] >= prayerDamage) {
    				playerLevel[5] -= prayerDamage;
    				damage = (int)(damage * .70);
    			} else {
    				double mod = (playerLevel[5]/prayerDamage);
    				mod = mod * .30;
    				damage = (int)(damage * mod);
    				playerLevel[5] = 0;
    			}
    			((Client)this).getPA().refreshSkill(5);
    		}
    Reply With Quote  
     

  2. #2  
    Member fuglucky's Avatar
    Join Date
    Nov 2010
    Posts
    80
    Thanks given
    0
    Thanks received
    3
    Rep Power
    0
    took me a second but i think i found it. =) you just misplaced one thing. its in here

    Code:
    double mod = (playerLevel[5]/prayerDamage);
    see what its doing is, its trying to devide 0 which is your current prayer level and 0 devided by anything will be 0 hahaha. =p so just do this and your fine.

    Code:
    double mod = (prayerDamage/playerLevel[5]);
    so it should all look like this:

    Code:
    if (playerEquipment[playerShield] == 16002 && damage > 0) { //Divine
    			int prayerDamage = (int)(damage * .15);
    			if (playerLevel[5] >= prayerDamage) {
    				playerLevel[5] -= prayerDamage;
    				damage = (int)(damage * .70);
    			} else {
    				double mod = (prayerDamage/playerLevel[5]);
    				mod = mod * .30;
    				damage = (int)(damage * mod);
    				playerLevel[5] = 0;
    			}
    			((Client)this).getPA().refreshSkill(5);
    		}
    good luck my friend, i hope that fixed it =).
    Quote Originally Posted by R3KoN View Post
    wtf is up with 10 space indents? coder-claustrophobia >.>
    /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\
    thats me!

    Want to help me out with testing my server? message me and ill give you a grand tour.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member Harambe_'s Avatar
    Join Date
    Jul 2007
    Posts
    504
    Thanks given
    15
    Thanks received
    22
    Rep Power
    13
    Thank you i will check it out rep++ anyways because you took the time to help
    Reply With Quote  
     

  5. #4  
    Banned
    Join Date
    Jul 2010
    Age
    29
    Posts
    1,143
    Thanks given
    7
    Thanks received
    48
    Rep Power
    0
    Where would this code go I want effects ftw.
    Reply With Quote  
     

  6. #5  
    Registered Member Harambe_'s Avatar
    Join Date
    Jul 2007
    Posts
    504
    Thanks given
    15
    Thanks received
    22
    Rep Power
    13
    player.java attacking on if its not in player its in playerasistant
    Reply With Quote  
     

  7. #6  
    Registered Member
    Spoof's Avatar
    Join Date
    Jun 2009
    Age
    14
    Posts
    1,475
    Thanks given
    105
    Thanks received
    122
    Rep Power
    1634
    What exactly is the special effect?
    Reply With Quote  
     

  8. #7  
    Banned
    Join Date
    Jul 2010
    Age
    29
    Posts
    1,143
    Thanks given
    7
    Thanks received
    48
    Rep Power
    0
    okay so where would this code go in player.java like under what

    Edit: Never mind I found it also had to put
    Code:
    public int damage = 0;
    in player.java
    Reply With Quote  
     

  9. #8  
    Registered Member Harambe_'s Avatar
    Join Date
    Jul 2007
    Posts
    504
    Thanks given
    15
    Thanks received
    22
    Rep Power
    13
    Quote Originally Posted by Square View Post
    What exactly is the special effect?
    The spec of the shield is (this isnt exact just an example if you want the exact look on runewiki. Anyways say player A hits player B. Player B has the shield on. Player A hits a 50 and only 35 Hp will be taken away from player B. Thats the effect.
    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. Hey I'm Divine
    By Divine in forum The Red Carpet
    Replies: 9
    Last Post: 08-29-2010, 01:28 PM
  2. Replies: 22
    Last Post: 05-20-2010, 05:29 AM
  3. Divine-PvP VPS
    By Socket Head in forum Advertise
    Replies: 24
    Last Post: 09-20-2009, 09:29 PM
  4. Divine Sword
    By Vox' in forum Models
    Replies: 5
    Last Post: 02-23-2009, 10:47 PM
  5. Divine PK
    By BiohazardSteven in forum Help
    Replies: 2
    Last Post: 01-29-2009, 05:04 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
  •