Hi, I am not sure how to make it so each npc has their own exp gain. My server source that I am using currently gives you 100 exp no matter what the npc is. Does anyone know how to edit it to so different npcs have different exp gains? Here is the current code:

Code:
public int CombatExpRate = 1;
	public boolean AttackNPC() {
		int hitDiff = 0;
		hitDiff = misc.random(playerMaxHit);
		Totals[0] += hitDiff;
			if (actionTimer <= 1) {
				if (server.npcHandler.npcs[attacknpc].IsDead == true) {
					ResetAttackNPC();
					resetAnimation();
				} else {
					actionAmount++;
					actionTimer = 7;
					animation(playerSEA);
					if ((server.npcHandler.npcs[attacknpc].HP - hitDiff) < 0)
{
					hitDiff = server.npcHandler.npcs[attacknpc].HP;
					}
					server.npcHandler.npcs[attacknpc].hitDiff += hitDiff;
					server.npcHandler.npcs[attacknpc].Killing[playerId] += hitDiff;
					server.npcHandler.npcs[attacknpc].updateRequired = true;
					server.npcHandler.npcs[attacknpc].hitUpdateRequired = true;
					server.npcHandler.npcs[attacknpc].IsUnderAttack = true;
					double TotalExp = 0;
					if (FightType != 3) {
						TotalExp = (double)(100);
						TotalExp = (double)(TotalExp * CombatExpRate);
						addSkillXP((int)(TotalExp), SkillID);
					} else {
						TotalExp = (double)(30.33);
						TotalExp = (double)(TotalExp * CombatExpRate);
						addSkillXP((int)(TotalExp), playerAttack);
						addSkillXP((int)(TotalExp), playerDefence);
						addSkillXP((int)(TotalExp), playerStrength);
					}
					TotalExp = (double)(100);
					TotalExp = (double)(TotalExp * CombatExpRate);
					addSkillXP((int)(TotalExp), playerHitpoints);
				}
				return true;
		}
		return false;
	}
I tryed to edit it my self but it never really worked how it should. If anyone can explain on how to edit it that would be great.