can anybody help me fix staking? and also when you kill someone in duel you get stuck in duel arena until you log out..can somebody fix it for me? i know its been released 10000x but none of the fixes work for me :\ heres my apply dead.
Code:
/**
* Dieing
**/
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)
o.sendMessage(Killmessage());
if(!PlayerKilling.hostOnList(o, c.connectedFrom)) {
PlayerKilling.addHostToList(o, c.connectedFrom);
if (c.killerId != c.playerId && c.inWild() && !c.inFunPk() && !c.inDuelArena() && !c.inPits)
if ((c.inFunPk()) || (c.inDuelArena()) || (c.inPits))
return;
else
o.pkPoints++;
o.sendMessage("You have received a point, you now have "+o.pkPoints+" pk points.");
} else {
if ((c.inFunPk()) || (c.inDuelArena()) || (c.inPits))
return;
else
if (c.killerId != c.playerId)
o.sendMessage("You have recently defeated "+c.playerName+", you don't receive any pk points.");
}
c.playerKilled = c.playerId;
if(o.duelStatus == 5) {
o.duelStatus++;
}
}
}
c.faceUpdate(0);
EventManager.getSingleton().addEvent(new Event() {
public void execute(EventContainer b) {
c.npcIndex = 0;
c.playerIndex = 0;
b.stop();
}
}, 2500);
c.stopMovement();
if (c.duelStatus <= 4) {
//c.frame74(512);//death music
c.sendMessage(Config.DEATH_MESSAGE);
} else if(c.duelStatus != 6) {
Client o = (Client) Server.playerHandler.players[c.killerId];
//c.frame74(512);//death music
c.sendMessage("You have lost the duel!");
o.getPA().movePlayer(Config.DUELING_RESPAWN_X+(Misc.random(Config.RANDOM_DUELING_RESPAWN)), Config.DUELING_RESPAWN_Y+(Misc.random(Config.RANDOM_DUELING_RESPAWN)), 0);
c.getPA().movePlayer(Config.DUELING_RESPAWN_X+(Misc.random(Config.RANDOM_DUELING_RESPAWN)), Config.DUELING_RESPAWN_Y+(Misc.random(Config.RANDOM_DUELING_RESPAWN)), 0);
PlayerSave.saveGame(o);
PlayerSave.saveGame(c);
}
resetDamageDone();
c.specAmount = 10;
c.getItems().addSpecialBar(c.playerEquipment[c.playerWeapon]);
c.lastVeng = 0;
c.vengOn = false;
resetFollowers();
c.attackTimer = 10;
}