Hank

I want to modify the distro Lumberjacking and harvest system to be able to allow for specific wood to be harvested from it's corresponding tree static type. I couldn't not find this on any of the forums.
For example Oak trees producing only Oak wood.

In advance, Thank you for your time!
ps. I'm not asking for someone to do it for me, just suggest where i should begin.

Edit:
I have figured out what i need to do(I think), I just now have to piece it all together.

Mental outline:
make a list of the statics of the trees in a if, elseif, else style so when the player succeeds at harvesting it can check which list contains the static the player harvested from and return the appropriate resource.

I figured I'd share the list of trees (7.0.18.0) since i just spent 15 minutes putting it together.
0x0C9E (3230) o'hii tree
0x0CA8 (3240) small banana tree
0x0CAA (3242) banana tree
0x0CAB (3243) banana tree (stump?)
0x0CC9 (3273) spider tree
0x0CCA (3274) tree
0x0CCB (3275) tree
0x0CCC (3276) tree
0x0CCD (3277) tree
0x0CD0 (3280) tree
0x0CD3 (3283) tree
0x0CD6 (3286) Cedar tree
0x0CD8 (3288) Cedar tree
0x0CDA (3290) oak tree
0x0CDD (3293) oak tree
0x0CE0 (3296) walnut tree
0x0CE3 (3299) walnut tree
0x0CE6 (3302) willow tree
0x0CF3 (3315) fallen log
0x0CF4 (3316) fallen log
0x0CF5 (3317) fallen log
0x0CF6 (3318) fallen log
0x0CF7 (3319) fallen log
0x0CF8 (3320) cypress tree
0x0CFB (3323) cypress tree
0x0CFE (3326) cypress tree
0x0D01 (3329) cypress tree
0x0D37 (3383) yucca
0x0D38 (3384) yucca
0x0D41 (3393) tree (tall)
0x0D42 (3394) tree (tall)
0x0D43 (3395) tree (tall)
0x0D44 (3396) tree (tall)
0x0D57 (3415) tree (tall)
0x0D58 (3416) tree (tall)
0x0D59 (3417) tree (tall)
0x0D5A (3418) tree (tall)
0x0D5B (3419) tree (tall)
0x0D6E (3438) tree (tall)
0x0D6F (3439) tree (tall)
0x0D70 (3440) tree (tall)
0x0D71 (3441) tree (tall)
0x0D72 (3442) tree (tall)
0x0D84 (3460) tree (tall)
0x0D85 (3461) tree (tall)
0x0D86 (3462) tree (tall)
0x0D94 (3476) apple tree
0x0D98 (3480) apple tree
0x0D9C (3484) peach tree
0x0DA0 (3488) peach tree
0x0Da4 (3492) pear tree
0x0DA8 (3496) pear tree
0x0DAC (3500) tree stump (palm)
0x0DAD (3501) tree stump (palm)
0x12B5 (4789) Yew tree
0x12B6 (4790) Yew tree
0x12B7 (4791) Yew tree
0x12B8 (4792) Yew tree
0x12B9 (4793) Yew tree
0x12BA (4794) Yew tree
0x12BB (4795) Yew tree
0x12BC (4796) Yew tree
0x12BD (4797) Yew tree
0x224A (8778) willow tree (hued?)
0x224B (8779) willow tree (hued?)
0x224C (8780) oak tree
0x224D (8781) oak tree (hued?)
0x2476 (9334) cherry tree
0x2477 (9335) cherry tree
0x247D (9341) maple tree
0x247E (9342) maple tree
0x26ED (9965) plum tree
0x26EE (9966) plum tree
note: How distro lumberjacking : harvest system works you need to add 0x3FFF to each hex value for these to be used in lumberjacking.cs

Edit:
I have not given up on this project, i am working on a custom resource system but have also been bogged down with real life matters. No ETA on another update.
 
Last edited by a moderator:
Edit: I decided to hide this post behind a spoiler because i'm ashamed to have even posted such trash
I gave up on my inital Mental outline and decided to take an easier route but i have run into a snag.

Here is what my custom Lumberjacking.cs script looks like
Code:
using System;
using Server;
using Server.Items;
using Server.Network;
using Server.Targeting;

namespace Server.Engines.Harvest
{
    public class Lumberjacking : HarvestSystem
    {
        private static Lumberjacking m_System;

        public static Lumberjacking System
        {
            get
            {
                if (m_System == null)
                    m_System = new Lumberjacking();

                return m_System;
            }
        }

private HarvestDefinition m_Plain, m_Oak, m_Ash, m_Yew, m_Bloodwood, m_Heartwood, m_Frostwood;

        public HarvestDefinition Plain
        {
            get{ return m_Plain; }
        }

        public HarvestDefinition Oak
        {
            get { return m_Oak; }
        }
        public HarvestDefinition Ash
        {
            get { return m_Ash; }
        }
        public HarvestDefinition Yew
        {
            get { return m_Yew; }
        }
        public HarvestDefinition Bloodwood
        {
            get { return m_Bloodwood; }
        }
        public HarvestDefinition Heartwood
        {
            get { return m_Heartwood; }
        }
        public HarvestDefinition Frostwood
        {
            get { return m_Frostwood; }
        }

        private Lumberjacking()
        {
            HarvestResource[] res;
            HarvestVein[] veins;

            #region PlainLumberjacking
            HarvestDefinition plainlumber = m_Plain = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            plainlumber.BankWidth = 4;
            plainlumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            plainlumber.MinTotal = 20;
            plainlumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            plainlumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            plainlumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            plainlumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            plainlumber.Tiles = m_PlainTree;

            // Players must be within 2 tiles to harvest
            plainlumber.MaxRange = 2;

            // Ten logs per harvest action
            plainlumber.ConsumedPerHarvest = 10;
            plainlumber.ConsumedPerFeluccaHarvest = 10;//20

            // The chopping effect
            plainlumber.EffectActions = new int[] { 13 };
            plainlumber.EffectSounds = new int[] { 0x13E };
            plainlumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            plainlumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            plainlumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            plainlumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            plainlumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            plainlumber.OutOfRangeMessage = 500446; // That is too far away.
            plainlumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            plainlumber.ToolBrokeMessage = 500499; // You broke your axe.

                res = new HarvestResource[]
                {
                new HarvestResource(00.0, 00.0, 100.0, 1072540, typeof(Log)),
                };

                veins = new HarvestVein[]
                {
                new HarvestVein(100.0, 0.0, res[0], null), // Ordinary Logs
                };

                plainlumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };

            plainlumber.Resources = res;
            plainlumber.Veins = veins;


            this.Definitions.Add(plainlumber);
            #endregion

            #region OakLumberjacking
            HarvestDefinition oaklumber = m_Oak = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            oaklumber.BankWidth = 4;
            oaklumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            oaklumber.MinTotal = 20;
            oaklumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            oaklumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            oaklumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            oaklumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            oaklumber.Tiles = m_OakTree;

            // Players must be within 2 tiles to harvest
            oaklumber.MaxRange = 2;

            // Ten logs per harvest action
            oaklumber.ConsumedPerHarvest = 10;
            oaklumber.ConsumedPerFeluccaHarvest = 10;//20

            // The chopping effect
            oaklumber.EffectActions = new int[] { 13 };
            oaklumber.EffectSounds = new int[] { 0x13E };
            oaklumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            oaklumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            oaklumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            oaklumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            oaklumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            oaklumber.OutOfRangeMessage = 500446; // That is too far away.
            oaklumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            oaklumber.ToolBrokeMessage = 500499; // You broke your axe.

            res = new HarvestResource[]
                {
            new HarvestResource(00.0, 00.0, 100.0, 1072540, typeof(Log)),
            };

            veins = new HarvestVein[]
            {
            new HarvestVein(100.0, 0.0, res[0], null), // Ordinary Logs
            };

            oaklumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };

            oaklumber.Resources = res;
            oaklumber.Veins = veins;

            this.Definitions.Add(oaklumber);
            #endregion

            #region AshLumberjacking
            HarvestDefinition ashlumber = m_Ash = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            ashlumber.BankWidth = 4;
            ashlumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            ashlumber.MinTotal = 20;
            ashlumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            ashlumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            ashlumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            ashlumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            ashlumber.Tiles = m_AshTree;

            // Players must be within 2 tiles to harvest
            ashlumber.MaxRange = 2;

            // Ten logs per harvest action
            ashlumber.ConsumedPerHarvest = 10;
            ashlumber.ConsumedPerFeluccaHarvest = 10;//20

            // The chopping effect
            ashlumber.EffectActions = new int[] { 13 };
            ashlumber.EffectSounds = new int[] { 0x13E };
            ashlumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            ashlumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            ashlumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            ashlumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            ashlumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            ashlumber.OutOfRangeMessage = 500446; // That is too far away.
            ashlumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            ashlumber.ToolBrokeMessage = 500499; // You broke your axe.

            res = new HarvestResource[]
                {
            new HarvestResource(80.0, 40.0, 120.0, 1072542, typeof(AshLog)),
            };

            veins = new HarvestVein[]
            {
            new HarvestVein(100.0, 0.5, res[2], res[0]), // Ash
            };

            ashlumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };

            ashlumber.Resources = res;
            ashlumber.Veins = veins;

            this.Definitions.Add(ashlumber);
            #endregion

            #region YewLumberjacking
            HarvestDefinition yewlumber = m_Yew = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            yewlumber.BankWidth = 4;
            yewlumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            yewlumber.MinTotal = 20;
            yewlumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            yewlumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            yewlumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            yewlumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            yewlumber.Tiles = m_YewTree;

            // Players must be within 2 tiles to harvest
            yewlumber.MaxRange = 2;

            // Ten logs per harvest action
            yewlumber.ConsumedPerHarvest = 10;
            yewlumber.ConsumedPerFeluccaHarvest = 10;//20

            // The chopping effect
            yewlumber.EffectActions = new int[] { 13 };
            yewlumber.EffectSounds = new int[] { 0x13E };
            yewlumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            yewlumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            yewlumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            yewlumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            yewlumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            yewlumber.OutOfRangeMessage = 500446; // That is too far away.
            yewlumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            yewlumber.ToolBrokeMessage = 500499; // You broke your axe.

            res = new HarvestResource[]
                {
            new HarvestResource(95.0, 55.0, 135.0, 1072543, typeof(YewLog)),
            };

            veins = new HarvestVein[]
            {
            new HarvestVein(05.0, 0.5, res[3], res[0]), // Yew
            };

            yewlumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };

            yewlumber.Resources = res;
            yewlumber.Veins = veins;

            this.Definitions.Add(yewlumber);
            #endregion

            #region HeartwoodLumberjacking
            HarvestDefinition heartwoodlumber = m_Heartwood = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            heartwoodlumber.BankWidth = 4;
            heartwoodlumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            heartwoodlumber.MinTotal = 20;
            heartwoodlumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            heartwoodlumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            heartwoodlumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            heartwoodlumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            heartwoodlumber.Tiles = m_HeartwoodTree;

            // Players must be within 2 tiles to harvest
            heartwoodlumber.MaxRange = 2;

            // Ten logs per harvest action
            heartwoodlumber.ConsumedPerHarvest = 10;
            heartwoodlumber.ConsumedPerFeluccaHarvest = 10;//20

            // The chopping effect
            heartwoodlumber.EffectActions = new int[] { 13 };
            heartwoodlumber.EffectSounds = new int[] { 0x13E };
            heartwoodlumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            heartwoodlumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            heartwoodlumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            heartwoodlumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            heartwoodlumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            heartwoodlumber.OutOfRangeMessage = 500446; // That is too far away.
            heartwoodlumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            heartwoodlumber.ToolBrokeMessage = 500499; // You broke your axe.

            res = new HarvestResource[]
                {
            new HarvestResource(100.0, 60.0, 140.0, 1072544, typeof(HeartwoodLog)),
            };

            veins = new HarvestVein[]
            {
            new HarvestVein(03.0, 0.5, res[4], res[0]), // Heartwood
            };

            heartwoodlumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };

            heartwoodlumber.Resources = res;
            heartwoodlumber.Veins = veins;

            this.Definitions.Add(heartwoodlumber);
            #endregion

            #region BloodwoodLumberjacking
            HarvestDefinition bloodwoodlumber = m_Bloodwood = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            bloodwoodlumber.BankWidth = 4;
            bloodwoodlumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            bloodwoodlumber.MinTotal = 20;
            bloodwoodlumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            bloodwoodlumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            bloodwoodlumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            bloodwoodlumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            bloodwoodlumber.Tiles = m_BloodwoodTree;

            // Players must be within 2 tiles to harvest
            bloodwoodlumber.MaxRange = 2;

            // Ten logs per harvest action
            bloodwoodlumber.ConsumedPerHarvest = 10;
            bloodwoodlumber.ConsumedPerFeluccaHarvest = 10;//20

            // The chopping effect
            bloodwoodlumber.EffectActions = new int[] { 13 };
            bloodwoodlumber.EffectSounds = new int[] { 0x13E };
            bloodwoodlumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            bloodwoodlumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            bloodwoodlumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            bloodwoodlumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            bloodwoodlumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            bloodwoodlumber.OutOfRangeMessage = 500446; // That is too far away.
            bloodwoodlumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            bloodwoodlumber.ToolBrokeMessage = 500499; // You broke your axe.

            res = new HarvestResource[]
                {
            new HarvestResource(100.0, 60.0, 140.0, 1072545, typeof(BloodwoodLog)),
            };

            veins = new HarvestVein[]
            {
            new HarvestVein(02.0, 0.5, res[5], res[0]), // Bloodwood
            };

            bloodwoodlumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };

            bloodwoodlumber.Resources = res;
            bloodwoodlumber.Veins = veins;

            this.Definitions.Add(bloodwoodlumber);
            #endregion

            #region FrostwoodLumberjacking
            HarvestDefinition frostwoodlumber = m_Frostwood = new HarvestDefinition();

            // Resource banks are every 4x3 tiles
            frostwoodlumber.BankWidth = 4;
            frostwoodlumber.BankHeight = 3;

            // Every bank holds from 20 to 45 logs
            frostwoodlumber.MinTotal = 20;
            frostwoodlumber.MaxTotal = 45;

            // A resource bank will respawn its content every 20 to 30 minutes
            frostwoodlumber.MinRespawn = TimeSpan.FromMinutes(20.0);
            frostwoodlumber.MaxRespawn = TimeSpan.FromMinutes(30.0);

            // Skill checking is done on the Lumberjacking skill
            frostwoodlumber.Skill = SkillName.Lumberjacking;

            // Set the list of harvestable tiles
            frostwoodlumber.Tiles = m_FrostwoodTree;

            // Players must be within 2 tiles to harvest
            frostwoodlumber.MaxRange = 2;

            // Ten logs per harvest action
            frostwoodlumber.ConsumedPerHarvest = 10;
            frostwoodlumber.ConsumedPerFeluccaHarvest = 10;//20

            // The chopping effect
            frostwoodlumber.EffectActions = new int[] { 13 };
            frostwoodlumber.EffectSounds = new int[] { 0x13E };
            frostwoodlumber.EffectCounts = (Core.AOS ? new int[] { 1 } : new int[] { 1, 2, 2, 2, 3 });
            frostwoodlumber.EffectDelay = TimeSpan.FromSeconds(1.6);
            frostwoodlumber.EffectSoundDelay = TimeSpan.FromSeconds(0.9);

            frostwoodlumber.NoResourcesMessage = 500493; // There's not enough wood here to harvest.
            frostwoodlumber.FailMessage = 500495; // You hack at the tree for a while, but fail to produce any useable wood.
            frostwoodlumber.OutOfRangeMessage = 500446; // That is too far away.
            frostwoodlumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
            frostwoodlumber.ToolBrokeMessage = 500499; // You broke your axe.

            res = new HarvestResource[]
                {
            new HarvestResource(100.0, 60.0, 140.0, 1072546, typeof(FrostwoodLog)),
            };

            veins = new HarvestVein[]
            {
            new HarvestVein(01.0, 0.5, res[6], res[0]), // Frostwood
            };

            frostwoodlumber.BonusResources = new BonusHarvestResource[]
                {
                    new BonusHarvestResource(0, 83.9, null, null), //Nothing
                    new BonusHarvestResource(100, 10.0, 1072548, typeof(BarkFragment)),
                    new BonusHarvestResource(100, 03.0, 1072550, typeof(LuminescentFungi)),
                    new BonusHarvestResource(100, 02.0, 1072547, typeof(SwitchItem)),
                    new BonusHarvestResource(100, 01.0, 1072549, typeof(ParasiticPlant)),
                    new BonusHarvestResource(100, 00.1, 1072551, typeof(BrilliantAmber))
                };

            frostwoodlumber.Resources = res;
            frostwoodlumber.Veins = veins;

            this.Definitions.Add(frostwoodlumber);
            #endregion
            }

            #region added
        public override Type GetResourceType( Mobile from, Item tool, HarvestDefinition def, Map map, Point3D loc, HarvestResource resource )
        {
            return base.GetResourceType( from, tool, def, map, loc, resource );
        }
           #endregion added

        public override bool CheckHarvest( Mobile from, Item tool )
        {
            if ( !base.CheckHarvest( from, tool ) )
                return false;

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

            return true;
        }

        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;
            }

            return true;
        }

        public override void OnBadHarvestTarget(Mobile from, Item tool, object toHarvest)
        {
            if (toHarvest is Mobile)
                ((Mobile)toHarvest).PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500450, from.NetState); // You can only skin dead creatures.
            else if (toHarvest is Item)
                ((Item)toHarvest).LabelTo(from, 500464); // Use this on corpses to carve away meat and hide
            else if (toHarvest is Targeting.StaticTarget || toHarvest is Targeting.LandTarget)
                from.SendLocalizedMessage(500489); // You can't use an axe on that.
            else
                from.SendLocalizedMessage(1005213); // You can't do that
        }

        public override void OnHarvestStarted(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
        {
            base.OnHarvestStarted(from, tool, def, toHarvest);

            if (Core.ML)
                from.RevealingAction();
        }

        #region Plain list
        private static readonly int[] m_PlainTree = new int[]
        {
            0x0C9E, 0x0CC9, 0x0CCA, 0x0CCB, 0x0CCC, 0x0CCD,
            0x0CD0, 0x0CD3, 0x0CD6, 0x0CD8, 0x0CE0, 0x0CE3,
            0x0CE6, 0x0CF8, 0x0CFB, 0x0CFE, 0x0D01, 0x0D41,
            0x0D42, 0x0D43, 0x0D44, 0x0D57, 0x0D58, 0x0D59,
            0x0D5A, 0x0D5B, 0x0D6E, 0x0D6F, 0x0D70, 0x0D71,
            0x0D72, 0x0D84, 0x0D85, 0x0D86, 0x0D94, 0x0D98,
            0x0D9C, 0x0DA0, 0x0Da4, 0x0DA8
        };
        #endregion

        #region Oak list
        private static readonly int[] m_OakTree = new int[]
        {
            0x0CDA, 0x0CDD, 0x224C, 0x224D
        };
        #endregion

        #region Ash list
        private static readonly int[] m_AshTree = new int[]
        {
            0x0000
        };
        #endregion

        #region Yew list
        private static readonly int[] m_YewTree = new int[]
        {
            0x12B5, 0x12B6, 0x12B7, 0x12B8, 0x12B9, 0x12BA,
            0x12BB, 0x12BC, 0x12BD
        };
        #endregion

        #region Bloodwood list
        private static readonly int[] m_BloodwoodTree = new int[]
        {
            0x0000
        };
        #endregion

        #region Heartwood list
        private static readonly int[] m_HeartwoodTree = new int[]
        {
            0x0000
        };
        #endregion

        #region Frostwood list
        private static readonly int[] m_FrostwoodTree = new int[]
        {
            0x0000
        };
        #endregion

}
}

The snag is that I get this error.
Code:
Errors:
+ Targets/BladedItemTarget.cs:
    CS1061: Line 76: 'Server.Engines.Harvest.Lumberjacking' does not contain a d
efinition for 'Definition' and no extension method 'Definition' accepting a firs
t argument of type 'Server.Engines.Harvest.Lumberjacking' could be found (are yo
u missing a using directive or an assembly reference?)
Which makes sense because I removed/changed public HarvestDefinition Definition.
I just don't know how to fix it.

So then over in BladedItemTarget.cs This is the line.
Code:
HarvestDefinition def = Lumberjacking.System.Definition;
 
Last edited by a moderator:
I did what you are trying to do years ago.. I think I left it out at some point while updating to a newer version of RunUO.. but I will see if I can find it, and what changes I made to achieve this. Its been a long time ago, so I cant be certain how in depth I went, but I do know I made trees give the corresponding wood resource at least.

I'll let you know, but dont stop progress just waiting on me.
 
I did what you are trying to do years ago.. I think I left it out at some point while updating to a newer version of RunUO.. but I will see if I can find it, and what changes I made to achieve this. Its been a long time ago, so I cant be certain how in depth I went, but I do know I made trees give the corresponding wood resource at least.

I'll let you know, but dont stop progress just waiting on me.
I know that doing it this 'easier' way is not very "pro" code wise. If it turns out I have to make multiple edits to multiple distro files I will find a better way to do it that's for sure.
I never stop working on a project until it's complete or I am dead tired. Thanks for your time Dian.

Edit:
I'm thinking about making my own custom harvest system. i'm sick of look at the distro's ugly heap of meh! Then i could do anything i wanted.
 
Last edited by a moderator:
Take a look at Dougan's attempt at a rewrite. Good place to start. Can find it by checking out an old revision that had it.
 
I figured I'd share the list of trees (7.0.18.0) since i just spent 15 minutes putting it together.
0x0C9E (3230) o'hii tree
0x0CA8 (3240) small banana tree
0x0CAA (3242) banana tree
0x0CAB (3243) banana tree (stump?)
0x0CC9 (3273) spider tree
0x0CCA (3274) tree
0x0CCB (3275) tree
0x0CCC (3276) tree
0x0CCD (3277) tree
0x0CD0 (3280) tree
0x0CD3 (3283) tree
0x0CD6 (3286) Cedar tree
0x0CD8 (3288) Cedar tree
0x0CDA (3290) oak tree
0x0CDD (3293) oak tree
0x0CE0 (3296) walnut tree
0x0CE3 (3299) walnut tree
0x0CE6 (3302) willow tree
0x0CF3 (3315) fallen log
0x0CF4 (3316) fallen log
0x0CF5 (3317) fallen log
0x0CF6 (3318) fallen log
0x0CF7 (3319) fallen log
0x0CF8 (3320) cypress tree
0x0CFB (3323) cypress tree
0x0CFE (3326) cypress tree
0x0D01 (3329) cypress tree
0x0D37 (3383) yucca
0x0D38 (3384) yucca
0x0D41 (3393) tree (tall)
0x0D42 (3394) tree (tall)
0x0D43 (3395) tree (tall)
0x0D44 (3396) tree (tall)
0x0D57 (3415) tree (tall)
0x0D58 (3416) tree (tall)
0x0D59 (3417) tree (tall)
0x0D5A (3418) tree (tall)
0x0D5B (3419) tree (tall)
0x0D6E (3438) tree (tall)
0x0D6F (3439) tree (tall)
0x0D70 (3440) tree (tall)
0x0D71 (3441) tree (tall)
0x0D72 (3442) tree (tall)
0x0D84 (3460) tree (tall)
0x0D85 (3461) tree (tall)
0x0D86 (3462) tree (tall)
0x0D94 (3476) apple tree
0x0D98 (3480) apple tree
0x0D9C (3484) peach tree
0x0DA0 (3488) peach tree
0x0Da4 (3492) pear tree
0x0DA8 (3496) pear tree
0x0DAC (3500) tree stump (palm)
0x0DAD (3501) tree stump (palm)
0x12B5 (4789) Yew tree
0x12B6 (4790) Yew tree
0x12B7 (4791) Yew tree
0x12B8 (4792) Yew tree
0x12B9 (4793) Yew tree
0x12BA (4794) Yew tree
0x12BB (4795) Yew tree
0x12BC (4796) Yew tree
0x12BD (4797) Yew tree
0x224A (8778) willow tree (hued?)
0x224B (8779) willow tree (hued?)
0x224C (8780) oak tree
0x224D (8781) oak tree (hued?)
0x2476 (9334) cherry tree
0x2477 (9335) cherry tree
0x247D (9341) maple tree
0x247E (9342) maple tree
0x26ED (9965) plum tree
0x26EE (9966) plum tree
note: How distro lumberjacking : harvest system works you need to add 0x3FFF to each hex value for these to be used in lumberjacking.cs

Hi, I'm currently trying to update my Lumberjack and Mining scripts and am curious as to what you mean by "add 0x3FFF to each hex value"? I noticed when adding "0x0CD6" it causes my server not to initiate. I'm assuming it has something to do with that "0x3FFF" but am confused =/
 
Hi, I'm currently trying to update my Lumberjack and Mining scripts and am curious as to what you mean by "add 0x3FFF to each hex value"? I noticed when adding "0x0CD6" it causes my server not to initiate. I'm assuming it has something to do with that "0x3FFF" but am confused =/

Code:
        #region Tile lists
        private static readonly int[] m_TreeTiles = new int[]
        {
            0x4CCA, 0x4CCB, 0x4CCC, 0x4CCD, 0x4CD0, 0x4CD3, 0x4CD6, 0x4CD8,
            0x4CDA, 0x4CDD, 0x4CE0, 0x4CE3, 0x4CE6, 0x4CF8, 0x4CFB, 0x4CFE,
            0x4D01, 0x4D41, 0x4D42, 0x4D43, 0x4D44, 0x4D57, 0x4D58, 0x4D59,
            0x4D5A, 0x4D5B, 0x4D6E, 0x4D6F, 0x4D70, 0x4D71, 0x4D72, 0x4D84,
            0x4D85, 0x4D86, 0x52B5, 0x52B6, 0x52B7, 0x52B8, 0x52B9, 0x52BA,
            0x52BB, 0x52BC, 0x52BD,
            0x4CCE, 0x4CCF, 0x4CD1, 0x4CD2, 0x4CD4, 0x4CD5, 0x4CD7, 0x4CD9,
            0x4CDB, 0x4CDC, 0x4CDE, 0x4CDF, 0x4CE1, 0x4CE2, 0x4CE4, 0x4CE5,
            0x4CE7, 0x4CE8, 0x4CF9, 0x4CFA, 0x4CFC, 0x4CFD, 0x4CFF, 0x4D00,
            0x4D02, 0x4D03, 0x4D45, 0x4D46, 0x4D47, 0x4D48, 0x4D49, 0x4D4A,
            0x4D4B, 0x4D4C, 0x4D4D, 0x4D4E, 0x4D4F, 0x4D50, 0x4D51, 0x4D52,
            0x4D53, 0x4D5C, 0x4D5D, 0x4D5E, 0x4D5F, 0x4D60, 0x4D61, 0x4D62,
            0x4D63, 0x4D64, 0x4D65, 0x4D66, 0x4D67, 0x4D68, 0x4D69, 0x4D73,
            0x4D74, 0x4D75, 0x4D76, 0x4D77, 0x4D78, 0x4D79, 0x4D7A, 0x4D7B,
            0x4D7C, 0x4D7D, 0x4D7E, 0x4D7F, 0x4D87, 0x4D88, 0x4D89, 0x4D8A,
            0x4D8B, 0x4D8C, 0x4D8D, 0x4D8E, 0x4D8F, 0x4D90, 0x4D95, 0x4D96,
            0x4D97, 0x4D99, 0x4D9A, 0x4D9B, 0x4D9D, 0x4D9E, 0x4D9F, 0x4DA1,
            0x4DA2, 0x4DA3, 0x4DA5, 0x4DA6, 0x4DA7, 0x4DA9, 0x4DAA, 0x4DAB,
            0x52BE, 0x52BF, 0x52C0, 0x52C1, 0x52C2, 0x52C3, 0x52C4, 0x52C5,
            0x52C6, 0x52C7
        };
        #endregion
    }
 
Code:
        #region Tile lists
        private static readonly int[] m_TreeTiles = new int[]
        {
            0x4CCA, 0x4CCB, 0x4CCC, 0x4CCD, 0x4CD0, 0x4CD3, 0x4CD6, 0x4CD8,
            0x4CDA, 0x4CDD, 0x4CE0, 0x4CE3, 0x4CE6, 0x4CF8, 0x4CFB, 0x4CFE,
            0x4D01, 0x4D41, 0x4D42, 0x4D43, 0x4D44, 0x4D57, 0x4D58, 0x4D59,
            0x4D5A, 0x4D5B, 0x4D6E, 0x4D6F, 0x4D70, 0x4D71, 0x4D72, 0x4D84,
            0x4D85, 0x4D86, 0x52B5, 0x52B6, 0x52B7, 0x52B8, 0x52B9, 0x52BA,
            0x52BB, 0x52BC, 0x52BD,
            0x4CCE, 0x4CCF, 0x4CD1, 0x4CD2, 0x4CD4, 0x4CD5, 0x4CD7, 0x4CD9,
            0x4CDB, 0x4CDC, 0x4CDE, 0x4CDF, 0x4CE1, 0x4CE2, 0x4CE4, 0x4CE5,
            0x4CE7, 0x4CE8, 0x4CF9, 0x4CFA, 0x4CFC, 0x4CFD, 0x4CFF, 0x4D00,
            0x4D02, 0x4D03, 0x4D45, 0x4D46, 0x4D47, 0x4D48, 0x4D49, 0x4D4A,
            0x4D4B, 0x4D4C, 0x4D4D, 0x4D4E, 0x4D4F, 0x4D50, 0x4D51, 0x4D52,
            0x4D53, 0x4D5C, 0x4D5D, 0x4D5E, 0x4D5F, 0x4D60, 0x4D61, 0x4D62,
            0x4D63, 0x4D64, 0x4D65, 0x4D66, 0x4D67, 0x4D68, 0x4D69, 0x4D73,
            0x4D74, 0x4D75, 0x4D76, 0x4D77, 0x4D78, 0x4D79, 0x4D7A, 0x4D7B,
            0x4D7C, 0x4D7D, 0x4D7E, 0x4D7F, 0x4D87, 0x4D88, 0x4D89, 0x4D8A,
            0x4D8B, 0x4D8C, 0x4D8D, 0x4D8E, 0x4D8F, 0x4D90, 0x4D95, 0x4D96,
            0x4D97, 0x4D99, 0x4D9A, 0x4D9B, 0x4D9D, 0x4D9E, 0x4D9F, 0x4DA1,
            0x4DA2, 0x4DA3, 0x4DA5, 0x4DA6, 0x4DA7, 0x4DA9, 0x4DAA, 0x4DAB,
            0x52BE, 0x52BF, 0x52C0, 0x52C1, 0x52C2, 0x52C3, 0x52C4, 0x52C5,
            0x52C6, 0x52C7
        };
        #endregion
    }

still tells me I can't use an axe on that for any tree I target... wondering if it doesn't have something to do with my custom map?

so I redownloaded and setup ServUO and got a different client. Still cannot use any axe to chop a tree?
 
Last edited:

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back