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?