Advertisement
Sarada-L2

Limit AtkSpeed y CastSpeed RusAcis 3.5

Apr 16th, 2023 (edited)
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.79 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P RUSaCis-3.5
  3. diff --git config/en/rus_acis.properties
  4. index f09715d..55ad000 100644
  5. --- config/en/rus_acis.properties
  6. +++ config/en/rus_acis.properties
  7. @@ -26,36 +26,46 @@
  8. 4702,7200;1352,7200;1353,7200;1354,7200;1259,7200;1355,7200;1356,7200;\
  9. 1363,7200;1357,7200;1323,7200;1268,7200;311,7200;309,7200;307,7200;1388,7200;\
  10. 1389,7200;1397,7200;1087,7200;1413,7200;1304,7200;1257,7200;1362,7200;1392,7200;\
  11. 1393,7200;1391,7200;1189,7200;1182,7200;270,7200;308,7200;306,7200;1191,7200;\
  12. 1416,7200;1390,7200;1391,7200
  13.  
  14. # Shout chat (ON - city, OFF - off, GM - only for GMs, GLOBAL - for the whole world)
  15. GlobalChat = ON
  16.  
  17. # Trade chat (ON - city, OFF - turns off, GM - only for GMs, GLOBAL - for the whole world)
  18. TradeChat = ON
  19.  
  20. # From which lvl players can use chat, global chat, trade chat or PM.
  21. AllChatLevel = 1
  22. TellChatLevel = 1
  23. ShoutChatLevel = 1
  24. TradeChatLevel = 1
  25.  
  26. +#====================================================
  27. +# P.ATK/M.ATK SPEED LIMITE
  28. +#====================================================
  29. +# All Classes
  30. +MaxPAtkSpeed = 1500
  31. +MaxMAtkSpeed = 2100
  32. +
  33. +# All Archers Atk speed Only
  34. +MaxPAtkSpeedArchers = 1300
  35.  
  36. # Enable the .menu command (contains functionality, stopping experience, etc.).
  37. # For autoloot to work correctly, you need to set AutoLoot to True in server.properties.
  38. EnableMenu = False
  39.  
  40. # Enable .online command
  41. EnabledOnlineCommand = False
  42.  
  43. # Enable PTS attack (makes 1 hit to the character, it will always hit JAVA).
  44. AttackPTS = True
  45.  
  46. # When you add subclass your skills from main class and subclass will stuck
  47. SubClassSkills = False
  48.  
  49. # Allow player to add/change subclass at all village master
  50. SubclassEverywhere = False
  51.  
  52. # Enable shift + click on the mob for the player.
  53. ShowNpcInfo = False
  54. diff --git config/rus_acis.properties
  55. index e7aee2c..3572171 100644
  56. --- config/rus_acis.properties
  57. +++ config/rus_acis.properties
  58. @@ -26,36 +26,46 @@
  59. 4702,7200;1352,7200;1353,7200;1354,7200;1259,7200;1355,7200;1356,7200;\
  60. 1363,7200;1357,7200;1323,7200;1268,7200;311,7200;309,7200;307,7200;1388,7200;\
  61. 1389,7200;1397,7200;1087,7200;1413,7200;1304,7200;1257,7200;1362,7200;1392,7200;\
  62. 1393,7200;1391,7200;1189,7200;1182,7200;270,7200;308,7200;306,7200;1191,7200;\
  63. 1416,7200;1390,7200;1391,7200
  64.  
  65. # Шаут чат (ON - город, OFF - выключает, GM - только для ГМов, GLOBAL - на весь мир)
  66. GlobalChat = ON
  67.  
  68. # Трейд чат (ON - город, OFF - выключает, GM - только для ГМов, GLOBAL - на весь мир)
  69. TradeChat = ON
  70.  
  71. # С какого лвл игроки могут использовать чат, глобальный чат, торговый чат или ПМ.
  72. AllChatLevel = 1
  73. TellChatLevel = 1
  74. ShoutChatLevel = 1
  75. TradeChatLevel = 1
  76.  
  77. +#====================================================
  78. +# P.ATK/M.ATK SPEED LIMITE
  79. +#====================================================
  80. +# All Classes
  81. +MaxPAtkSpeed = 1500
  82. +MaxMAtkSpeed = 2100
  83. +
  84. +# All Archers Atk speed Only
  85. +MaxPAtkSpeedArchers = 1300
  86.  
  87. # Включить команду .menu (содержит в себе функционал, остановки опыта и тп).
  88. # Чтобы автолут работал корректно, нужно в server.properties - AutoLoot перевести в True.
  89. EnableMenu = False
  90.  
  91. # Включить команду .online
  92. EnabledOnlineCommand = False
  93.  
  94. # Включить атаку по PTS (делает 1 удар по персонажу, по JAVA бить будет всегда).
  95. AttackPTS = True
  96.  
  97. # Когда вы добавляете подкласс, ваши навыки из основного класса и подкласса стакаются.
  98. SubClassSkills = False
  99.  
  100. # Разрешить игроку добавлять/изменять подкласс у всех village master.
  101. SubclassEverywhere = False
  102.  
  103. # Включить для игрока шифт + клик по мобу.
  104. ShowNpcInfo = False
  105. diff --git java/net/sf/l2j/Config.java
  106. index aef57b0..17c7385 100644
  107. --- java/net/sf/l2j/Config.java
  108. +++ java/net/sf/l2j/Config.java
  109. @@ -849,36 +849,40 @@
  110. public static int SELECTOR_SLEEP_TIME = 20; // default 20
  111. public static int MAX_SEND_PER_PASS = 80; // default 80
  112. public static int MAX_READ_PER_PASS = 80; // default 80
  113. public static int HELPER_BUFFER_COUNT = 20; // default 20
  114.  
  115. // --------------------------------------------------
  116. // RUS-ACIS
  117. // --------------------------------------------------
  118.  
  119. /** Infinity SS and Arrows */
  120. public static boolean INFINITY_SS;
  121. public static boolean INFINITY_ARROWS;
  122.  
  123. /** Olympiad Period */
  124. public static boolean OLY_USE_CUSTOM_PERIOD_SETTINGS;
  125. public static OlympiadPeriod OLY_PERIOD;
  126. public static int OLY_PERIOD_MULTIPLIER;
  127.  
  128. + public static int MAX_PATK_SPEED;
  129. + public static int MAX_MATK_SPEED;
  130. + public static int MAX_PATK_SPEED_ARCHERS;
  131.  
  132. public static boolean ENABLE_MODIFY_SKILL_DURATION;
  133. public static HashMap<Integer, Integer> SKILL_DURATION_LIST;
  134.  
  135. public static String GLOBAL_CHAT;
  136. public static String TRADE_CHAT;
  137. public static int CHAT_ALL_LEVEL;
  138. public static int CHAT_TELL_LEVEL;
  139. public static int CHAT_SHOUT_LEVEL;
  140. public static int CHAT_TRADE_LEVEL;
  141.  
  142. public static boolean ENABLE_MENU;
  143. public static boolean ENABLE_ONLINE_COMMAND;
  144.  
  145. public static boolean BOTS_PREVENTION;
  146. public static int KILLS_COUNTER;
  147. public static int KILLS_COUNTER_RANDOMIZATION;
  148. public static int VALIDATION_TIME;
  149. public static int PUNISHMENT;
  150. @@ -2551,36 +2555,41 @@
  151. PLAYER_RATE_DROP_EQUIP = rates.getProperty("PlayerRateDropEquip", 25);
  152. PLAYER_RATE_DROP_EQUIP_WEAPON = rates.getProperty("PlayerRateDropEquipWeapon", 5);
  153. PET_XP_RATE = rates.getProperty("PetXpRate", 1.);
  154. PET_FOOD_RATE = rates.getProperty("PetFoodRate", 1);
  155. SINEATER_XP_RATE = rates.getProperty("SinEaterXpRate", 1.);
  156. KARMA_DROP_LIMIT = rates.getProperty("KarmaDropLimit", 10);
  157. KARMA_RATE_DROP = rates.getProperty("KarmaRateDrop", 70);
  158. KARMA_RATE_DROP_ITEM = rates.getProperty("KarmaRateDropItem", 50);
  159. KARMA_RATE_DROP_EQUIP = rates.getProperty("KarmaRateDropEquip", 40);
  160. KARMA_RATE_DROP_EQUIP_WEAPON = rates.getProperty("KarmaRateDropEquipWeapon", 10);
  161. }
  162.  
  163. private static final void loadRusAcis()
  164. {
  165. final ExProperties rusacis = initProperties(RUS_ACIS_FILE);
  166. INFINITY_SS = rusacis.getProperty("InfinitySS", false);
  167. INFINITY_ARROWS = rusacis.getProperty("InfinityArrows", false);
  168.  
  169. + MAX_MATK_SPEED = Integer.parseInt(rusacis.getProperty("MaxMAtkSpeed", "1999"));
  170. + MAX_PATK_SPEED = Integer.parseInt(rusacis.getProperty("MaxPAtkSpeed", "1500"));
  171. +
  172. + MAX_PATK_SPEED_ARCHERS = Integer.parseInt(rusacis.getProperty("MaxPAtkSpeedArchers", "1500"));
  173.  
  174. OLY_USE_CUSTOM_PERIOD_SETTINGS = rusacis.getProperty("OlyUseCustomPeriodSettings", false);
  175. OLY_PERIOD = OlympiadPeriod.valueOf(rusacis.getProperty("OlyPeriod", "MONTH"));
  176. OLY_PERIOD_MULTIPLIER = rusacis.getProperty("OlyPeriodMultiplier", 1);
  177.  
  178. ENABLE_MODIFY_SKILL_DURATION = rusacis.getProperty("EnableModifySkillDuration", false);
  179. if (ENABLE_MODIFY_SKILL_DURATION)
  180. {
  181. SKILL_DURATION_LIST = new HashMap<>();
  182. String[] propertySplit = rusacis.getProperty("SkillDurationList", "").split(";");
  183.  
  184. for (String skill : propertySplit)
  185. {
  186. String[] skillSplit = skill.split(",");
  187. if (skillSplit.length != 2)
  188. LOGGER.warn("[SkillDurationList]: invalid config property -> SkillDurationList \"" + skill + "\"");
  189. else
  190. {
  191. try
  192. diff --git java/net/sf/l2j/gameserver/model/actor/status/PlayerStatus.java
  193. index 07bda24..3898373 100644
  194. --- java/net/sf/l2j/gameserver/model/actor/status/PlayerStatus.java
  195. +++ java/net/sf/l2j/gameserver/model/actor/status/PlayerStatus.java
  196. @@ -1,33 +1,34 @@
  197. package net.sf.l2j.gameserver.model.actor.status;
  198.  
  199. import java.util.Map;
  200.  
  201. import net.sf.l2j.commons.random.Rnd;
  202.  
  203. import net.sf.l2j.Config;
  204. import net.sf.l2j.gameserver.data.manager.CastleManager;
  205. import net.sf.l2j.gameserver.data.manager.ClanHallManager;
  206. import net.sf.l2j.gameserver.data.manager.DuelManager;
  207. import net.sf.l2j.gameserver.data.manager.ZoneManager;
  208. import net.sf.l2j.gameserver.data.xml.PlayerLevelData;
  209. import net.sf.l2j.gameserver.enums.SiegeSide;
  210. import net.sf.l2j.gameserver.enums.StatusType;
  211. import net.sf.l2j.gameserver.enums.ZoneId;
  212. +import net.sf.l2j.gameserver.enums.actors.ClassId;
  213. import net.sf.l2j.gameserver.enums.actors.ClassRace;
  214. import net.sf.l2j.gameserver.enums.actors.OperateType;
  215. import net.sf.l2j.gameserver.enums.actors.WeightPenalty;
  216. import net.sf.l2j.gameserver.enums.skills.EffectType;
  217. import net.sf.l2j.gameserver.enums.skills.Stats;
  218. import net.sf.l2j.gameserver.model.PlayerLevel;
  219. import net.sf.l2j.gameserver.model.actor.Creature;
  220. import net.sf.l2j.gameserver.model.actor.Npc;
  221. import net.sf.l2j.gameserver.model.actor.Playable;
  222. import net.sf.l2j.gameserver.model.actor.Player;
  223. import net.sf.l2j.gameserver.model.actor.Summon;
  224. import net.sf.l2j.gameserver.model.actor.container.npc.RewardInfo;
  225. import net.sf.l2j.gameserver.model.actor.instance.Pet;
  226. import net.sf.l2j.gameserver.model.actor.instance.Servitor;
  227. import net.sf.l2j.gameserver.model.clanhall.ClanHall;
  228. import net.sf.l2j.gameserver.model.clanhall.ClanHallFunction;
  229. import net.sf.l2j.gameserver.model.entity.Duel.DuelState;
  230. import net.sf.l2j.gameserver.model.entity.Siege;
  231. @@ -1022,72 +1023,87 @@
  232. return super.getMAtk(target, skill);
  233. }
  234.  
  235. @Override
  236. public int getMAtkSpd()
  237. {
  238. double base = 333;
  239.  
  240. if (_actor.isMounted())
  241. {
  242. if (_actor.checkFoodState(_actor.getPetTemplate().getHungryLimit()))
  243. base /= 2;
  244. }
  245.  
  246. final int penalty = _actor.getArmorGradePenalty();
  247. if (penalty > 0)
  248. base *= Math.pow(0.84, penalty);
  249.  
  250. - return (int) calcStat(Stats.MAGIC_ATTACK_SPEED, base, null, null);
  251. + double val = calcStat(Stats.MAGIC_ATTACK_SPEED, base, null, null);
  252. +
  253. + if (val > Config.MAX_MATK_SPEED)
  254. + {
  255. + val = Config.MAX_MATK_SPEED;
  256. + }
  257. + return (int) val;
  258. }
  259.  
  260. @Override
  261. public int getPAtk(Creature target)
  262. {
  263. if (_actor.isMounted())
  264. {
  265. double base = _actor.getPetDataEntry().getMountPAtk();
  266.  
  267. if (getLevel() < _actor.getMountLevel())
  268. base /= 2;
  269.  
  270. return (int) calcStat(Stats.POWER_ATTACK, base, null, null);
  271. }
  272.  
  273. return super.getPAtk(target);
  274. }
  275.  
  276. @Override
  277. public int getPAtkSpd()
  278. {
  279. if (_actor.isFlying())
  280. return (_actor.checkFoodState(_actor.getPetTemplate().getHungryLimit())) ? 150 : 300;
  281.  
  282. if (_actor.isRiding())
  283. {
  284. int base = _actor.getPetDataEntry().getMountAtkSpd();
  285.  
  286. if (_actor.checkFoodState(_actor.getPetTemplate().getHungryLimit()))
  287. base /= 2;
  288.  
  289. return (int) calcStat(Stats.POWER_ATTACK_SPEED, base, null, null);
  290. }
  291. -
  292. - return super.getPAtkSpd();
  293. + int val = super.getPAtkSpd();
  294. + if (val > Config.MAX_PATK_SPEED)
  295. + {
  296. + val = Config.MAX_PATK_SPEED;
  297. + }
  298. + else if (_actor.getClassId().equals(ClassId.PHANTOM_RANGER) || _actor.getClassId().equals(ClassId.GHOST_SENTINEL) || _actor.getClassId().equals(ClassId.SILVER_RANGER) || _actor.getClassId().equals(ClassId.MOONLIGHT_SENTINEL) || _actor.getClassId().equals(ClassId.HAWKEYE) || _actor.getClassId().equals(ClassId.SAGGITARIUS))
  299. + {
  300. + if (val > Config.MAX_PATK_SPEED_ARCHERS)
  301. + return Config.MAX_PATK_SPEED_ARCHERS;
  302. + }
  303. + return val;
  304. }
  305.  
  306. @Override
  307. public int getEvasionRate(Creature target)
  308. {
  309. int val = super.getEvasionRate(target);
  310.  
  311. final int penalty = _actor.getArmorGradePenalty();
  312. if (penalty > 0)
  313. val -= (2 * penalty);
  314.  
  315. return val;
  316. }
  317.  
  318. @Override
  319. public int getAccuracy()
  320. {
  321. int val = super.getAccuracy();
  322.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement