Thread: Fixing PKP

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Fixing PKP 
    Registered Member
    Join Date
    Feb 2011
    Age
    28
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    Im here again Hybridpvp v3 and my pkp point system is messed up. Whenever people die they get pkp and when you win you dont get anything. How could you fix this?
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Nov 2008
    Posts
    1,017
    Thanks given
    21
    Thanks received
    32
    Rep Power
    161
    bump i need this too.
    Reply With Quote  
     

  3. #3  
    Banned imsuperman05's Avatar
    Join Date
    May 2011
    Posts
    410
    Thanks given
    21
    Thanks received
    25
    Rep Power
    0
    Show me your
    Code:
        public void applyDead() {
    in playerassistant.java and i'll fix it for you.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Feb 2011
    Age
    28
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    Quote Originally Posted by imsuperman05 View Post
    Show me your
    Code:
        public void applyDead() {
    in playerassistant.java and i'll fix it for you.
    Code:
     public void applyDead() {    
            c.respawnTimer = 10;
            c.isDead = false;
            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.npcIndex > 0) && c.inPits == false){
                    }
                    if (c.killerId != c.playerId)
                        o.sendMessage("You have defeated "+Misc.optimizeText(c.playerName)+"!");
                                    if(c.inWild()){
                                            c.pkPoints += 5;
                                            o.sendMessage("You have received 5 Pk Points");
                                    }
                    c.playerKilled = c.playerId;
                    if(o.duelStatus == 5) {
                        o.duelStatus++;
                    }
                }
            }
            c.poisonDamage = 0;
            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;
    	removeAllWindows();
    	c.tradeResetNeeded = true;
      	}
    Reply With Quote  
     

  5. #5  
    Banned imsuperman05's Avatar
    Join Date
    May 2011
    Posts
    410
    Thanks given
    21
    Thanks received
    25
    Rep Power
    0
    Try this.
    Code:
     public void applyDead() {    
            c.respawnTimer = 10;
            c.isDead = false;
            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.npcIndex > 0) && c.inPits == false){
                    }
    				if(c.inWild()) 
    				return;
    				if (Server.playerHandler.players[c.playerId].connectedFrom != o.lastKilled && c.duelStatus == 0) {
    					o.pkPoints = (o.pkPoints + 5);
    					o.sendMessage("You recieved 5 Pk Points");
    					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.");
    				}
    			}
    		}
                    if(o.duelStatus == 5) {
                        o.duelStatus++;
                    }
                }
            }
            c.poisonDamage = 0;
            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;
    	removeAllWindows();
    	c.tradeResetNeeded = true;
      	}
    If you get any errors, like 100 errors, add or take out a bracket. If this does not work, then use this
    Code:
     public void applyDead() {    
            c.respawnTimer = 10;
            c.isDead = false;
            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.npcIndex > 0) && c.inPits == false){
                    }
                    if (c.killerId != c.playerId)
                    if(c.inWild())
                    return;
                        o.sendMessage("You have defeated "+Misc.optimizeText(c.playerName)+"!");
                                            o.pkPoints += 5;
                                            o.sendMessage("You have received 5 Pk Points");
                    c.playerKilled = c.playerId;
                    if(o.duelStatus == 5) {
                        o.duelStatus++;
                    }
                }
            }
            c.poisonDamage = 0;
            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;
    	removeAllWindows();
    	c.tradeResetNeeded = true;
      	}
    Reply With Quote  
     

  6. #6  
    Respected Member

    Revil's Avatar
    Join Date
    Nov 2010
    Age
    30
    Posts
    4,860
    Thanks given
    3,715
    Thanks received
    2,228
    Rep Power
    5000
    Replace your void applydead with:

    Code:
    public void applyDead() {    
            c.respawnTimer = 15;
            c.isDead = false;
            
            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.npcIndex > 0) && c.inPits == false){
                    }
                    if (c.killerId != c.playerId)
                        o.sendMessage("You have defeated "+Misc.optimizeText(c.playerName)+"!");
                                    if(c.inWild()){
                                            c.pkPoints += 1;
                                            o.sendMessage("You have received 1 PkPoint, you now have "+c.pkPoints+" pk points!");
                                    }
                    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;
        }
    Reply With Quote  
     

  7. #7  
    Banned imsuperman05's Avatar
    Join Date
    May 2011
    Posts
    410
    Thanks given
    21
    Thanks received
    25
    Rep Power
    0
    Quote Originally Posted by -Revil View Post
    Replace your void applydead with:

    Code:
    public void applyDead() {    
            c.respawnTimer = 15;
            c.isDead = false;
            
            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.npcIndex > 0) && c.inPits == false){
                    }
                    if (c.killerId != c.playerId)
                        o.sendMessage("You have defeated "+Misc.optimizeText(c.playerName)+"!");
                                    if(c.inWild()){
                                            c.pkPoints += 1;
                                            o.sendMessage("You have received 1 PkPoint, you now have "+c.pkPoints+" pk points!");
                                    }
                    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;
        }
    That would not work, you just changed the sendmessage.


    !!! Just actually read through it and found the fix.
    change the
    Code:
                                            c.pkPoints += 5;
    to
    Code:
                                            o.pkPoints += 5;
    Also, you could just move the inwild statement and add a return;
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Feb 2011
    Age
    28
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    Alright, also. When you win a fight you dont gain exp.
    Reply With Quote  
     

  9. #9  
    Banned imsuperman05's Avatar
    Join Date
    May 2011
    Posts
    410
    Thanks given
    21
    Thanks received
    25
    Rep Power
    0
    Not getting what your saying, you want to get exp like 100k xp when you fight? or what?
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Feb 2011
    Age
    28
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    They say they dont get ANYTHING for winning.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 15
    Last Post: 12-12-2011, 09:12 PM
  2. Who can help fixing this
    By Coder Joker in forum Help
    Replies: 2
    Last Post: 06-23-2011, 06:45 PM
  3. Fixing the Map??
    By Genesis in forum Help
    Replies: 6
    Last Post: 02-13-2011, 05:29 AM
  4. Fixing the top [BOTH]
    By mige5 in forum Tutorials
    Replies: 10
    Last Post: 12-28-2009, 12:33 AM
  5. fixing lag
    By bobbykinney0000 in forum Help
    Replies: 0
    Last Post: 12-25-2009, 01:58 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •