Thread: Pk Points

Results 1 to 6 of 6
  1. #1 Pk Points 
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,819
    Thanks received
    1,767
    Rep Power
    2438
    Where would I add c.pkPoints += 1 in this:

    Code:
    public void applyDead() {	
    		c.respawnTimer = 15;
    		c.isDead = false;
    		
    		if(c.duelStatus != 6 && c.inDuelArena()) {
    			//c.killerId = c.getCombat().getKillerId(c.playerId);
    			c.killerId = findKiller();
    			Client o = (Client) Server.playerHandler.players[c.killerId];
    			Client y = (Client) Server.playerHandler.players[c.duelingWith];
    			y.sendMessage("You won the duel, and will be able to claim the rewards in a second.");			
    			if(o != null) {
    				if (c.killerId != c.playerId)
    				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;
    		removeAllWindows();
    		removeAllWindows();
    		c.tradeResetNeeded = true;
    	}
    This :
    Code:
    if(o != null) {
    				if (c.killerId != c.playerId)
    				c.playerKilled = c.playerId;
    				if(o.duelStatus == 5) {
    					o.duelStatus++;
    					
    				}
    			}
    Only adds it if you win a duel.
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
     

  2. #2  
    plz dont take my wizard mind bombs Women's Avatar
    Join Date
    Mar 2010
    Posts
    1,881
    Thanks given
    724
    Thanks received
    1,162
    Rep Power
    4763
    onder last broket it work no error. pls:jelly:
     

  3. #3  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,819
    Thanks received
    1,767
    Rep Power
    2438
    Here?

    c.tradeResetNeeded = true;
    }
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
     

  4. #4  
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    32
    Posts
    2,757
    Thanks given
    264
    Thanks received
    1,090
    Rep Power
    4393
    whole point of pk points is to give the person who won the battle a point, so you wouldnt apply it into the death method for the opponent, you would only do this if you was adding a death point.

    you would want to check if the player who is being attacked by the attacker and if he has died, then add a pk point to the attacker.

    soooooo

    Code:
    Client opponent.....
    Client attacker....
    if(oponent.isDead()) {
         attacker.pkpoints += 1;
    }
    this will not work with your source, its an example, so were ever you check if the opponent is dead, add the pk point for the attacker.
     

  5. #5  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,819
    Thanks received
    1,767
    Rep Power
    2438
    I already knew that... I want to know where to add the method that adds pk points.
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
     

  6. #6  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    Quote Originally Posted by Big Sean View Post
    Martin says:
    ill tell u where
    if u stop selling my auto donation system
    Tyluur says:
    Okay.
    Code:
    public void applyDead() {	
    		c.respawnTimer = 15;
    		c.isDead = false;
    		
    		if(c.duelStatus != 6 && c.inDuelArena()) {
    			//c.killerId = c.getCombat().getKillerId(c.playerId);
    			c.killerId = findKiller();
    			Client o = (Client) Server.playerHandler.players[c.killerId];
    			Client y = (Client) Server.playerHandler.players[c.duelingWith];
    			y.sendMessage("You won the duel, and will be able to claim the rewards in a second.");			
    			if(o != null) {
    				if (c.killerId != c.playerId)
    				c.playerKilled = c.playerId;
    				if(o.duelStatus == 5) {
    					o.duelStatus++;
    					
    				}
    			}
    		} else {
    			c.killerId = findKiller();
    			Client o = (Client) Server.playerHandler.players[c.killerId];
    			if(o != null)
    				o.pkPoints += 1;
    		}
    		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();
    		removeAllWindows();
    		c.tradeResetNeeded = true;
    	}
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
     


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: 0
    Last Post: 06-12-2010, 04:06 PM
  2. Npc points!
    By sexyrussian in forum Help
    Replies: 0
    Last Post: 04-22-2010, 10:15 AM
  3. [HELP] pk points [HELP]
    By Trock in forum Help
    Replies: 16
    Last Post: 10-02-2009, 08:01 PM
  4. Replies: 6
    Last Post: 09-23-2009, 04:36 PM
  5. Replies: 6
    Last Post: 07-15-2009, 09:15 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •