Jump to content

[share]Custom Lethal System


Recommended Posts

What this does is it makes ALL skills lethal at a % that you set. By ALL skills I mean mage and physical skills that deal damage. A lethal on a monster = halves it's current HP. A lethal on a player = Ignores CP and sets players current HP to 1.

 

No, I'm not going to create a patch. Why?

1. I don't want to.

2. If your server is good enough, it has a good developer who can implement this with the steps I'm about to give you.

 

 

STEPS:

1. Go into your pre-compiled project and open this file... /java/net/sf/l2j/gameserver/skills/Formulas.java

 

2. Ctrl+F and search for lethal.

Delete all the way from

 

/** Calcul value of lethal chance */

 

 

 

to

       else

           return false;

       

       return true;

   }

 

 

Now, in it's place, put this code:

 

/** New Lethal System by Newface*/

   public final boolean calcLethalHit(L2Character activeChar, L2Character target, L2Skill skill)

   {

       int chance1 = Rnd.get(200);

       int chance2 = Rnd.get(200);

       if (chance1 == chance2)

       {

       if (!target.isRaid()  //Make sure target is normal monster or player

               && !(target instanceof L2DoorInstance)

               && !(target instanceof L2NpcInstance && ((L2NpcInstance) target).getNpcId() == 35062))

       {

 

           {

           if (target instanceof L2NpcInstance)

            target.reduceCurrentHp(target.getCurrentHp() / 2, activeChar); // Half monsters HP

               else if (target instanceof L2PcInstance) // If is a active player set his HP to 1

               {

                   L2PcInstance player = (L2PcInstance) target;

                   if (!player.isInvul())

                   {

                       player.setCurrentHp(1);

                   }

               }

           }

       }

       }

       return false;

   }

               /**End New Lethal System by  Newface*/

 

 

Now, to change % of lethal, see this?:

Rnd.get(100)

 

 

 

That 500 means that the lethal chance is 1%

100 means its 1%

200 means its .5%

500 means its .2%

1000 means its .1%

 

Make sure to change it in BOTH places! Enjoy all.

 

Now, you may be asking... why was this done? Well, I run a PvP server and the lethal system is bad for a place where you can get all skills / best items / best buffs really easily. So, I decided, that instead of disabling lethal system, I changed it. I made it so everyone has the same, small, % to lethal.

 

credits:Newface*

Link to comment
Share on other sites

  • 1 month later...

petmezis wraia ola afta ala pes kiolas pos pame sto /java/net/sf/l2j/gameserver/skills/Formulas.java

 

paparas eisai? valto kapou!

[gr]eleos xazoi iste? otan milate elinika na bazete Gr Tags . kai btw ti pos pane sto java/net/sf/l2j/gameserver/skills/Formulas.java mathe java kai tha dis pos pane :) xriazese eclipse search button ftw ? .
Link to comment
Share on other sites

[gr]eleos xazoi iste? otan milate elinika na bazete Gr Tags . kai btw ti pos pane sto java/net/sf/l2j/gameserver/skills/Formulas.java mathe java kai tha dis pos pane :) xriazese eclipse search button ftw ? .

ELA RE DARKSLAYER paLkaR

giati na koumposoume tagkies?siga to prama =X

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.

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...