My code maybe incorrect, im using my basic knowledge im at school
add
You may have to remove the = 0 ?Code:c.PkPoints
Then add the Number. or something i'll help when i get home.
|
Hi i need help with the pk point system i added. Lets say you have 10 pk points and you die, well then you loose all of them? And also when you kill someone it doesnt add your pkp to the current ones you have so if you have 10 pkps and you win it will override the points you have and you'll then have 2.
Code:public void applyDead() { c.respawnTimer = 10; c.isDead = true; if(c.duelStatus != 6) { //c.killerId = c.getCombat().getKillerId(c.playerId); c.killerId = findKiller(); Client o = (Client) Server.playerHandler.players[c.killerId]; if(o != null) { if (c.killerId != c.playerId) if(c.inWild()) c.pkPoints = 0; o.pkPoints = 2; c.sendMessage("@red@ You now have "+c.pkPoints+" Pk Points!"); o.sendMessage("@red@ You now have "+o.pkPoints+" Pk Points!"); o.sendMessage("You have defeated @red@"+c.playerName+"!"); c.sendMessage("You have beenn defeated by @red@"+o.playerName+"!"); if(o.duelStatus == 5) { o.duelStatus++;; }
My code maybe incorrect, im using my basic knowledge im at school
add
You may have to remove the = 0 ?Code:c.PkPoints
Then add the Number. or something i'll help when i get home.
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) {
o.specAmount = 10;
if(!(c.npcIndex > 0) && c.inPits == false){
c.DC++;
o.KC++;
}
c.playerKilled = c.playerId;
if(o.duelStatus == 5) {
o.duelStatus++;
}
if (c.inWild())
if (Server.playerHandler.players[c.playerId].connectedFrom != o.lastKilled) {
o.sendMessage("You have defeated "+Misc.optimizeText(c.playerName)+" and received 1 PK Point!");
o.pkPoints = (o.pkPoints + 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.");
return;
}
}
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |