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

    • SELLING EMPTY TELEGRAM BOTS WITH AGE Registration date: November 2024 High-quality & clean bots — no subscribers, no bans, created on fresh IPs. y rested and reliable — perfect for: — Telegram search ranking — any technical or marketing tasks Delivery options: tdata, by phone number, ownership transfer, or via tokens. Current price list: From 3 pcs — $3 each From 20 pcs — $2.5 each From 60 pcs — $2.3 each From 100 pcs — $2.2 each From 400 pcs — $1.9 each Over 15,000+ bots available — ready for instant delivery. Contact on Telegram: @SMMTG6
    • Telegram Bot TOP Search Promotion | SEO Optimization for Bots | SMMTG.PRO We promote Telegram bots to the TOP of search results — by keywords, topics, and countries. What’s included: • Promotion to the TOP of Telegram search • Bot optimization for Telegram algorithms • Competitor analysis and keyword selection • Testing and securing stable ranking Delivery time: 2–3 days per bot Pricing: Starts from $40 per bot (final cost depends on competition level and target country) We work with 50+ countries: Russia • Ukraine • USA • Israel • Uzbekistan • Turkey • China • Thailand • Europe • India Training is also available: Telegram bot SEO optimization Techniques & insights for reaching TOP search positions Real-world cases and recommendations Contact: Telegram — @SMMTG6 Our SMM panel: SMMTG.PRO
    • SMMTG.PRO — TELEGRAM SERVICES PROVIDER PRICE LIST ★ Premium Subscribers for Bots Russia — from $5.6 / 1,000 subs Ukraine — from $5.6 / 1,000 subs USA — from $6.4 / 1,000 subs Israel — from $6.4 / 1,000 subs Uzbekistan — from $6.4 / 1,000 subs Turkey — from $6.4 / 1,000 subs China — from $6.4 / 1,000 subs Thailand — from $6.4 / 1,000 subs Europe — from $6.4 / 1,000 subs India — from $6.4 / 1,000 subs Other countries — from $13 / 1,000 subs OTHER SERVICES Telegram Boost — from $42 / 1,000 votes Premium Subscribers for Channels — from $2.9 / 1,000 Telegram Stars — from $16.9 / 1,000 stars Regular Subscribers for Channels — from $0.19 / 1,000 Regular Subscribers for Bots — from $0.25 / 1,000 Post Reactions — from $0.14 / 1,000 reactions Post Views — from $0.07 / 1,000 views EXCLUSIVE SERVICES ★ Telegram Search TOP Ranking | SEO Optimization ★ Aged Telegram Bots (registered accounts) — from $1.9 / bot ★ Telegram SEO & Search Training PAYMENT METHODS Heleket — any cryptocurrency CrystalPay — RUB | KZT | SBP | CryptoBot & more Payeer — multiple payment options ➤ Website (24/7): SMMTG.PRO ➤ Telegram Channel: t.me/+e_DKWnC5AFw0ZDhi ➤ 24/7 Support: @SMMTG6
    • IOThread [3][47] (good) good IOThread [3][47] (good) good IOThread [3][47] (good) good     IOThread [6][78] (ahehe): ahehe
    • rly swired...leave low npcmakers ,its worked..not crash L2server.exe.   A:I:S:E:PE:DI:DE:BO=1.000000:1.000000:1.000000:1.000000:1.000000:0:0:0 L:Y:X:H=0:0:0:0:0 Crashed Thread[6]. Server Up Time : Wed Oct 15 13:11:08 2025 Current Time : Wed Oct 15 13:13:35 2025 Elapsed Time : 0 days 0 hours 2 minutes 27 seconds IOBufferPool - 39989 / 40000, PendingWrite 0 bytes [0] =============== object report user[0/0], npc[820/0], item[0/0], usersocket[0] =============== npc server connection log Connect : Wed Oct 15 13:13:34 2025 [(16328) 2025/10/15 13:13:35]: ======================= an Access Violation in module L2Server.exe at 0033:00518eef. start at 2025/10/15 13:11:08 Read from location ffffffff caused an access violation. Registers: EAX=0003dc7b CS=0033 EIP=00518eef EFLGS=00010207 EBX=a2228c44 SS=002b ESP=7da7f870 EBP=00000000 ECX=0003dc7b DS=002b ESI=00000000 FS=0053 EDX=00400000 ES=002b EDI=0c200dc0 GS=002b Bytes at CS:EIP: 48 8b 0c f0 80 79 5d 00 74 23 44 39 69 10 7f 1d Stack dump: 7da7f870: a2228c44 00000000 0004c158 00000000 009b2a10 00000000 00400000 00000000 7da7f890: 00000001 00000000 00000000 00000000 fffffffe ffffffff 00000000 40cae180 7da7f8b0: 00000000 40d11740 00000000 c0b1be00 00000000 00000000 00000000 00000000 7da7f8d0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 7da7f8f0: 3b19e2dc 00000000 0078e4c8 00000000 3b19e2dc 00000000 00400000 00000000 7da7f910: 0004c158 00000000 00000000 00000000 00000000 00000000 006c688a 00000000 7da7f930: a2228c44 00000000 00000000 00000000 00000000 00000000 00a2aa10 00000000 7da7f950: 012e6dc0 00000000 9beaee10 00000000 00000000 00000000 0004c158 00000000 7da7f970: 00000000 00000000 00a12d50 00000000 fffffffe ffffffff 0064dd24 00000000 7da7f990: fffffffe ffffffff 00000000 00000000 00000000 00000000 00000000 00000000 ver = Dec 16 2005_22:03:13 GuardInfo : IOThread [0][63] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [1][63] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [2][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [3][47] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [4][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [5][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) Lock Stack : IOThread [6][78] (ahehe): void IOThread_common(void *arglist) -> void CIOObject::TimerDispatch(bool bRootLoop) -> void CThreadLocalTimer::Dispath -> void CEnterWorldSerializer::TimerExpired(int id) -> void CNPC::EnterWorld(bool bSetDefaultParam, int nHP, int nMP) -> CCreature::EnterWorld Lock Stack : .\NpcSocket.cpp(278[116]) IOThread [7][78] (good): void IOThread_common(void *arglist) -> bool NpcEnterWorldPacket(NpcSocket* pSocket, const unsigned char *pPacket) -> void Push(int index, int x, int y, int z, int dir, int nSetDefaultParam, int nHP, int nMP) Lock Stack : .\NpcSocket.cpp(389[185]) ListenThread [13][141] (good): void ListenThread_common() -> unsigned __stdcall WaitThread(void *) Lock Stack : MainThread [12][156] (good): Lock Stack : GuardInfo end [(16328) 2025/10/15 13:13:35]: *.\ioc.cpp:648(Tue Dec 13 02:52:40 2005) exception  
  • Topics

×
×
  • 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