A Project for Chronicle 4 based on L2JServer.


    could someone adapt this for our project?

    Share
    avatar
    jamaica

    Posts : 135
    Join date : 2013-02-24
    Age : 28
    Location : Romania

    could someone adapt this for our project?

    Post  jamaica on 14th October 2013, 12:33

    Code:
    Index: config/mods/customs.properties
    ===================================================================
    --- config/mods/customs.properties (revision 43)
    +++ config/mods/customs.properties (revision 44)
    @@ -77,4 +77,9 @@
     WarriorTitleSystemEnabled = False
     MageTitleSystemEnabled = False
    +
    +#-------------------------------------------------------------
    +# Section: Custom Fight Stats Title System
    +#-------------------------------------------------------------
    +AllowFightStatsSystem = False
     
     #-------------------------------------------------------------
    Index: /java/com/l2jarchid/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- /java/com/l2jarchid/gameserver/model/actor/instance/L2PcInstance.java (revision 32)
    +++ /java/com/l2jarchid/gameserver/model/actor/instance/L2PcInstance.java (revision 44)
    @@ -5453,4 +5453,7 @@
           broadcastUserInfo();
     
    +      FightStatsSystem(getPvpKills(), getPkKills());
    +      broadcastUserInfo();
    +      
           // Update the character's name color if they reached any of the 5 PvP
           // levels.
    @@ -5463,4 +5466,12 @@
        }
     
    +   public void FightStatsSystem(int pvpKillAmount, int pkKillAmount)
    +   {
    +      if (L2Config.ALLOW_FIGHT_STATS_SYSTEM)
    +      {
    +         activeChar.setTitle("PvPs:"+getPvpKills()+ "| PKs:"+getPkKills()+"");
    +      }
    +   }
    +   
        public void PvpReward() {
           if (L2Config.PVP_REWARD_ENABLED) {
    Index: //java/com/l2jarchid/L2Config.java
    ===================================================================
    --- /java/com/l2jarchid/L2Config.java (revision 41)
    +++ /java/com/l2jarchid/L2Config.java (revision 44)
    @@ -1346,4 +1346,5 @@
        public static int          SIDE_BLOW_SUCCESS;
        public static boolean      ENABLE_MODIFY_SKILL_DURATION;
    +    public static boolean      ALLOW_FIGHT_STATS_SYSTEM;
        //=====================================================================================
        public static FastList<Integer>   ALLOWED_SKILLS_LIST      = new FastList<Integer>();
    @@ -1597,5 +1598,5 @@
                ARCHID_BACK_TIMER = Integer.parseInt(CustomMod.getProperty("BackTimer", "30"));
                ARCHID_AWAY_PEACE_ZONE = Boolean.parseBoolean(CustomMod.getProperty("AwayOnlyInPeaceZone", "False"));
    -
    +           ALLOW_FIGHT_STATS_SYSTEM = Boolean.parseBoolean(CustomMod.getProperty("AllowFightStatsSystem", "False"));
                CHAR_TITLE = Boolean.parseBoolean(CustomMod.getProperty("CharTitle", "false"));
               ADD_CHAR_TITLE = CustomMod.getProperty("CharAddTitle", "Welcome");
    avatar
    mystogan64

    Posts : 51
    Join date : 2013-10-04

    Re: could someone adapt this for our project?

    Post  mystogan64 on 14th October 2013, 13:03

    net.sf.l2j.gameserver.model.actor.L2PcInstance.java
    Code:

    if (broadcastType == 2)
     {
     broadcastUserInfo();
    + FightStatsSystem(getPvpKills(), getPkKills());
     }
     }


    + public void FightStatsSystem(int pvpKillAmount, int pkKillAmount)
    + {
    + if (Config.ALLOW_FIGHT_STATS_SYSTEM)
    + {
    + setTitle("PvPs:" + getPvpKills() + "| PKs:" + getPkKills() + "");
    + }
    + }
    net.sf.l2j.Config.java
    Code:

    public static boolean ALLOW_AUTO_REWARDER;
    +public static boolean ALLOW_FIGHT_STATS_SYSTEM;


    ALLOW_AUTO_REWARDER = Boolean.valueOf(customSettings.getProperty("AllowAutoRewarder", "False"));
    +ALLOW_FIGHT_STATS_SYSTEM = Boolean.parseBoolean(customSettings.getProperty("AllowFightStatsSystem", "False"));

    gameserver/config/custom.properties
    Code:

    +#-------------------------------------------------------------
    +# Section: Custom Fight Stats Title System
    +#-------------------------------------------------------------
    +AllowFightStatsSystem = False

      Current date/time is 24th September 2017, 09:45