My nex armour hp boost code:
Code:
	public int calculateMaxLifePoints() {
		int lifePoints = getLevelForXP(playerXP[3]);//The normal hp
		int torvaLegs = 13360;//Torva Legs id
		int torvaBody = 13358;//Torva Body id
		int torvaHelm = 13362;//Torva Helm id
		int pernixLegs = 13352;//Pernix Chaps id
		int pernixBody = 13354;//Pernix Body id
		int pernixHelm = 13355;//Pernix Cowl id
		int virtusLegs = 13346;//Virtus Robe bottom id
		int virtusBody = 13348;//Virtus Robe top id
		int virtusHelm = 13350;//Virtus Mask id
		if (playerEquipment[playerLegs] == torvaLegs || playerEquipment[playerLegs] == pernixLegs || playerEquipment[playerLegs] == virtusLegs)
			lifePoints += 13;
		if (playerEquipment[playerChest] == torvaBody || playerEquipment[playerChest] == pernixBody || playerEquipment[playerChest] == virtusBody)
			lifePoints += 20;
		if (playerEquipment[playerHat] == torvaHelm || playerEquipment[playerHat] == pernixHelm || playerEquipment[playerHat] == virtusHelm)
			lifePoints += 7;
		return lifePoints;
	}

My food code for it heal with the HP Boost:
Code:
			FoodToEat f = FoodToEat.food.get(id);
			if (c.playerLevel[3] < c.calculateMaxLifePoints()) {
				c.playerLevel[3] += f.getHeal();
				if (c.playerLevel[3] > c.calculateMaxLifePoints())
					c.playerLevel[3] = c.calculateMaxLifePoints();
			}
Now i wan't the soulsplit heal to do like food, heal till 1390 (if have a full nex wear)

My applySoulsplit code:
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 (damage > 0) {
									int heal = (int) (damage * 0.40);
									//int heal = (int)(damage/5);
									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.ssDelay = 4;
                        EventManager.getSingleton().addEvent(new Event() {
                                public void execute(EventContainer s) {
                                        if (c.ssDelay > 0) {
                                                c.ssDelay--;
                                        }
                                        if (c.ssDelay == 3) {
                                                c2.gfx0(2264);
                                        }
                                        if (c.ssDelay == 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.ssDelay == 0) {    
                                                s.stop();
                                        }
                                }
                        }, 500);
                }
        }
Then i did this to test:

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 (damage > 0) {
									int heal = (int) (damage * 0.40);
									//int heal = (int)(damage/5);
									if (c2.playerLevel[5] <= 0) {
                                        					c2.playerLevel[5] = 0;
                                        					c2.getCombat().resetPrayers();
									}
									if (c.playerLevel[3] < c.calculateMaxLifePoints()) {
										c.playerLevel[3] += heal;
										c2.playerLevel[5] -= 1;
									if (c.playerLevel[3] > c.calculateMaxLifePoints())
										c.playerLevel[3] = c.calculateMaxLifePoints();
									} else 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.ssDelay = 4;
                        EventManager.getSingleton().addEvent(new Event() {
                                public void execute(EventContainer s) {
                                        if (c.ssDelay > 0) {
                                                c.ssDelay--;
                                        }
                                        if (c.ssDelay == 3) {
                                                c2.gfx0(2264);
                                        }
                                        if (c.ssDelay == 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.ssDelay == 0) {    
                                                s.stop();
                                        }
                                }
                        }, 500);
                }
        }


But didnt worked, what i can do to work? thx