Thread: [PI] SoulSplit HP Heals Just 2?

Results 1 to 3 of 3
  1. #1 [PI] SoulSplit HP Heals Just 2? 
    Java Developer

    Join Date
    Jun 2012
    Posts
    385
    Thanks given
    80
    Thanks received
    35
    Rep Power
    4
    If i hit 0, it heal 2 hp, if i hit 10 it heal just 2, if i hit 200 it heal just 2.... How i can fix?


    My ApplySoulSplit

    Code:
                public void applySoulSplit(int index, int damage) {
                    if (!c.curseActive[18])
                            return;
                    if (Server.playerHandler.players[index] != null) { 
                            final Client c2 = (Client)Server.playerHandler.players[index];
                            final int pX = c.getX();
                            final int pY = c.getY();
                            final int oX = c2.getX();
                            final int oY = c2.getY();
                            int offX = (pY - oY)* -1;
                            int offY = (pX - oX)* -1;
    						if (c.curseActive[18] && !c.prayerActive[23] && (c.playerLevel[3] <= 99)) {
    									int heal = 2;
    									if (c2.playerLevel[5] <= 0) {
                                            c2.playerLevel[5] = 0;
                                            c2.getCombat().resetPrayers();
    									}
    									if (c.playerLevel[3] + heal >= c.getPA().getLevelForXP(c.playerXP[3])) {
    										c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]);
    									} else {
    										c.playerLevel[3] += heal;
    										c2.playerLevel[5] -= 1;
    									}
                            c.getPA().refreshSkill(3);
                            c2.getPA().refreshSkill(5);
                            }
                            c.getPA().createPlayersProjectile(pX, pY, offX, offY, 50, 45, 2263, 31, 31, - c.oldPlayerIndex - 1, 0);
                            c.soulSplitDelay = 4;
                            EventManager.getSingleton().addEvent(new Event() {
                                    public void execute(EventContainer s) {
                                            if (c.soulSplitDelay > 0) {
                                                    c.soulSplitDelay--;
                                            }
                                            if (c.soulSplitDelay == 3) {
                                                    c2.gfx0(2264);
                                            }
                                            if (c.soulSplitDelay == 2) {
                                                    int offX2 = (oY - pY)* -1;
                                                    int offY2 = (oX - pX)* -1;
                                                    c.getPA().createPlayersProjectile(oX, oY, offX2, offY2, 50, 45, 2263, 31, 31, - c.playerId - 1, 0);
                                            }
                                            if (c.soulSplitDelay == 0) {    
                                                    s.stop();
                                            }
                                    }
                            }, 500);
                    }
            }
    Reply With Quote  
     

  2. #2  
    Registered Member Simonski's Avatar
    Join Date
    Jul 2012
    Age
    26
    Posts
    89
    Thanks given
    64
    Thanks received
    7
    Rep Power
    44
    Code:
    public void applySoulSplit(int index, int damage) {
                    if (!c.curseActive[18])
                            return;
                    if (Server.playerHandler.players[index] != null) { 
                            final Client c2 = (Client)Server.playerHandler.players[index];
                            final int pX = c.getX();
                            final int pY = c.getY();
                            final int oX = c2.getX();
                            final int oY = c2.getY();
                            int offX = (pY - oY)* -1;
                            int offY = (pX - oX)* -1;
    						if (c.curseActive[18] && !c.prayerActive[23] && (c.playerLevel[3] <= 99)) {
    									int heal = 2;
    									if (c2.playerLevel[5] <= 0) {
                                            c2.playerLevel[5] = 0;
                                            c2.getCombat().resetPrayers();
    									}
    									if (c.playerLevel[3] + heal >= c.getPA().getLevelForXP(c.playerXP[3])) {
    										c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]);
    									} else {
    										c.playerLevel[3] += heal;
    										c2.playerLevel[5] -= 1;
    									}
                            c.getPA().refreshSkill(3);
                            c2.getPA().refreshSkill(5);
                            }
                            c.getPA().createPlayersProjectile(pX, pY, offX, offY, 50, 45, 2263, 31, 31, - c.oldPlayerIndex - 1, 0);
                            c.soulSplitDelay = 4;
                            EventManager.getSingleton().addEvent(new Event() {
                                    public void execute(EventContainer s) {
                                            if (c.soulSplitDelay > 0) {
                                                    c.soulSplitDelay--;
                                            }
                                            if (c.soulSplitDelay == 3) {
                                                    c2.gfx0(2264);
                                            }
                                            if (c.soulSplitDelay == 2) {
                                                    int offX2 = (oY - pY)* -1;
                                                    int offY2 = (oX - pX)* -1;
                                                    c.getPA().createPlayersProjectile(oX, oY, offX2, offY2, 50, 45, 2263, 31, 31, - c.playerId - 1, 0);
                                            }
                                            if (c.soulSplitDelay == 0) {    
                                                    s.stop();
                                            }
                                    }
                            }, 500);
                    }
            }
    Change the red to
    Code:
    int heal = damage * 0.25;
    I think, not too sure.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    May 2012
    Posts
    1,089
    Thanks given
    328
    Thanks received
    82
    Rep Power
    135
    int heal = 2;
    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. Changing how much food heals you
    By BADBOY OWNS in forum Tutorials
    Replies: 3
    Last Post: 10-20-2007, 06:49 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •