UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

[COMPLETE] Greater Dragons

Status
Not open for further replies.

Nikki_Demise

Bug Hunter
Re: Greater Dragons

Kiluad;577214 said:
did the command chance get switched to real skill by mistake?

Nope

Code:
        public virtual double GetControlChance( Mobile m, bool useBaseSkill )
        {
            if ( m_dMinTameSkill <= 29.1 || m_bSummoned || m.AccessLevel >= AccessLevel.GameMaster )
                return 1.0;

            double dMinTameSkill = m_dMinTameSkill;

            if ( dMinTameSkill > -24.9 && Server.SkillHandlers.AnimalTaming.CheckMastery( m, this ) )
                dMinTameSkill = -24.9;

            int taming = (int)((useBaseSkill ? m.Skills[SkillName.AnimalTaming].Base : m.Skills[SkillName.AnimalTaming].Value ) * 10);
            int lore = (int)((useBaseSkill ? m.Skills[SkillName.AnimalLore].Base : m.Skills[SkillName.AnimalLore].Value )* 10);
            int bonus = 0, chance = 700;

            if( Core.ML )
            {
                int SkillBonus = taming - (int)(dMinTameSkill * 10);
                int LoreBonus = lore - (int)(dMinTameSkill * 10);

                int SkillMod = 6, LoreMod = 6;

                if( SkillBonus < 0 )
                    SkillMod = 28;
                if( LoreBonus < 0 )
                    LoreMod = 14;

                SkillBonus *= SkillMod;
                LoreBonus *= LoreMod;

                bonus = (SkillBonus + LoreBonus ) / 2;
            }    
            else
            {
                int difficulty = (int)(dMinTameSkill * 10);
                int weighted = ((taming * 4) + lore) / 5;
                bonus = weighted - difficulty;

                if ( bonus <= 0 )
                    bonus *= 14;
                else
                    bonus *= 6;
            }

            chance += bonus;

            if ( chance >= 0 && chance < 200 )
                chance = 200;
            else if ( chance > 990 )
                chance = 990;

            chance -= (MaxLoyalty - m_Loyalty) * 10;

            return ( (double)chance / 1000 );
        }
 
Status
Not open for further replies.
Top