Jump to content
  • 0

Lethal power


TreVor

Question

11 answers to this question

Recommended Posts

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

Link to comment
Share on other sites

  • 0

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>

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

/**
    * 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?

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

  • 0

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

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
Answer this question...

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



  • Posts

    • Well, sorry not sorry for resurrecting old topic, but I believe it's ultimately stupid to implement license checks like Vilmis did 🙂   private static String url = "jdbc:mysql://185.80.128.233/" + getData("Zm9ydW1fZGI="); private static String username = getData("bXJjb3B5cmlnaHQ="); private static String password = getData("Y29weXJpZ2h0XzEyMw=="); con = GlobalDB.getInstance().getConnection(); PreparedStatement statement; statement = con.prepareStatement("SELECT field_6 from core_pfields_content WHERE member_id = ?"); statement.setInt(1, Config.FORUM_USER_ID); ResultSet rset = statement.executeQuery();   This awesome way of coding things leaves us with base64-encoded credentials and DB exposed and accessible globally 😉 Btw he checks his licensing data from some plugin generated table his forum uses. Vilmis took action and ensured that mrcopyright user would have only needed accesses and rights for this operation. But he forgot to ensure that his INFORMATION_SCHEMA database would not be exposed and readable... That leads us to fully readable server variables like version used (10.1.26-MariaDB-0+deb9u1 - pretty ancient DB and OS, I'd assume). From here you can go south and do some kinky stuff, if you want and have knowledge for that. But who cares, right?   Ooh, table core_pfields_content field_6 is IP address which is checked by FORUM_USER_ID. Yep, you can query all IP addresses there (124 of them right now) and also do whatever you want with them! 🙂  The most fun part? Files source has been shared what, more than 2 years ago?  Vilmis still uses very same credentials and never changed it after sources exposure - who cares. Although, "sources" may be way too strong word here. If anyone still use paid Orion versions, I'd suggest packing your shit and leaving immediately, or at least fix this incompetent fool caused problems. It's obvious Vilmis don't care or maybe doesn't even know from the first place how to solve this problem (hint hint - tiny PHP Rest API microservice which would do absolutely the same but without exposing sensitive data?). By doing that, he exposes his infrastructure and YOUR data, and he does that for more than 2 years now 🙂 Developer of century!    
    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...