Jump to content
  • 0

Lethal power


Question

11 answers to this question

Recommended Posts

  • 0
Posted
<skill id="344" levels="1" name="Lethal Blow">
	<set name="power" val="5773"/>
	<set name="lethal1" val="5"/>
	<set name="lethal2" val="2"/>
</skill>

  • 0
Posted

Mhm ok i'm check :) how to disable on raid boss?

 

<skill id="344" levels="1" name="Lethal Blow" enchantGroup1="6" enchantGroup2="6" enchantGroup3="6" enchantGroup4="6" enchantGroup5="6" enchantGroup6="6" enchantGroup7="6">
	<!-- Confirmed CT2.5 -->
	<table name="#enchantMagicLvl"> 81 81 81 82 82 82 83 83 83 84 84 84 85 85 85 </table>
	<table name="#ench1Power"> 6502 6535 6568 6601 6634 6667 6700 6733 6766 6799 6833 6866 6899 6932 6965 </table>
	<table name="#ench2CritRate"> 21 21 21 21 21 21 21 22 22 22 22 22 22 22 23 </table>
	<table name="#enchelementPower"> 3 6 10 13 16 20 23 26 30 33 36 40 43 46 50 </table>
	<table name="#ench7Duel"> 5880 5986 6092 6198 6304 6410 6516 6622 6728 6834 6940 7046 7152 7258 7364 </table>
	<set name="baseCritRate" val="20" />
	<set name="blowChance" val="30" />
	<set name="castRange" val="40" />
	<set name="condition" val="16" /> <!-- Crit -->
	<set name="effectRange" val="400" />
	<set name="hitTime" val="1800" />
	<set name="lethal1" val="5" /> <!-- Half-Kill -->
	<set name="magicLvl" val="76" />
	<set name="mpConsume" val="77" />
	<set name="nextActionAttack" val="true" />
	<set name="operateType" val="A1" />
	<set name="overHit" val="true" />
	<set name="power" val="5000" />
	<set name="reuseDelay" val="4000" />
	<set name="skillType" val="BLOW" />
	<set name="SSBoost" val="1.5" />
	<set name="target" val="TARGET_ONE" />
	<set name="trait" val="DEATH" />
	<enchant1 name="magicLvl" val="#enchantMagicLvl" />
	<enchant1 name="power" val="#ench1Power" />
	<enchant2 name="magicLvl" val="#enchantMagicLvl" />
	<enchant2 name="baseCritRate" val="#ench2CritRate" />
	<enchant3 name="magicLvl" val="#enchantMagicLvl" />
	<enchant3 name="element" val="0" /> <!-- Fire -->
	<enchant3 name="elementPower" val="#enchelementPower" />
	<enchant4 name="magicLvl" val="#enchantMagicLvl" />
	<enchant4 name="element" val="1" /> <!-- Water -->
	<enchant4 name="elementPower" val="#enchelementPower" />
	<enchant5 name="magicLvl" val="#enchantMagicLvl" />
	<enchant5 name="element" val="2" /> <!-- Wind -->
	<enchant5 name="elementPower" val="#enchelementPower" />
	<enchant6 name="magicLvl" val="#enchantMagicLvl" />
	<enchant6 name="element" val="3" /> <!-- Earth -->
	<enchant6 name="elementPower" val="#enchelementPower" />
	<enchant7 name="magicLvl" val="#enchantMagicLvl" />
	<enchant7 name="pvpPower" val="#ench7Duel" />
	<cond msgId="113" addName="1">
		<using kind="Dagger,Dual Dagger" />
	</cond>
</skill>

  • 0
Posted

Mhm ok i'm check :) how to disable on raid boss?

 

<skill id="344" levels="1" name="Lethal Blow" enchantGroup1="6" enchantGroup2="6" enchantGroup3="6" enchantGroup4="6" enchantGroup5="6" enchantGroup6="6" enchantGroup7="6">
	<!-- Confirmed CT2.5 -->
	<table name="#enchantMagicLvl"> 81 81 81 82 82 82 83 83 83 84 84 84 85 85 85 </table>
	<table name="#ench1Power"> 6502 6535 6568 6601 6634 6667 6700 6733 6766 6799 6833 6866 6899 6932 6965 </table>
	<table name="#ench2CritRate"> 21 21 21 21 21 21 21 22 22 22 22 22 22 22 23 </table>
	<table name="#enchelementPower"> 3 6 10 13 16 20 23 26 30 33 36 40 43 46 50 </table>
	<table name="#ench7Duel"> 5880 5986 6092 6198 6304 6410 6516 6622 6728 6834 6940 7046 7152 7258 7364 </table>
	<set name="baseCritRate" val="20" />
	<set name="blowChance" val="30" />
	<set name="castRange" val="40" />
	<set name="condition" val="16" /> <!-- Crit -->
	<set name="effectRange" val="400" />
	<set name="hitTime" val="1800" />
	<set name="lethal1" val="5" /> <!-- Half-Kill -->
	<set name="magicLvl" val="76" />
	<set name="mpConsume" val="77" />
	<set name="nextActionAttack" val="true" />
	<set name="operateType" val="A1" />
	<set name="overHit" val="true" />
	<set name="power" val="5000" />
	<set name="reuseDelay" val="4000" />
	<set name="skillType" val="BLOW" />
	<set name="SSBoost" val="1.5" />
	<set name="target" val="TARGET_ONE" />
	<set name="trait" val="DEATH" />
	<enchant1 name="magicLvl" val="#enchantMagicLvl" />
	<enchant1 name="power" val="#ench1Power" />
	<enchant2 name="magicLvl" val="#enchantMagicLvl" />
	<enchant2 name="baseCritRate" val="#ench2CritRate" />
	<enchant3 name="magicLvl" val="#enchantMagicLvl" />
	<enchant3 name="element" val="0" /> <!-- Fire -->
	<enchant3 name="elementPower" val="#enchelementPower" />
	<enchant4 name="magicLvl" val="#enchantMagicLvl" />
	<enchant4 name="element" val="1" /> <!-- Water -->
	<enchant4 name="elementPower" val="#enchelementPower" />
	<enchant5 name="magicLvl" val="#enchantMagicLvl" />
	<enchant5 name="element" val="2" /> <!-- Wind -->
	<enchant5 name="elementPower" val="#enchelementPower" />
	<enchant6 name="magicLvl" val="#enchantMagicLvl" />
	<enchant6 name="element" val="3" /> <!-- Earth -->
	<enchant6 name="elementPower" val="#enchelementPower" />
	<enchant7 name="magicLvl" val="#enchantMagicLvl" />
	<enchant7 name="pvpPower" val="#ench7Duel" />
	<cond msgId="113" addName="1">
		<using kind="Dagger,Dual Dagger" />
	</cond>
</skill>

 

Edit Blow skillhandler.

  • 0
Posted

Mhm please send to me :) tutorial on edit power and disable on raid boss ;/ Very Thanks Tryskell

calcLethalHit( in Formulas.java

 

That stuff already exists on L2J since a long time.

  • 0
Posted

/**
    * Calculate value of blow success 
    * @param activeChar 
    * @param target 
    * @param chance 
    * @return
    */
   public static final boolean calcBlow(L2Character activeChar, L2Character target, int chance)
   {
      return activeChar.calcStat(Stats.BLOW_RATE, chance*(1.0+(activeChar.getDEX()-20)/100), target, null)>Rnd.get(100);
   }
   /**
    * Calculate value of lethal chance 
    * @param activeChar 
    * @param target 
    * @param baseLethal 
    * @param magiclvl 
    * @return
    */
   public static final double calcLethal(L2Character activeChar, L2Character target, int baseLethal, int magiclvl)
   {
      double chance = 0;
      if (magiclvl > 0)
      {
         int delta = ((magiclvl + activeChar.getLevel()) / 2) - 1 - target.getLevel();
         
         // delta [-3,infinite)
         if (delta >= -3)
         {
            chance = (baseLethal * ((double) activeChar.getLevel() / target.getLevel()));
         }
         // delta [-9, -3[
         else if (delta < -3 && delta >= -9)
         {
            //               baseLethal
            // chance = -1 * -----------
            //               (delta / 3)
            chance = (-3) * (baseLethal / (delta));
         }
         //delta [-infinite,-9[
         else
         {
            chance = baseLethal / 15;
         }
      }
      else
      {
         chance = (baseLethal * ((double) activeChar.getLevel() / target.getLevel()));
      }
      return 10 * activeChar.calcStat(Stats.LETHAL_RATE, chance, target, null);
   }
   
   public static final boolean calcLethalHit(L2Character activeChar, L2Character target, L2Skill skill)
   {
      if (!target.isRaid() && !(target instanceof L2DoorInstance)
            && !(target instanceof L2Npc && ((L2Npc) target).getNpcId() == 35062))
      {
         //activeChar.sendMessage(Double.toString(chance));
         //activeChar.sendMessage(Double.toString(calcLethal(activeChar, target, skill.getLethalChance2(),skill.getMagicLevel())));
         //activeChar.sendMessage(Double.toString(calcLethal(activeChar, target, skill.getLethalChance1(),skill.getMagicLevel())));
         
         // 2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1)
         if (skill.getLethalChance2() > 0 && Rnd.get(1000) < calcLethal(activeChar, target, skill.getLethalChance2(),skill.getMagicLevel()))
         {
            if (target instanceof L2Npc)
               target.reduceCurrentHp(target.getCurrentHp() - 1, activeChar, skill);
            else if (target instanceof L2PcInstance) // If is a active player set his HP and CP to 1
            {
               L2PcInstance player = (L2PcInstance) target;
               if (!player.isInvul())
               {
                  if (!(activeChar instanceof L2PcInstance &&
                        (((L2PcInstance)activeChar).isGM() && !((L2PcInstance)activeChar).getAccessLevel().canGiveDamage())))
                  {
                     player.setCurrentHp(1);
                     player.setCurrentCp(1);
                     player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.LETHAL_STRIKE_SUCCESSFUL));
                  }
               }
            }
            activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.LETHAL_STRIKE));
         }
         else if (skill.getLethalChance1() > 0 && Rnd.get(1000) < calcLethal(activeChar, target, skill.getLethalChance1(),skill.getMagicLevel()))
         {
            if (target instanceof L2PcInstance)
            {
               L2PcInstance player = (L2PcInstance) target;
               if (!player.isInvul())
               {
                  if (!(activeChar instanceof L2PcInstance &&
                        (((L2PcInstance)activeChar).isGM() && !((L2PcInstance)activeChar).getAccessLevel().canGiveDamage())))
                  {
                     player.setCurrentCp(1); // Set CP to 1
                     player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CP_DISAPPEARS_WHEN_HIT_WITH_A_HALF_KILL_SKILL));
                     activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.HALF_KILL));
                  }
               }
            }
            //TODO: remove half kill since SYSMsg got changed.
            /*else if (target instanceof L2Npc) // If is a monster remove first damage and after 50% of current hp
                    target.reduceCurrentHp(target.getCurrentHp() / 2, activeChar, skill);*/
            
         }
         else
            return false;
      }
      else
         return false;
      
      return true;
   }

 

This is my code on formulas.java please check :) mhm how to disable lethal on raidboss?

  • 0
Posted

Dude I'm not your mama. If you can't use search tool alone, forget the idea to open a server, even for fun.

 

	   public static final boolean calcLethalHit(L2Character activeChar, L2Character target, L2Skill skill)
   {
      if (!target.isRaid() && !(target instanceof L2DoorInstance)

 

Your code got it already. Now if it doesn't work, that's another problem.

  • 0
Posted

Now, if you are 100% SURE (and don't say "i'm probably sure", be SURE) when you hit a raidboss you can lethal it, here are some tracks :

 

- the target isn't a raidboss (type of the L2Npc in npc.sql MUST BE RaidBossInstance or GrandBossInstance).

- isRaid() check is wrong (either doesn't check one of instances I said higher, or return false anytime).

  • 0
Posted

Mhm nice Tryskell :) my question how to fixed damage (power) lethal and chance :) chance is 100% :) please help me ;/

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


  • Posts

    • LIVE VERIFICATION? SUMSUB? “IMPOSSIBLE”? ▪ Spoiler: it is possible — if you know who to work with. A client came in with a task to pass **live verification** on **WantToPay**, a Telegram virtual card service. On the platform side — **Sumsub**: liveness check, SMS, manual review. “Fast” and “by eye” simply don’t work here. › What was done: → analyzed the verification scenario and Sumsub requirements → built the correct flow: phone number, email, timing → **completed live verification remotely, without account handover** → handled SMS and confirmation codes → brought the process to final approval ▪ Result: → verification passed → access granted → no flags or repeat requests ▪ Live verification is not luck. It’s scenario-based preparation — not hope. › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +6RAKokIn5ItmYjEx ) *All data is published with the client’s consent.* #verification #sumsub #livecheck #kyc #case
    • IMPORTANT INFO: In a few days, I will switch to completely new code, written from scratch with a new download system, patch building and management system. The Updater will become true 2026 code with "foolproof systems". I'm going to create a Discord server for customers to request new ideas and features. FIRST CUSTOMERS ARE ALREADY USING THE NEW UPDATER ON LIVE SERVERS! Watch this topic for upcoming info because the new updater is around the corner! Yes, you can still use self-update on the previous updater! No, the new updater won't be compatible with the old patch system! A new build is required, but players who already have game files won't have to download the entire patch again! New templates and updates to existing templates are coming soon! Sneak peek:  
    • i used guytis IL project and source. i found in his project there are 3 Client version source... 1,CliExt_H5   --->this one cant be compiled in VS2005,i did know why..is it for H5 client? 2,CliExtNew  --->this one is IL version ,but when i compiled it and use it.player cant login game,MD5Checksum wrong.i check the source code,but not found any hints. 3,L2Server    --->this one for HB client?im not sure...   so my question is what are the differences between these three versions of cliext.dll?how can i fix the issue of the MD5Checksum not matching problem?   01/29/2026 21:04:11.366, [CCliExt::HandleCheckSum] Invalid Checksum[1130415144] vs [-721420287] packet[dd] len[29] sum[2698] key[30] HWID[] Account[]! 01/29/2026 21:04:11.366, SocketLimiter::UserSocketBadunknownprotocol 11111111111 01/29/2026 21:04:11.366, [usersocket]unknown protocol from ip[113.137.149.115]!      
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..