12-25-2010, 12:02 AM
Тут наткнулся на диф второй вид чампов гирои
Но немогу подключить его, помогите)
Вот диф
выходит такая ошибка и безконечно
NPC 21111 class not found
Но немогу подключить его, помогите)
Вот диф
диф
Код:
Index: java/com/l2jserver/gameserver/model/actor/L2Attackable.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Attackable.java (revision 4420)
+++ java/com/l2jserver/gameserver/model/actor/L2Attackable.java (working copy)
@@ -70,6 +70,7 @@
private boolean _isRaid = false;
private boolean _isRaidMinion = false;
private boolean _champion = false;
+ private boolean _heromob = false;
/**
* This class contains all AggroInfo of the L2Attackable against the attacker L2Character.
@@ -677,10 +678,16 @@
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
{
- exp *= Config.L2JMOD_CHAMPION_REWARDS;
- sp *= Config.L2JMOD_CHAMPION_REWARDS;
+ exp *= Config.L2JMOD_CHAMPION_REWARDS_XP;
+ sp *= Config.L2JMOD_CHAMPION_REWARDS_SP;
}
+ else if (Config.L2JMOD_HERO_ENABLE && isHeromob())
+ {
+ exp *= Config.L2JMOD_HERO_REWARDS_XP;
+ sp *= Config.L2JMOD_HERO_REWARDS_SP;
+ }
+
// Check for an over-hit enabled strike
if (attacker instanceof L2PcInstance)
{
@@ -814,10 +821,16 @@
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
{
- exp *= Config.L2JMOD_CHAMPION_REWARDS;
- sp *= Config.L2JMOD_CHAMPION_REWARDS;
+ exp *= Config.L2JMOD_CHAMPION_REWARDS_XP;
+ sp *= Config.L2JMOD_CHAMPION_REWARDS_SP;
}
+ else if (Config.L2JMOD_HERO_ENABLE && isHeromob())
+ {
+ exp *= Config.L2JMOD_HERO_REWARDS_XP;
+ sp *= Config.L2JMOD_HERO_REWARDS_SP;
+ }
+
exp *= partyMul;
sp *= partyMul;
@@ -1189,6 +1202,9 @@
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
dropChance *= Config.L2JMOD_CHAMPION_REWARDS;
+ if (Config.L2JMOD_HERO_ENABLE && isHeromob())
+ dropChance *= Config.L2JMOD_HERO_REWARDS;
+
// Round drop chance
dropChance = Math.round(dropChance);
@@ -1234,6 +1250,11 @@
if ((drop.getItemId() == 57 || (drop.getItemId() >= 6360 && drop.getItemId() <= 6362)) && isChampion())
itemCount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS;
+ if (Config.L2JMOD_HERO_ENABLE)
+ // TODO (April 11, 2009): Find a way not to hardcode these values.
+ if ((drop.getItemId() == 57 || (drop.getItemId() >= 6360 && drop.getItemId() <= 6362)) && isHeromob())
+ itemCount *= Config.L2JMOD_HERO_ADENAS_REWARDS;
+
if (itemCount > 0)
return new RewardItem(drop.getItemId(), itemCount);
else if (itemCount == 0 && Config.DEBUG)
@@ -1287,6 +1308,9 @@
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
categoryDropChance *= Config.L2JMOD_CHAMPION_REWARDS;
+
+ if (Config.L2JMOD_HERO_ENABLE && isHeromob())
+ categoryDropChance *= Config.L2JMOD_HERO_REWARDS;
// Round drop chance
categoryDropChance = Math.round(categoryDropChance);
@@ -1324,6 +1348,9 @@
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
dropChance *= Config.L2JMOD_CHAMPION_REWARDS;
+
+ if (Config.L2JMOD_HERO_ENABLE && isHeromob())
+ dropChance *= Config.L2JMOD_HERO_REWARDS;
dropChance = Math.round(dropChance);
@@ -1372,6 +1399,11 @@
if ((drop.getItemId() == 57 || (drop.getItemId() >= 6360 && drop.getItemId() <= 6362)) && isChampion())
itemCount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS;
+ if (Config.L2JMOD_HERO_ENABLE)
+ // TODO (April 11, 2009): Find a way not to hardcode these values.
+ if ((drop.getItemId() == 57 || (drop.getItemId() >= 6360 && drop.getItemId() <= 6362)) && isHeromob())
+ itemCount *= Config.L2JMOD_HERO_ADENAS_REWARDS;
+
if (!Config.MULTIPLE_ITEM_DROP && !ItemTable.getInstance().getTemplate(drop.getItemId()).isStackable() && itemCount > 1)
itemCount = 1;
@@ -1672,6 +1704,27 @@
dropItem(player, item);
}
}
+ // Apply Special Item drop with random(rnd) quantity(qty) for heroes.
+ if (Config.L2JMOD_HERO_ENABLE && isHeromob() && (Config.L2JMOD_HERO_REWARD_LOWER_LVL_ITEM_CHANCE > 0 || Config.L2JMOD_HERO_REWARD_HIGHER_LVL_ITEM_CHANCE > 0))
+ {
+ int heroqty = Rnd.get(Config.L2JMOD_HERO_REWARD_QTY);
+ RewardItem item = new RewardItem(Config.L2JMOD_HERO_REWARD_ID,++heroqty);
+
+ if (player.getLevel() <= getLevel() && (Rnd.get(100) < Config.L2JMOD_HERO_REWARD_LOWER_LVL_ITEM_CHANCE))
+ {
+ if (Config.AUTO_LOOT || isFlying())
+ player.addItem("HeroLoot", item.getItemId(), item.getCount(), this, true); // Give the item(s) to the L2PcInstance that has killed the L2Attackable
+ else
+ dropItem(player, item);
+ }
+ else if (player.getLevel() > getLevel() && (Rnd.get(100) < Config.L2JMOD_HERO_REWARD_HIGHER_LVL_ITEM_CHANCE))
+ {
+ if (Config.AUTO_LOOT || isFlying())
+ player.addItem("HeroLoot", item.getItemId(), item.getCount(), this, true); // Give the item(s) to the L2PcInstance that has killed the L2Attackable
+ else
+ dropItem(player, item);
+ }
+ }
//Instant Item Drop :>
if (getTemplate().dropherbgroup > 0)
@@ -2321,6 +2374,8 @@
{
if (isChampion() && !Config.L2JMOD_CHAMPION_ENABLE_VITALITY)
return false;
+ if (isHeromob() && !Config.L2JMOD_HERO_ENABLE_VITALITY)
+ return false;
return true;
}
@@ -2369,4 +2424,14 @@
{
return _champion;
}
+ public void setHeromob(boolean heromo)
+ {
+ _heromob = heromo;
+ }
+
+ @Override
+ public boolean isHeromob()
+ {
+ return _heromob;
+ }
}
Index: java/com/l2jserver/gameserver/model/actor/stat/CharStat.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/stat/CharStat.java (revision 4420)
+++ java/com/l2jserver/gameserver/model/actor/stat/CharStat.java (working copy)
@@ -306,7 +306,9 @@
return 1;
float bonusAtk = 1;
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
- bonusAtk = Config.L2JMOD_CHAMPION_ATK;
+ bonusAtk = Config.L2JMOD_CHAMPION_MATK;
+ if (Config.L2JMOD_HERO_ENABLE && _activeChar.isHeromob())
+ bonusAtk = Config.L2JMOD_HERO_MATK;
if (_activeChar.isRaid())
bonusAtk *= Config.RAID_MATTACK_MULTIPLIER;
double attack = _activeChar.getTemplate().baseMAtk * bonusAtk;
@@ -363,7 +365,9 @@
return 1;
float bonusSpdAtk = 1;
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
- bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
+ bonusSpdAtk = Config.L2JMOD_CHAMPION_SPD_MATK;
+ if (Config.L2JMOD_HERO_ENABLE && _activeChar.isHeromob())
+ bonusSpdAtk = Config.L2JMOD_HERO_SPD_MATK;
double val = calcStat(Stats.MAGIC_ATTACK_SPEED, _activeChar.getTemplate().baseMAtkSpd * bonusSpdAtk, null, null);
if (val > Config.MAX_MATK_SPEED && !_activeChar.isGM())
val = Config.MAX_MATK_SPEED;
@@ -469,7 +473,9 @@
return 1;
float bonusAtk = 1;
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
- bonusAtk = Config.L2JMOD_CHAMPION_ATK;
+ bonusAtk = Config.L2JMOD_CHAMPION_PATK;
+ if (Config.L2JMOD_HERO_ENABLE && _activeChar.isHeromob())
+ bonusAtk = Config.L2JMOD_HERO_PATK;
if (_activeChar.isRaid())
bonusAtk *= Config.RAID_PATTACK_MULTIPLIER;
return (int) calcStat(Stats.POWER_ATTACK, _activeChar.getTemplate().basePAtk * bonusAtk, target, null);
@@ -526,7 +532,9 @@
return 1;
float bonusAtk = 1;
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
- bonusAtk = Config.L2JMOD_CHAMPION_SPD_ATK;
+ bonusAtk = Config.L2JMOD_CHAMPION_SPD_PATK;
+ if (Config.L2JMOD_HERO_ENABLE && _activeChar.isHeromob())
+ bonusAtk = Config.L2JMOD_HERO_SPD_PATK;
int val = (int) Math.round(calcStat(Stats.POWER_ATTACK_SPEED, _activeChar.getTemplate().basePAtkSpd * bonusAtk, null, null));
return val;
}
Index: java/com/l2jserver/gameserver/ai/L2AttackableAI.java
===================================================================
--- java/com/l2jserver/gameserver/ai/L2AttackableAI.java (revision 4420)
+++ java/com/l2jserver/gameserver/ai/L2AttackableAI.java (working copy)
@@ -293,6 +293,8 @@
if (me.isChampion() && Config.L2JMOD_CHAMPION_PASSIVE)
return false;
+ if (me.isHeromob() && Config.L2JMOD_HERO_PASSIVE)
+ return false;
// Check if the actor is Aggressive
return (me.isAggressive() && GeoData.getInstance().canSeeTarget(me, target));
Index: java/com/l2jserver/gameserver/model/L2Spawn.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Spawn.java (revision 4420)
+++ java/com/l2jserver/gameserver/model/L2Spawn.java (working copy)
@@ -541,6 +541,7 @@
if (mob instanceof L2Attackable)
{
((L2Attackable) mob).setChampion(false);
+ ((L2Attackable) mob).setHeromob(false);
}
if (Config.L2JMOD_CHAMPION_ENABLE)
@@ -552,6 +553,8 @@
&& !getTemplate().isQuestMonster
&& !mob.isRaid()
&& !mob.isRaidMinion()
+ //&& !((L2MonsterInstance) mob).isHeromob()
+ && !mob.isHeromob()
&& Config.L2JMOD_CHAMPION_FREQUENCY > 0
&& mob.getLevel()>=Config.L2JMOD_CHAMP_MIN_LVL
&& mob.getLevel()<=Config.L2JMOD_CHAMP_MAX_LVL
@@ -565,6 +568,29 @@
}
}
+ if (Config.L2JMOD_HERO_ENABLE)
+ {
+ // Set hero on next spawn
+ if
+ (
+ mob instanceof L2MonsterInstance
+ && !getTemplate().isQuestMonster
+ && !mob.isRaid()
+ && !mob.isRaidMinion()
+ && !mob.isChampion()
+ && Config.L2JMOD_HERO_FREQUENCY > 0
+ && mob.getLevel()>=Config.L2JMOD_HERO_MIN_LVL
+ && mob.getLevel()<=Config.L2JMOD_HERO_MAX_LVL
+ && (Config.L2JMOD_HERO_ENABLE_IN_INSTANCES || getInstanceId() == 0)
+ )
+ {
+ int random = Rnd.get(100);
+
+ if (random < Config.L2JMOD_HERO_FREQUENCY)
+ ((L2Attackable) mob).setHeromob(true);
+ }
+ }
+
// Link the L2NpcInstance to this L2Spawn
mob.setSpawn(this);
Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java (revision 4420)
+++ java/com/l2jserver/Config.java (working copy)
@@ -625,17 +625,48 @@
public static int L2JMOD_CHAMP_MIN_LVL;
public static int L2JMOD_CHAMP_MAX_LVL;
public static int L2JMOD_CHAMPION_HP;
+ public static int L2JMOD_CHAMPION_MP;
public static int L2JMOD_CHAMPION_REWARDS;
+ public static int L2JMOD_CHAMPION_REWARDS_XP;
+ public static int L2JMOD_CHAMPION_REWARDS_SP;
public static float L2JMOD_CHAMPION_ADENAS_REWARDS;
public static float L2JMOD_CHAMPION_HP_REGEN;
- public static float L2JMOD_CHAMPION_ATK;
- public static float L2JMOD_CHAMPION_SPD_ATK;
+ public static float L2JMOD_CHAMPION_MP_REGEN;
+ public static float L2JMOD_CHAMPION_PATK;
+ public static float L2JMOD_CHAMPION_MATK;
+ public static float L2JMOD_CHAMPION_SPD_PATK;
+ public static float L2JMOD_CHAMPION_SPD_MATK;
public static int L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE;
public static int L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE;
public static int L2JMOD_CHAMPION_REWARD_ID;
public static int L2JMOD_CHAMPION_REWARD_QTY;
public static boolean L2JMOD_CHAMPION_ENABLE_VITALITY;
public static boolean L2JMOD_CHAMPION_ENABLE_IN_INSTANCES;
+ public static boolean L2JMOD_HERO_ENABLE;
+ public static boolean L2JMOD_HERO_PASSIVE;
+ public static int L2JMOD_HERO_FREQUENCY;
+ public static String L2JMOD_HERO_TITLE;
+ public static int L2JMOD_HERO_MIN_LVL;
+ public static int L2JMOD_HERO_MAX_LVL;
+ public static int L2JMOD_HERO_HP;
+ public static int L2JMOD_HERO_MP;
+ public static int L2JMOD_HERO_REWARDS;
+ public static int L2JMOD_HERO_REWARDS_XP;
+ public static int L2JMOD_HERO_REWARDS_SP;
+ public static float L2JMOD_HERO_ADENAS_REWARDS;
+ public static float L2JMOD_HERO_HP_REGEN;
+ public static float L2JMOD_HERO_MP_REGEN;
+ public static float L2JMOD_HERO_PATK;
+ public static float L2JMOD_HERO_MATK;
+ public static float L2JMOD_HERO_SPD_PATK;
+ public static float L2JMOD_HERO_SPD_MATK;
+ public static int L2JMOD_HERO_REWARD_LOWER_LVL_ITEM_CHANCE;
+ public static int L2JMOD_HERO_REWARD_HIGHER_LVL_ITEM_CHANCE;
+ public static int L2JMOD_HERO_REWARD_ID;
+ public static int L2JMOD_HERO_REWARD_QTY;
+ public static boolean L2JMOD_HERO_ENABLE_VITALITY;
+ public static boolean L2JMOD_HERO_ENABLE_IN_INSTANCES;
+ public static boolean L2JMOD_HERO_AURA;
public static boolean TVT_EVENT_ENABLED;
public static boolean TVT_EVENT_IN_INSTANCE;
public static String TVT_EVENT_INSTANCE_FILE;
@@ -2156,11 +2187,17 @@
L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(L2JModSettings.getProperty("ChampionMinLevel", "20"));
L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(L2JModSettings.getProperty("ChampionMaxLevel", "60"));
L2JMOD_CHAMPION_HP = Integer.parseInt(L2JModSettings.getProperty("ChampionHp", "7"));
+ L2JMOD_CHAMPION_MP = Integer.parseInt(L2JModSettings.getProperty("ChampionMp", "7"));
L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(L2JModSettings.getProperty("ChampionHpRegen", "1."));
+ L2JMOD_CHAMPION_MP_REGEN = Float.parseFloat(L2JModSettings.getProperty("ChampionMpRegen", "1."));
L2JMOD_CHAMPION_REWARDS = Integer.parseInt(L2JModSettings.getProperty("ChampionRewards", "8"));
+ L2JMOD_CHAMPION_REWARDS_XP = Integer.parseInt(L2JModSettings.getProperty("ChampionXPRewards", "8"));
+ L2JMOD_CHAMPION_REWARDS_SP = Integer.parseInt(L2JModSettings.getProperty("ChampionSPRewards", "8"));
L2JMOD_CHAMPION_ADENAS_REWARDS = Float.parseFloat(L2JModSettings.getProperty("ChampionAdenasRewards", "1"));
- L2JMOD_CHAMPION_ATK = Float.parseFloat(L2JModSettings.getProperty("ChampionAtk", "1."));
- L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(L2JModSettings.getProperty("ChampionSpdAtk", "1."));
+ L2JMOD_CHAMPION_PATK = Float.parseFloat(L2JModSettings.getProperty("ChampionPAtk", "1."));
+ L2JMOD_CHAMPION_MATK = Float.parseFloat(L2JModSettings.getProperty("ChampionMAtk", "1."));
+ L2JMOD_CHAMPION_SPD_PATK = Float.parseFloat(L2JModSettings.getProperty("ChampionSpdPAtk", "1."));
+ L2JMOD_CHAMPION_SPD_MATK = Float.parseFloat(L2JModSettings.getProperty("ChampionSpdMAtk", "1."));
L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardLowerLvlItemChance", "0"));
L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardHigherLvlItemChance", "0"));
L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(L2JModSettings.getProperty("ChampionRewardItemID", "6393"));
@@ -2168,6 +2205,32 @@
L2JMOD_CHAMPION_ENABLE_VITALITY = Boolean.parseBoolean(L2JModSettings.getProperty("ChampionEnableVitality", "False"));
L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = Boolean.parseBoolean(L2JModSettings.getProperty("ChampionEnableInInstances", "False"));
+ L2JMOD_HERO_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("HeroEnable", "false"));
+ L2JMOD_HERO_PASSIVE = Boolean.parseBoolean(L2JModSettings.getProperty("HeroPassive", "false"));
+ L2JMOD_HERO_FREQUENCY = Integer.parseInt(L2JModSettings.getProperty("HeroFrequency", "0"));
+ L2JMOD_HERO_TITLE = L2JModSettings.getProperty("HeroTitle", "Hero");
+ L2JMOD_HERO_MIN_LVL = Integer.parseInt(L2JModSettings.getProperty("HeroMinLevel", "25"));
+ L2JMOD_HERO_MAX_LVL = Integer.parseInt(L2JModSettings.getProperty("HeroMaxLevel", "75"));
+ L2JMOD_HERO_HP = Integer.parseInt(L2JModSettings.getProperty("HeroHp", "10"));
+ L2JMOD_HERO_HP_REGEN = Float.parseFloat(L2JModSettings.getProperty("HeroHpRegen", "1."));
+ L2JMOD_HERO_MP = Integer.parseInt(L2JModSettings.getProperty("HeroMp", "10"));
+ L2JMOD_HERO_MP_REGEN = Float.parseFloat(L2JModSettings.getProperty("HeroMpRegen", "1."));
+ L2JMOD_HERO_REWARDS = Integer.parseInt(L2JModSettings.getProperty("HeroRewards", "8"));
+ L2JMOD_HERO_REWARDS_XP = Integer.parseInt(L2JModSettings.getProperty("HeroXPRewards", "8"));
+ L2JMOD_HERO_REWARDS_SP = Integer.parseInt(L2JModSettings.getProperty("HeroSPRewards", "8"));
+ L2JMOD_HERO_ADENAS_REWARDS = Float.parseFloat(L2JModSettings.getProperty("HeroAdenasRewards", "1"));
+ L2JMOD_HERO_PATK = Float.parseFloat(L2JModSettings.getProperty("HeroPAtk", "1.1"));
+ L2JMOD_HERO_MATK = Float.parseFloat(L2JModSettings.getProperty("HeroMAtk", "1.1"));
+ L2JMOD_HERO_SPD_PATK = Float.parseFloat(L2JModSettings.getProperty("HeroSpdPAtk", "1.1"));
+ L2JMOD_HERO_SPD_MATK = Float.parseFloat(L2JModSettings.getProperty("HeroSpdMAtk", "1.1"));
+ L2JMOD_HERO_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(L2JModSettings.getProperty("HeroRewardLowerLvlItemChance", "0"));
+ L2JMOD_HERO_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(L2JModSettings.getProperty("HeroRewardHigherLvlItemChance", "0"));
+ L2JMOD_HERO_REWARD_ID = Integer.parseInt(L2JModSettings.getProperty("HeroRewardItemID", "6393"));
+ L2JMOD_HERO_REWARD_QTY = Integer.parseInt(L2JModSettings.getProperty("HeroRewardItemQty", "1"));
+ L2JMOD_HERO_ENABLE_VITALITY = Boolean.parseBoolean(L2JModSettings.getProperty("HeroEnableVitality", "False"));
+ L2JMOD_HERO_ENABLE_IN_INSTANCES = Boolean.parseBoolean(L2JModSettings.getProperty("HeroEnableInInstances", "False"));
+ L2JMOD_HERO_AURA = Boolean.parseBoolean(L2JModSettings.getProperty("HeroAura", "false"));
+
TVT_EVENT_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("TvTEventEnabled", "false"));
TVT_EVENT_IN_INSTANCE = Boolean.parseBoolean(L2JModSettings.getProperty("TvTEventInInstance", "false"));
TVT_EVENT_INSTANCE_FILE = L2JModSettings.getProperty("TvTEventInstanceFile", "coliseum.xml");
@@ -3036,17 +3099,46 @@
else if (pName.equalsIgnoreCase("ChampionMinLevel")) L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionMaxLevel")) L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionHp")) L2JMOD_CHAMPION_HP = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("ChampionMp")) L2JMOD_CHAMPION_MP = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionHpRegen")) L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("ChampionMpRegen")) L2JMOD_CHAMPION_MP_REGEN = Float.parseFloat(pValue);
else if (pName.equalsIgnoreCase("ChampionRewards")) L2JMOD_CHAMPION_REWARDS = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("ChampionXPRewards")) L2JMOD_CHAMPION_REWARDS_XP = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("ChampionSPRewards")) L2JMOD_CHAMPION_REWARDS_SP = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionAdenasRewards")) L2JMOD_CHAMPION_ADENAS_REWARDS = Float.parseFloat(pValue);
- else if (pName.equalsIgnoreCase("ChampionAtk")) L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue);
- else if (pName.equalsIgnoreCase("ChampionSpdAtk")) L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("ChampionPAtk")) L2JMOD_CHAMPION_PATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("ChampionSpdPAtk")) L2JMOD_CHAMPION_SPD_PATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("ChampionMAtk")) L2JMOD_CHAMPION_MATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("ChampionSpdMAtk")) L2JMOD_CHAMPION_SPD_MATK = Float.parseFloat(pValue);
else if (pName.equalsIgnoreCase("ChampionRewardLowerLvlItemChance")) L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionRewardHigherLvlItemChance")) L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionRewardItemID")) L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionRewardItemQty")) L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("ChampionEnableInInstances")) L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = Boolean.parseBoolean(pValue);
+ else if (pName.equalsIgnoreCase("HeroEnable")) L2JMOD_HERO_ENABLE = Boolean.parseBoolean(pValue);
+ else if (pName.equalsIgnoreCase("HeroFrequency")) L2JMOD_HERO_FREQUENCY = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroMinLevel")) L2JMOD_HERO_MIN_LVL = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroMaxLevel")) L2JMOD_HERO_MAX_LVL = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroHp")) L2JMOD_HERO_HP = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroHpRegen")) L2JMOD_HERO_HP_REGEN = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("HeroMp")) L2JMOD_HERO_MP = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroMpRegen")) L2JMOD_HERO_MP_REGEN = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("HeroRewards")) L2JMOD_HERO_REWARDS = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroXPRewards")) L2JMOD_HERO_REWARDS_XP = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroSPRewards")) L2JMOD_HERO_REWARDS_SP = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroAdenasRewards")) L2JMOD_HERO_ADENAS_REWARDS = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("HeroPAtk")) L2JMOD_HERO_PATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("HeroSpdPAtk")) L2JMOD_HERO_SPD_PATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("HeroMAtk")) L2JMOD_HERO_MATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("HeroSpdMAtk")) L2JMOD_HERO_SPD_MATK = Float.parseFloat(pValue);
+ else if (pName.equalsIgnoreCase("HeroRewardLowerLvlItemChance")) L2JMOD_HERO_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroRewardHigherLvlItemChance")) L2JMOD_HERO_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroRewardItemID")) L2JMOD_HERO_REWARD_ID = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroRewardItemQty")) L2JMOD_HERO_REWARD_QTY = Integer.parseInt(pValue);
+ else if (pName.equalsIgnoreCase("HeroEnableInInstances")) L2JMOD_HERO_ENABLE_IN_INSTANCES = Boolean.parseBoolean(pValue);
+ else if (pName.equalsIgnoreCase("HeroAura")) L2JMOD_HERO_AURA = Boolean.parseBoolean(pValue);
+
else if (pName.equalsIgnoreCase("AllowWedding")) L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue);
else if (pName.equalsIgnoreCase("WeddingPrice")) L2JMOD_WEDDING_PRICE = Integer.parseInt(pValue);
else if (pName.equalsIgnoreCase("WeddingPunishInfidelity")) L2JMOD_WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(pValue);
Index: java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java
===================================================================
--- java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java (revision 4420)
+++ java/com/l2jserver/gameserver/network/serverpackets/AbstractNpcInfo.java (working copy)
@@ -112,6 +112,8 @@
if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())
_title = (Config.L2JMOD_CHAMP_TITLE); // On every subclass
+ else if (Config.L2JMOD_HERO_ENABLE && cha.isHeromob())
+ _title = (Config.L2JMOD_HERO_TITLE); // On every subclass
else if (cha.getTemplate().serverSideTitle)
_title = cha.getTemplate().title; // On every subclass
else
@@ -183,14 +185,19 @@
writeD(0x00); //pvp flag
writeD(0x00); // karma
- writeD(_npc.getAbnormalEffect()); // C2
+ int abnormal = _npc.getAbnormalEffect();
+ if (Config.L2JMOD_HERO_ENABLE && _npc.isHeromob())
+ abnormal |= AbnormalEffect.VITALITY.getMask();
+ else
+ abnormal &= ~AbnormalEffect.VITALITY.getMask();
+ writeD(abnormal); // C2
writeD(_clanId); //clan id
writeD(_clanCrest); //crest id
writeD(_allyId); // ally id
writeD(_allyCrest); // all crest
writeC(_npc.isFlying() ? 2 : 0); // C2
writeC(0x00); // title color 0=client
-
+
writeF(_collisionRadius);
writeF(_collisionHeight);
writeD(_enchantEffect); // C4
Index: java/com/l2jserver/gameserver/model/actor/instance/L2MinionInstance.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/instance/L2MinionInstance.java (revision 4420)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2MinionInstance.java (working copy)
@@ -67,6 +67,7 @@
if (getLeader().isRaid())
{
setChampion(false);
+ setHeromob(false);
setIsRaidMinion(true);
}
// Notify Leader that Minion has Spawned
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties (revision 4420)
+++ java/config/l2jmods.properties (working copy)
@@ -2,7 +2,7 @@
# L2JMODS - non-retail-like systems that have been integrated into the L2J project.
# Be warned that there may be no support for these mods beyond the original author's assistance.
# ---------------------------------------------------------------------------
-# Champion mobs - Turn random mobs into Champions
+# Champion & Hero mobs - Turn random mobs into Champions or Heroes
# ---------------------------------------------------------------------------
# Enable/Disable Champion Mob System.
ChampionEnable = False
@@ -12,12 +12,15 @@
# To set all champion mobs to Passive, set True.
ChampionPassive = False
-# % chance for a mob to became champion (0 to disable).
+# % chance for a mob to became champion.
ChampionFrequency = 5
# Title of all Champion Mobs.
ChampionTitle = Champion
+# Aura for Champion Mobs.
+ChampAura = False
+
# Min and max levels allowed for a mob to be a Champion mob.
ChampionMinLevel = 20
ChampionMaxLevel = 70
@@ -25,21 +28,39 @@
# Hp multiplier for Champion mobs.
ChampionHp = 8
+# Mp multiplier for Champion mobs.
+ChampionMp = 8
+
# Hp Regen Multiplier for Champion mobs.
ChampionHpRegen = 1.0
+# Mp Regen Multiplier for Champion mobs.
+ChampionMpRegen = 1.0
+
# Standard rewards multiplier for Champion mobs.
ChampionRewards = 8
+# Standard exp rewards multiplier for Champion mobs.
+ChampionXPRewards = 8
+
+# Standard sp rewards multiplier for Champion mobs.
+ChampionSPRewards = 8
+
# Adena & Seal Stone rewards multiplier for Champion mobs.
ChampionAdenasRewards = 1.0
-# P. Attack and M. Attack bonus for Champion mobs.
-ChampionAtk = 1.0
+# P. Attack bonus for Champion mobs.
+ChampionPAtk = 1.0
-# Physical/Magical Attack Speed bonus for Champion mobs.
-ChampionSpdAtk = 1.0
+# M. Attack bonus for Champion mobs.
+ChampionMAtk = 1.0
+# Physical Attack Speed bonus for Champion mobs.
+ChampionSpdPAtk = 1.0
+
+# Magical Attack Speed bonus for Champion mobs.
+ChampionSpdMAtk = 1.0
+
# Specified reward item ID
ChampionRewardItemID = 6393
@@ -52,7 +73,7 @@
# % Chance to obtain a specified reward item from a LOWER lvl Champion mob.
ChampionRewardHigherLvlItemChance = 0
-# Do you want to enable the vitality calculation when killing champion mobs?
+# Do you want to enable the vitality calculation when killing Champions mobs?
# Be aware that it can lead to huge unbalance on your server, your rate for that mob would
# then be "mobXP x serverRate x vitalityRate x championXpRate
# Notes:
@@ -64,6 +85,87 @@
# Default = False
ChampionEnableInInstances = False
+# Enable/Disable Hero Mob System.
+HeroEnable = False
+
+# Force Heroes mobs to be passive?
+# To leave elite mobs to default/Agressive, set to False.
+# To set all heroes mobs to Passive, set True.
+HeroPassive = False
+
+# % chance for a mob to became hero.
+HeroFrequency = 2
+
+# Title of all Hero Mobs.
+HeroTitle = Hero
+
+# Aura for Hero Mobs.
+HeroAura = True
+
+# Min and max levels allowed for a mob to be a Hero mob.
+HeroMinLevel = 25
+HeroMaxLevel = 75
+
+# Hp multiplier for Heroes mobs.
+HeroHp = 10
+
+# Mp multiplier for Heroes mobs.
+HeroHp = 10
+
+# Hp Regen Multiplier for Heroes mobs.
+HeroHpRegen = 1.1
+
+# Mp Regen Multiplier for Heroes mobs.
+HeroHpRegen = 1.1
+
+# Standard rewards multiplier for Heroes mobs.
+HeroRewards = 10
+
+# Standard exp rewards multiplier for Heroes mobs.
+HeroXPRewards = 10
+
+# Standard sp rewards multiplier for Heroes mobs.
+HeroSPRewards = 10
+
+# Adena & Seal Stone rewards multiplier for Heroes mobs.
+HeroAdenasRewards = 1.0
+
+# P. Attack bonus for Heroes mobs.
+HeroPAtk = 1.1
+
+# M. Attack bonus for Heroes mobs.
+HeroMAtk = 1.1
+
+# Physical Attack Speed bonus for Heroes mobs.
+HeroSpdPAtk = 1.1
+
+# Magical Attack Speed bonus for Heroes mobs.
+HeroSpdMAtk = 1.1
+
+# Specified reward item ID
+HeroRewardItemID = 6393
+
+# The amount of the specified reward a player will receive if they are awarded the item.
+HeroRewardItemQty = 1
+
+# % Chance to obtain a specified reward item from a HIGHER lvl Hero mob.
+HeroRewardLowerLvlItemChance = 0
+
+# % Chance to obtain a specified reward item from a LOWER lvl Hero mob.
+HeroRewardHigherLvlItemChance = 0
+
+# Do you want to enable the vitality calculation when killing Heroes mobs?
+# Be aware that it can lead to huge unbalance on your server, your rate for that mob would
+# then be "mobXP x serverRate x vitalityRate x heroXpRate
+# Notes:
+# Works only if EnableVitality = True
+# Default: False
+HeroEnableVitality = False
+
+# Enable spawning of the heroes in instances
+# Default = False
+HeroEnableInInstances = False
+
# ---------------------------------------------------------------------------
# Wedding System (by evill33t)
# ---------------------------------------------------------------------------
Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java (revision 4420)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java (working copy)
@@ -6842,6 +6842,10 @@
getStatus().reduceHp(i/Config.L2JMOD_CHAMPION_HP, attacker, awake, isDOT, false);
else
getStatus().reduceHp(i, attacker, awake, isDOT, false);
+ if (Config.L2JMOD_HERO_ENABLE && isHeromob() && Config.L2JMOD_HERO_HP != 0)
+ getStatus().reduceHp(i/Config.L2JMOD_HERO_HP, attacker, awake, isDOT, false);
+ else
+ getStatus().reduceHp(i, attacker, awake, isDOT, false);
}
public void reduceCurrentMp(double i) { getStatus().reduceMp(i); }
public void removeStatusListener(L2Character object) { getStatus().removeStatusListener(object); }
@@ -6864,6 +6868,11 @@
return false;
}
+ public boolean isHeromob()
+ {
+ return false;
+ }
+
/**
* Check player max buff count
* @return max buff count
Index: java/com/l2jserver/gameserver/skills/Formulas.java
===================================================================
--- java/com/l2jserver/gameserver/skills/Formulas.java (revision 4420)
+++ java/com/l2jserver/gameserver/skills/Formulas.java (working copy)
@@ -1009,6 +1009,8 @@
if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())
hpRegenMultiplier *= Config.L2JMOD_CHAMPION_HP_REGEN;
+ if (Config.L2JMOD_HERO_ENABLE && cha.isHeromob())
+ hpRegenMultiplier *= Config.L2JMOD_HERO_HP_REGEN;
if (cha instanceof L2PcInstance)
{
NPC 21111 class not found