Thread: Help

Results 1 to 2 of 2
  1. #1 Help 
    Registered Member
    Join Date
    Feb 2011
    Posts
    220
    Thanks given
    1
    Thanks received
    12
    Rep Power
    5
    I'm making magepoints, and different npc's give you different amount of points.
    But once I kill a NPC all the magepoints are combining. How can I separate so the NPC would give the right amount of points and so on.. and it gives slayer exp for each one.
    Every If statement is a new NPC

    Code:
    public void dropItems(int i) {
    		Client c = (Client) PlayerHandler.players[npcs[i].killedBy];
    		if (c != null) {
    				if (npcs[i].npcType == 1648);
    					c.getPA().addSkillXP(npcs[i].MaxHP * Config.SLAYER_EXPERIENCE,
    							18);
    					c.magePoints += 2;
    					if (npcs[i].npcType == 1612);
    					c.getPA()
    					.addSkillXP(
    							(npcs[i].MaxHP * 10)
    									* Config.SLAYER_EXPERIENCE, 18);
    					c.magePoints += 4;
    					if (npcs[i].npcType == 1643);
    						c1.getPA()
    						.addSkillXP(
    								(npcs[i].MaxHP * 13)
    										* Config.SLAYER_EXPERIENCE, 18);
    						c1.magePoints += 5;
    						if (npcs[i].npcType == 1618);
    							c1.getPA()
    							.addSkillXP(
    									(npcs[i].MaxHP * 15)
    											* Config.SLAYER_EXPERIENCE, 18);
    							c1.magePoints += 7;
    							if (npcs[i].npcType == 1610);
    					c1.getPA()
    					.addSkillXP(
    							(npcs[i].MaxHP * 12)
    									* Config.SLAYER_EXPERIENCE, 18);
    					c1.magePoints += 6;
    					if (npcs[i].npcType == 2783);
    						c1.getPA()
    						.addSkillXP(
    								(npcs[i].MaxHP * 20)
    										* Config.SLAYER_EXPERIENCE, 18);
    						c1.magePoints += 12;
    						if (npcs[i].npcType == 1613);
    					c1.getPA()
    					.addSkillXP(
    							(npcs[i].MaxHP * 14)
    									* Config.SLAYER_EXPERIENCE, 18);
    					c1.magePoints += 8;
    					if (npcs[i].npcType == 1615);
    					c1.getPA()
    					.addSkillXP(
    							(npcs[i].MaxHP * 16)
    									* Config.SLAYER_EXPERIENCE, 18);
    					c1.magePoints += 10;
    Can anyone fix it?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Feb 2011
    Posts
    220
    Thanks given
    1
    Thanks received
    12
    Rep Power
    5
    Bumpp pleaseee
    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
  •