So as I said in a previous thread, I'm a noob when it comes to coding and I got this error that I can't seem to find a solution for


Errors:
+ Items/Weapons/BaseWeapon.cs:
CS0117: Line 3597: 'Server.Items.CraftResource' does not contain a definition for 'Platinum'
+ Engines/Harvest/Mining.cs:
CS0246: Line 95: The type or namespace name 'PlatinumGranite' could not be found (are you missing a using directive or an assembly reference?)
CS0246: Line 95: The type or namespace name 'PlatinumElemental' could not be found (are you missing a using directive or an assembly reference?)
+ Items/Armor/BaseArmor.cs:
CS0117: Line 164: 'Server.Items.CraftResource' does not contain a definition for 'Platinum'
CS0117: Line 1051: 'Server.Items.OreInfo' does not contain a definition for 'Platinum'
+ Items/Resources/Blacksmithing/Ingots.cs:
CS0117: Line 63: 'Server.Items.OreInfo' does not contain a definition for 'Platinum'
CS0117: Line 440: 'Server.Items.CraftResource' does not contain a definition for 'Platinum'
+ Items/Resources/Blacksmithing/Ore.cs:
CS0117: Line 60: 'Server.Items.OreInfo' does not contain a definition for 'Platinum'
CS0117: Line 294: 'Server.Items.CraftResource' does not contain a definition for 'Platinum'
CS0117: Line 712: 'Server.Items.CraftResource' does not contain a definition for 'Platinum'
+ Items/Resources/Masonry/Granite.cs:
CS0117: Line 319: 'Server.Items.CraftResource' does not contain a definition for 'Platinum'
 
So, you are adding a new resource type called Platinum, and Ore to match. Did you add those files? They appear to be missing.
 
If you are adding a Custom Resources for Custom ores/metals, you don't need to edit baseweapon. Beginners shouldn't try messing with any of the Basecodes, as they can cause major damage if done improperly. The Files you need to be dealing with are Resourceinfo.cs, ingots.cs, ore.cs, Granite.cs, mining.cs . If you are adding it to the crafting as well you need to go into DefBlacksmithy.cs and DefMasonary.cs . You also need to create a new script for your Elemental, just copy a pre existin elemental and change the material to yours, Once you have it all running according to plan, You can then mess with the baseweapon and start working on that.

Look at this for help with Resourceinfo, as that would be your main base your editing.

Code:
using System;
using System.Collections;

namespace Server.Items
{







    public enum CraftResource
    {







        None = 0,
        Iron = 1,
        DullCopper,
        ShadowIron,
        Copper,
        Bronze,
        Gold,
        Agapite,
        Verite,
        Valorite,
        Mithril,
        Soul,
        Nether,
        Astral,
        Solar,
        Magma,
        Obsidian,
        Spectral,
        IcySteel,
        InfernalCrystal,

        RegularLeather = 101,
        SpinedLeather,
        HornedLeather,
        BarbedLeather,
        ShadowLeather,
        OstrichLeather,
        MysticalLeather,
        TwilightLeather,

        RedScales = 201,
        YellowScales,
        BlackScales,
        GreenScales,
        WhiteScales,
        BlueScales,
        SalmonScales,
        CodScales,

        RegularWood = 301,
        OakWood,
        AshWood,
        YewWood,
        Heartwood,
        Bloodwood,
        Frostwood,
        Bamboowood,
        Maplewood,
        Cherrywood,
        Birchwood,
        Palmwood,
        Murkwood,
        Silverleafwood,

        Cloth = 401,
        ChlorphyteCloth
    }



































    public enum CraftResourceType
    {







        None,
        Metal,
        Leather,
        Scales,
        Wood,
        Cloth
    }



































    public class CraftAttributeInfo
    {







        private int m_WeaponFireDamage;
        private int m_WeaponColdDamage;
        private int m_WeaponPoisonDamage;
        private int m_WeaponEnergyDamage;
        private int m_WeaponChaosDamage;
        private int m_WeaponDirectDamage;
        private int m_WeaponDurability;
        private int m_WeaponLuck;
        private int m_WeaponGoldIncrease;
        private int m_WeaponLowerRequirements;

        private int m_ArmorPhysicalResist;
        private int m_ArmorFireResist;
        private int m_ArmorColdResist;
        private int m_ArmorPoisonResist;
        private int m_ArmorEnergyResist;
        private int m_ArmorDurability;
        private int m_ArmorLuck;
        private int m_ArmorGoldIncrease;
        private int m_ArmorLowerRequirements;

        private int m_BonusHits;

        private int m_RunicMinAttributes;
        private int m_RunicMaxAttributes;
        private int m_RunicMinIntensity;
        private int m_RunicMaxIntensity;
        private int m_AttributesRegenHits;
        //AttributesRegenHits

        public int WeaponFireDamage
        {






            get
            {






                return this.m_WeaponFireDamage;
            }
































            set
            {






                this.m_WeaponFireDamage = value;
            }
        }










        public int WeaponColdDamage
        {






            get
            {






                return this.m_WeaponColdDamage;
            }











            set
            {






                this.m_WeaponColdDamage = value;
            }
        }










        public int WeaponPoisonDamage
        {






            get
            {






                return this.m_WeaponPoisonDamage;
            }










            set
            {






                this.m_WeaponPoisonDamage = value;
            }
        }











        public int WeaponEnergyDamage
        {






            get
            {






                return this.m_WeaponEnergyDamage;
            }










            set
            {






                this.m_WeaponEnergyDamage = value;
            }
        }










        public int WeaponChaosDamage
        {






            get
            {






                return this.m_WeaponChaosDamage;
            }









            set
            {






                this.m_WeaponChaosDamage = value;
            }
        }











        public int WeaponDirectDamage
        {






            get
            {






                return this.m_WeaponDirectDamage;
            }












            set
            {






                this.m_WeaponDirectDamage = value;
            }
        }










        public int WeaponDurability
        {






            get
            {






                return this.m_WeaponDurability;
            }










            set
            {






                this.m_WeaponDurability = value;
            }
        }











        public int WeaponLuck
        {






            get
            {






                return this.m_WeaponLuck;
            }













            set
            {






                this.m_WeaponLuck = value;
            }
        }













        public int WeaponGoldIncrease
        {






            get
            {






                return this.m_WeaponGoldIncrease;
            }











            set
            {






                this.m_WeaponGoldIncrease = value;
            }
        }













        public int WeaponLowerRequirements
        {






            get
            {






                return this.m_WeaponLowerRequirements;
            }














            set
            {






                this.m_WeaponLowerRequirements = value;
            }
        }










        public int ArmorPhysicalResist
        {






            get
            {






                return this.m_ArmorPhysicalResist;
            }












            set
            {






                this.m_ArmorPhysicalResist = value;
            }
        }











        public int ArmorFireResist
        {






            get
            {






                return this.m_ArmorFireResist;
            }













            set
            {






                this.m_ArmorFireResist = value;
            }
        }












        public int ArmorColdResist
        {






            get
            {






                return this.m_ArmorColdResist;
            }












            set
            {






                this.m_ArmorColdResist = value;
            }
        }












        public int ArmorPoisonResist
        {






            get
            {






                return this.m_ArmorPoisonResist;
            }













            set
            {






                this.m_ArmorPoisonResist = value;
            }
        }












        public int ArmorEnergyResist
        {






            get
            {






                return this.m_ArmorEnergyResist;
            }













            set
            {






                this.m_ArmorEnergyResist = value;
            }
        }

















        public int ArmorDurability
        {






            get
            {






                return this.m_ArmorDurability;
            }













            set
            {






                this.m_ArmorDurability = value;
            }
        }











        public int ArmorLuck
        {






            get
            {






                return this.m_ArmorLuck;
            }












            set
            {






                this.m_ArmorLuck = value;
            }
        }











        public int ArmorGoldIncrease
        {






            get
            {






                return this.m_ArmorGoldIncrease;
            }












            set
            {






                this.m_ArmorGoldIncrease = value;
            }
        }












        public int ArmorLowerRequirements
        {






            get
            {






                return this.m_ArmorLowerRequirements;
            }












            set
            {






                this.m_ArmorLowerRequirements = value;
            }
        }











        public int BonusHits
        {






            get
            {






                return this.m_BonusHits;
            }












            set
            {






                this.m_BonusHits = value;
            }
        }










        public int RunicMinAttributes
        {






            get
            {






                return this.m_RunicMinAttributes;
            }










            set
            {






                this.m_RunicMinAttributes = value;
            }
        }










        public int RunicMaxAttributes
        {






            get
            {






                return this.m_RunicMaxAttributes;
            }










            set
            {






                this.m_RunicMaxAttributes = value;
            }
        }











        public int RunicMinIntensity
        {






            get
            {






                return this.m_RunicMinIntensity;
            }










            set
            {






                this.m_RunicMinIntensity = value;
            }
        }










        public int RunicMaxIntensity
        {






            get
            {






                return this.m_RunicMaxIntensity;
            }













            set
            {






                this.m_RunicMaxIntensity = value;
            }
        }















        public int AttributesRegenHits
        {






            get
            {






                return this.m_AttributesRegenHits;
            }















            set
            {






                this.m_AttributesRegenHits = value;
            }
        }














        #region Mondain's Legacy
        private int m_WeaponDamage;
        private int m_WeaponHitChance;
        private int m_WeaponHitLifeLeech;
        private int m_WeaponRegenHits;
        private int m_WeaponSwingSpeed;

        private int m_ArmorDamage;
        private int m_ArmorHitChance;
        private int m_ArmorRegenHits;
        private int m_ArmorMage;

        private int m_ShieldPhysicalResist;
        private int m_ShieldFireResist;
        private int m_ShieldColdResist;
        private int m_ShieldPoisonResist;
        private int m_ShieldEnergyResist;
        private int m_SpellDamageIncrease;

        public int SpellDamageIncrease
        {





            get
            {





                return this.m_SpellDamageIncrease;
            }













            set
            {





                this.m_SpellDamageIncrease = value;
            }
        }
     
        public int WeaponDamage
        {




            get
            {






                return this.m_WeaponDamage;
            }







            set
            {





                this.m_WeaponDamage = value;
            }
        }







        public int WeaponHitChance
        {





            get
            {





                return this.m_WeaponHitChance;
            }






            set
            {





                this.m_WeaponHitChance = value;
            }
        }







        public int WeaponHitLifeLeech
        {






            get
            {




                return this.m_WeaponHitLifeLeech;
            }







            set
            {





                this.m_WeaponHitLifeLeech = value;
            }
        }







        public int WeaponRegenHits
        {





            get
            {





                return this.m_WeaponRegenHits;
            }





            set
            {





                this.m_WeaponRegenHits = value;
            }
        }







        public int WeaponSwingSpeed
        {





            get
            {





                return this.m_WeaponSwingSpeed;
            }





            set
            {




                this.m_WeaponSwingSpeed = value;
            }
        }






        public int ArmorDamage
        {



            get
            {




                return this.m_ArmorDamage;
            }





            set
            {




                this.m_ArmorDamage = value;
            }
        }






        public int ArmorHitChance
        {






            get
            {




                return this.m_ArmorHitChance;
            }





            set
            {




                this.m_ArmorHitChance = value;
            }
        }









        public int ArmorRegenHits
        {




            get
            {





                return this.m_ArmorRegenHits;
            }






            set
            {





                this.m_ArmorRegenHits = value;
            }
        }






        public int ArmorMage
        {



            get
            {



                return this.m_ArmorMage;
            }





            set
            {





                this.m_ArmorMage = value;
            }
        }







        public int ShieldPhysicalResist
        {





            get
            {





                return this.m_ShieldPhysicalResist;
            }







            set
            {






                this.m_ShieldPhysicalResist = value;
            }
        }






        public int ShieldFireResist
        {






            get
            {




                return this.m_ShieldFireResist;
            }







            set
            {






                this.m_ShieldFireResist = value;
            }
        }






        public int ShieldColdResist
        {





            get
            {





                return this.m_ShieldColdResist;
            }







            set
            {




                this.m_ShieldColdResist = value;
            }
        }







        public int ShieldPoisonResist
        {





            get
            {





                return this.m_ShieldPoisonResist;
            }





            set
            {





                this.m_ShieldPoisonResist = value;
            }
        }





        public int ShieldEnergyResist
        {




            get
            {




                return this.m_ShieldEnergyResist;
            }





            set
            {



                this.m_ShieldEnergyResist = value;
            }
        }






























        #endregion

        public CraftAttributeInfo()
        {





        }































        public static readonly CraftAttributeInfo Blank;
        public static readonly CraftAttributeInfo DullCopper, ShadowIron, Copper, Bronze, Golden, Agapite, Verite, Valorite, Mithril, Soul, Nether, Astral, Solar, Magma, Obsidian, Spectral, IcySteel, InfernalCrystal;
        public static readonly CraftAttributeInfo Spined, Horned, Barbed, Shadow, Ostrich, Mystical, Twilight;
        public static readonly CraftAttributeInfo RedScales, YellowScales, BlackScales, GreenScales, WhiteScales, BlueScales, SalmonScales, CodScales;
        public static readonly CraftAttributeInfo OakWood, AshWood, YewWood, Heartwood, Bloodwood, Frostwood, Bamboowood, Maplewood, Cherrywood, Birchwood, Palmwood, Murkwood, Silverleafwood;
        public static readonly CraftAttributeInfo ChlorphyteCloth;

        static CraftAttributeInfo()
        {



















            Blank = new CraftAttributeInfo();

            CraftAttributeInfo dullCopper = DullCopper = new CraftAttributeInfo();

            dullCopper.ArmorPhysicalResist = 6;
            dullCopper.ArmorDurability = 50;
            dullCopper.ArmorLowerRequirements = 20;
            dullCopper.WeaponDurability = 100;
            dullCopper.WeaponLowerRequirements = 50;
            dullCopper.RunicMinAttributes = 1;
            dullCopper.RunicMaxAttributes = 2;
            if (Core.ML)
            {



















                dullCopper.RunicMinIntensity = 40;
                dullCopper.RunicMaxIntensity = 100;
            }
            else
            {



















                dullCopper.RunicMinIntensity = 10;
                dullCopper.RunicMaxIntensity = 35;
            }































            CraftAttributeInfo shadowIron = ShadowIron = new CraftAttributeInfo();

            shadowIron.ArmorPhysicalResist = 2;
            shadowIron.ArmorFireResist = 1;
            shadowIron.ArmorEnergyResist = 5;
            shadowIron.ArmorDurability = 100;
            shadowIron.WeaponColdDamage = 20;
            shadowIron.WeaponDurability = 50;
            shadowIron.RunicMinAttributes = 2;
            shadowIron.RunicMaxAttributes = 2;
            if (Core.ML)
            {



















                shadowIron.RunicMinIntensity = 45;
                shadowIron.RunicMaxIntensity = 100;
            }
            else
            {



















                shadowIron.RunicMinIntensity = 20;
                shadowIron.RunicMaxIntensity = 45;
            }































            CraftAttributeInfo copper = Copper = new CraftAttributeInfo();

            copper.ArmorPhysicalResist = 1;
            copper.ArmorFireResist = 1;
            copper.ArmorPoisonResist = 5;
            copper.ArmorEnergyResist = 2;
            copper.WeaponPoisonDamage = 10;
            copper.WeaponEnergyDamage = 20;
            copper.RunicMinAttributes = 2;
            copper.RunicMaxAttributes = 3;
            if (Core.ML)
            {



















                copper.RunicMinIntensity = 50;
                copper.RunicMaxIntensity = 100;
            }
            else
            {



















                copper.RunicMinIntensity = 25;
                copper.RunicMaxIntensity = 50;
            }































            CraftAttributeInfo bronze = Bronze = new CraftAttributeInfo();

            bronze.ArmorPhysicalResist = 3;
            bronze.ArmorColdResist = 5;
            bronze.ArmorPoisonResist = 1;
            bronze.ArmorEnergyResist = 1;
            bronze.WeaponFireDamage = 40;
            bronze.RunicMinAttributes = 3;
            bronze.RunicMaxAttributes = 3;
            if (Core.ML)
            {



















                bronze.RunicMinIntensity = 55;
                bronze.RunicMaxIntensity = 100;
            }
            else
            {



















                bronze.RunicMinIntensity = 30;
                bronze.RunicMaxIntensity = 65;
            }































            CraftAttributeInfo golden = Golden = new CraftAttributeInfo();

            golden.ArmorPhysicalResist = 1;
            golden.ArmorFireResist = 1;
            golden.ArmorColdResist = 2;
            golden.ArmorEnergyResist = 2;
            golden.ArmorLuck = 40;
            golden.ArmorLowerRequirements = 30;
            golden.WeaponLuck = 40;
            golden.WeaponLowerRequirements = 50;
            golden.RunicMinAttributes = 3;
            golden.RunicMaxAttributes = 4;
            if (Core.ML)
            {



















                golden.RunicMinIntensity = 60;
                golden.RunicMaxIntensity = 100;
            }
            else
            {



















                golden.RunicMinIntensity = 35;
                golden.RunicMaxIntensity = 75;
            }































            CraftAttributeInfo agapite = Agapite = new CraftAttributeInfo();

            agapite.ArmorPhysicalResist = 2;
            agapite.ArmorFireResist = 3;
            agapite.ArmorColdResist = 2;
            agapite.ArmorPoisonResist = 2;
            agapite.ArmorEnergyResist = 2;
            agapite.WeaponColdDamage = 30;
            agapite.WeaponEnergyDamage = 20;
            agapite.RunicMinAttributes = 4;
            agapite.RunicMaxAttributes = 4;
            if (Core.ML)
            {



















                agapite.RunicMinIntensity = 65;
                agapite.RunicMaxIntensity = 100;
            }
            else
            {



















                agapite.RunicMinIntensity = 40;
                agapite.RunicMaxIntensity = 80;
            }































            CraftAttributeInfo verite = Verite = new CraftAttributeInfo();

            verite.ArmorPhysicalResist = 3;
            verite.ArmorFireResist = 3;
            verite.ArmorColdResist = 2;
            verite.ArmorPoisonResist = 3;
            verite.ArmorEnergyResist = 1;
            verite.WeaponPoisonDamage = 40;
            verite.WeaponEnergyDamage = 20;
            verite.RunicMinAttributes = 4;
            verite.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                verite.RunicMinIntensity = 70;
                verite.RunicMaxIntensity = 100;
            }
            else
            {



















                verite.RunicMinIntensity = 45;
                verite.RunicMaxIntensity = 90;
            }































            CraftAttributeInfo valorite = Valorite = new CraftAttributeInfo();

            valorite.ArmorPhysicalResist = 4;
            valorite.ArmorColdResist = 3;
            valorite.ArmorPoisonResist = 3;
            valorite.ArmorEnergyResist = 3;
            valorite.ArmorDurability = 50;
            valorite.WeaponFireDamage = 10;
            valorite.WeaponColdDamage = 20;
            valorite.WeaponPoisonDamage = 10;
            valorite.WeaponEnergyDamage = 20;
            valorite.RunicMinAttributes = 5;
            valorite.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                valorite.RunicMinIntensity = 85;
                valorite.RunicMaxIntensity = 100;
            }
            else
            {



















                valorite.RunicMinIntensity = 50;
                valorite.RunicMaxIntensity = 100; }

            CraftAttributeInfo mithril = Mithril = new CraftAttributeInfo();

            mithril.ArmorPhysicalResist = 5;
            mithril.ArmorColdResist = Utility.RandomMinMax(5, 20);
            mithril.ArmorPoisonResist = 3;
            mithril.ArmorEnergyResist = 3;
            mithril.ArmorDurability = 50;
            mithril.WeaponColdDamage = 20;
            mithril.WeaponHitLifeLeech = Utility.RandomMinMax(1, 10);
            mithril.RunicMinAttributes = 5;
            mithril.RunicMaxAttributes = 5;
            mithril.ArmorLuck = 75;
            mithril.ArmorLowerRequirements = 35;
            mithril.WeaponLuck = 75;
            if (Core.ML)
            {




                mithril.RunicMinIntensity = 85;
                mithril.RunicMaxIntensity = 100;
            }
            else
            {




                mithril.RunicMinIntensity = 50;
                mithril.RunicMaxIntensity = 100;
            }



























            CraftAttributeInfo soul = Soul = new CraftAttributeInfo();

            soul.ArmorPhysicalResist = 4;
            soul.ArmorColdResist = Utility.RandomMinMax(5, 25);
            soul.ArmorPoisonResist = 3;
            soul.ArmorEnergyResist = 3;
            soul.ArmorDurability = 50;
            soul.WeaponFireDamage = 10;
            soul.WeaponColdDamage = 20;
            soul.WeaponPoisonDamage = 10;
            soul.WeaponEnergyDamage = 20;
            soul.RunicMinAttributes = 5;
            soul.RunicMaxAttributes = 5;
            soul.SpellDamageIncrease = Utility.RandomMinMax(5, 15);
            if (Core.ML)
            {



















                soul.RunicMinIntensity = 85;
                soul.RunicMaxIntensity = 100;
            }
            else
            {



















                soul.RunicMinIntensity = 50;
                soul.RunicMaxIntensity = 100;
            }























            CraftAttributeInfo nether = Nether = new CraftAttributeInfo();

            nether.ArmorPhysicalResist = 4;
            nether.ArmorColdResist = 3;
            nether.ArmorPoisonResist = 3;
            nether.ArmorEnergyResist = 3;
            nether.ArmorDurability = 50;
            nether.WeaponFireDamage = 10;
            nether.WeaponColdDamage = 20;
            nether.WeaponPoisonDamage = 10;
            nether.WeaponEnergyDamage = 20;
            nether.RunicMinAttributes = 5;
            nether.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                nether.RunicMinIntensity = 85;
                nether.RunicMaxIntensity = 100;
            }
            else
            {



















                nether.RunicMinIntensity = 50;
                nether.RunicMaxIntensity = 100;
            }

























            CraftAttributeInfo astral = Astral = new CraftAttributeInfo();

            astral.ArmorPhysicalResist = 4;
            astral.ArmorColdResist = 3;
            astral.ArmorPoisonResist = 3;
            astral.ArmorEnergyResist = 3;
            astral.ArmorDurability = 50;
            astral.WeaponFireDamage = 10;
            astral.WeaponColdDamage = 20;
            astral.WeaponPoisonDamage = 10;
            astral.WeaponEnergyDamage = 20;
            astral.RunicMinAttributes = 5;
            astral.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                astral.RunicMinIntensity = 85;
                astral.RunicMaxIntensity = 100;
            }
            else
            {



















                astral.RunicMinIntensity = 50;
                astral.RunicMaxIntensity = 100;
            }

























            CraftAttributeInfo solar = Solar = new CraftAttributeInfo();

            solar.ArmorPhysicalResist = 4;
            solar.ArmorColdResist = 3;
            solar.ArmorPoisonResist = 3;
            solar.ArmorEnergyResist = 3;
            solar.ArmorDurability = 50;
            solar.WeaponFireDamage = 10;
            solar.WeaponColdDamage = 20;
            solar.WeaponPoisonDamage = 10;
            solar.WeaponEnergyDamage = 20;
            solar.RunicMinAttributes = 5;
            solar.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                solar.RunicMinIntensity = 85;
                solar.RunicMaxIntensity = 100;
            }
            else
            {



















                solar.RunicMinIntensity = 50;
                solar.RunicMaxIntensity = 100;
            }

























            CraftAttributeInfo magma = Magma = new CraftAttributeInfo();

            magma.ArmorPhysicalResist = 4;
            magma.ArmorColdResist = 3;
            magma.ArmorPoisonResist = 3;
            magma.ArmorEnergyResist = 3;
            magma.ArmorDurability = 50;
            magma.WeaponFireDamage = 10;
            magma.WeaponColdDamage = 20;
            magma.WeaponPoisonDamage = 10;
            magma.WeaponEnergyDamage = 20;
            magma.RunicMinAttributes = 5;
            magma.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                magma.RunicMinIntensity = 85;
                magma.RunicMaxIntensity = 100;
            }
            else
            {



















                magma.RunicMinIntensity = 50;
                magma.RunicMaxIntensity = 100;
            }

























            CraftAttributeInfo obsidian = Obsidian = new CraftAttributeInfo();

            obsidian.ArmorPhysicalResist = 4;
            obsidian.ArmorColdResist = 3;
            obsidian.ArmorPoisonResist = 3;
            obsidian.ArmorEnergyResist = 3;
            obsidian.ArmorDurability = 50;
            obsidian.WeaponFireDamage = 10;
            obsidian.WeaponColdDamage = 20;
            obsidian.WeaponPoisonDamage = 10;
            obsidian.WeaponEnergyDamage = 20;
            obsidian.RunicMinAttributes = 5;
            obsidian.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                obsidian.RunicMinIntensity = 85;
                obsidian.RunicMaxIntensity = 100;
            }
            else
            {



















                obsidian.RunicMinIntensity = 50;
                obsidian.RunicMaxIntensity = 100;
            }

























            CraftAttributeInfo spectral = Spectral = new CraftAttributeInfo();

            spectral.ArmorPhysicalResist = 4;
            spectral.ArmorColdResist = 3;
            Spectral.ArmorPoisonResist = 3;
            Spectral.ArmorEnergyResist = 3;
            Spectral.ArmorDurability = 50;
            Spectral.WeaponFireDamage = 10;
            spectral.WeaponColdDamage = 20;
            spectral.WeaponPoisonDamage = 10;
            spectral.WeaponEnergyDamage = 20;
            spectral.RunicMinAttributes = 5;
            spectral.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                spectral.RunicMinIntensity = 85;
                spectral.RunicMaxIntensity = 100;
            }
            else
            {



















                spectral.RunicMinIntensity = 50;
                spectral.RunicMaxIntensity = 100;
            }

























            CraftAttributeInfo icySteel = IcySteel = new CraftAttributeInfo();

            icySteel.ArmorPhysicalResist = 4;
            icySteel.ArmorColdResist = 3;
            icySteel.ArmorPoisonResist = 3;
            icySteel.ArmorEnergyResist = 3;
            icySteel.ArmorDurability = 50;
            icySteel.WeaponFireDamage = 10;
            icySteel.WeaponColdDamage = 20;
            icySteel.WeaponPoisonDamage = 10;
            icySteel.WeaponEnergyDamage = 20;
            icySteel.RunicMinAttributes = 5;
            icySteel.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                icySteel.RunicMinIntensity = 85;
                icySteel.RunicMaxIntensity = 100;
            }
            else
            {



















                icySteel.RunicMinIntensity = 50;
                icySteel.RunicMaxIntensity = 100;
            }

























            CraftAttributeInfo infernalCrystal = InfernalCrystal = new CraftAttributeInfo();

            infernalCrystal.ArmorPhysicalResist = 4;
            infernalCrystal.ArmorColdResist = 3;
            infernalCrystal.ArmorPoisonResist = 3;
            infernalCrystal.ArmorEnergyResist = 3;
            infernalCrystal.ArmorDurability = 50;
            infernalCrystal.WeaponFireDamage = 10;
            infernalCrystal.WeaponColdDamage = 20;
            infernalCrystal.WeaponPoisonDamage = 10;
            infernalCrystal.WeaponEnergyDamage = 20;
            infernalCrystal.RunicMinAttributes = 5;
            infernalCrystal.RunicMaxAttributes = 5;
            if (Core.ML)
            {



















                InfernalCrystal.RunicMinIntensity = 85;
                InfernalCrystal.RunicMaxIntensity = 100;
            }
            else
            {



















                InfernalCrystal.RunicMinIntensity = 50;
                InfernalCrystal.RunicMaxIntensity = 100;
            }


























            CraftAttributeInfo spined = Spined = new CraftAttributeInfo();

            spined.ArmorPhysicalResist = 5;
            spined.ArmorLuck = 40;
            spined.RunicMinAttributes = 1;
            spined.RunicMaxAttributes = 3;
            if (Core.ML)
            {

















                spined.RunicMinIntensity = 40;
                spined.RunicMaxIntensity = 100;
            }
            else
            {

















                spined.RunicMinIntensity = 20;
                spined.RunicMaxIntensity = 40;
            }
























            CraftAttributeInfo shadow = Shadow = new CraftAttributeInfo();

            Shadow.ArmorPhysicalResist = 5;
            Shadow.ArmorLuck = 40;
            shadow.RunicMinAttributes = 1;
            shadow.RunicMaxAttributes = 3;
            if (Core.ML)
            {



















                shadow.RunicMinIntensity = 40;
                shadow.RunicMaxIntensity = 100;
            }
            else
            {



















                shadow.RunicMinIntensity = 20;
                shadow.RunicMaxIntensity = 40;
            }
























            CraftAttributeInfo ostrich = Ostrich = new CraftAttributeInfo();

            ostrich.ArmorPhysicalResist = 5;
            ostrich.ArmorLuck = 40;
            ostrich.RunicMinAttributes = 1;
            ostrich.RunicMaxAttributes = 3;
            if (Core.ML)
            {



















                ostrich.RunicMinIntensity = 40;
                ostrich.RunicMaxIntensity = 100;
            }
            else
            {



















                ostrich.RunicMinIntensity = 20;
                ostrich.RunicMaxIntensity = 40;
            }

























            CraftAttributeInfo mystical = Mystical = new CraftAttributeInfo();

            mystical.ArmorPhysicalResist = 5;
            mystical.ArmorLuck = 40;
            mystical.RunicMinAttributes = 1;
            mystical.RunicMaxAttributes = 3;
            if (Core.ML)
            {



















                mystical.RunicMinIntensity = 40;
                mystical.RunicMaxIntensity = 100;
            }
            else
            {



















                mystical.RunicMinIntensity = 20;
                mystical.RunicMaxIntensity = 40;
            }

























            CraftAttributeInfo twilight = Twilight = new CraftAttributeInfo();

            twilight.ArmorPhysicalResist = 5;
            twilight.ArmorLuck = 40;
            twilight.RunicMinAttributes = 1;
            twilight.RunicMaxAttributes = 3;
            if (Core.ML)
            {



















                twilight.RunicMinIntensity = 40;
                twilight.RunicMaxIntensity = 100;
            }
            else
            {



















                twilight.RunicMinIntensity = 20;
                twilight.RunicMaxIntensity = 40;
            }






            CraftAttributeInfo horned = Horned = new CraftAttributeInfo();

            horned.ArmorPhysicalResist = 2;
            horned.ArmorFireResist = 3;
            horned.ArmorColdResist = 2;
            horned.ArmorPoisonResist = 2;
            horned.ArmorEnergyResist = 2;
            horned.RunicMinAttributes = 3;
            horned.RunicMaxAttributes = 4;
            if (Core.ML)
            {





                horned.RunicMinIntensity = 45;
                horned.RunicMaxIntensity = 100;
            }
            else
            {






                horned.RunicMinIntensity = 30;
                horned.RunicMaxIntensity = 70;
            }









            CraftAttributeInfo barbed = Barbed = new CraftAttributeInfo();

            barbed.ArmorPhysicalResist = 2;
            barbed.ArmorFireResist = 1;
            barbed.ArmorColdResist = 2;
            barbed.ArmorPoisonResist = 3;
            barbed.ArmorEnergyResist = 4;
            barbed.RunicMinAttributes = 4;
            barbed.RunicMaxAttributes = 5;
            if (Core.ML)
            {







                barbed.RunicMinIntensity = 50;
                barbed.RunicMaxIntensity = 100;
            }
            else
            {





                barbed.RunicMinIntensity = 40;
                barbed.RunicMaxIntensity = 100;
            }





            CraftAttributeInfo red = RedScales = new CraftAttributeInfo();

            red.ArmorFireResist = 10;
            red.ArmorColdResist = -3;

            CraftAttributeInfo yellow = YellowScales = new CraftAttributeInfo();

            yellow.ArmorPhysicalResist = -3;
            yellow.ArmorLuck = 20;

            CraftAttributeInfo black = BlackScales = new CraftAttributeInfo();

            black.ArmorPhysicalResist = 10;
            black.ArmorEnergyResist = -3;

            CraftAttributeInfo green = GreenScales = new CraftAttributeInfo();

            green.ArmorFireResist = -3;
            green.ArmorPoisonResist = 10;

            CraftAttributeInfo white = WhiteScales = new CraftAttributeInfo();

            white.ArmorPhysicalResist = -3;
            white.ArmorColdResist = 10;

            CraftAttributeInfo blue = BlueScales = new CraftAttributeInfo();

            blue.ArmorPoisonResist = -3;
            blue.ArmorEnergyResist = 10;

            CraftAttributeInfo salmon = SalmonScales = new CraftAttributeInfo();

            salmon.ArmorPoisonResist = -3;
            salmon.ArmorEnergyResist = 10;

            CraftAttributeInfo cod = CodScales = new CraftAttributeInfo();

            cod.ArmorPoisonResist = -3;
            cod.ArmorEnergyResist = 10;

            //public static readonly CraftAttributeInfo OakWood, AshWood, YewWood, Heartwood, Bloodwood, Frostwood;

            #region Mondain's Legacy
            CraftAttributeInfo oak = OakWood = new CraftAttributeInfo();

            oak.ArmorPhysicalResist = 3;
            oak.ArmorFireResist = 3;
            oak.ArmorPoisonResist = 2;
            oak.ArmorEnergyResist = 3;
            oak.ArmorLuck = 40;
            oak.ShieldPhysicalResist = 1;
            oak.ShieldFireResist = 1;
            oak.ShieldColdResist = 1;
            oak.ShieldPoisonResist = 1;
            oak.ShieldEnergyResist = 1;
            oak.WeaponLuck = 40;
            oak.WeaponDamage = 5;
            oak.RunicMinAttributes = 1;
            oak.RunicMaxAttributes = 2;
            oak.RunicMinIntensity = 1;
            oak.RunicMaxIntensity = 50;

            CraftAttributeInfo ash = AshWood = new CraftAttributeInfo();

            ash.ArmorPhysicalResist = 4;
            ash.ArmorFireResist = 2;
            ash.ArmorColdResist = 4;
            ash.ArmorPoisonResist = 1;
            ash.ArmorEnergyResist = 6;
            ash.ArmorLowerRequirements = 20;
            ash.ShieldEnergyResist = 3;
            ash.WeaponSwingSpeed = 10;
            ash.WeaponLowerRequirements = 20;
            ash.RunicMinAttributes = 2;
            ash.RunicMaxAttributes = 3;
            ash.RunicMinIntensity = 35;
            ash.RunicMaxIntensity = 75;

            CraftAttributeInfo yew = YewWood = new CraftAttributeInfo();

            yew.ArmorPhysicalResist = 6;
            yew.ArmorFireResist = 3;
            yew.ArmorColdResist = 3;
            yew.ArmorEnergyResist = 3;
            yew.ArmorRegenHits = 1;
            yew.ShieldPhysicalResist = 3;
            yew.WeaponHitChance = 5;
            yew.WeaponDamage = 10;
            yew.RunicMinAttributes = 3;
            yew.RunicMaxAttributes = 3;
            yew.RunicMinIntensity = 40;
            yew.RunicMaxIntensity = 90;

            CraftAttributeInfo heartwood = Heartwood = new CraftAttributeInfo();

            heartwood.ArmorPhysicalResist = 2;
            heartwood.ArmorFireResist = 3;
            heartwood.ArmorColdResist = 2;
            heartwood.ArmorPoisonResist = 7;
            heartwood.ArmorEnergyResist = 2;

            // one of below
            heartwood.ArmorDamage = 10;
            heartwood.ArmorHitChance = 5;
            heartwood.ArmorLuck = 40;
            heartwood.ArmorLowerRequirements = 20;
            heartwood.ArmorMage = 1;

            // one of below
            heartwood.WeaponDamage = 10;
            heartwood.WeaponHitChance = 5;
            heartwood.WeaponHitLifeLeech = 13;
            heartwood.WeaponLuck = 40;
            heartwood.WeaponLowerRequirements = 20;
            heartwood.WeaponSwingSpeed = 10;

            heartwood.RunicMinAttributes = 4;
            heartwood.RunicMaxAttributes = 4;
            heartwood.RunicMinIntensity = 50;
            heartwood.RunicMaxIntensity = 100;

            CraftAttributeInfo bloodwood = Bloodwood = new CraftAttributeInfo();

            bloodwood.ArmorPhysicalResist = 3;
            bloodwood.ArmorFireResist = 8;
            bloodwood.ArmorColdResist = 1;
            bloodwood.ArmorPoisonResist = 3;
            bloodwood.ArmorEnergyResist = 3;
            bloodwood.ArmorRegenHits = 2;
            bloodwood.ShieldFireResist = 3;
            bloodwood.WeaponRegenHits = 2;
            bloodwood.WeaponHitLifeLeech = 16;

            CraftAttributeInfo frostwood = Frostwood = new CraftAttributeInfo();

            frostwood.ArmorPhysicalResist = 2;
            frostwood.ArmorFireResist = 1;
            frostwood.ArmorColdResist = 8;
            frostwood.ArmorPoisonResist = 3;
            frostwood.ArmorEnergyResist = 4;
            frostwood.ShieldColdResist = 3;
            frostwood.WeaponColdDamage = 40;
            frostwood.WeaponDamage = 12;

            // AOW Custom Wood AttributeInfo
         
            CraftAttributeInfo bamboowood = Bamboowood = new CraftAttributeInfo();

            bamboowood.ArmorPhysicalResist = 2;
            bamboowood.ArmorFireResist = 1;
            bamboowood.ArmorColdResist = 8;
            bamboowood.ArmorPoisonResist = 3;
            bamboowood.ArmorEnergyResist = 4;
            bamboowood.ShieldColdResist = 3;
            bamboowood.WeaponColdDamage = 40;
            bamboowood.WeaponDamage = 12;

            CraftAttributeInfo maplewood = Maplewood = new CraftAttributeInfo();

            maplewood.ArmorPhysicalResist = 2;
            maplewood.ArmorFireResist = 1;
            maplewood.ArmorColdResist = 8;
            maplewood.ArmorPoisonResist = 3;
            maplewood.ArmorEnergyResist = 4;
            maplewood.ShieldColdResist = 3;
            maplewood.WeaponColdDamage = 40;
            maplewood.WeaponDamage = 12;

            CraftAttributeInfo cherrywood = Cherrywood = new CraftAttributeInfo();

            cherrywood.ArmorPhysicalResist = 2;
            cherrywood.ArmorFireResist = 1;
            cherrywood.ArmorColdResist = 8;
            cherrywood.ArmorPoisonResist = 3;
            cherrywood.ArmorEnergyResist = 4;
            cherrywood.ShieldColdResist = 3;
            cherrywood.WeaponColdDamage = 40;
            cherrywood.WeaponDamage = 12;

            CraftAttributeInfo birchwood = Birchwood = new CraftAttributeInfo();

            birchwood.ArmorPhysicalResist = 2;
            birchwood.ArmorFireResist = 1;
            birchwood.ArmorColdResist = 8;
            birchwood.ArmorPoisonResist = 3;
            birchwood.ArmorEnergyResist = 4;
            birchwood.ShieldColdResist = 3;
            birchwood.WeaponColdDamage = 40;
            birchwood.WeaponDamage = 12;

            CraftAttributeInfo palmwood = Palmwood = new CraftAttributeInfo();

            palmwood.ArmorPhysicalResist = 2;
            palmwood.ArmorFireResist = 1;
            palmwood.ArmorColdResist = 8;
            palmwood.ArmorPoisonResist = 3;
            palmwood.ArmorEnergyResist = 4;
            palmwood.ShieldColdResist = 3;
            palmwood.WeaponColdDamage = 40;
            palmwood.WeaponDamage = 12;

            CraftAttributeInfo murkwood = Murkwood = new CraftAttributeInfo();

            murkwood.ArmorPhysicalResist = 2;
            murkwood.ArmorFireResist = 1;
            murkwood.ArmorColdResist = 8;
            murkwood.ArmorPoisonResist = 3;
            murkwood.ArmorEnergyResist = 4;
            murkwood.ShieldColdResist = 3;
            murkwood.WeaponColdDamage = 40;
            murkwood.WeaponDamage = 12;

            CraftAttributeInfo silverleafwood = Silverleafwood = new CraftAttributeInfo();

            silverleafwood.ArmorPhysicalResist = 2;
            silverleafwood.ArmorFireResist = 1;
            silverleafwood.ArmorColdResist = 8;
            silverleafwood.ArmorPoisonResist = 3;
            silverleafwood.ArmorEnergyResist = 4;
            silverleafwood.ShieldColdResist = 3;
            silverleafwood.WeaponColdDamage = 40;
            silverleafwood.WeaponDamage = 12;

            // AOW Custom Wood AttributeInfo Ends
         
            #endregion

            // AOW Custom Cloth
         
            CraftAttributeInfo chlorphytecloth = ChlorphyteCloth = new CraftAttributeInfo();

            chlorphytecloth.ArmorPoisonResist = Utility.RandomMinMax(1, 16);
            chlorphytecloth.WeaponDamage = Utility.RandomMinMax(20, 200);
            chlorphytecloth.WeaponLuck = Utility.RandomMinMax(20, 140);
            chlorphytecloth.BonusHits = Utility.RandomMinMax(1, 8);
            //chlorphytecloth.RegenHits = Utility.RandomMinMax(1, 3);



        }
    }























    public class CraftResourceInfo
    {



        private readonly int m_Hue;
        private readonly int m_Number;
        private readonly string m_Name;
        private readonly CraftAttributeInfo m_AttributeInfo;
        private readonly CraftResource m_Resource;
        private readonly Type[] m_ResourceTypes;

        public int Hue
        {



            get
            {



                return this.m_Hue;
            }
        }






















        public int Number
        {



            get
            {



                return this.m_Number;
            }
        }






















        public string Name
        {



            get
            {



                return this.m_Name;
            }
        }






















        public CraftAttributeInfo AttributeInfo
        {



            get
            {



                return this.m_AttributeInfo;
            }
        }






















        public CraftResource Resource
        {



            get
            {



                return this.m_Resource;
            }
        }






















        public Type[] ResourceTypes
        {



            get
            {



                return this.m_ResourceTypes;
            }
        }























        public CraftResourceInfo(int hue, int number, string name, CraftAttributeInfo attributeInfo, CraftResource resource, params Type[] resourceTypes)
        {



            this.m_Hue = hue;
            this.m_Number = number;
            this.m_Name = name;
            this.m_AttributeInfo = attributeInfo;
            this.m_Resource = resource;
            this.m_ResourceTypes = resourceTypes;

            for (int i = 0; i < resourceTypes.Length; ++i)
            CraftResources.RegisterType(resourceTypes[i], resource);
        }
    }























    public class CraftResources
    {



        private static readonly CraftResourceInfo[] m_MetalInfo = new CraftResourceInfo[]
        {



            new CraftResourceInfo(0x000, 1053109, "Iron", CraftAttributeInfo.Blank, CraftResource.Iron, typeof(IronIngot), typeof(IronOre), typeof(Granite)),
            new CraftResourceInfo(0x973, 1053108, "Dull Copper",    CraftAttributeInfo.DullCopper,    CraftResource.DullCopper, typeof(DullCopperIngot),    typeof(DullCopperOre),    typeof(DullCopperGranite)),
            new CraftResourceInfo(0x966, 1053107, "Shadow Iron",    CraftAttributeInfo.ShadowIron,    CraftResource.ShadowIron, typeof(ShadowIronIngot),    typeof(ShadowIronOre),    typeof(ShadowIronGranite)),
            new CraftResourceInfo(0x96D, 1053106, "Copper", CraftAttributeInfo.Copper, CraftResource.Copper, typeof(CopperIngot), typeof(CopperOre), typeof(CopperGranite)),
            new CraftResourceInfo(0x972, 1053105, "Bronze", CraftAttributeInfo.Bronze, CraftResource.Bronze, typeof(BronzeIngot), typeof(BronzeOre), typeof(BronzeGranite)),
            new CraftResourceInfo(0x8A5, 1053104, "Gold", CraftAttributeInfo.Golden, CraftResource.Gold, typeof(GoldIngot), typeof(GoldOre), typeof(GoldGranite)),
            new CraftResourceInfo(0x979, 1053103, "Agapite", CraftAttributeInfo.Agapite, CraftResource.Agapite, typeof(AgapiteIngot), typeof(AgapiteOre), typeof(AgapiteGranite)),
            new CraftResourceInfo(0x89F, 1053102, "Verite", CraftAttributeInfo.Verite, CraftResource.Verite, typeof(VeriteIngot), typeof(VeriteOre), typeof(VeriteGranite)),
            new CraftResourceInfo(0x8AB, 1053101, "Valorite", CraftAttributeInfo.Valorite,    CraftResource.Valorite, typeof(ValoriteIngot),    typeof(ValoriteOre), typeof(ValoriteGranite)),
            new CraftResourceInfo(1186,     0,    "Mithril",    CraftAttributeInfo.Mithril,    CraftResource.Mithril,    typeof(MithrilIngot),    typeof(MithrilOre),    typeof(MithrilGranite)),
            new CraftResourceInfo(2092, 0,    "Soul",    CraftAttributeInfo.Soul,    CraftResource.Soul,    typeof(SoulIngot),    typeof(SoulOre),    typeof(SoulGranite)),
            new CraftResourceInfo(1194, 0, "Nether",    CraftAttributeInfo.Nether,    CraftResource.Nether,    typeof(NetherIngot),    typeof(NetherOre),    typeof(NetherGranite)),
            new CraftResourceInfo(2294, 0, "Astral",    CraftAttributeInfo.Astral,    CraftResource.Astral,    typeof(AstralIngot),    typeof(AstralOre),    typeof(AstralGranite)),
            new CraftResourceInfo(1569, 0, "solar",    CraftAttributeInfo.Solar,    CraftResource.Solar,    typeof(SolarIngot),    typeof(SolarOre),    typeof(SolarGranite)),
            new CraftResourceInfo(2361, 0, "Magma",    CraftAttributeInfo.Magma,    CraftResource.Magma,    typeof(MagmaIngot),    typeof(MagmaOre),    typeof(MagmaGranite)),
            new CraftResourceInfo(2364, 0, "Obsidian",    CraftAttributeInfo.Obsidian,    CraftResource.Obsidian,    typeof(ObsidianIngot),    typeof(ObsidianOre),    typeof(ObsidianGranite)),
            new CraftResourceInfo(2945, 0, "Spectral",    CraftAttributeInfo.Spectral,    CraftResource.Spectral,    typeof(SpectralIngot),    typeof(SpectralOre),    typeof(SpectralGranite)),
            new CraftResourceInfo(2484, 0, "Icy Steel",    CraftAttributeInfo.IcySteel,    CraftResource.IcySteel,    typeof(IcySteelIngot),    typeof(IcySteelOre),    typeof(IcySteelGranite)),
            new CraftResourceInfo(2817, 0, "Infernal Crystal",    CraftAttributeInfo.InfernalCrystal,    CraftResource.InfernalCrystal,    typeof(InfernalCrystalIngot),    typeof(InfernalCrystalOre),    typeof(InfernalCrystalGranite)),
        };

        private static readonly CraftResourceInfo[] m_ScaleInfo = new CraftResourceInfo[]
        {



            new CraftResourceInfo(0x66D, 1053129, "Red Scales",    CraftAttributeInfo.RedScales, CraftResource.RedScales, typeof(RedScales)),
            new CraftResourceInfo(0x8A8, 1053130, "Yellow Scales",    CraftAttributeInfo.YellowScales,    CraftResource.YellowScales, typeof(YellowScales)),
            new CraftResourceInfo(0x455, 1053131, "Black Scales",    CraftAttributeInfo.BlackScales, CraftResource.BlackScales, typeof(BlackScales)),
            new CraftResourceInfo(0x851, 1053132, "Green Scales",    CraftAttributeInfo.GreenScales, CraftResource.GreenScales, typeof(GreenScales)),
            new CraftResourceInfo(0x8FD, 1053133, "White Scales",    CraftAttributeInfo.WhiteScales, CraftResource.WhiteScales, typeof(WhiteScales)),
            new CraftResourceInfo(0x8B0, 1053134, "Blue Scales",    CraftAttributeInfo.BlueScales, CraftResource.BlueScales, typeof(BlueScales)),
            new CraftResourceInfo(2667, 0, "Salmon Scales",    CraftAttributeInfo.SalmonScales, CraftResource.SalmonScales, typeof(SalmonScales)),
            new CraftResourceInfo(1178, 0, "Cod Scales",    CraftAttributeInfo.CodScales, CraftResource.CodScales, typeof(CodScales)),
        };

        private static readonly CraftResourceInfo[] m_LeatherInfo = new CraftResourceInfo[]
        {



            new CraftResourceInfo(0x000, 1049353, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularLeather,    typeof(Leather), typeof(Hides)),
            new CraftResourceInfo(0x283, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather,    typeof(SpinedLeather),    typeof(SpinedHides)),
            new CraftResourceInfo(0x227, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather,    typeof(HornedLeather),    typeof(HornedHides)),
            new CraftResourceInfo(0x1C1, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather,    typeof(BarbedLeather),    typeof(BarbedHides)),
            new CraftResourceInfo(1108, 0, "Shadow", CraftAttributeInfo.Shadow, CraftResource.ShadowLeather,    typeof(ShadowLeather),    typeof(ShadowHides)),
            new CraftResourceInfo(45, 0, "Ostrich", CraftAttributeInfo.Ostrich, CraftResource.OstrichLeather,    typeof(OstrichLeather),    typeof(OstrichHides)),
            new CraftResourceInfo(2903, 0, "Mystical", CraftAttributeInfo.Mystical, CraftResource.MysticalLeather,    typeof(MysticalLeather),    typeof(MysticalHides)),
            new CraftResourceInfo(2600, 0, "Twilight", CraftAttributeInfo.Twilight, CraftResource.TwilightLeather,    typeof(TwilightLeather),    typeof(TwilightHides)),
        };

        private static readonly CraftResourceInfo[] m_AOSLeatherInfo = new CraftResourceInfo[]
        {



            new CraftResourceInfo(0x000, 1049353, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularLeather,    typeof(Leather), typeof(Hides)),
            new CraftResourceInfo(0x8AC, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather,    typeof(SpinedLeather),    typeof(SpinedHides)),
            new CraftResourceInfo(0x845, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather,    typeof(HornedLeather),    typeof(HornedHides)),
            new CraftResourceInfo(0x851, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather,    typeof(BarbedLeather),    typeof(BarbedHides)),
            new CraftResourceInfo(1108, 0, "Shadow", CraftAttributeInfo.Shadow, CraftResource.ShadowLeather,    typeof(ShadowLeather),    typeof(ShadowHides)),
            new CraftResourceInfo(45, 0, "Ostrich", CraftAttributeInfo.Ostrich, CraftResource.OstrichLeather,    typeof(OstrichLeather),    typeof(OstrichHides)),
            new CraftResourceInfo(2903, 0, "Mystical", CraftAttributeInfo.Mystical, CraftResource.MysticalLeather,    typeof(MysticalLeather),    typeof(MysticalHides)),
            new CraftResourceInfo(2600, 0, "Twilight", CraftAttributeInfo.Twilight, CraftResource.TwilightLeather,    typeof(TwilightLeather),    typeof(TwilightHides)),
        };

        private static readonly CraftResourceInfo[] m_WoodInfo = new CraftResourceInfo[]
        {


            new CraftResourceInfo(0x000, 1011542, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularWood,    typeof(Log), typeof(Board)),
            new CraftResourceInfo(0x7DA, 1072533, "Oak", CraftAttributeInfo.OakWood, CraftResource.OakWood, typeof(OakLog), typeof(OakBoard)),
            new CraftResourceInfo(0x4A7, 1072534, "Ash", CraftAttributeInfo.AshWood, CraftResource.AshWood, typeof(AshLog), typeof(AshBoard)),
            new CraftResourceInfo(0x4A8, 1072535, "Yew", CraftAttributeInfo.YewWood, CraftResource.YewWood, typeof(YewLog), typeof(YewBoard)),
            new CraftResourceInfo(0x4A9, 1072536, "Heartwood", CraftAttributeInfo.Heartwood,    CraftResource.Heartwood,    typeof(HeartwoodLog),    typeof(HeartwoodBoard)),
            new CraftResourceInfo(1194, 1072538, "Bloodwood", CraftAttributeInfo.Bloodwood,    CraftResource.Bloodwood,    typeof(BloodwoodLog),    typeof(BloodwoodBoard)),
            new CraftResourceInfo(0x47F, 1072539, "Frostwood", CraftAttributeInfo.Frostwood,    CraftResource.Frostwood,    typeof(FrostwoodLog),    typeof(FrostwoodBoard)),
            new CraftResourceInfo(51, 0, "Bamboo Wood", CraftAttributeInfo.Bamboowood,    CraftResource.Bamboowood,    typeof(BambooLog),    typeof(BambooBoard)),
            new CraftResourceInfo(41, 0, "Maple Wood", CraftAttributeInfo.Maplewood,    CraftResource.Maplewood,    typeof(MapleLog),    typeof(MapleBoard)),
            new CraftResourceInfo(140, 0, "Cherry Wood", CraftAttributeInfo.Cherrywood,    CraftResource.Cherrywood,    typeof(CherryLog),    typeof(CherryBoard)),
            new CraftResourceInfo(246, 0, "Birch Wood", CraftAttributeInfo.Birchwood,    CraftResource.Birchwood,    typeof(BirchLog),    typeof(BirchBoard)),
            new CraftResourceInfo(251, 0, "Palm Wood", CraftAttributeInfo.Palmwood,    CraftResource.Palmwood,    typeof(PalmLog),    typeof(PalmBoard)),
            new CraftResourceInfo(361, 0, "Murk Wood", CraftAttributeInfo.Murkwood,    CraftResource.Murkwood,    typeof(MurkLog),    typeof(MurkBoard)),
            new CraftResourceInfo(496, 0, "SilverLeaf Wood", CraftAttributeInfo.Silverleafwood,    CraftResource.Silverleafwood,    typeof(SilverLeafLog),    typeof(SilverLeafBoard)),
         
        };

        private static readonly CraftResourceInfo[] m_Cloth = new CraftResourceInfo[]
        {
         
            new CraftResourceInfo(0x000, 0, "Cloth", CraftAttributeInfo.Blank, CraftResource.Cloth, typeof(Cloth)),
            new CraftResourceInfo(0x000, 0, "Chlorphyte", CraftAttributeInfo.ChlorphyteCloth, CraftResource.ChlorphyteCloth,    typeof(ChlorphyteCloth))
            // new CraftResourceInfo(0x7DA, 1072533, "Oak", CraftAttributeInfo.OakWood, CraftResource.OakWood, typeof(OakLog), typeof(OakBoard)),
            // new CraftResourceInfo(0x4A7, 1072534, "Ash", CraftAttributeInfo.AshWood, CraftResource.AshWood, typeof(AshLog), typeof(AshBoard)),
            // new CraftResourceInfo(0x4A8, 1072535, "Yew", CraftAttributeInfo.YewWood, CraftResource.YewWood, typeof(YewLog), typeof(YewBoard)),
            // new CraftResourceInfo(0x4A9, 1072536, "Heartwood", CraftAttributeInfo.Heartwood,    CraftResource.Heartwood,    typeof(HeartwoodLog),    typeof(HeartwoodBoard)),
            // new CraftResourceInfo(0x4AA, 1072538, "Bloodwood", CraftAttributeInfo.Bloodwood,    CraftResource.Bloodwood,    typeof(BloodwoodLog),    typeof(BloodwoodBoard)),
            //  new CraftResourceInfo(0x47F, 1072539, "Frostwood", CraftAttributeInfo.Frostwood,    CraftResource.Frostwood,    typeof(FrostwoodLog),    typeof(FrostwoodBoard))
        };


        /// <summary>
        /// Returns true if '<paramref name="resource"/>' is None, Iron, RegularLeather or RegularWood. False if otherwise.
        /// </summary>
        public static bool IsStandard(CraftResource resource)
        {

            return (resource == CraftResource.None || resource == CraftResource.Iron || resource == CraftResource.RegularLeather || resource == CraftResource.RegularWood || resource == CraftResource.Cloth);
        }





        private static Hashtable m_TypeTable;

        /// <summary>
        /// Registers that '<paramref name="resourceType"/>' uses '<paramref name="resource"/>' so that it can later be queried by <see cref="CraftResources.GetFromType"/>
        /// </summary>
        public static void RegisterType(Type resourceType, CraftResource resource)
        {

            if (m_TypeTable == null)
            m_TypeTable = new Hashtable();

            m_TypeTable[resourceType] = resource;
        }





        /// <summary>
        /// Returns the <see cref="CraftResource"/> value for which '<paramref name="resourceType"/>' uses -or- CraftResource.None if an unregistered type was specified.
        /// </summary>
        public static CraftResource GetFromType(Type resourceType)
        {

            if (m_TypeTable == null)
            return CraftResource.None;

            object obj = m_TypeTable[resourceType];

            if (!(obj is CraftResource))
                return CraftResource.None;

            return (CraftResource)obj;
        }





        /// <summary>
        /// Returns a <see cref="CraftResourceInfo"/> instance describing '<paramref name="resource"/>' -or- null if an invalid resource was specified.
        /// </summary>
        public static CraftResourceInfo GetInfo(CraftResource resource)
        {

            CraftResourceInfo[] list = null;

            switch (GetType(resource))
            {

                case CraftResourceType.Metal:
                    list = m_MetalInfo;
                break;
                case CraftResourceType.Leather:
                    list = Core.AOS ? m_AOSLeatherInfo : m_LeatherInfo;
                break;
                case CraftResourceType.Scales:
                    list = m_ScaleInfo;
                break;
                case CraftResourceType.Wood:
                    list = m_WoodInfo;
                break;
                case CraftResourceType.Cloth:
                    list = m_Cloth;
                break;
            }



            if (list != null)
            {
                int index = GetIndex(resource);

                if (index >= 0 && index < list.Length)
                return list[index];
            }



            return null;
        }



        /// <summary>
        /// Returns a <see cref="CraftResourceType"/> value indiciating the type of '<paramref name="resource"/>'.
        /// </summary>
        public static CraftResourceType GetType(CraftResource resource)
        {
            if (resource >= CraftResource.Iron && resource <= CraftResource.InfernalCrystal)
            return CraftResourceType.Metal;

            if (resource >= CraftResource.RegularLeather && resource <= CraftResource.TwilightLeather)
            return CraftResourceType.Leather;

            if (resource >= CraftResource.RedScales && resource <= CraftResource.CodScales)
            return CraftResourceType.Scales;

            if (resource >= CraftResource.RegularWood && resource <= CraftResource.Silverleafwood)
            return CraftResourceType.Wood;

            if (resource >= CraftResource.Cloth && resource <= CraftResource.ChlorphyteCloth)
            return CraftResourceType.Cloth;

            return CraftResourceType.None;
        }



        /// <summary>
        /// Returns the first <see cref="CraftResource"/> in the series of resources for which '<paramref name="resource"/>' belongs.
        /// </summary>
        public static CraftResource GetStart(CraftResource resource)
        {
            switch (GetType(resource))
            {
                case CraftResourceType.Metal:
                    return CraftResource.Iron;
                case CraftResourceType.Leather:
                    return CraftResource.RegularLeather;
                case CraftResourceType.Scales:
                    return CraftResource.RedScales;
                case CraftResourceType.Wood:
                    return CraftResource.RegularWood;
                case CraftResourceType.Cloth:
                    return CraftResource.Cloth;
            }



            return CraftResource.None;
        }



        /// <summary>
        /// Returns the index of '<paramref name="resource"/>' in the seriest of resources for which it belongs.
        /// </summary>
        public static int GetIndex(CraftResource resource)
        {
            CraftResource start = GetStart(resource);

            if (start == CraftResource.None)
            return 0;

            return (int)(resource - start);
        }



        /// <summary>
        /// Returns the <see cref="CraftResourceInfo.Number"/> property of '<paramref name="resource"/>' -or- 0 if an invalid resource was specified.
        /// </summary>
        public static int GetLocalizationNumber(CraftResource resource)
        {
            CraftResourceInfo info = GetInfo(resource);

            return (info == null ? 0 : info.Number);
        }



        /// <summary>
        /// Returns the <see cref="CraftResourceInfo.Hue"/> property of '<paramref name="resource"/>' -or- 0 if an invalid resource was specified.
        /// </summary>
        public static int GetHue(CraftResource resource)
        {
            CraftResourceInfo info = GetInfo(resource);

            return (info == null ? 0 : info.Hue);
        }



        /// <summary>
        /// Returns the <see cref="CraftResourceInfo.Name"/> property of '<paramref name="resource"/>' -or- an empty string if the resource specified was invalid.
        /// </summary>
        public static string GetName(CraftResource resource)
        {
            CraftResourceInfo info = GetInfo(resource);

            return (info == null ? String.Empty : info.Name);
        }



        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
            return CraftResource.SpinedLeather;
            else if (info.Name.IndexOf("Horned") >= 0)
            return CraftResource.HornedLeather;
            else if (info.Name.IndexOf("Barbed") >= 0)
            return CraftResource.BarbedLeather;
            else if (info.Name.IndexOf("Leather") >= 0)
            return CraftResource.RegularLeather;
            else if (info.Name.IndexOf("Shadow") >= 0)
            return CraftResource.ShadowLeather;
            else if (info.Name.IndexOf("Ostrich") >= 0)
            return CraftResource.OstrichLeather;
            else if (info.Name.IndexOf("Mystical") >= 0)
            return CraftResource.MysticalLeather;
            else if (info.Name.IndexOf("Twilight") >= 0)
            return CraftResource.TwilightLeather;

            if (info.Level == 0)
            return CraftResource.Iron;
            else if (info.Level == 1)
            return CraftResource.DullCopper;
            else if (info.Level == 2)
            return CraftResource.ShadowIron;
            else if (info.Level == 3)
            return CraftResource.Copper;
            else if (info.Level == 4)
            return CraftResource.Bronze;
            else if (info.Level == 5)
            return CraftResource.Gold;
            else if (info.Level == 6)
            return CraftResource.Agapite;
            else if (info.Level == 7)
            return CraftResource.Verite;
            else if (info.Level == 8)
            return CraftResource.Valorite;
            else if (info.Level == 9)
            return CraftResource.Mithril;
            else if (info.Level == 10)
            return CraftResource.Soul;
            else if (info.Level == 11)
            return CraftResource.Nether;
            else if (info.Level == 12)
            return CraftResource.Astral;
            else if (info.Level == 13)
            return CraftResource.Solar;
            else if (info.Level == 14)
            return CraftResource.Magma;
            else if (info.Level == 15)
            return CraftResource.Obsidian;
            else if (info.Level == 16)
            return CraftResource.Spectral;
            else if (info.Level == 17)
            return CraftResource.IcySteel;
            else if (info.Level == 18)
            return CraftResource.InfernalCrystal;



            return CraftResource.None;
        }



        /// <summary>
        /// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>', using '<paramref name="material"/>' to help resolve leather OreInfo instances.
        /// </summary>
        public static CraftResource GetFromOreInfo(OreInfo info, ArmorMaterialType material)
        {
            if (material == ArmorMaterialType.Studded || material == ArmorMaterialType.Leather || material == ArmorMaterialType.Spined ||
                material == ArmorMaterialType.Horned || material == ArmorMaterialType.Barbed)
            {
                if (info.Level == 0)
                return CraftResource.RegularLeather;
                else if (info.Level == 1)
                return CraftResource.SpinedLeather;
                else if (info.Level == 2)
                return CraftResource.HornedLeather;
                else if (info.Level == 3)
                return CraftResource.BarbedLeather;
                else if (info.Level == 4)
                return CraftResource.ShadowLeather;
                else if (info.Level == 5)
                return CraftResource.OstrichLeather;
                else if (info.Level == 6)
                return CraftResource.MysticalLeather;
                else if (info.Level == 7)
                return CraftResource.TwilightLeather;

                return CraftResource.None;
            }



            return GetFromOreInfo(info);
        }
    }



    // NOTE: This class is only for compatability with very old RunUO versions.
    // No changes to it should be required for custom resources.
    public class OreInfo
    {
        public static readonly OreInfo Iron = new OreInfo(0, 0x000, "Iron");
        public static readonly OreInfo DullCopper = new OreInfo(1, 0x973, "Dull Copper");
        public static readonly OreInfo ShadowIron = new OreInfo(2, 0x966, "Shadow Iron");
        public static readonly OreInfo Copper = new OreInfo(3, 0x96D, "Copper");
        public static readonly OreInfo Bronze = new OreInfo(4, 0x972, "Bronze");
        public static readonly OreInfo Gold = new OreInfo(5, 0x8A5, "Gold");
        public static readonly OreInfo Agapite = new OreInfo(6, 0x979, "Agapite");
        public static readonly OreInfo Verite = new OreInfo(7, 0x89F, "Verite");
        public static readonly OreInfo Valorite = new OreInfo(8, 0x8AB, "Valorite");
        public static readonly OreInfo Mithril = new OreInfo(9, 1186, "Mithril");
        public static readonly OreInfo Soul = new OreInfo(10, 2092, "Soul");
        public static readonly OreInfo Nether = new OreInfo(11, 1194, "Nether");
        public static readonly OreInfo Astral = new OreInfo(12, 2294, "Astral");
        public static readonly OreInfo Solar = new OreInfo(13, 1569, "Solar");
        public static readonly OreInfo Magma = new OreInfo(14, 2361, "Magma");
        public static readonly OreInfo Obsidian = new OreInfo(15, 2364, "Obsidian");
        public static readonly OreInfo Spectral = new OreInfo(16, 2945, "Spectral");
        public static readonly OreInfo IcySteel = new OreInfo(17, 2484, "Icy Steel");
        public static readonly OreInfo InfernalCrystal = new OreInfo(18, 2817, "Infernal Crystal");
     

        private readonly int m_Level;
        private readonly int m_Hue;
        private readonly string m_Name;

        public OreInfo(int level, int hue, string name)
        {
            this.m_Level = level;
            this.m_Hue = hue;
            this.m_Name = name;
        }

        public int Level
        {
            get
            {
                return this.m_Level;
            }
        }

        public int Hue
        {
            get
            {
                return this.m_Hue;
            }
        }

        public string Name
        {
            get
            {
                return this.m_Name;
            }
        }
    }
}
 
Last edited:
ah okay well I found the problem this morning. I didn't add in the new resource into resourceinfo.cs because I forgot.
 
Back