Hello, here is my first share. This code is good when you want to do something like when mob lvl is 76 or bigger, exp rate can be smaller.
Iam using L2jarchid.
open com.l2jarchid.gamesserver.model.actor.L2npc.java
Find:
public int getExpReward()
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP);
}
REPLACE IT TO:
public int getExpReward()
{
if (getLevel() > 75)
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * 1);
}
else
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP);
}
}
rateXp * 1 is exp rate you can change it to 20 or etc (number only change)... This code is when mob lvl is 76 or bigger exp rate will be 1... if you want to do intervals like from 52 to 65 - 20 exp , 65-76 - 10 exp 76 or bigger - 5 exp rate ... write this code
public int getExpReward()
{
if (getLevel() > 52 && getLevel() < 66)
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * 20);
}
if (getLevel() > 66 && getLevel() < 75)
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * 10);
}
if (getLevel() > 75)
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * 5);
}
else
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP);
}
}
I think this code will be usefull
Credits to Intrepid,Horus and me ...
P.S. if someone will share code for character exp(when character reach 76lvl then exp for him will count as 1) will be great :)
public int getExpReward()
{
L2Attackable attacker;
if (getLevel() > 75)
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * 5);
}
else
{
double rateXp = getStat().calcStat(Stats.MAX_HP, 1, this, null);
return (int) (getTemplate().rewardExp * rateXp * Config.RATE_XP);
}
}
if some1 can test write feedback (i dont test it, maybe it work, for characters lvl)