Jump to content

[Share]Backstab rate modify. L2J aCis


'Baggos'

Recommended Posts

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);
+                     }

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...