Ir para conteúdo
  • Cadastre-se
  • 0

BuffDuration na Acis


Sorameshi

Pergunta

É possivel criar um mod para controlar os buffs como é feito no L2jFrozen só que para a Acis?

 

Um exemplo seria a opção que temos de buffDuration em other.properties de l2jFrozen. desde já grato.

# --------------------------------------
# When the reads, buff, and their duration.
# Format: id_skill time; id_skill2, time2 ;....
# Example:
# SkillDurationList = 264,3600; 265,3600; 266,3600; 267,3600; 268,3600; \
# 269.3600, 270.3600, 304.3600, 305.1200, 306.3600, 308.3600, 349.3600; \
# 363.3600, 364.3600
# Default: false
EnableModifySkillDuration = True
SkillDurationList = 264,7200;265,7200;266,7200;267,7200;268,7200;\
269,7200;270,7200;304,7200;305,1200;306,7200;308,7200;349,7200;\
363,7200;364,7200;529,7200;271,7200;272,7200;273,7200;274,7200;\
275,7200;276,7200;277,7200;307,7200;309,7200;310,7200;311,7200;\
366,7200;530,7200;765,7200;1035,7200;1043,7200;1044,7200;1062,7200;\
1077,7200;1078,7200;1085,7200;1204,7200;1036,7200;1045,7200;1048,7200;\
1086,7200;1240,7200;1242,7200;1243,7200;1388,7200;1389,7200;336,7200;\
1356,7200;1007,7200;1006,7200;1009,7200;1251,7200;1252,7200;1253,7200;\
1284,7200;1308,7200;1309,7200;1310,7200;1390,7200;1391,7200;1362,7200;\
1363,7200;1413,7200;1355,7200;1303,7200;1087,7200;1259,7200;1059,7200;\
305,7200;1268,7200;1040,7200;1068,7200;4700,7200;1397,7200;4703,7200;\
4344,7200;4349,7200;4346,7200;4345,7200;4347,7200;4348,7200;4352,7200;\
4354,7200;4360,7200;4358,7200;4357,7200;4359,7200;1032,7200;4342,7200;\
1323,7200;4355,7200;4356,7200;4351,7200;365,7200;4699,7200;4702,7200;\
1002,7200;1357,7200;1304,7200;1073,7200;1311,7200;4225,7200;4350,7200;\
20101,7200;20102,7200;20103,7200;1374,7200;395,60;1182,7200;1191,7200;1189,7200;\
1392,7200;1393,7200;1352,7200;1353,7200;1354,7200;1033,7200;395,7200;396,7200;1374,7200\

 

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts recomendados

  • 0
3 minutos atrás, ShadowBR disse:

É possivel criar um mod para controlar os buffs como é feito no L2jFrozen só que para a Acis?

 

Um exemplo seria a opção que temos de buffDuration em other.properties de l2jFrozen. desde já grato.

 

tem nesse tópico

 

esse de cima n testei, mas eu tenho esse q eu testei na acis

Spoiler

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: config/players.properties
===================================================================
--- config/players.properties    (revision 6)
+++ config/players.properties    (working copy)
@@ -288,4 +288,15 @@
 
# Store buffs/debuffs on user logout?
StoreSkillCooltime = True
+
+# Alternative Time buffs
+# Default: False
+EnableAlternativeSkillDuration = False
+
+# When the reads, buff, and their duration.
+# Format: id_skill time; id_skill2, time2.
+# Example:
+# SkillDurationList = 264,3600; 265,3600; 266,3600; 267,3600; 268,3600; \
+# 363.3600, 364.3600
+SkillDurationList = 264,3600
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java    (revision 6)
+++ java/net/sf/l2j/Config.java    (working copy)
@@ -491,6 +491,8 @@
     /** Buffs */
     public static boolean STORE_SKILL_COOLTIME;
     public static int BUFFS_MAX_AMOUNT;
+    public static boolean ENABLE_ALTERNATIVE_SKILL_DURATION;
+    public static HashMap<Integer, Integer> SKILL_DURATION_LIST;
     
     // --------------------------------------------------
     // Server
@@ -1110,6 +1115,39 @@
             
             BUFFS_MAX_AMOUNT = players.getProperty("MaxBuffsAmount", 20);
             STORE_SKILL_COOLTIME = players.getProperty("StoreSkillCooltime", true);
+            ENABLE_ALTERNATIVE_SKILL_DURATION = Boolean.parseBoolean(players.getProperty("EnableAlternativeSkillDuration", "false"));
+            if(ENABLE_ALTERNATIVE_SKILL_DURATION)
+            {
+                SKILL_DURATION_LIST = new HashMap<>();
+                
+                String[] propertySplit;
+                propertySplit = players.getProperty("SkillDurationList", "").split(";");
+                
+                for(String skill : propertySplit)
+                {
+                    String[] skillSplit = skill.split(",");
+                    if(skillSplit.length != 2)
+                    {
+                        System.out.println("[SkillDurationList]: invalid config property -> SkillDurationList \"" + skill + "\"");
+                    }
+                    else
+                    {
+                        try
+                        {
+                            SKILL_DURATION_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
+                        }
+                        catch(NumberFormatException nfe)
+                        {
+                            nfe.printStackTrace();
+                            
+                            if(!skill.equals(""))
+                            {
+                                System.out.println("[SkillDurationList]: invalid config property -> SkillList \"" + skillSplit[0] + "\"" + skillSplit[1]);
+                            }
+                        }
+                    }
+                }                
+            }
             
             // server
             ExProperties server = load(SERVER_FILE);
Index: java/net/sf/l2j/gameserver/skills/DocumentBase.java
===================================================================
--- java/net/sf/l2j/gameserver/skills/DocumentBase.java    (revision 6)
+++ java/net/sf/l2j/gameserver/skills/DocumentBase.java    (working copy)
@@ -24,6 +24,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.model.ChanceCondition;
 import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.base.Race;
@@ -228,7 +229,27 @@
             count = Integer.decode(getValue(attrs.getNamedItem("count").getNodeValue(), template));
         
         if (attrs.getNamedItem("time") != null)
+        {
             time = Integer.decode(getValue(attrs.getNamedItem("time").getNodeValue(), template));
+            if(Config.ENABLE_ALTERNATIVE_SKILL_DURATION)
+            {
+                if(Config.SKILL_DURATION_LIST.containsKey(((L2Skill) template).getId()))
+                {
+                    if(((L2Skill) template).getLevel() < 100)
+                    {
+                        time = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+                    }
+                    else if(((L2Skill) template).getLevel() >= 100 && ((L2Skill) template).getLevel() < 140)
+                    {
+                        time += Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+                    }
+                    else if(((L2Skill) template).getLevel() > 140)
+                    {
+                        time = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+                    }
+                }
+            }
+        }    
         else if (((L2Skill) template).getBuffDuration() > 0)
             time = ((L2Skill) template).getBuffDuration() / 1000 / count;
         

 


 

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.