Skill succes rate

Results 1 to 13 of 13
  1. #1
    Enthusiast Dox is offline
    MemberRank
    Oct 2008 Join Date
    The Netherlands, AmersfoortLocation
    39Posts

    Skill succes rate

    Oke first of all dont tell me i should use search cuz i did and y i found some stuff about it but
    1st. Not what im looking for
    2nd.Not a correct answer
    so lets try again. I want to chance the succes rate of lets say the skill 'Bluff' code:

    <skill id="358" levels="1" name="Bluff">
    <!--
    Description(s): Tricks the enemy to show its back.
    Removes the enemy's desire to attack and cancels one's
    own target status. Instantly throws the enemy into a
    state of shock. An equipped dagger weapon is required
    to use this skill.
    -->
    <!-- Done by BoDiE -->
    <set name="weaponsAllowed" val="16" />
    <set name="mpConsume" val="35" />
    <set name="power" val="40" />
    <set name="target" val="TARGET_ONE" />
    <set name="magicLvl" val="77" />
    <set name="hitTime" val="1000" />
    <set name="condition" val="16" />
    <set name="reuseDelay" val="80000" />
    <set name="skillType" val="AGGREDUCE_CHAR" />
    <set name="effectType" val="STUN" />
    <set name="effectPower" val="40" />
    <set name="lvlDepend" val="1" />
    <set name="operateType" val="OP_ACTIVE" />
    <set name="castRange" val="40" />
    <set name="effectRange" val="400" />
    <for>
    <effect count="1" name="Bluff" time="1" val="0"
    stackOrder="1" stackType="Stun" />
    <effect count="1" name="RemoveTarget" time="1" val="0"
    noicon="1" />
    </for>
    </skill>
    now lets say i want to change the succes rate to 50%. Can any1 help me please
    Thanks in advance


  2. #2
    Account Upgraded | Title Enabled! Rin4a is offline
    MemberRank
    Apr 2006 Join Date
    LatviaLocation
    981Posts

    Re: Skill succes rate

    change <set name="power" val="40" /> to any value that you like:
    <set name="power" val="100" /> for 100%

  3. #3
    Enthusiast Dox is offline
    MemberRank
    Oct 2008 Join Date
    The Netherlands, AmersfoortLocation
    39Posts

    Re: Skill succes rate

    mm that doesnt count for

    <skill id="343" levels="1" name="Lethal Shot">
    <set name="mpConsume" val="153" />
    <set name="weaponsAllowed" val="32" />
    <set name="magicLvl" val="76" />
    <set name="power" val="5132" />
    <set name="target" val="TARGET_ONE" />
    <set name="skillType" val="PDAM" />
    <set name="operateType" val="OP_ACTIVE" />
    <set name="castRange" val="900" />
    <set name="effectRange" val="1400" />
    <set name="reuseDelay" val="30000" />
    <set name="overHit" val="true" />
    <set name="SSBoost" val="2.0" />
    <set name="lethal1" val="5" />
    <set name="lethal2" val="2" />
    <set name="hitTime" val="4000" />
    <for />
    </skill>
    <skill id="344" levels="1" name="Lethal Blow">
    <set name="mpConsume" val="77" />
    <set name="weaponsAllowed" val="16" />
    <set name="magicLvl" val="76" />
    <set name="power" val="5773" />
    <set name="target" val="TARGET_ONE" />
    <set name="skillType" val="BLOW" />
    <set name="operateType" val="OP_ACTIVE" />
    <set name="castRange" val="40" />
    <set name="effectRange" val="400" />
    <set name="reuseDelay" val="15000" />
    <set name="overHit" val="true" />
    <set name="condition" val="16" />
    <set name="lethal1" val="5" />
    <set name="lethal2" val="2" />
    <set name="hitTime" val="1800" />
    <set name="baseCritRate" val="15" />
    <for />
    </skill>
    cuz the power is much higher then 100 sothat wouldent be 100%
    how to increase or decrease the rate of succes for the lethals?

  4. #4
    Account Upgraded | Title Enabled! Rin4a is offline
    MemberRank
    Apr 2006 Join Date
    LatviaLocation
    981Posts

    Re: Skill succes rate

    there was a config for that...
    search for it

  5. #5
    Software Person TimeBomb is offline
    ModeratorRank
    May 2008 Join Date
    United StatesLocation
    1,252Posts

    Re: Skill succes rate

    Please go to your core, java/net/sf/l2j/gameserver/skills [that is before compiled to find that], and find the file forumulas.java

    ctrl+f, search for the word lethal.
    Now, there are several formulas in there. It's hard to explain so that's why you need to look it up. Look through the formulas. That will explain how lethal rate works, although you need to know a bit of math and a bit of java.
    Code:
    	/** Calcul value of lethal chance */
    	public final double calcLethal(L2Character activeChar, L2Character target, int baseLethal)
    	{
    		return activeChar.calcStat(Stats.LETHAL_RATE, (baseLethal*((double)activeChar.getLevel()/target.getLevel())), target, null);
    	}
        
        public final boolean calcLethalHit(L2Character activeChar, L2Character target, L2Skill skill)
        {
            if (!target.isRaid()
                    && !(target instanceof L2DoorInstance)
                    && !(target instanceof L2NpcInstance && ((L2NpcInstance) target).getNpcId() == 35062))
            {
                int chance = Rnd.get(100);
                // 2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1)
                if (skill.getLethalChance2() > 0 && chance < calcLethal(activeChar, target, skill.getLethalChance2()))
                {
                    if (target instanceof L2NpcInstance)
                        target.reduceCurrentHp(target.getCurrentHp() - 1, activeChar);
                    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);
                        	}
                        }
                    }
                    activeChar.sendPacket(new SystemMessage(SystemMessageId.LETHAL_STRIKE));
                }
                else if (skill.getLethalChance1() > 0 && chance < calcLethal(activeChar, target, skill.getLethalChance1()))
                {
                    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
                            }
                        }
                    }
                    else if (target instanceof L2NpcInstance) // If is a monster remove first damage and after 50% of current hp
                        target.reduceCurrentHp(target.getCurrentHp() / 2, activeChar);
                    activeChar.sendPacket(new SystemMessage(SystemMessageId.LETHAL_STRIKE));
                }
                else
                    return false;
            }
            else
                return false;
            
            return true;
        }
    If you can't find it or get to your core, there is all of the lethal java formula info.

  6. #6
    Apprentice caramon81 is offline
    MemberRank
    Sep 2005 Join Date
    9Posts

    Re: Skill succes rate

    Code:
    <set name="lethal1" val="5" />
    <set name="lethal2" val="2" />
    think that would be kinda noticable. increase or decrease

  7. #7
    Enthusiast Dox is offline
    MemberRank
    Oct 2008 Join Date
    The Netherlands, AmersfoortLocation
    39Posts

    Re: Skill succes rate

    mm thanks but i think my files are alrdy compiled then cuz i dont have a
    java/net/sf/l2j/gameserver/skills/forumulas.java

    imma go find it out thanks anyway

  8. #8
    Enthusiast dkt251 is offline
    MemberRank
    Sep 2005 Join Date
    26Posts

    Re: Skill succes rate

    to change without doing anything in the sourcecode just add a simple
    Code:
    <set name="skill_landing_percent" val="xx"/>
    in your skill description. exchange "xx" for your successrate. so for
    example if you want to do a 100% successrate you have to add
    Code:
    <set name="skill_landing_percent" val="100"/>
    but this makes the formulas almost useless. it can unbalance your server.

  9. #9
    Apprentice g13h4ck3r is offline
    MemberRank
    Jul 2008 Join Date
    11Posts

    Re: Skill succes rate

    yes, adding skill success rate to 100% will sure unbalance the server. if you make those lethals lands like 100% it will sure rock in pvp. 2 shots and the opponent is down.

  10. #10
    Enthusiast Dox is offline
    MemberRank
    Oct 2008 Join Date
    The Netherlands, AmersfoortLocation
    39Posts

    Re: Skill succes rate

    thanks for the help guys, i wasent planing to make em 100% skill landing but i sure do wanted to know how to set them thanks again

  11. #11
    Enthusiast PrettyBOYY is offline
    MemberRank
    Oct 2007 Join Date
    43Posts

    Re: Skill succes rate

    Quote Originally Posted by dkt251 View Post
    to change without doing anything in the sourcecode just add a simple
    Code:
    <set name="skill_landing_percent" val="xx"/>
    in your skill description. exchange "xx" for your successrate. so for
    example if you want to do a 100% successrate you have to add
    Code:
    <set name="skill_landing_percent" val="100"/>
    but this makes the formulas almost useless. it can unbalance your server.
    hmmm i've added this to a skill but then it doesnt work... can anybody confirm if this is the answer? i've tried it with the infinity stinger and it doesnt silence 100% of the time. i only get silence like 5% of the time. =T can anybody help?

  12. #12
    Account Upgraded | Title Enabled! B1ggBoss is offline
    MemberRank
    Apr 2008 Join Date
    SpainLocation
    488Posts

    Re: Skill succes rate

    Quote Originally Posted by Rin4a View Post
    change <set name="power" val="40" /> to any value that you like:
    <set name="power" val="100" /> for 100%

    dont search for more guys, i got same prob some months ago and is being fixed as r1n4s wrote

  13. #13
    Enthusiast PrettyBOYY is offline
    MemberRank
    Oct 2007 Join Date
    43Posts

    Re: Skill succes rate

    Quote Originally Posted by B1ggBoss View Post
    dont search for more guys, i got same prob some months ago and is being fixed as r1n4s wrote
    i tried this and it doesnt work -_-



Advertisement