StartHarvesting() public method

public StartHarvesting ( Server.Mobile from, Item tool, object toHarvest ) : void
from Server.Mobile
tool Item
toHarvest object
return void
Ejemplo n.º 1
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (m_System is Lumberjacking && targeted is IChopable)
            {
                ((IChopable)targeted).OnChop(from);
            }

            else if (m_System is Lumberjacking && targeted is IAxe && m_Tool is BaseAxe)
            {
                IAxe obj  = (IAxe)targeted;
                Item item = (Item)targeted;

                if (!item.IsChildOf(from.Backpack) && !item.IsChildOf(from.BankBox))
                {
                    from.SendMessage("This item must be in your backpack or bankbox to be used.");
                }

                else if (obj.Axe(from, (BaseAxe)m_Tool))
                {
                    from.PlaySound(0x13E);
                }
            }

            else if (m_System is Lumberjacking && targeted is ICarvable)
            {
                ((ICarvable)targeted).Carve(from, (Item)m_Tool);
            }

            else if (m_System is Lumberjacking && FurnitureAttribute.Check(targeted as Item))
            {
                DestroyFurniture(from, (Item)targeted);
            }

            else if (m_System is Mining && targeted is TreasureMap)
            {
                ((TreasureMap)targeted).OnBeginDig(from);
            }

            else if (targeted == from)
            {
                m_System.StartHarvesting(from, m_Tool, targeted, true);
            }

            else
            {
                m_System.StartHarvesting(from, m_Tool, targeted, false);
            }
        }
Ejemplo n.º 2
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (targeted is NubiaSpecialHarvest && from is NubiaPlayer)
            {
                ((NubiaSpecialHarvest)targeted).BeginSpecialHarvest(from as NubiaPlayer, m_Tool);
                return;
            }


            if (m_System is Mining && targeted is StaticTarget)
            {
                int itemID = ((StaticTarget)targeted).ItemID;

                // grave
                if (itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 || itemID == 0xEE8)
                {
                    PlayerMobile player = from as PlayerMobile;

                    if (player != null)
                    {
                        QuestSystem qs = player.Quest;

                        if (qs is WitchApprenticeQuest)
                        {
                            FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;

                            if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.Bones)
                            {
                                player.SendLocalizedMessage(1055037);                                   // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
                                obj.Complete();

                                return;
                            }
                        }
                    }
                }
            }

            if (m_System is Lumberjacking && targeted is IChopable)
            {
                ((IChopable)targeted).OnChop(from);
            }
            else if (m_System is Lumberjacking && FurnitureAttribute.Check(targeted as Item))
            {
                DestroyFurniture(from, (Item)targeted);
            }
            else if (m_System is Mining && targeted is TreasureMap)
            {
                ((TreasureMap)targeted).OnBeginDig(from);
            }
            else
            {
                m_System.StartHarvesting(from, m_Tool, targeted);
            }
        }
Ejemplo n.º 3
0
		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( m_System is Mining && targeted is StaticTarget )
			{
				int itemID = ((StaticTarget)targeted).ItemID;

				// grave
				if ( itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 || itemID == 0xEE8 )
				{
					PlayerMobile player = from as PlayerMobile;

					if ( player != null )
					{
						QuestSystem qs = player.Quest;

						if ( qs is WitchApprenticeQuest )
						{
							FindIngredientObjective obj = qs.FindObjective( typeof( FindIngredientObjective ) ) as FindIngredientObjective;

							if ( obj != null && !obj.Completed && obj.Ingredient == Ingredient.Bones )
							{
								player.SendLocalizedMessage( 1055037 ); // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
								obj.Complete();

								return;
							}
						}
					}
				}
			}

			if ( m_System is Lumberjacking && targeted is IChopable )
				((IChopable)targeted).OnChop( from );
			else if ( m_System is Lumberjacking && targeted is IAxe && m_Tool is BaseAxe )
			{
				IAxe obj = (IAxe)targeted;
				Item item = (Item)targeted;
					
				if ( !item.IsChildOf( from.Backpack ) )
					from.SendLocalizedMessage( 1062334 ); // This item must be in your backpack to be used.
				else if ( obj.Axe( from, (BaseAxe)m_Tool ) )
					from.PlaySound( 0x13E );
			}
			else if ( m_System is Lumberjacking && targeted is ICarvable )
				((ICarvable)targeted).Carve( from, (Item)m_Tool );
			else if ( m_System is Lumberjacking && FurnitureAttribute.Check( targeted as Item ) )
				DestroyFurniture( from, (Item)targeted );
			else if ( m_System is Mining && targeted is TreasureMap )
				((TreasureMap)targeted).OnBeginDig( from );
			else
				m_System.StartHarvesting( from, m_Tool, targeted );
		}
Ejemplo n.º 4
0
 protected override void OnTarget(Mobile from, object targeted)
 {
     if (m_System is Lumberjacking && targeted is IChopable)
     {
         ((IChopable)targeted).OnChop(from);
     }
     //else if ( m_System is Lumberjacking && FurnitureAttribute.Check( targeted as Item ) )
     //	DestroyFurniture( from, (Item)targeted );
     else
     {
         m_System.StartHarvesting(from, m_Tool, targeted);
     }
 }
Ejemplo n.º 5
0
        public static void TargetByResource(TargetByResourceMacroEventArgs e)
        {
            Mobile m = e.Mobile;
            Item tool = e.Tool;

            HarvestSystem system = null;
            HarvestDefinition def = null;
            object toHarvest;

            if (tool is IHarvestTool)
            {
                system = ((IHarvestTool)tool).HarvestSystem;
            }

            if (system != null)
            {
                switch (e.ResourceType)
                {
                    case 0: // ore
                        if (system is Mining)
                            def = ((Mining)system).OreAndStone;
                        break;
                    case 1: // sand
                        if (system is Mining)
                            def = ((Mining)system).Sand;
                        break;
                    case 2: // wood
                        if (system is Lumberjacking)
                            def = ((Lumberjacking)system).Definition;
                        break;
                    case 3: // grave
                        if (TryHarvestGrave(m))
                            return;
                        break;
                    case 4: // red shrooms
                        if (TryHarvestShrooms(m))
                            return;
                        break;
                }

                if (def != null && FindValidTile(m, def, out toHarvest))
                {
                    system.StartHarvesting(m, tool, toHarvest);
                    return;
                }

                system.OnBadHarvestTarget(m, tool, new LandTarget(new Point3D(0, 0, 0), Map.Felucca));
            }
        }
Ejemplo n.º 6
0
		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( m_System is Lumberjacking && targeted is IChopable )
				((IChopable)targeted).OnChop( from );
			else if ( m_System is Lumberjacking && targeted is IAxe && m_Tool is BaseAxe )
			{
				IAxe obj = (IAxe)targeted;
				Item item = (Item)targeted;
					
				if ( !item.IsChildOf( from.Backpack ) )
					from.SendLocalizedMessage( 1062334 ); // This item must be in your backpack to be used.
				else if ( obj.Axe( from, (BaseAxe)m_Tool ) )
					from.PlaySound( 0x13E );
			}
			else if ( m_System is Lumberjacking && targeted is ICarvable )
				((ICarvable)targeted).Carve( from, (Item)m_Tool );
			else if ( m_System is Lumberjacking && FurnitureAttribute.Check( targeted as Item ) )
				DestroyFurniture( from, (Item)targeted );
			else if ( m_System is Mining && targeted is TreasureMap )
				((TreasureMap)targeted).OnBeginDig( from );
			else
				m_System.StartHarvesting( from, m_Tool, targeted );
		}
Ejemplo n.º 7
0
 protected override void OnTick()
 {
     sys.StartHarvesting(from, tool, toHarvest);
 }
Ejemplo n.º 8
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (m_System is Mining)
            {
                if (targeted is StaticTarget)
                {
                    int itemID = ((StaticTarget)targeted).ItemID;

                    // grave
                    if (itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 || itemID == 0xEE8)
                    {
                        PlayerMobile player = from as PlayerMobile;

                        if (player != null)
                        {
                            QuestSystem qs = player.Quest;

                            if (qs is WitchApprenticeQuest)
                            {
                                FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;

                                if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.Bones)
                                {
                                    player.SendLocalizedMessage(1055037); // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
                                    obj.Complete();

                                    return;
                                }
                            }
                        }
                    }
                }
                else if (targeted is LandTarget && ((LandTarget)targeted).TileID >= 113 && ((LandTarget)targeted).TileID <= 120)
                {
                    if (Server.Engines.Quests.TheGreatVolcanoQuest.OnHarvest(from, m_Tool))
                    {
                        return;
                    }
                }
            }

            if (m_System is Lumberjacking && targeted is IChopable)
            {
                ((IChopable)targeted).OnChop(from);
            }
            else if (m_System is Lumberjacking && targeted is IAxe && m_Tool is BaseAxe)
            {
                IAxe obj  = (IAxe)targeted;
                Item item = (Item)targeted;

                if (!item.IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
                }
                else if (obj.Axe(from, (BaseAxe)m_Tool))
                {
                    from.PlaySound(0x13E);
                }
            }
            else if (m_System is Lumberjacking && targeted is ICarvable)
            {
                ((ICarvable)targeted).Carve(from, (Item)m_Tool);
            }
            else if (m_System is Lumberjacking && FurnitureAttribute.Check(targeted as Item))
            {
                DestroyFurniture(from, (Item)targeted);
            }
            else if (m_System is Mining && targeted is TreasureMap)
            {
                ((TreasureMap)targeted).OnBeginDig(from);
            }
            #region High Seas
            else if (m_System is Mining && targeted is NiterDeposit)
            {
                ((NiterDeposit)targeted).OnMine(from, m_Tool);
            }
            else if (m_System is Lumberjacking && targeted is CrackedLavaRockEast)
            {
                ((CrackedLavaRockEast)targeted).OnCrack(from);
            }
            else if (m_System is Lumberjacking && targeted is CrackedLavaRockSouth)
            {
                ((CrackedLavaRockSouth)targeted).OnCrack(from);
            }
            #endregion
            else
            {
                // If we got here and we're lumberjacking then we didn't target something that can be done from the pack
                if (m_System is Lumberjacking && m_Tool.Parent != from)
                {
                    from.SendLocalizedMessage(500487);                     // The axe must be equipped for any serious wood chopping.
                    return;
                }
                m_System.StartHarvesting(from, m_Tool, targeted);
            }
        }
Ejemplo n.º 9
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (m_System is Mining && targeted is StaticTarget)
            {
                int itemID = ((StaticTarget)targeted).ItemID;

                // grave
                if (itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 || itemID == 0xEE8)
                {
                    PlayerMobile player = from as PlayerMobile;

                    if (player != null)
                    {
                        QuestSystem qs = player.Quest;

                        if (qs is WitchApprenticeQuest)
                        {
                            FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;

                            if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.Bones)
                            {
                                player.SendLocalizedMessage(1055037);                                   // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
                                obj.Complete();

                                return;
                            }
                        }
                    }
                }
            }

            if (m_System is Lumberjacking && targeted is IChopable)
            {
                if (m_Tool.Parent != from)
                {
                    from.SendAsciiMessage("The axe must be equipped for any serious wood chopping.");
                    //from.SendLocalizedMessage( 500487 ); // The axe must be equipped for any serious wood chopping.
                    return;
                }
                else
                {
                    ((IChopable)targeted).OnChop(from);
                }
            }
            else if (m_System is Lumberjacking && targeted is ICarvable)
            {
                from.Animate(32, 5, 1, true, false, 0);
                ((ICarvable)targeted).Carve(from, m_Tool);
            }
            else if (m_System is Lumberjacking && targeted is Log)
            {
                BaseTool tools = new FletcherTools();
                from.SendMenu(new BowFletchingMenu(from, BowFletchingMenu.Main(from), "Main", tools));
                if (tools != null)
                {
                    tools.Delete();
                }
            }
            else if (m_System is Lumberjacking && FurnitureAttribute.Check(targeted as Item))
            {
                DestroyFurniture(from, (Item)targeted);
            }
            else if (m_System is Mining && targeted is TreasureMap)
            {
                ((TreasureMap)targeted).OnBeginDig(from);
            }
            else
            {
                m_System.StartHarvesting(from, m_Tool, targeted);
            }
        }
Ejemplo n.º 10
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (m_System is Mining && targeted is StaticTarget)
            {
                int itemID = ((StaticTarget)targeted).ItemID;

                // grave
                if (itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 || itemID == 0xEE8)
                {
                    PlayerMobile player = from as PlayerMobile;

                    if (player != null)
                    {
                        QuestSystem qs = player.Quest;

                        if (qs is WitchApprenticeQuest)
                        {
                            FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;

                            if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.Bones)
                            {
                                player.SendLocalizedMessage(1055037);                                   // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
                                obj.Complete();

                                return;
                            }
                        }
                    }
                }
            }

            if (m_System is Lumberjacking && targeted is IChopable)
            {
                ((IChopable)targeted).OnChop(from);
            }
            else if (m_System is Lumberjacking && FurnitureAttribute.Check(targeted as Item))
            {
                DestroyFurniture(from, (Item)targeted);
            }
            else if (m_System is Mining && targeted is TreasureMap)
            {
                ((TreasureMap)targeted).OnBeginDig(from);
            }
            else if (m_System is Mining && targeted is DiggableRock)
            {
                if (m_Tool is IUsesRemaining)
                {
                    ((DiggableRock)targeted).DigIt(from);
                    if (m_Tool is IUsesRemaining)
                    {
                        IUsesRemaining toolWithUses = (IUsesRemaining)m_Tool;

                        toolWithUses.ShowUsesRemaining = true;

                        if (toolWithUses.UsesRemaining > 0)
                        {
                            --toolWithUses.UsesRemaining;
                        }

                        if (toolWithUses.UsesRemaining < 1)
                        {
                            m_Tool.Delete();
                            Mining.System.OreAndStone.SendMessageTo(from, Mining.System.OreAndStone.ToolBrokeMessage);
                        }
                    }
                }
            }
            else
            {
                m_System.StartHarvesting(from, m_Tool, targeted);
            }
        }
Ejemplo n.º 11
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            // true if return override encountered in script
            IEntity targetedEntity = targeted as IEntity;

            if (XmlScript.HasTrigger(targetedEntity, TriggerName.onTargeted) && UberScriptTriggers.Trigger(targetedEntity, from, TriggerName.onTargeted, m_Tool))
            {
                return;
            }

            CustomRegion customRegion = from.Region as CustomRegion;

            if (customRegion != null && customRegion.Controller != null)
            {
                SkillName skill = SkillName.Spellweaving; // placeholder
                if (m_System is Mining)
                {
                    skill = SkillName.Mining;
                }
                else if (m_System is Fishing)
                {
                    skill = SkillName.Fishing;
                }
                else if (m_System is Lumberjacking)
                {
                    skill = SkillName.Lumberjacking;
                }

                if (customRegion.Controller.IsRestrictedSkill((int)skill))
                {
                    from.SendMessage("You cannot use that skill here.");
                    return;
                }
            }

            //conquest skill check
            Skill tskill = null;

            if (m_System is Mining)
            {
                tskill = from.Skills[SkillName.Mining];
            }
            else if (m_System is Lumberjacking)
            {
                tskill = from.Skills[SkillName.Lumberjacking];
            }
            else if (m_System is Fishing)
            {
                tskill = from.Skills[SkillName.Fishing];
            }

            if (tskill != null)
            {
                Conquests.Conquests.CheckProgress <SkillConquest>(from as PlayerMobile, tskill);
            }

            if (m_System is Mining && targeted is StaticTarget)
            {
                int itemID = ((StaticTarget)targeted).ItemID;

                // grave
                if (itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 || itemID == 0xEE8)
                {
                    PlayerMobile player = from as PlayerMobile;

                    if (player != null)
                    {
                        QuestSystem qs = player.Quest;

                        if (qs is WitchApprenticeQuest)
                        {
                            FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;

                            if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.Bones)
                            {
                                player.SendLocalizedMessage(1055037);                                   // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
                                obj.Complete();

                                return;
                            }
                        }
                    }
                }
            }

            if (m_System is Lumberjacking && targeted is IChopable)
            {
                if (targeted is Item)
                {
                    if (((Item)targeted).Breakable)
                    {
                        ((IChopable)targeted).OnChop(from);
                    }
                    else
                    {
                        from.SendMessage("That is unbreakable!");
                    }
                }
                else
                {
                    ((IChopable)targeted).OnChop(from);
                }
            }
            else if (m_System is Lumberjacking && targeted is IAxe && m_Tool is BaseAxe)
            {
                IAxe obj  = (IAxe)targeted;
                Item item = (Item)targeted;

                if (!item.IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
                }
                else if (obj.Axe(from, (BaseAxe)m_Tool))
                {
                    from.PlaySound(0x13E);
                }
            }
            else if (m_System is Lumberjacking && targeted is ICarvable)
            {
                ((ICarvable)targeted).Carve(from, (Item)m_Tool);
            }
            else if (m_System is Lumberjacking && FurnitureAttribute.Check(targeted as Item))
            {
                if (((Item)targeted).Breakable)
                {
                    DestroyFurniture(from, (Item)targeted);
                }
                else
                {
                    from.SendMessage("That is unbreakable!");
                }
            }
            else if (m_System is Mining && targeted is TreasureMap)
            {
                ((TreasureMap)targeted).OnBeginDig(from);
            }
            else
            {
                m_System.StartHarvesting(from, m_Tool, targeted);
            }
        }
Ejemplo n.º 12
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            if (m_System is Mining && targeted is StaticTarget)
            {
                int itemID = ((StaticTarget)targeted).ItemID;

                // grave
                if (itemID == 0xED3 || itemID == 0xEDF || itemID == 0xEE0 || itemID == 0xEE1 || itemID == 0xEE2 || itemID == 0xEE8)
                {
                    PlayerMobile player = from as PlayerMobile;

                    if (player != null)
                    {
                        QuestSystem qs = player.Quest;

                        if (qs is WitchApprenticeQuest)
                        {
                            FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;

                            if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.Bones)
                            {
                                player.SendLocalizedMessage(1055037);                                   // You finish your grim work, finding some of the specific bones listed in the Hag's recipe.
                                obj.Complete();

                                return;
                            }
                        }
                    }
                }
            }

            if (m_System is Lumberjacking && targeted is IChopable)
            {
                ((IChopable)targeted).OnChop(from);
            }
            else if (m_System is Lumberjacking && targeted is ICarvable)
            {
                ((ICarvable)targeted).Carve(from, m_Tool);
            }
            else if (m_System is Lumberjacking && FurnitureAttribute.Check(targeted as Item))
            {
                DestroyFurniture(from, (Item)targeted);
            }
            else if (m_System is Mining && targeted is TreasureMap)
            {
                ((TreasureMap)targeted).OnBeginDig(from);
            }
            else if (m_System is Lumberjacking && targeted is GuildContainer) //Taran: Turn guildcontainer into deed
            {
                Guild guild = from.Guild as Guild;
                if (guild != null && !guild.Disbanded)
                {
                    GuildContainer gc     = (GuildContainer)targeted;
                    Mobile         leader = guild.Leader;

                    if (from.Guild.Id == gc.GuildID && from == leader)
                    {
                        Container cont  = (Container)targeted;
                        Item[]    found = cont.FindItemsByType(typeof(Item), true);

                        if (found.Length > 0)
                        {
                            from.SendAsciiMessage("The container must be empty before you can re-deed it");
                        }
                        else
                        {
                            cont.Delete();
                            from.AddToBackpack(new GuildContainerDeed());
                            from.SendAsciiMessage("You put the guild container deed in your backpack");
                        }
                    }
                    else
                    {
                        from.SendAsciiMessage("You must be the leader of the guild to do that");
                    }
                }
                else
                {
                    from.SendAsciiMessage("You can't use an axe on that.");
                }
            }

            #region Turn logs into boards
            else if (m_System is Lumberjacking && targeted is BaseLog) //Turn logs into boards
            {
                BaseLog log = (BaseLog)targeted;

                if (log.IsChildOf(from.Backpack))
                {
                    CraftResource cr     = log.Resource;
                    int           amount = log.Amount;

                    log.Delete();

                    switch (cr)
                    {
                    case CraftResource.RegularWood:
                    {
                        Board board = new Board(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.OakWood:
                    {
                        OakBoard board = new OakBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.AshWood:
                    {
                        AshBoard board = new AshBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.YewWood:
                    {
                        YewBoard board = new YewBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.Heartwood:
                    {
                        HeartwoodBoard board = new HeartwoodBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.Bloodwood:
                    {
                        BloodwoodBoard board = new BloodwoodBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.Frostwood:
                    {
                        FrostwoodBoard board = new FrostwoodBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.Mahoganywood:
                    {
                        MahoganyBoard board = new MahoganyBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.Cedarwood:
                    {
                        CedarBoard board = new CedarBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.Willowwood:
                    {
                        WillowBoard board = new WillowBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    case CraftResource.Mystwood:
                    {
                        MystWoodBoard board = new MystWoodBoard(amount);
                        from.AddToBackpack(board);
                        break;
                    }

                    default:
                    {
                        from.SendAsciiMessage("Error, no check for that log is made.");
                        break;
                    }
                    }
                    if (from.Mounted)
                    {
                        from.Animate(26, 5, 1, true, false, 0);
                    }
                    else
                    {
                        from.Animate(9, 5, 1, true, false, 0);
                    }

                    from.PlaySound(573);
                    from.SendAsciiMessage("You chop the logs and turn them into boards");
                }
                else
                {
                    from.SendAsciiMessage("That must be in your backpack before you can chop it");
                }
            }
            #endregion
            else
            {
                if (!CheckAllowed(from))
                {
                    return;
                }
                m_System.StartHarvesting(from, m_Tool, targeted);
            }
        }