Advertisement
VANPER

Unstuck Time

Feb 11th, 2020
1,020
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.97 KB | None | 0 0
  1. Index: net.sf.l2j;Config.java
  2. ===================================================================
  3. --- net.sf.l2j;Config.java (revision 84)
  4. +++ net.sf.l2j;Config.java (working copy)
  5.  
  6. +   /** Unstuck Time */
  7. +   public static int UNSTUCK_TIME;
  8.  
  9. +   UNSTUCK_TIME = player.getProperty("UnstuckTime", 30);
  10.  
  11. Index: net.sf.l2j.gameserver.handler.usercommandhandlers;Escape.java
  12. ===================================================================
  13. --- net.sf.l2j.gameserver.handler.usercommandhandlers;Escape.java (revision 84)
  14. +++ net.sf.l2j.gameserver.handler.usercommandhandlers;Escape.java (working copy)
  15.  
  16.     // Official timer 5 minutes, for GM 1 second
  17.     if (player.isGM())
  18.     player.doCast(SkillTable.getInstance().getInfo(2100, 1));
  19. +   else
  20. +   {
  21. +       player.sendPacket(new PlaySound("systemmsg_e.809"));
  22. +       int unstuckTimer = Config.UNSTUCK_TIME * 1000;
  23. +      
  24. +       L2Skill skill = SkillTable.getInstance().getInfo(2099, 1);
  25. +       skill.setHitTime(unstuckTimer);
  26. +       player.doCast(skill);
  27. +  
  28. +       if (unstuckTimer < 60000)
  29. +           player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_S2).addString("You will unstuck in " + unstuckTimer / 1000 + " seconds."));
  30. +       else
  31. +           player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_S2).addString("You will unstuck i " + unstuckTimer / 60000 + " minutes."));
  32. +  
  33. +   }
  34.  
  35. Index: net.sf.l2j.gameserver.model;L2Skill.java
  36. ===================================================================
  37. --- net.sf.l2j.gameserver.model;L2Skill.java (revision 84)
  38. +++ net.sf.l2j.gameserver.model;L2Skill.java (working copy)
  39.  
  40. -   private final int _hitTime; // all times in milliseconds
  41.  
  42. +   private int _hitTime; // all times in milliseconds
  43.  
  44.  
  45. +   public void setHitTime(int value)
  46. +   {
  47. +       _hitTime = value;
  48. +   }
  49.  
  50.  
  51. Index: config/player.propertis
  52. ===================================================================
  53. --- config/player.propertis (revision 84)
  54. +++ config/player.propertis (working copy)
  55.  
  56. +   # Time in seconds for /unstuck
  57. +   UnstuckTime = 15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement