Thread: [PI] Monster Kill Points

Results 1 to 6 of 6
  1. #1 [PI] Monster Kill Points 
    Donator
    Garrett's Avatar
    Join Date
    May 2010
    Age
    29
    Posts
    350
    Thanks given
    45
    Thanks received
    21
    Rep Power
    28
    So, im making up a new minigame for my server and i wanted to make it so whenever you kill a monster you get points for it; just like Godwars ect..

    So, i went in and copied the "appendKillCount"; code because it looked like it would work;

    But it didn't ._.
    Is this the right way to do it?, or is there another way?.

    Code:
    	public void appendMonsterPoints(int i) {
    		Client c = (Client) PlayerHandler.players[npcs[i].killedBy];
    		if (c != null) {
    			int[] mpMonsters = { 73, 74 };
    			for (int j : mpMonsters) {
    				if (npcs[i].npcType == j) {
    					c.zombieCount++;
    					c.zombiePoints += Misc.random(25);
    					c.sendMessage("Zombie Killcount: " + c.zombieCount);		
    					break;
    				}
    			}	
    		}
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Jan 2008
    Age
    31
    Posts
    1,380
    Thanks given
    76
    Thanks received
    384
    Rep Power
    962
    Make sure you're applying this method when a NPC dies.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Banned
    Join Date
    Dec 2010
    Posts
    761
    Thanks given
    86
    Thanks received
    137
    Rep Power
    0
    Simple thing to do thanks for your contribution.
    Reply With Quote  
     

  5. #4  
    Donator
    Garrett's Avatar
    Join Date
    May 2010
    Age
    29
    Posts
    350
    Thanks given
    45
    Thanks received
    21
    Rep Power
    28
    Quote Originally Posted by Ashen Sky View Post
    Make sure you're applying this method when a NPC dies.
    Thank's, i forgot to declare the method in
    Code:
    if (npcs[i].isDead == true) {
    Im so dumb sometimes !.
    Reply With Quote  
     

  6. #5  
    Banned

    Join Date
    Apr 2012
    Posts
    3,225
    Thanks given
    2,554
    Thanks received
    832
    Rep Power
    0
    Quote Originally Posted by Java™ View Post
    Simple thing to do thanks for your contribution.
    What the flying fk?
    Reply With Quote  
     

  7. #6  
    Donator
    Garrett's Avatar
    Join Date
    May 2010
    Age
    29
    Posts
    350
    Thanks given
    45
    Thanks received
    21
    Rep Power
    28
    Quote Originally Posted by Demonhorn View Post
    What the flying fk?
    Yeah, i kind of questioned that myself. x)
    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. getting pkp when monster kill's me
    By Mr. Robot in forum Help
    Replies: 2
    Last Post: 11-05-2011, 08:14 PM
  2. Replies: 5
    Last Post: 10-02-2011, 12:29 AM
  3. [PI] Dying from monster gives PK points
    By ba bye range in forum Help
    Replies: 1
    Last Post: 02-17-2011, 03:55 AM
  4. Need certain slayer to kill a monster.
    By harraj128 in forum Requests
    Replies: 8
    Last Post: 11-27-2009, 06:59 AM
  5. Z508 Dead When Monster Kill
    By PrataKosong in forum Help
    Replies: 2
    Last Post: 08-31-2009, 03:13 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
  •