So I want a random reward award system then someone kindly gave me the code added my ids and put in applydead method and it compiles fine but I don't recive anything =p help here is code ?
Code
Code:
int randomArray[] = { 14878, 14879, 14877, 14876, 14880, 14881, 14882, 14883, 14884, 14885, 14886, 14887, 14888, 14889, 14890, 14891, 14892};
int giveItem = Misc.random(randomArray.length);
Method
Code:
public void applyDead() {
c.respawnTimer = 15;
c.isDead = false;
removeAllWindows();
c.tradeResetNeeded = 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("You have defeated "+c.playerName+"!");
o.sendMessage(getKM());
o.pcPoints += 2;
c.DC++;
o.KC++;
int randomArray[] = { 14878, 14879, 14877, 14876, 14880, 14881, 14882, 14883, 14884, 14885, 14886, 14887, 14888, 14889, 14890, 14891, 14892};
int giveItem = Misc.random(randomArray.length);
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;
}
~ Adam