Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void healOther(Client c, int i) {
- Client p = (Client)Server.playerHandler.players[i];
- double hpPercent = c.playerLevel[3] * 0.75;
- if(!hasRequiredLevel(c, 92)) {
- c.sendMessage("You need to have a magic level of 92 to cast this spell.");
- return;
- }
- if(!hasRunes(c, new int[] {ASTRAL, LAW, BLOOD}, new int[] {3, 3, 1})) {
- return;
- }
- if(p.playerLevel[3] < 1) {
- return;
- }
- int addingHP = 0;
- if(p.playerLevel[3] == p.getLevelForXP(p.playerXP[3])) {
- c.sendMessage(""+p.playerName+" already has full hitpoints.");
- return;
- }
- deleteRunes(c, new int[] {ASTRAL, LAW, BLOOD}, new int[] {3, 3, 1});
- addingHP = (int)hpPercent;
- if(p.playerLevel[3] + (int)hpPercent > p.getLevelForXP(p.playerXP[3])) {
- addingHP = p.getLevelForXP(c.playerXP[3]);
- }
- c.handleHitMask(addingHP);
- c.playerLevel[3] -= addingHP;
- p.playerLevel[3] += addingHP;
- p.getPA().refreshSkill(3);
- c.getPA().refreshSkill(3);
- c.faceUpdate(i+32768);
- c.startAnimation(4411);
- c.gfx100(727);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement