Noticias:

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

Menú Principal

Efecto de Camara al Morir

Iniciado por Swarlog, Sep 01, 2022, 12:07 AM

Tema anterior - Siguiente tema

Swarlog



index: config/functions/pvp.properties
===================================================================
AntiFarmPdefDiff = False
AntiFarmMaxPdefDiff = 300
# You must active AntiFarmEnabled = True to enable this mod.
# AntiFarm if player has Patk < AntiFarmMaxPatkDiff.
AntiFarmPatkDiff = False
AntiFarmMaxPatkDiff = 300
# If true summons don't give any reward (avoid pvp/pk farm)
AntiFarmSummon = False
+
+#====================================
+# Camera effect on die
+#====================================
+# Effect enabled?
+CameraEnabled = True
+# Distance Camera <-> Killer
+CameraDistance = 10
+# Point of view to the killer
+# North = 90, South = 270, East = 0, West = 180
+CameraPOV = 0
+# Angle of view to the killer
+# angle > 0: looks up, angle < 0: looks down
+CameraAngle = 5
+# Animation speed (milliseconds)
+CameraSpeed = 3000
+# Animation delay
+CameraDuration = 3000


Index: head-src/com/l2jfrozen/Config.java
===================================================================
    public static boolean ANTI_FARM_PDEF_DIFF_ENABLED;
    public static int ANTI_FARM_MAX_PDEF_DIFF;
    public static boolean ANTI_FARM_PATK_DIFF_ENABLED;
    public static int ANTI_FARM_MAX_PATK_DIFF;
    public static boolean ANTI_FARM_PARTY_ENABLED;
    public static boolean ANTI_FARM_IP_ENABLED;
    public static boolean ANTI_FARM_SUMMON;

+    // Camera Effect
+    public static boolean CAMERA_ENABLED;
+    public static int CAMERA_DISTANCE;
+    public static int CAMERA_POV;
+    public static int CAMERA_ANGLE;
+    public static int CAMERA_SPEED;
+    public static int CAMERA_DELAY;
+
    // ============================================================
    public static void loadPvpConfig()
    {
        final String PVP = FService.PVP_CONFIG_FILE;
       
        try
        {
            final Properties pvpSettings = new Properties();
            final InputStream is = new FileInputStream(new File(PVP));
            pvpSettings.load(is);
            is.close();
           
            /* KARMA SYSTEM */
            KARMA_MIN_KARMA = Integer.parseInt(pvpSettings.getProperty("MinKarma", "240"));
           
           
FEW LINES BELOW >>>>>>>>>>>>>>>>>>>>>>>
           
           
            ANTI_FARM_PATK_DIFF_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmPatkDiff", "False"));
            ANTI_FARM_MAX_PATK_DIFF = Integer.parseInt(pvpSettings.getProperty("AntiFarmMaxPatkDiff", "300"));
            ANTI_FARM_PARTY_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmParty", "False"));
            ANTI_FARM_IP_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmIP", "False"));
            ANTI_FARM_SUMMON = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmSummon", "False"));
+
+            CAMERA_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("CameraEnabled", "false"));
+            CAMERA_DISTANCE = Integer.parseInt(pvpSettings.getProperty("CameraDistance", "10"));
+            CAMERA_POV = Integer.parseInt(pvpSettings.getProperty("CameraPOV", "0"));
+            CAMERA_ANGLE = Integer.parseInt(pvpSettings.getProperty("CameraAngle", "5"));
+            CAMERA_SPEED = Integer.parseInt(pvpSettings.getProperty("CameraSpeed", "3000"));
+            CAMERA_DELAY = Integer.parseInt(pvpSettings.getProperty("CameraDuration", "3000"));
        }
        catch (final Exception e)
        {
            e.printStackTrace();
            throw new Error("Failed to Load " + PVP + " File.");
        }
    }
   
    // ============================================================

Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
import com.l2jfrozen.gameserver.network.serverpackets.ShortCutInit;
import com.l2jfrozen.gameserver.network.serverpackets.SkillCoolTime;
import com.l2jfrozen.gameserver.network.serverpackets.SkillList;
import com.l2jfrozen.gameserver.network.serverpackets.Snoop;
import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
+import com.l2jfrozen.gameserver.network.serverpackets.SpecialCamera;
import com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate;
import com.l2jfrozen.gameserver.network.serverpackets.StopMove;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.network.serverpackets.TargetSelected;


FEW LINES BELOW>>>>>>>>>>>>>>>>>



                            }
                        }
                        else
                        {
                            onDieUpdateKarma(); // Update karma if delevel is not allowed
                        }
                    }
                }
            }
+               if (Config.CAMERA_ENABLED && !isPhoenixBlessed())
+     {
+         sendPacket(new SpecialCamera(killer.getObjectId(), Config.CAMERA_DISTANCE, Config.CAMERA_POV, Config.CAMERA_ANGLE, Config.CAMERA_SPEED, Config.CAMERA_DELAY));
+     }
        }
       
        // Unsummon Cubics
        unsummonAllCubics();
       
        if (_forceBuff != null)
        {
            abortCast();
        }
       
        for (final L2Character character : getKnownList().getKnownCharacters())
            if (character.getTarget() == this)
            {
                if (character.isCastingNow())
                    character.abortCast();
            }
       
        if (isInParty() && getParty().isInDimensionalRift())
        {
            getParty().getDimensionalRift().getDeadMemberList().add(this);
        }


Creditos: tessa