Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Curse Raid EDIT

Iniciado por Swarlog, Ago 19, 2022, 01:00 AM

Tema anterior - Siguiente tema

Swarlog

He creado este script para el que quiera cambiar la diferencia de nivel por defecto al matar un raid. Por defecto es 8 niveles, si eres 8 niveles superior al raid el curse (penalización) te entra. Con este parche podemos cambiar el nivel, por ejemplo a 10 niveles de diferencia como margen. Recomendado para servidores H5, ya os raids se quedan contos en esa crónica.

Index: dist/game/config/NPC.properties
===================================================================
--- dist/game/config/NPC.properties (revision 9879)
+++ dist/game/config/NPC.properties (working copy)
@@ -170,6 +170,7 @@
 # Caution: drop will be reduced or even absent if DeepBlue drop rules enabled. 
 # Default: False
 DisableRaidCurse = False
+RaidCurseLevel = 8
 
Index: Config.java
===================================================================
--- Config.java (revision 9879)
+++ Config.java (working copy)
@@ -815,6 +825,7 @@
    public static float RAID_MIN_RESPAWN_MULTIPLIER;
    public static float RAID_MAX_RESPAWN_MULTIPLIER;
    public static boolean RAID_DISABLE_CURSE;
+   public static int RAID_CURSE_LEVEL;
    public static int RAID_CHAOS_TIME;
    public static int GRAND_CHAOS_TIME;
    public static int MINION_CHAOS_TIME;
 
@@ -2034,6 +2098,7 @@
            }
           
            RAID_DISABLE_CURSE = NPC.getBoolean("DisableRaidCurse", false);
+           RAID_CURSE_LEVEL = NPC.getInt("RaidCurseLevel", 8);
            RAID_CHAOS_TIME = NPC.getInt("RaidChaosTime", 10);
            GRAND_CHAOS_TIME = NPC.getInt("GrandChaosTime", 10);
            MINION_CHAOS_TIME = NPC.getInt("MinionChaosTime", 10);
 
Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java  (revision 9879)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java  (working copy)
@@ -4922,7 +4922,7 @@
        // than 8 levels lower
        if (target.isRaid() && target.giveRaidCurse() && !Config.RAID_DISABLE_CURSE)
        {
-           if (getLevel() > (target.getLevel() + 8))
+           if (getLevel() > (target.getLevel() + Config.RAID_CURSE_LEVEL))
            {
                Skill skill = CommonSkill.RAID_CURSE2.getSkill();
               
@@ -5843,7 +5843,7 @@
                    targetsCastTarget = target.getAI().getCastTarget();
                }
               
-               if (!Config.RAID_DISABLE_CURSE && ((target.isRaid() && target.giveRaidCurse() && (getLevel() > (target.getLevel() + 8))) || (!skill.isBad() && (targetsAttackTarget != null) && targetsAttackTarget.isRaid() && targetsAttackTarget.giveRaidCurse() && targetsAttackTarget.getAttackByList().contains(target) && (getLevel() > (targetsAttackTarget.getLevel() + 8))) || (!skill.isBad() && (targetsCastTarget != null) && targetsCastTarget.isRaid() && targetsCastTarget.giveRaidCurse() && targetsCastTarget.getAttackByList().contains(target) && (getLevel() > (targetsCastTarget.getLevel() + 8)))))
+               if (!Config.RAID_DISABLE_CURSE && ((target.isRaid() && target.giveRaidCurse() && (getLevel() > (target.getLevel() + Config.RAID_CURSE_LEVEL))) || (!skill.isBad() && (targetsAttackTarget != null) && targetsAttackTarget.isRaid() && targetsAttackTarget.giveRaidCurse() && targetsAttackTarget.getAttackByList().contains(target) && (getLevel() > (targetsAttackTarget.getLevel() + Config.RAID_CURSE_LEVEL))) || (!skill.isBad() && (targetsCastTarget != null) && targetsCastTarget.isRaid() && targetsCastTarget.giveRaidCurse() && targetsCastTarget.getAttackByList().contains(target) && (getLevel() > (targetsCastTarget.getLevel() + Config.RAID_CURSE_LEVEL)))))
                {
                    final CommonSkill curse = skill.isMagic() ? CommonSkill.RAID_CURSE : CommonSkill.RAID_CURSE2;
                    Skill curseSkill = curse.getSkill();