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

    • I’ve seen tools like Find Person Name by Photo come in handy for creators who want to understand their audience better or spot fake accounts trying to piggyback on their growth. Pairing something like that with a solid SMM panel can make your workflow feel way smoother, especially if you're trying to grow without getting tangled in guesswork.
    • Join our discord: https://www.lineage2.cz/discord  
    • You should buy it then I’ll make a discount  
    • Hi everyone,   In 2014, I completely stepped away from developing L2 servers and doing L2J-related work. Since then, I’ve only opened this server about once a year and helped a few servers and individuals for free. I haven’t taken on any paid L2J work since then.   LINEAGE2.GOLD is a project that has reached about Season 6. The first season launched at the end of 2020 and was a fully rebuilt Gold-style server on the Classic client (protocol 110). It featured many custom systems and enhancements. After several seasons, I decided to abandon the Mobius-based project and move to Lucera, as my goal was to get as close as possible to Interlude PTS behavior while still staying on the L2J platform.   The current project was once again completely rebuilt, this time on the Essence client (protocol 306), and is based on Lucera. Because of that, acquiring a license from Deazer is required.   My Lucera extender includes, but is not limited to: Formulas.java Basic anti-bot detection, which proved quite effective, we caught most Adrenaline users using relatively simple server-side logic, logged them, and took staff action. Simple admin account lookup commands based on IP, HWID, and similar identifiers. In-game Captcha via https://lineage2.gold/code, protected by Cloudflare, including admin commands for blacklisting based on aggression levels and whitelisting. Additional admin tools such as Auto-Play status checks, Enchanted Hero Weapon live sync, force add/remove clans from castle sieges, item listeners for live item monitoring, and more. A fully rewritten Auto-Play system with support for ExAutoPlaySetting, while still using the Auto-Play UI wheel, featuring: Debuff Efficiency Party Leader Assist Respectful Hunting Healer AI Target Mode Range Mode Summoner buff support Dwarf mechanics Reworked EffectDispelEffects to restore buffs after Cancellation. Raid Bomb item support. Reworked CronZoneSwitcher. Prime Time Raid Respawn Service. Community Board features such as Top rankings and RB/Epic status. Custom systems for Noblesse, Subclasses, support-class rewards, and much more.   Depending on the deal, the project can include: The lineage2.gold domain The website built on the Laravel PHP framework The server’s Discord Client Interface source Server files and extender source The server database (excluding private data such as emails and passwords)   I’m primarily looking for a serious team to continue the project, as it would be a shame to see this work abandoned. This is not cheap. You can DM me with offers. If you’re wondering why I’m doing this: I’ve felt a clear lack of appreciation from the L2 community, and I’m not interested in doing charity work for people who don’t deserve it. I’m simply not someone who tolerates BS. Server Info: https://lineage2.gold/info Server for test: https://lineage2.gold/download Over 110 videos YouTube playlist: https://www.youtube.com/watch?v=HO7BZaxUv2U&list=PLD9WZ0Nj-zstZaYeWxAxTKbX7ia2M_DUu&index=113
  • 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..

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