Ir para conteúdo
  • Cadastre-se
  • 0

Mod limitador de statos


gleyce123

Pergunta

15 respostass a esta questão

Posts recomendados


  • 0
12 horas atrás, Jondxz disse:

Testou esse? Limitador de Status aCis 367+

A L2JNetwork tem como base a aCis, então acredito que você vai ter que alterar pouca coisa no código 

 

Tentei sim amigo porém não existe os mesmos caminhos como 
 

gameserver/model/actor/stat/CharStat.java

eu acho que são diferentes os nomes e por isso não consigo sem falar que não sou boa em 

alterar codigos assim você não poderia me ajudar ? só falta esse mod pro meu server..

Link para o comentário
Compartilhar em outros sites

  • 0
1 hora atrás, gleyce123 disse:

Tentei sim amigo porém não existe os mesmos caminhos como 


gameserver/model/actor/stat/CharStat.java

Eu posso estar engando, mas tenta o caminho: gameserver/model/actor/stat/CreatureStat.java

Editado por Jondxz

468x120.jpg

I6DHu.png

Link para o comentário
Compartilhar em outros sites

  • 0
1 hora atrás, Jondxz disse:

Eu posso estar engando, mas tenta o caminho: gameserver/model/actor/stat/CreatureStat.java

Essa parte que vc falou achei onde por os codigos agora não achei na parte da config.java e nem da parte do pcstat.java

Editado por gleyce123
Link para o comentário
Compartilhar em outros sites

  • 0
59 minutos atrás, gleyce123 disse:

Essa parte que vc falou achei onde por os codigos agora não achei na parte da config.java e nem da parte do pcstat.java

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/stat/CreatureStat.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/stat/CreatureStat.java    (revision 3)
+++ java/net/sf/l2j/gameserver/model/actor/stat/CreatureStat.java    (working copy)
@@ -141,7 +141,7 @@
      */
     public int getCriticalHit(Character target, L2Skill skill)
     {
-        return Math.min((int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill), 500);
+        return Math.min((int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill), Config.MAX_PCRIT_RATE);
     }
     
     /**
@@ -151,7 +151,7 @@
      */
     public final int getMCriticalHit(Character target, L2Skill skill)
     {
-        return (int) calcStat(Stats.MCRITICAL_RATE, 8, target, skill);
+        return (int) calcStat(Stats.MCRITICAL_RATE, Config.MAX_MCRIT_RATE, target, skill);
     }
     
     /**
@@ -160,7 +160,7 @@
      */
     public int getEvasionRate(Character target)
     {
-        return (int) calcStat(Stats.EVASION_RATE, 0, target, null);
+        return (int) calcStat(Stats.EVASION_RATE, Config.MAX_EVASION, target, null);
     }
     
     /**
@@ -168,7 +168,7 @@
      */
     public int getAccuracy()
     {
-        return (int) calcStat(Stats.ACCURACY_COMBAT, 0, null, null);
+        return (int) calcStat(Stats.ACCURACY_COMBAT, Config.MAX_ACCURACY, null, null);
     }
     
     public int getMaxHp()
    Index: config/aCis.properties
===================================================================
--- config/aCis.properties (revision 104)
+++ config/aCis.properties (working copy)
@@ -82,3 +82,40 @@
 # Players can see in the upper chat who dies in pvp and pk
 # Default : False
 AnnounceKillPLayers = true
+
+#=============================================================
+#                            Limits
+#=============================================================
+
+# Run speed modifier. Example: Setting this to 5 will 
+# give players +5 to their running speed.
+# Default: 0
+RunSpeedBoost = 0
+
+# Maximum character running speed.
+# Default: 250
+MaxRunSpeed = 250
+
+# Maximum character Physical Critical Rate. (10 = 1%)
+# Default: 500
+MaxPCritRate = 500
+
+# Maximum character Magic Critical Rate. (10 = 1%)
+# Default: 200
+MaxMCritRate = 200
+
+# Maximum character Attack Speed.
+# Default: 1500
+MaxPAtkSpeed = 1500
+
+# Maximum character Cast Speed.
+# Default: 1999
+MaxMAtkSpeed = 1999
+
+# Maximum character Evasion.
+# Default: 250
+MaxEvasion = 250
+
+# Maxmum character Accuracy
+# Default: 300
+MaxAccuracy = 300
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 104)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -401,6 +401,15 @@
     public static boolean ENABLE_MODIFY_SKILL_DURATION;
     public static Map<Integer, Integer> SKILL_DURATION_LIST;
     public static boolean ANNOUNCE_KILL;
+    /** Limits */
+    public static int RUN_SPD_BOOST;
+    public static int MAX_RUN_SPEED;
+    public static int MAX_PCRIT_RATE;
+    public static int MAX_MCRIT_RATE;
+    public static int MAX_PATK_SPEED;
+    public static int MAX_MATK_SPEED;
+    public static int MAX_EVASION;
+    public static int MAX_ACCURACY;
 
  // --------------------------------------------------
  // Players
@@ -947,8 +956,15 @@
  }
  }
  ANNOUNCE_KILL = aCis.getProperty("AnnounceKillPLayers", false);
+            RUN_SPD_BOOST = aCis.getProperty("RunSpeedBoost", 0);
+            MAX_RUN_SPEED = aCis.getProperty("MaxRunSpeed", 250);
+            MAX_PCRIT_RATE = aCis.getProperty("MaxPCritRate", 500);
+            MAX_MCRIT_RATE = aCis.getProperty("MaxMCritRate", 200);
+            MAX_PATK_SPEED = aCis.getProperty("MaxPAtkSpeed", 1500);
+            MAX_MATK_SPEED = aCis.getProperty("MaxMAtkSpeed", 1999);
+            MAX_EVASION = aCis.getProperty("MaxEvasion", 250);
+            MAX_ACCURACY = aCis.getProperty("MaxAccuracy", 300);
  
- 
  // NPCs / Monsters
  ExProperties npcs = load(NPCS_FILE);
  CHAMPION_FREQUENCY = npcs.getProperty("ChampionFrequency", 0);
Index: java/net/sf/l2j/gameserver/model/actor/stat/PlayerStat.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/stat/PlayerStat.java    (revision 3)
+++ java/net/sf/l2j/gameserver/model/actor/stat/PlayerStat.java    (working copy)
@@ -401,6 +401,11 @@
         if (penalty > 0)
             baseValue *= Math.pow(0.84, penalty);
         
+        if ((penalty > Config.MAX_RUN_SPEED) && (!getActiveChar().isGM()))
+        {
+            return Config.MAX_RUN_SPEED;
+        }
+        
         // calculate speed
         return (float) calcStat(Stats.RUN_SPEED, baseValue, null, null);
     }
@@ -436,6 +441,11 @@
         if (penalty > 0)
             base *= Math.pow(0.84, penalty);
         
+        if ((base > Config.MAX_MATK_SPEED) && (!getActiveChar().isGM()))
+        {
+            return Config.MAX_MATK_SPEED;
+        }
+        
         return (int) calcStat(Stats.MAGIC_ATTACK_SPEED, base, null, null);
     }
     
@@ -465,6 +475,11 @@
             if (getActiveChar().checkFoodState(getActiveChar().getPetTemplate().getHungryLimit()))
                 base /= 2;
             
+            if ((base > Config.MAX_PATK_SPEED) && (!getActiveChar().isGM()))
+            {
+                return Config.MAX_PATK_SPEED;
+            }
+            
             return (int) calcStat(Stats.POWER_ATTACK_SPEED, base, null, null);
         }
         
@@ -480,6 +495,10 @@
         if (penalty > 0)
             val -= (2 * penalty);
         
+        if ((val > Config.MAX_EVASION) && (!getActiveChar().isGM()))
+        {
+            return Config.MAX_EVASION;
+        }
         return val;
     }
     
@@ -491,6 +510,11 @@
         if (getActiveChar().getExpertiseWeaponPenalty())
             val -= 20;
         
+        if ((val > Config.MAX_ACCURACY) && (!getActiveChar().isGM()))
+        {
+          return Config.MAX_ACCURACY;
+        }
+        
         return val;
     }

Aqui esta gleyce123

CRMjmY4.jpg

Link para o comentário
Compartilhar em outros sites

  • 0
17 minutos atrás, ★BlackStar★ disse:

 

  Ocultar conteúdo

 



### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/stat/CreatureStat.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/stat/CreatureStat.java    (revision 3)
+++ java/net/sf/l2j/gameserver/model/actor/stat/CreatureStat.java    (working copy)
@@ -141,7 +141,7 @@
      */
     public int getCriticalHit(Character target, L2Skill skill)
     {
-        return Math.min((int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill), 500);
+        return Math.min((int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill), Config.MAX_PCRIT_RATE);
     }
     
     /**
@@ -151,7 +151,7 @@
      */
     public final int getMCriticalHit(Character target, L2Skill skill)
     {
-        return (int) calcStat(Stats.MCRITICAL_RATE, 8, target, skill);
+        return (int) calcStat(Stats.MCRITICAL_RATE, Config.MAX_MCRIT_RATE, target, skill);
     }
     
     /**
@@ -160,7 +160,7 @@
      */
     public int getEvasionRate(Character target)
     {
-        return (int) calcStat(Stats.EVASION_RATE, 0, target, null);
+        return (int) calcStat(Stats.EVASION_RATE, Config.MAX_EVASION, target, null);
     }
     
     /**
@@ -168,7 +168,7 @@
      */
     public int getAccuracy()
     {
-        return (int) calcStat(Stats.ACCURACY_COMBAT, 0, null, null);
+        return (int) calcStat(Stats.ACCURACY_COMBAT, Config.MAX_ACCURACY, null, null);
     }
     
     public int getMaxHp()
    Index: config/aCis.properties
===================================================================
--- config/aCis.properties (revision 104)
+++ config/aCis.properties (working copy)
@@ -82,3 +82,40 @@
 # Players can see in the upper chat who dies in pvp and pk
 # Default : False
 AnnounceKillPLayers = true
+
+#=============================================================
+#                            Limits
+#=============================================================
+
+# Run speed modifier. Example: Setting this to 5 will 
+# give players +5 to their running speed.
+# Default: 0
+RunSpeedBoost = 0
+
+# Maximum character running speed.
+# Default: 250
+MaxRunSpeed = 250
+
+# Maximum character Physical Critical Rate. (10 = 1%)
+# Default: 500
+MaxPCritRate = 500
+
+# Maximum character Magic Critical Rate. (10 = 1%)
+# Default: 200
+MaxMCritRate = 200
+
+# Maximum character Attack Speed.
+# Default: 1500
+MaxPAtkSpeed = 1500
+
+# Maximum character Cast Speed.
+# Default: 1999
+MaxMAtkSpeed = 1999
+
+# Maximum character Evasion.
+# Default: 250
+MaxEvasion = 250
+
+# Maxmum character Accuracy
+# Default: 300
+MaxAccuracy = 300
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 104)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -401,6 +401,15 @@
     public static boolean ENABLE_MODIFY_SKILL_DURATION;
     public static Map<Integer, Integer> SKILL_DURATION_LIST;
     public static boolean ANNOUNCE_KILL;
+    /** Limits */
+    public static int RUN_SPD_BOOST;
+    public static int MAX_RUN_SPEED;
+    public static int MAX_PCRIT_RATE;
+    public static int MAX_MCRIT_RATE;
+    public static int MAX_PATK_SPEED;
+    public static int MAX_MATK_SPEED;
+    public static int MAX_EVASION;
+    public static int MAX_ACCURACY;
 
  // --------------------------------------------------
  // Players
@@ -947,8 +956,15 @@
  }
  }
  ANNOUNCE_KILL = aCis.getProperty("AnnounceKillPLayers", false);
+            RUN_SPD_BOOST = aCis.getProperty("RunSpeedBoost", 0);
+            MAX_RUN_SPEED = aCis.getProperty("MaxRunSpeed", 250);
+            MAX_PCRIT_RATE = aCis.getProperty("MaxPCritRate", 500);
+            MAX_MCRIT_RATE = aCis.getProperty("MaxMCritRate", 200);
+            MAX_PATK_SPEED = aCis.getProperty("MaxPAtkSpeed", 1500);
+            MAX_MATK_SPEED = aCis.getProperty("MaxMAtkSpeed", 1999);
+            MAX_EVASION = aCis.getProperty("MaxEvasion", 250);
+            MAX_ACCURACY = aCis.getProperty("MaxAccuracy", 300);
  
- 
  // NPCs / Monsters
  ExProperties npcs = load(NPCS_FILE);
  CHAMPION_FREQUENCY = npcs.getProperty("ChampionFrequency", 0);
Index: java/net/sf/l2j/gameserver/model/actor/stat/PlayerStat.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/stat/PlayerStat.java    (revision 3)
+++ java/net/sf/l2j/gameserver/model/actor/stat/PlayerStat.java    (working copy)
@@ -401,6 +401,11 @@
         if (penalty > 0)
             baseValue *= Math.pow(0.84, penalty);
         
+        if ((penalty > Config.MAX_RUN_SPEED) && (!getActiveChar().isGM()))
+        {
+            return Config.MAX_RUN_SPEED;
+        }
+        
         // calculate speed
         return (float) calcStat(Stats.RUN_SPEED, baseValue, null, null);
     }
@@ -436,6 +441,11 @@
         if (penalty > 0)
             base *= Math.pow(0.84, penalty);
         
+        if ((base > Config.MAX_MATK_SPEED) && (!getActiveChar().isGM()))
+        {
+            return Config.MAX_MATK_SPEED;
+        }
+        
         return (int) calcStat(Stats.MAGIC_ATTACK_SPEED, base, null, null);
     }
     
@@ -465,6 +475,11 @@
             if (getActiveChar().checkFoodState(getActiveChar().getPetTemplate().getHungryLimit()))
                 base /= 2;
             
+            if ((base > Config.MAX_PATK_SPEED) && (!getActiveChar().isGM()))
+            {
+                return Config.MAX_PATK_SPEED;
+            }
+            
             return (int) calcStat(Stats.POWER_ATTACK_SPEED, base, null, null);
         }
         
@@ -480,6 +495,10 @@
         if (penalty > 0)
             val -= (2 * penalty);
         
+        if ((val > Config.MAX_EVASION) && (!getActiveChar().isGM()))
+        {
+            return Config.MAX_EVASION;
+        }
         return val;
     }
     
@@ -491,6 +510,11 @@
         if (getActiveChar().getExpertiseWeaponPenalty())
             val -= 20;
         
+        if ((val > Config.MAX_ACCURACY) && (!getActiveChar().isGM()))
+        {
+          return Config.MAX_ACCURACY;
+        }
+        
         return val;
     }

 

Aqui esta gleyce123


aCis.getProperty não consigo achar nenhuma referencia com isso aqui pra por está parte.

        RUN_SPD_BOOST = aCis.getProperty("RunSpeedBoost", 0);
        MAX_RUN_SPEED = aCis.getProperty("MaxRunSpeed", 250);
        MAX_PCRIT_RATE = aCis.getProperty("MaxPCritRate", 500);
        MAX_MCRIT_RATE = aCis.getProperty("MaxMCritRate", 200);
        MAX_PATK_SPEED = aCis.getProperty("MaxPAtkSpeed", 1500);
        MAX_MATK_SPEED = aCis.getProperty("MaxMAtkSpeed", 1999);
        MAX_EVASION = aCis.getProperty("MaxEvasion", 250);
        MAX_ACCURACY = aCis.getProperty("MaxAccuracy", 300);

 

Link para o comentário
Compartilhar em outros sites

  • 0

É pq não tem msm isso.

no meu caso eu botei 

assim 

        RUN_SPD_BOOST = limits.getProperty("RunSpeedBoost", 0);
        MAX_RUN_SPEED = limits.getProperty("MaxRunSpeed", 250);
        MAX_PCRIT_RATE = limits.getProperty("MaxPCritRate", 500);
        MAX_MCRIT_RATE = limits.getProperty("MaxMCritRate", 200);
        MAX_PATK_SPEED = limits.getProperty("MaxPAtkSpeed", 1500);
        MAX_MATK_SPEED = limits.getProperty("MaxMAtkSpeed", 1999);
        MAX_EVASION = limits.getProperty("MaxEvasion", 250);
        MAX_ACCURACY = limits.getProperty("MaxAccuracy", 300);

 

e botei as config em custom/limits.properties

 

CRMjmY4.jpg

Link para o comentário
Compartilhar em outros sites

  • 0
18 minutos atrás, ★BlackStar★ disse:

É pq não tem msm isso.

no meu caso eu botei 

assim 

        RUN_SPD_BOOST = limits.getProperty("RunSpeedBoost", 0);
        MAX_RUN_SPEED = limits.getProperty("MaxRunSpeed", 250);
        MAX_PCRIT_RATE = limits.getProperty("MaxPCritRate", 500);
        MAX_MCRIT_RATE = limits.getProperty("MaxMCritRate", 200);
        MAX_PATK_SPEED = limits.getProperty("MaxPAtkSpeed", 1500);
        MAX_MATK_SPEED = limits.getProperty("MaxMAtkSpeed", 1999);
        MAX_EVASION = limits.getProperty("MaxEvasion", 250);
        MAX_ACCURACY = limits.getProperty("MaxAccuracy", 300);

 

e botei as config em custom/limits.properties

 

coloquei tudo direitinho mais adiantou não.... ta passando ainda do limite que coloquei.. se poder mandar o codigo com todas as referencias igual como vc botou talvez eu consiga..

Editado por gleyce123
Link para o comentário
Compartilhar em outros sites

  • 0

Vi que no config.java logo no começo onde tem isso aqui ta faltando a config limites não seria isso ?
 

    public static final String CLANS_FILE = "./config/clans.properties";
    public static final String EVENTS_FILE = "./config/events.properties";
    public static final String GEOENGINE_FILE = "./config/geoengine.properties";
    public static final String HEXID_FILE = "./config/hexid.txt";
    public static final String LOGIN_CONFIGURATION_FILE = "./config/loginserver.properties";
    public static final String NPCS_FILE = "./config/npcs.properties";
    public static final String PLAYERS_FILE = "./config/players.properties";
    public static final String SERVER_FILE = "./config/server.properties";
    public static final String SIEGE_FILE = "./config/siege.properties";
    public static final String CHECK_LIMITS_FILE = "./config/customs/chat.properties";
    public static final String NEWBIE_FILE = "./config/customs/newbies_system.properties";
    public static final String MANAGER_FILE = "./config/customs/npcs_manager.properties";
    public static final String BANK_FILE = "./config/customs/bank.properties";
    public static final String CUSTOMS_FILE = "./Çconfig/customs/customs.properties";
    public static final String VOTE_FILE = "./config/customs/vote.properties";
    public static final String PROTECT_FILE = "./config/customs/protection.properties";
    public static final String OFFLINESHOP_FILE = "./config/customs/offlineshop.properties";
    public static final String DONATOR_FILE = "./config/customs/donators.properties";
    public static final String TVT_FILE = "./config/customs/tvt.properties";
    public static final String COMMAND_LIST = "./config/customs/commandlist.properties";
    public static final String RANDOM_ZONE = "./config/customs/randompvpzone.properties";
    public static final String RAID_FILE = "./config/customs/raidbosses.properties";

Editado por gleyce123
Link para o comentário
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





×
×
  • Criar Novo...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.