Thread: Help me!!!

Results 1 to 5 of 5
  1. #1 Help me!!! 
    Registered Member
    Core's Avatar
    Join Date
    Sep 2007
    Posts
    4,194
    Thanks given
    11
    Thanks received
    393
    Rep Power
    1985
    Barrows doesn't work. It is the getkiller method, it returns the player null for no reason. It is the same exact method that works in any other server. Here is the methods.

    Code:
    Client plr = (Client) Server.playerHandler.players[npcs[i].getKillerId()];
    						if(plr != null) {
    							if (npcs[i].npcType == 2025 || npcs[i].npcType == 2026 || npcs[i].npcType == 2027 || npcs[i].npcType == 2028 || npcs[i].npcType == 2029 || npcs[i].npcType == 2030) {
    								plr.BarrowskillCount += 1;
    							}
    Code:
    	public int getKiller() {
    		int Killer = 0;
    		int Count = 0;
    		for (int i = 1; i < Config.MAX_PLAYERS; i++) {
    			if (false) {
    				Killer = i;
    				Count = 1;
    			} else {
    				if (Killing[i] > Killing[Killer]) {
    					Killer = i;
    					Count = 1;
    				} else if (Killing[i] == Killing[Killer]) {
    					Count++;
    				}
    			}
    		}
    		return Killer;
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member
    minutes's Avatar
    Join Date
    Apr 2008
    Posts
    1,926
    Thanks given
    2
    Thanks received
    19
    Rep Power
    465
    where you added this?

    Client plr = (Client) Server.playerHandler.players[npcs[i].getKillerId()];
    if(plr != null) {
    if (npcs[i].npcType == 2025 || npcs[i].npcType == 2026 || npcs[i].npcType == 2027 || npcs[i].npcType == 2028 || npcs[i].npcType == 2029 || npcs[i].npcType == 2030) {
    plr.BarrowskillCount += 1;
    }



    click banner to join gtracer!
    Reply With Quote  
     

  3. #3  
    Registered Member
    Core's Avatar
    Join Date
    Sep 2007
    Posts
    4,194
    Thanks given
    11
    Thanks received
    393
    Rep Power
    1985
    In process where npcs die
    Reply With Quote  
     

  4. #4  
    Registered Member
    ViperSniper's Avatar
    Join Date
    Apr 2007
    Age
    30
    Posts
    2,417
    Thanks given
    367
    Thanks received
    82
    Rep Power
    976
    add in monster drop method.
    :indeed:
    Reply With Quote  
     

  5. #5  
    Registered Member
    Core's Avatar
    Join Date
    Sep 2007
    Posts
    4,194
    Thanks given
    11
    Thanks received
    393
    Rep Power
    1985
    it has nothing to do with the placement. It has to do with the getkiller method. It returns null for no reason.
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •