-JRGames-

Unstuck Time

Aug 24th, 2022
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.51 KB | Software | 0 0
  1. diff --git a/aCis_gameserver/config/en/rus_acis.properties b/aCis_gameserver/config/en/rus_acis.properties
  2. index 0ac920d..00fac2f 100644
  3. --- a/aCis_gameserver/config/en/rus_acis.properties
  4. +++ b/aCis_gameserver/config/en/rus_acis.properties
  5. @@ -5,6 +5,9 @@
  6.  InfinitySS = False
  7.  InfinityArrows = False
  8.  
  9. +# Time in seconds for /unstuck
  10. +UnstuckTime = 15
  11. +
  12.  # Alt Oly period: MONTH/DAY/WEEK
  13.  # MONTH, WEEK, DAY
  14.  # Exemple. 2 weeks-->AltOlyPeriod=WEEK and AltOlyPeriodMultiplier=2.
  15. diff --git a/aCis_gameserver/config/rus_acis.properties b/aCis_gameserver/config/rus_acis.properties
  16. index d60eb4c..13a1f67 100644
  17. --- a/aCis_gameserver/config/rus_acis.properties
  18. +++ b/aCis_gameserver/config/rus_acis.properties
  19. @@ -5,6 +5,9 @@
  20.  InfinitySS = False
  21.  InfinityArrows = False
  22.  
  23. +# Время в секундах для /unstuck
  24. +UnstuckTime = 15
  25. +
  26.  # Период олимпиады: месяц / день / неделя
  27.  # месяц / день / неделя
  28.  # Например: 2 недели-->AltOlyPeriod=Неделя и AltOlyPeriodMultiplier=2.
  29. diff --git a/aCis_gameserver/java/net/sf/l2j/Config.java b/aCis_gameserver/java/net/sf/l2j/Config.java
  30. index a28b524..a0704e2 100644
  31. --- a/aCis_gameserver/java/net/sf/l2j/Config.java
  32. +++ b/aCis_gameserver/java/net/sf/l2j/Config.java
  33. @@ -872,6 +872,9 @@
  34.     public static boolean INFINITY_SS;
  35.     public static boolean INFINITY_ARROWS;
  36.    
  37. +   /** Unstuck Time */
  38. +   public static int UNSTUCK_TIME;
  39. +  
  40.     /** Olympiad Period */
  41.     public static OlympiadPeriod OLY_PERIOD;
  42.     public static int OLY_PERIOD_MULTIPLIER;
  43. @@ -2578,6 +2581,8 @@
  44.         INFINITY_SS = rusacis.getProperty("InfinitySS", false);
  45.         INFINITY_ARROWS = rusacis.getProperty("InfinityArrows", false);
  46.        
  47. +       UNSTUCK_TIME = rusacis.getProperty("UnstuckTime", 30);
  48. +      
  49.         OLY_PERIOD = OlympiadPeriod.valueOf(rusacis.getProperty("OlyPeriod", "MONTH"));
  50.         OLY_PERIOD_MULTIPLIER = rusacis.getProperty("OlyPeriodMultiplier", 1);
  51.        
  52. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java
  53. index 7e263a3..9136698 100644
  54. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java
  55. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/usercommandhandlers/Escape.java
  56. @@ -1,5 +1,7 @@
  57.  package net.sf.l2j.gameserver.handler.usercommandhandlers;
  58.  
  59. +import net.sf.l2j.Config;
  60. +import net.sf.l2j.gameserver.data.SkillTable;
  61.  import net.sf.l2j.gameserver.enums.ZoneId;
  62.  import net.sf.l2j.gameserver.handler.IUserCommandHandler;
  63.  import net.sf.l2j.gameserver.model.actor.Player;
  64. @@ -9,6 +11,8 @@
  65.  import net.sf.l2j.gameserver.model.entity.events.teamvsteam.TvTEvent;
  66.  import net.sf.l2j.gameserver.network.SystemMessageId;
  67.  import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
  68. +import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
  69. +import net.sf.l2j.gameserver.skills.L2Skill;
  70.  
  71.  public class Escape implements IUserCommandHandler
  72.  {
  73. @@ -38,9 +42,16 @@
  74.         else
  75.         {
  76.             player.sendPacket(new PlaySound("systemmsg_e.809"));
  77. -           player.sendPacket(SystemMessageId.STUCK_TRANSPORT_IN_FIVE_MINUTES);
  78. -          
  79. +           int unstuckTimer = Config.UNSTUCK_TIME * 1000;
  80. +                      
  81. +           L2Skill skill = SkillTable.getInstance().getInfo(2099, 1);
  82. +           skill.setHitTime(unstuckTimer);
  83.             player.getAI().tryToCast(player, 2099, 1);
  84. +          
  85. +           if (unstuckTimer < 60000)
  86. +               player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_S2).addString("You will unstuck in " + unstuckTimer / 1000 + " seconds."));
  87. +           else
  88. +               player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_S2).addString("You will unstuck i " + unstuckTimer / 60000 + " minutes."));
  89.         }
  90.     }
  91.    
  92. diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java b/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java
  93. index 46d49d2..7d011fb 100644
  94. --- a/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java
  95. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/skills/L2Skill.java
  96. @@ -85,7 +85,7 @@
  97.     private final int _abnormalLvl; // Abnormal levels for skills and their canceling
  98.     private final int _effectAbnormalLvl;
  99.    
  100. -   private final int _hitTime; // all times in milliseconds
  101. +   private int _hitTime; // all times in milliseconds
  102.     private final int _coolTime;
  103.    
  104.     private final int _reuseDelay;
  105. @@ -1508,4 +1508,9 @@
  106.     {
  107.         return _icon;
  108.     }
  109. +
  110. +   public void setHitTime(int value)
  111. +   {
  112. +       _hitTime = value;
  113. +   }
  114.  }
  115. \ No newline at end of file
  116.  
Add Comment
Please, Sign In to add comment