Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Dieing
- **/
- public void applyDead() {
- c.respawnTimer = 15;
- c.isDead = false;
- if(c.duelStatus != 6) {
- c.killerId = findKiller();
- Client o = (Client) PlayerHandler.players[c.killerId];
- if(o != null && (c.killerId != c.playerId)) {
- o.specAmount = 10;
- o.getItems().addSpecialBar(o.playerEquipment[o.playerWeapon]);
- o.sendMessage("Your special attack refills completely!");
- o.cStreak += 1;
- o.getPA().sendFrame126("@whi@Current Kill Streak: @bla@(@red@" + o.cStreak + "@bla@)", 7334);
- if (o.cStreak >= 3) {
- for (int j = 0; j < PlayerHandler.players.length; j++) {
- if (PlayerHandler.players[j] != null) {
- Client c2 = (Client)PlayerHandler.players[j];
- c2.sendMessage("@blu@[Killstreak] @red@"+o.playerName+" just killed @blu@"+c.playerName+"@red@ and is on a "+o.cStreak+" killstreak");
- }
- }
- }
- if(o.cStreak > o.hStreak) {
- o.sendMessage("Congratulations, your Highest kill streak has increased!");
- o.hStreak = o.cStreak;
- o.getPA().sendFrame126("@whi@Highest Kill Streak: @bla@(@red@" + o.hStreak + "@bla@)", 7333);
- }
- if(!o.inPits){
- if(o.killsThisMinute <= 2){
- if(o.cantGetKills == 0){
- if(c.playerId != o.playerId){
- if(!c.inPits && !c.inFunPk()){
- if (c.pkPoints > 10){
- //c.getItems().addItem(c.randomStatues(), 1);
- c.pkPoints = (c.pkPoints - 1);
- c.sendMessage("You now have "+c.pkPoints+" PK Points. @red@(-1)");
- }
- if (c.pkPoints <=10){
- c.sendMessage("@red@You lose no points because you only have "+c.pkPoints+" PK Points.");
- }
- c.DC++;
- } else if(c.inFunPk()) {
- c.sendMessage("You were killed in FunPK so you don't lose any PK Points.");
- } else if(c.inPits) {
- c.sendMessage("@red@You receive no penalty for dying in Fight Pits.");
- }
- String a = ""+o.connectedFrom+"";
- String b = ""+c.connectedFrom+"";
- if(o.playerKilled != c.playerId && o.lastKilled != Server.playerHandler.players[c.playerId].connectedFrom){
- o.KC++;
- //if(o.hasRegistered == 1)
- //o.updateStats();
- //else if(o.hasRegistered != 1)
- //o.sendMessage("@red@Type @blu@::register @red@and compare your k/d with friends in the new highscores!");
- o.killsThisMinute++;
- o.playerKilled = c.playerId;
- if (!o.inFunPk()){
- if(c.playerId == o.myTarget){
- if (!a.equals(b)){
- o.sendMessage("@blu@You gain 1 target point for killing your target! ");
- o.sendMessage("@blu@You gain 5 extra PK Points for killing your target!");
- o.pkPoints += 5;
- o.targetPoints += 1;
- o.totalTargetPoints += 1;
- //c.getItems().addItem(c.randomStatues(), 1);
- c.myTarget = -1;
- o.myTarget = -1;
- c.target = 0;
- o.target = 0;
- o.getPA().createPlayerHints(10, -1);
- c.getPA().createPlayerHints(10, -1);
- o.targetName = "None";
- c.targetName = "None";
- o.findTarget();
- c.findTarget();
- }
- if (a.equals(b)){
- o.sendMessage("@blu@You gained nothing from your kill and your target was reset.");
- c.myTarget = -1;
- o.myTarget = -1;
- c.target = 0;
- o.target = 0;
- o.getPA().createPlayerHints(10, -1);
- c.getPA().createPlayerHints(10, -1);
- o.targetName = "None";
- c.targetName = "None";
- o.findTarget();
- c.findTarget();
- }
- }
- if(o.memberStatus == 2){
- if (!a.equals(b)){
- o.pkPoints = (o.pkPoints + 6);
- o.sendMessage("@red@Super Donator bonus: @blu@(+6 PK points)");
- //c.getItems().addItem(c.randomStatues(), 1);
- }
- if (a.equals(b)){
- c.sendMessage("You didn't gain any PKP for that kill.");
- }
- }
- if(o.memberStatus == 1){
- if (!a.equals(b)){
- o.pkPoints = (o.pkPoints + 5);
- o.sendMessage("@red@Super Donator bonus: @blu@(+5 PK points)");
- //c.getItems().addItem(c.randomStatues(), 1);
- }
- if (a.equals(b)){
- c.sendMessage("You didn't gain any PKP for that kill.");
- }
- }
- if(o.isTraining){
- if (!a.equals(b)){
- o.pkPoints = (o.pkPoints + 10);
- o.sendMessage("@red@Training account: @blu@(+10 PK points)");
- //c.getItems().addItem(c.randomStatues(), 2);
- }
- if (a.equals(b)){
- c.sendMessage("You didn't gain any PKP for that kill.");
- }
- }
- if(o.memberStatus == 3){
- if (!a.equals(b)){
- o.pkPoints = (o.pkPoints + 7);
- o.sendMessage("@red@Donator bonus: @blu@(+7 PK points)");
- //c.getItems().addItem(c.randomStatues(), 2);
- }
- if (a.equals(b)){
- c.sendMessage("You didn't gain any PKP for that kill.");
- }
- }
- if(o.memberStatus == 0){
- if (!a.equals(b)){
- o.pkPoints = (o.pkPoints + 5);
- //c.getItems().addItem(c.randomStatues(), 1);
- o.sendMessage("@blu@(+5 PK points)");
- }
- if (a.equals(b)){
- c.sendMessage("You didn't gain any PKP for that kill.");
- }
- }
- if(!o.isInHighRiskPK()){
- o.pkPoints = (o.pkPoints + 10);
- o.sendMessage("@red@You now have "+o.pkPoints+" PK Points. @blu@(+10 PK points)");
- } else {
- o.pkPoints = (o.pkPoints + 10);
- o.sendMessage("@red@You now have "+o.pkPoints+" PK Points. @blu@(+5 PK points)");
- }
- }
- if (o.inFunPk()){
- o.pkPoints = (o.pkPoints + 1);
- if(o.memberStatus <= 1){
- o.sendMessage("@red@You gain 1 PK Point because you were in FunPK!");
- o.sendMessage("@red@You now have "+o.pkPoints+" PK Points. @blu@(+1 PK points)");
- } else if(o.memberStatus >= 2){
- o.pkPoints = (o.pkPoints + 1);
- o.sendMessage("@red@You gain 2 PK Points for being a Super Donor in FunPK!");
- o.sendMessage("@red@You now have "+o.pkPoints+" PK Points. @blu@(+2 PK points)");
- }
- }
- o.lastKilled = Server.playerHandler.players[c.playerId].connectedFrom;
- } else {
- o.sendMessage("@red@You gain no PK points.");
- }
- }
- } else {
- o.sendMessage("@red@You have been blocked from recieving PK Points for 1 hour.");
- c.playerKilled = c.playerId;
- c.DC++;
- c.pkPoints = (c.pkPoints - 1);
- c.sendMessage("@red@You now have "+c.pkPoints+" PK Points. (-1)");
- }
- } else {
- c.DC++;
- c.pkPoints = (c.pkPoints - 1);
- c.sendMessage("@red@You now have "+c.pkPoints+" PK Points. (-1)");
- o.cantGetKills = 1;
- o.cantGetKillsTimer = 3600;
- o.sendMessage("@red@You have been blocked from recieving PK Points for 1 hour.");
- }
- } else {
- o.sendMessage("@red@You now have "+o.pkPoints+" PK Points. (+4)");
- o.pkPoints = (o.pkPoints + 4);
- //o.pitsPoints = (o.pitsPoints + 1);
- //o.sendMessage("@red@You now have "+o.pitsPoints+" Pits Points. (+1)");
- //o.sendMessage("@red@Fight pits PK point bonus is temporarily disabled!");
- }
- if(o.duelStatus == 5) {
- o.duelStatus++;
- }
- }
- }
- c.faceUpdate(0);
- c.npcIndex = 0;
- c.playerIndex = 0;
- c.stopMovement();
- if(c.duelStatus <= 4) {
- if (c.redSkull == true) {
- return;
- }
- c.sendMessage("Oh dear you are dead!");
- c.cStreak = 0;
- c.getPA().sendFrame126("@whi@Current Kill Streak: @bla@(@red@" + c.cStreak + "@bla@)", 7334);
- //MYSQL.updateKD(c.KC, c.DC, c.playerName);
- } 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;
- c.doubleHit = false;
- c.usingClaws = false;
- resetFollowers();
- c.attackTimer = 10;
- }
- public void resetDamageDone() {
- for (int i = 0; i < PlayerHandler.players.length; i++) {
- if (PlayerHandler.players[i] != null) {
- PlayerHandler.players[i].damageTaken[c.playerId] = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment