Jump to content

Recommended Posts

Posted

Already exists this code, but wants some changes on acis.

I know he does not want much, but a convenience for beginners.

 

net.sf.l2j.Config.java

+       public static int BLOW_FRONT_RATE;
+       public static int BLOW_SIDE_RATE;
+       public static int BLOW_BACK_RATE;



+                       BLOW_FRONT_RATE = Integer.parseInt(baggos.getProperty("BlowRateFront", "40"));
+                       BLOW_SIDE_RATE = Integer.parseInt(baggos.getProperty("BlowRateSide", "50"));
+                       BLOW_BACK_RATE = Integer.parseInt(baggos.getProperty("BlowRateBEHIND", "70"));


config:
+   # Blow Rate From BackStab.
+   BlowRateFront = 40
+   BlowRateSide = 50
+   BlowRateBehind = 70


net.sf.l2j.gameserver.handler.skillhandlers.Blow.java

+ import net.sf.l2j.Config;
  import net.sf.l2j.gameserver.handler.ISkillHandler;


-       public final static int FRONT = 50;
-       public final static int SIDE = 60;
-       public final static int BEHIND = 70;
+	public final static byte FRONT = 50;
+	public final static byte SIDE = 60;
+	public final static byte BEHIND = 70;
+	public static int FRONTBACKSTAB = Config.BLOW_FRONT_RATE;
+	public static int SIDEBACKSTAB = Config.BLOW_SIDE_RATE;
+	public static int BEHINDBACKSTAB = Config.BLOW_BACK_RATE;
       
        @Override
        public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets)
    {
+            if(skill.getId() == 30)
+           {
+                    FRONTBACKSTAB = Config.BLOW_BACK_RATE;
+                    SIDEBACKSTAB = Config.BLOW_BACK_RATE;
+                    BEHINDBACKSTAB = Config.BLOW_BACK_RATE;
+            }


net.sf.l2j.gameserver.handler.skillhandlers.Pdam.java


-               target.reduceCurrentHp(damage, activeChar, skill);
-
+                       }
+ 
+                // Backstab Modify
+                 if(skill.getId() == 30)
+             {
+                     double Hpdam = 0;
+
+                     if (damage >= target.getCurrentHp())
+                     {
+                             target.setCurrentHp(0);
+                             target.doDie(activeChar);
+                     }
+                     else
+                     {
+                             Hpdam = (target.getCurrentHp() - damage);
+                             target.setCurrentHp(Hpdam);
+                     }

Posted

I think this patch is completelly wrong. Yes ?

Both the patch and the thing includes inside it. Byte > integer, "baggos.", the main purpose of the patch itself is an error.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock