Thread: [PI] Pk Point help!!! [PI]

Results 1 to 7 of 7
  1. #1 [PI] Pk Point help!!! [PI] 
    Registered Member
    Join Date
    Mar 2011
    Posts
    26
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    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++;;
    				}
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Dec 2010
    Posts
    1,982
    Thanks given
    174
    Thanks received
    256
    Rep Power
    223
    My code maybe incorrect, im using my basic knowledge im at school

    add

    Code:
    c.PkPoints
    You may have to remove the = 0 ?
    Then add the Number. or something i'll help when i get home.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2011
    Posts
    26
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by t11andreas View Post
    My code maybe incorrect, im using my basic knowledge im at school

    add

    Code:
    c.PkPoints
    You may have to remove the = 0 ?
    Then add the Number. or something i'll help when i get home.
    Alright, ill be waiting lol
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    May 2009
    Posts
    844
    Thanks given
    44
    Thanks received
    39
    Rep Power
    29
    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;
    }
    }
    }
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2011
    Posts
    26
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by i0wn3v3ry View Post
    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;
    }
    }
    }
    Thanks but now the problem is when i log out, they're pkp goes back down to 0
    Reply With Quote  
     

  6. #6  
    Banned x eddie x's Avatar
    Join Date
    Feb 2011
    Posts
    528
    Thanks given
    17
    Thanks received
    7
    Rep Power
    0
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Mar 2011
    Posts
    26
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by x eddie x View Post
    Dude, theres absolutely nothing here. its just another person asking for help with pkp.
    Reply With Quote  
     


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: 3
    Last Post: 02-25-2013, 02:26 AM
  2. Replies: 4
    Last Post: 08-24-2009, 02:49 AM
  3. What is the point..
    By iPhoneGuy in forum Suggestions
    Replies: 0
    Last Post: 07-27-2009, 08:59 AM
  4. What's the Point??
    By wh1p in forum Complaints
    Replies: 3
    Last Post: 01-14-2009, 09:44 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
  •