public override bool CheckHarvest(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
        {
            if (!base.CheckHarvest(from, tool, def, toHarvest))
            {
                return(false);
            }

            if (tool.Parent != from)
            {
                from.SendLocalizedMessage(500487); // The axe must be equipped for any serious wood chopping.
                return(false);
            }

            PlayerMobile player = from as PlayerMobile;

            if (player == null)
            {
                return(false);
            }

            CaptchaPersistance.CheckAndCreateCaptchaAccountEntry(player);

            if (!player.m_CaptchaAccountData.Attempt(player, CaptchaSourceType.Lumberjacking))
            {
                return(false);
            }

            return(true);
        }
Пример #2
0
        public override bool CheckHarvest(Mobile from, Item tool)
        {
            if (!base.CheckHarvest(from, tool))
            {
                return(false);
            }

            if (from.Mounted)
            {
                from.SendLocalizedMessage(501864); // You can't mine while riding.
                return(false);
            }

            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(501865); // You can't mine while polymorphed.
                return(false);
            }

            PlayerMobile player = from as PlayerMobile;

            if (player == null)
            {
                return(false);
            }

            CaptchaPersistance.CheckAndCreateCaptchaAccountEntry(player);

            if (!player.m_CaptchaAccountData.Attempt(player, CaptchaSourceType.Mining))
            {
                return(false);
            }

            return(true);
        }
Пример #3
0
        public override bool CheckHarvest(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
        {
            if (!base.CheckHarvest(from, tool, def, toHarvest))
            {
                return(false);
            }

            if (from.Mounted)
            {
                from.SendLocalizedMessage(500971); // You can't fish while riding!
                return(false);
            }

            PlayerMobile player = from as PlayerMobile;

            if (player == null)
            {
                return(false);
            }

            CaptchaPersistance.CheckAndCreateCaptchaAccountEntry(player);

            if (!player.m_CaptchaAccountData.Attempt(player, CaptchaSourceType.Fishing))
            {
                return(false);
            }

            return(true);
        }
Пример #4
0
        public override bool CheckHarvest(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
        {
            if (!base.CheckHarvest(from, tool, def, toHarvest))
            {
                return(false);
            }

            if (def == m_Sand && !(from is PlayerMobile && from.Skills[SkillName.Mining].Base >= 100.0 && ((PlayerMobile)from).SandMining))
            {
                OnBadHarvestTarget(from, tool, toHarvest);
                return(false);
            }

            else if (from.Mounted)
            {
                from.SendLocalizedMessage(501864); // You can't mine while riding.
                return(false);
            }

            else if (from.IsBodyMod && !from.Body.IsHuman)
            {
                from.SendLocalizedMessage(501865); // You can't mine while polymorphed.
                return(false);
            }

            PlayerMobile player = from as PlayerMobile;

            if (player == null)
            {
                return(false);
            }

            CaptchaPersistance.CheckAndCreateCaptchaAccountEntry(player);

            if (!player.m_CaptchaAccountData.Attempt(player, CaptchaSourceType.Mining))
            {
                return(false);
            }

            return(true);
        }