yeah.. its all in the title. anyway heres my apply dead method:
Code:
public void applyDead() {
c.respawnTimer = 15;
c.isDead = false;
if(c.duelStatus != 6) {
c.killerId = findKiller();
Client o = (Client) Server.playerHandler.players[c.killerId];
if(o != null) {
c.DC++;
o.KC++;
c.playerKilled = c.playerId;
if(o.duelStatus == 5) {
o.duelStatus++;
}
if (Server.playerHandler.players[c.playerId].connectedFrom != o.lastKilled) {
o.pkPoints = (o.pkPoints + 15);
o.getItems().addItem(c.getPA().randomClue(), Misc.random(0) + 1);
o.lastKilled = Server.playerHandler.players[c.playerId].connectedFrom;
} else {
o.sendMessage("You do not recieve pk points because you have killed " +c.playerName+ " twice in a row.");
}
}
}
c.faceUpdate(0);
c.npcIndex = 0;
c.playerIndex = 0;
c.stopMovement();
if(c.duelStatus <= 4) {
c.sendMessage("Oh dear, you are dead.");
PlayerSave.saveGame(c);
} else if(c.duelStatus != 6) {
c.sendMessage("You have lost the duel!");
PlayerSave.saveGame(c);
}
resetDamageDone();
c.specAmount = 10;
c.getItems().addSpecialBar(c.playerEquipment[c.playerWeapon]);
c.lastVeng = 0;
c.vengOn = false;
resetFollowers();
c.attackTimer = 10;
}
It adds pk points when you die from an npc. if u die in pvp, it doesnt though.