onder last broket it work no error. pls:jelly:
|
Where would I add c.pkPoints += 1 in this:
This :Code:public void applyDead() { c.respawnTimer = 15; c.isDead = false; if(c.duelStatus != 6 && c.inDuelArena()) { //c.killerId = c.getCombat().getKillerId(c.playerId); c.killerId = findKiller(); Client o = (Client) Server.playerHandler.players[c.killerId]; Client y = (Client) Server.playerHandler.players[c.duelingWith]; y.sendMessage("You won the duel, and will be able to claim the rewards in a second."); if(o != null) { if (c.killerId != c.playerId) c.playerKilled = c.playerId; if(o.duelStatus == 5) { o.duelStatus++; } } } c.faceUpdate(0); c.npcIndex = 0; c.playerIndex = 0; c.stopMovement(); if(c.duelStatus <= 4) { c.sendMessage("Oh dear you are dead!"); } else if(c.duelStatus != 6) { c.sendMessage("You have lost the duel!"); } resetDamageDone(); c.specAmount = 10; c.getItems().addSpecialBar(c.playerEquipment[c.playerWeapon]); c.lastVeng = 0; c.vengOn = false; resetFollowers(); c.attackTimer = 10; removeAllWindows(); removeAllWindows(); c.tradeResetNeeded = true; }Only adds it if you win a duel.Code:if(o != null) { if (c.killerId != c.playerId) c.playerKilled = c.playerId; if(o.duelStatus == 5) { o.duelStatus++; } }
onder last broket it work no error. pls:jelly:
whole point of pk points is to give the person who won the battle a point, so you wouldnt apply it into the death method for the opponent, you would only do this if you was adding a death point.
you would want to check if the player who is being attacked by the attacker and if he has died, then add a pk point to the attacker.
soooooo
this will not work with your source, its an example, so were ever you check if the opponent is dead, add the pk point for the attacker.Code:Client opponent..... Client attacker.... if(oponent.isDead()) { attacker.pkpoints += 1; }
Code:public void applyDead() { c.respawnTimer = 15; c.isDead = false; if(c.duelStatus != 6 && c.inDuelArena()) { //c.killerId = c.getCombat().getKillerId(c.playerId); c.killerId = findKiller(); Client o = (Client) Server.playerHandler.players[c.killerId]; Client y = (Client) Server.playerHandler.players[c.duelingWith]; y.sendMessage("You won the duel, and will be able to claim the rewards in a second."); if(o != null) { if (c.killerId != c.playerId) c.playerKilled = c.playerId; if(o.duelStatus == 5) { o.duelStatus++; } } } else { c.killerId = findKiller(); Client o = (Client) Server.playerHandler.players[c.killerId]; if(o != null) o.pkPoints += 1; } c.faceUpdate(0); c.npcIndex = 0; c.playerIndex = 0; c.stopMovement(); if(c.duelStatus <= 4) { c.sendMessage("Oh dear you are dead!"); } else if(c.duelStatus != 6) { c.sendMessage("You have lost the duel!"); } resetDamageDone(); c.specAmount = 10; c.getItems().addSpecialBar(c.playerEquipment[c.playerWeapon]); c.lastVeng = 0; c.vengOn = false; resetFollowers(); c.attackTimer = 10; removeAllWindows(); removeAllWindows(); c.tradeResetNeeded = true; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |