Hello all, and thank you for all the help from your posts so far. :)
(side question, is runuo.com down for good?-a lot of my google searches seems like the answer is already there, but cannot connect to read whole solution). :(

I'm trying to disable taming on my server.

The first part of the animaltaming.cs file is as follows:

Code:
using System;
using System.Collections;
using Server.Targeting;
using Server.Network;
using Server.Mobiles;

namespace Server.SkillHandlers
{
    public class AnimalTaming
    {
        private static Hashtable m_BeingTamed = new Hashtable();

        public static void Initialize()
        {
            SkillInfo.Table[(int)SkillName.AnimalTaming].Callback = new SkillUseCallback( OnUse );
        }

        private static bool m_DisableMessage;

        public static bool DisableMessage
        {
            get{ return m_DisableMessage; }
            set{ m_DisableMessage = value; }
        }

        public static TimeSpan OnUse( Mobile m )
        {
            m.RevealingAction();

            m.Target = new InternalTarget();
            m.RevealingAction();

            if ( !m_DisableMessage )
                m.SendLocalizedMessage( 502789 ); // Tame which animal?

            return TimeSpan.FromHours( 6.0 );
        }

It looks to me like "private static bool m_DisableMessage;" if there is a message there then
"if ( !m_DisableMessage )" won't work- disabling taming.
How to I put a message there?

Thank you!
 
Last edited by a moderator:
Easiest way:

Find the following method in PlayerMobile.cs and modify it with the 4 lines I added to the top:

Code:
        public override bool AllowSkillUse( SkillName skill )
        {
            if (skill == SkillName.AnimalTaming)
            {
                SendMessage( "That skill cannot be used right now." ); // Customize your message here ...
                return false;
            }
          
            if ( AnimalForm.UnderTransformation( this ) )
            {
                for( int i = 0; i < m_AnimalFormRestrictedSkills.Length; i++ )
                {
                    if( m_AnimalFormRestrictedSkills[i] == skill )
                    {
                        SendLocalizedMessage( 1070771 ); // You cannot use that skill in this form.
                        return false;
                    }
                }
            }

            #region Dueling
            if ( m_DuelContext != null && !m_DuelContext.AllowSkillUse( this, skill ) )
                return false;
            #endregion

            return DesignContext.Check( this );
        }
 
Easiest way:

Find the following method in PlayerMobile.cs and modify it with the 4 lines I added to the top:

Code:
        public override bool AllowSkillUse( SkillName skill )
        {
            if (skill == SkillName.AnimalTaming)
            {
                SendMessage( "That skill cannot be used right now." ); // Customize your message here ...
                return false;
            }
       
            if ( AnimalForm.UnderTransformation( this ) )
            {
                for( int i = 0; i < m_AnimalFormRestrictedSkills.Length; i++ )
                {
                    if( m_AnimalFormRestrictedSkills[i] == skill )
                    {
                        SendLocalizedMessage( 1070771 ); // You cannot use that skill in this form.
                        return false;
                    }
                }
            }

            #region Dueling
            if ( m_DuelContext != null && !m_DuelContext.AllowSkillUse( this, skill ) )
                return false;
            #endregion

            return DesignContext.Check( this );
        }

Awesome! Worked like a charm. -Or a disabled taming skill;)
Thank you Lokai!
[doublepost=1525453876][/doublepost]
All signs point to yes, I admit I still check once in a while and see if it comes up, but it's been gone a long time now. . .
Sad. :(
Wish we could get all that info transferred here.
But I guess as the questions come up again, we can solve them again! :)
Thanks arvoreen.
 
Back