Ir para conteúdo


Mod time buff


Melhor Resposta Brhu3, 11 janeiro 2017 - 18:04

### 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;
 		
Visualizar todo o conteúdo do post


2 respostas neste tópico

#1    anakinl2

anakinl2
  • Muito Noob

  • 190 posts

Postado 11 janeiro 2017 - 18:01

alguem tem o mods de alterar o tempo dos buff

 

Ex:

 

# Alternate time change skills
# Format: skillid, newtime and; skillid2, newtime2; ....
# Example: 1:0 (3600) for song's, mark "/" move to a new line
# 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 = 1323,7200;1068,7200;1085,7200;1204,7200;1035,7200;\
1243,7200;1240,7200;1048,7200;1036,7200;1389,7200;1259,7200;\
1397,7200;1059,7200;1040,7200;1078,7200;1077,7200;1062,7200;\
1242,7200;1045,7200;1086,7200;1388,7200;1087,7200;1304,7200;\
1303,7200;1268,7200;1257,7200;1073,7200;1044,7200;1010,7200;\
1033,7200;1032,7200;1352,7200;1392,7200;1393,7200;1354,7200;\
1191,7200;1182,7200;1353,7200;1189,7200;1043,7200;271,7200;\
273,7200;275,7200;277,7200;309,7200;311,7200;272,7200;274,7200;\
276,7200;307,7200;310,7200;365,7200;264,7200;266,7200;268,7200;\
270,7200;305,7200;308,7200;364,7200;265,7200;267,7200;269,7200;\
304,7200;306,7200;363,7200;349,7200;1363,7200;1413,7200;1356,7200;\
1357,7200;1355,7200;1416,7200;1414,7200;4699,7200;4700,7200;\
4702,7200;4703,7200;1007,7200;1009,7200;1252,7200;1310,7200;\
1251,7200;1391,7200;1284,7200;1006,7200;1002,7200;1253,7200;\
1309,7200;1308,7200;1390,7200;1362,7200;1003,7200;1005,7200;\
1008,7200;1260,7200;1004,7200;1250,7200;1261,7200;1249,7200;\
1282,7200;1364,7200;1365,7200;1415,7200;1416,7200;1414,7200
Informação adicional: Utilizo a rev acis 350 e client Interlude.

QX92gY.gif

www.lineage2.us


#2    Brhu3

Brhu3
  • Muito Noob

  • 168 posts

Postado 11 janeiro 2017 - 18:04   Melhor Resposta

Por favor, acesse sua conta ou cadastre-se para ver este conteúdo oculto.



#3    anakinl2

anakinl2
  • Muito Noob

  • 190 posts

Postado 11 janeiro 2017 - 19:26

vlw brother muito obrigado !!!


QX92gY.gif

www.lineage2.us





0 usuário(s) está(ão) lendo este tópico

0 membros, 0 visitantes, 0 usuários anônimos

© L2jBrasil - Todos os direitos reservados
NCsoft©, the interlocking NC logo, Lineage© II, and all associated logos and designs are trademarks or registered trademarks or service marks of NCsoft Corp.
All rights reserved and other trademarks are the property of their respective owners.