Advertisement
VANPER

Physics SS and Dagger

Feb 11th, 2020
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.41 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. -   public static final String GEOENGINE_FILE = "./config/main/geoengine.properties";
  7.  
  8. +   public static final String GEOENGINE_FILE = "./config/main/geoengine.properties";
  9.  
  10. +   public static final String PHYSICS_FILE = "./config/customs/physics.properties";
  11.  
  12. +   public static int BLOW_ATTACK_FRONT;
  13. +   public static int BLOW_ATTACK_SIDE;
  14. +   public static int BLOW_ATTACK_BEHIND;
  15. +   public static int BACKSTAB_ATTACK_FRONT;
  16. +   public static int BACKSTAB_ATTACK_SIDE;
  17. +   public static int BACKSTAB_ATTACK_BEHIND;
  18. +   public static int ANTI_SS_BUG_1;
  19. +   public static int ANTI_SS_BUG_2;
  20. +   public static int ANTI_SS_BUG_3;
  21.  
  22. +   private static final void loadPhysics()
  23. +   {
  24. +   final ExProperties physics = initProperties(PHYSICS_FILE); 
  25. +   BLOW_ATTACK_FRONT = Integer.parseInt(physics.getProperty("BlowAttackFront", "50"));
  26. +   BLOW_ATTACK_SIDE = Integer.parseInt(physics.getProperty("BlowAttackSide", "60"));
  27. +   BLOW_ATTACK_BEHIND = Integer.parseInt(physics.getProperty("BlowAttackBehind", "70"));
  28. +  
  29. +   BACKSTAB_ATTACK_FRONT = Integer.parseInt(physics.getProperty("BackstabAttackFront", "0"));
  30. +   BACKSTAB_ATTACK_SIDE = Integer.parseInt(physics.getProperty("BackstabAttackSide", "0"));
  31. +   BACKSTAB_ATTACK_BEHIND = Integer.parseInt(physics.getProperty("BackstabAttackBehind", "70"));
  32.  
  33. +   ANTI_SS_BUG_1 = Integer.parseInt(physics.getProperty("Delay", "2700"));
  34. +   ANTI_SS_BUG_2 = Integer.parseInt(physics.getProperty("DelayBow", "1500"));
  35. +   ANTI_SS_BUG_3 = Integer.parseInt(physics.getProperty("DelayNextAttack", "470000"));
  36. +  
  37. +   }
  38.  
  39.  
  40.  
  41. loadPhysics();
  42.  
  43.  
  44. Index: net.sf.l2j.gameserver.handler.skillhandlers;Blow.java
  45. ===================================================================
  46. --- net.sf.l2j.gameserver.handler.skillhandlers;Blow.java (revision 84)
  47. +++ net.sf.l2j.gameserver.handler.skillhandlers;Blow.java (working copy)
  48.  
  49. -   byte _successChance = SIDE;
  50. -  
  51. -   if (activeChar.isBehindTarget())
  52. -       _successChance = BEHIND;
  53. -   else if (activeChar.isInFrontOfTarget())
  54. -       _successChance = FRONT;
  55.  
  56. +   byte _successChance = SIDE;
  57. +  
  58. +   if (activeChar.isBehindTarget())
  59. +       _successChance = BEHIND;
  60. +   else if (activeChar.isInFrontOfTarget())
  61. +       _successChance = FRONT;
  62.            
  63. +   if (skill.getName().equals("Backstab"))
  64. +   {
  65. +   if (activeChar.isBehindTarget())
  66. +       _successChance = (byte) Config.BACKSTAB_ATTACK_BEHIND;
  67. +   else if (activeChar.isInFrontOfTarget())
  68. +       _successChance = (byte) Config.BACKSTAB_ATTACK_FRONT;
  69. +   else
  70. +       _successChance = (byte) Config.BACKSTAB_ATTACK_SIDE;
  71. +   }
  72. +   else if (activeChar.isBehindTarget())
  73. +       _successChance = (byte) Config.BLOW_ATTACK_BEHIND;
  74. +   else if (activeChar.isInFrontOfTarget())
  75. +       _successChance = (byte) Config.BLOW_ATTACK_FRONT;
  76. +   else
  77. +   _successChance = (byte) Config.BLOW_ATTACK_SIDE;
  78.    
  79.  
  80. Index: net.sf.l2j.gameserver.model.actor;Creature.java
  81. ===================================================================
  82. --- net.sf.l2j.gameserver.model.actor;Creature.java (revision 84)
  83. +++ net.sf.l2j.gameserver.model.actor;Creature.java (working copy)
  84.  
  85. -   public int calculateTimeBetweenAttacks(Creature target, WeaponType weaponType)
  86. -   {
  87. -       switch (weaponType)
  88. -       {
  89. -           case BOW:
  90. -               return 1500 * 345 / getStat().getPAtkSpd();
  91. -          
  92. -           default:
  93. -               return Formulas.calcPAtkSpd(this, target, getStat().getPAtkSpd());
  94. -       }
  95. -   }
  96.  
  97. +   public int calculateTimeBetweenAttacks(Creature target, WeaponType weaponType)
  98. +   {
  99. +       switch (weaponType)
  100. +       {
  101. +           case BOW:
  102. +               return Config.ANTI_SS_BUG_2 * 345 / getStat().getPAtkSpd();
  103. +       }
  104. +       return Formulas.calcPAtkSpd(this, target, getStat().getPAtkSpd());
  105. +   }
  106.  
  107. Index: net.sf.l2j.gameserver.skills;Formulas.java
  108. ===================================================================
  109. --- net.sf.l2j.gameserver.skills;Formulas.java (revision 84)
  110. +++ net.sf.l2j.gameserver.skills;Formulas.java (working copy)
  111.  
  112. -   public static final int calcPAtkSpd(Creature attacker, Creature target, double rate)
  113. -   {
  114. -       if (rate < 2)
  115. -           return 2700;
  116. -      
  117. -       return (int) (470000 / rate);
  118. -   }
  119.  
  120. +   public static final int calcPAtkSpd(Creature attacker, Creature target, double rate)
  121. +   {
  122. +       if (rate < 2.0D)
  123. +           return Config.ANTI_SS_BUG_1;
  124. +       return (int) (Config.ANTI_SS_BUG_3 / rate);
  125. +   }
  126.  
  127. Index: config/physics.properties
  128. ===================================================================
  129. --- config/physics.properties (revision 84)
  130. +++ config/physics.properties (working copy)
  131.  
  132.  
  133. +   #====================================================
  134. +   #               BLOW SETTINGS
  135. +   #====================================================
  136. +   # Chance front
  137. +   BlowAttackFront = 100
  138. +  
  139. +   # Chance on the sides
  140. +   BlowAttackSide = 100
  141. +  
  142. +   # Chance from behind
  143. +   BlowAttackBehind = 100
  144. +  
  145. +   #====================================================
  146. +   #            BACKSTAB SETTINGS        
  147. +   #====================================================
  148. +   # Chance front
  149. +   BackstabAttackFront = 0
  150. +  
  151. +   # Chance on the sides
  152. +   BackstabAttackSide = 40
  153. +  
  154. +   # Chance from behind
  155. +   BackstabAttackBehind = 100
  156.  
  157. +   #====================================================
  158. +   #                 ANTI BUG SS
  159. +   #====================================================
  160. +   #Low = 1500
  161. +   #PvP = 1550
  162. +   DelayBow = 1500
  163. +  
  164. +   # Low = 2700
  165. +   # PvP = 2900
  166. +   Delay = 2900
  167. +  
  168. +   # Low = 470000
  169. +   # PvP = 620000
  170. +   DelayNextAttack = 620000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement