RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.1] FS:Grave Digging System

prplbeast

Sorceror
Vrael, You can use any shovel and you need mining and forensics, make sure your digging in a grave.
i am having the same prob as Vreal
I have update the system and added the grave digger quest back in. Hope you enjoy!

i am running the newest SVN and when i try to dig on a grave site it tells me "you cant mine that". any one have ideas? i have not unfroze anything and nothing is modified.
i used the old one in the past and both players and my self really like it.
 

Pure Insanity

Sorceror
The new SVN changed some TileID numbers I believe? Maybe double check those, as a lot of resource gathering stuff seems to need updating in order to work.
 

prplbeast

Sorceror
The new SVN changed some TileID numbers I believe? Maybe double check those, as a lot of resource gathering stuff seems to need updating in order to work.
I have gone through every file that has TileIDs for harvesting and all the ones that were missing i added in and still get "you can not mine that". anyone have any other ideas?
 

Obsidian Fire

Sorceror
Are you adding the Grave sites or using the ones that are already ingame? I installed this real quick on SVN 726 (Clean Server) and went to Fel and in the Brtittania Graveyard there is a a grave just inside the yard between the fence and a cript, I dug there and Boom, worked great.
 

prplbeast

Sorceror
i am using the ones pre-built in game like in tram grave yard. still gives me that same message, i also have the edits in for SA. but all we did was add in the SA ground tiles.
 

Obsidian Fire

Sorceror
I think it might be one of a couple things, but try this HarvestTarget.cs from SVN 726. Look it over and see where the Mods are and see if it works for you. The only other thing I could think of is you have other mods that are interffering.
 

Attachments

  • HarvestTarget.cs
    3.7 KB · Views: 20

prplbeast

Sorceror
I think it might be one of a couple things, but try this HarvestTarget.cs from SVN 726. Look it over and see where the Mods are and see if it works for you. The only other thing I could think of is you have other mods that are interffering.

Thank You very much that fixed my prob. i am really glad it works now. Again Thank You Very Much.
 

kmekc

Wanderer
I've modified an grave digging system to be part of the Mining-System. Just like Sandmining. So there is no need for new tools and the implementation is seamless to the world.

Code:
namespace Server.Engines.Harvest
{
    public class Mining : HarvestSystem
    {
....

        private HarvestDefinition m_OreAndStone, m_Sand, m_Grave;

        public HarvestDefinition Grave
        {
            get { return m_Grave; }
        }

        public static void Initialize()
        {
            Array.Sort( m_GraveTiles );
        }

        private Mining()
        {
....
            #region GraveRobbing
            HarvestDefinition grave = m_Grave = new HarvestDefinition();
            grave.BankWidth = 2;
            grave.BankHeight = 2;
            grave.MinTotal = 1;
            grave.MaxTotal = 2;
            grave.MinRespawn = TimeSpan.FromMinutes( 20.0 );
            grave.MaxRespawn = TimeSpan.FromMinutes( 30.0 );
            grave.Skill = SkillName.Mining;
            grave.Tiles = m_GraveTiles;
            grave.MaxRange = 2;
            grave.ConsumedPerHarvest = 1;
            grave.ConsumedPerFeluccaHarvest = 1;
            grave.EffectActions = new int[] { 11 };
            grave.EffectSounds = new int[] { 0x125, 0x126 };
            grave.EffectCounts = new int[] { 1, 2, 2, 2, 3 };
            grave.EffectDelay = TimeSpan.FromSeconds( 1.6 );
            grave.EffectSoundDelay = TimeSpan.FromSeconds( 0.9 );
            grave.NoResourcesMessage = 501756; // Nothing worth taking..
            grave.FailMessage = 503006; // Nothing visible happens..
            grave.OutOfRangeMessage = 500446; // That is too far away.
            grave.PackFullMessage = 500720; // You don't have enough room in your backpack!
            grave.ToolBrokeMessage = 500499; // You broke your axe.
            grave.PlaceAtFeetIfFull = true;

            res = new HarvestResource[]
            {
                new HarvestResource( 020.0, 010.0, 150.0, "You put some bones in your backpack",        typeof( Bone ),    typeof( Revenant ) ),
                new HarvestResource( 050.0, 030.0, 150.0, "You put some garlic in your backpack",        typeof( Garlic ) ),
                new HarvestResource( 050.0, 030.0, 150.0, "You put some spiders silk in your backpack",        typeof( SpidersSilk ) ),
                new HarvestResource( 050.0, 030.0, 150.0, "You put some blood moss in your backpack",        typeof( Bloodmoss ) ),
                new HarvestResource( 065.0, 040.0, 150.0, "You put some nightshade in your backpack",    typeof( Nightshade ) ),
                new HarvestResource( 065.0, 040.0, 150.0, "You put some mandrake root in your backpack",    typeof( MandrakeRoot ) )
            };

            veins = new HarvestVein[]
            {
                new HarvestVein( 35.0, 0.0, res[0], res[0] ),    // Bones
                new HarvestVein( 15.0, 0.5, res[1], res[0] ),    // ExecutionerCap
                new HarvestVein( 15.0, 0.5, res[2], res[0] ),    // SpidersSilk
                new HarvestVein( 15.0, 0.5, res[3], res[0] ),    // BloodMoss
                new HarvestVein( 10.0, 0.5, res[4], res[0] ),    // NightShade
                new HarvestVein( 10.0, 0.5, res[5], res[0] )    // MandrakeRoot
            };

            grave.Resources = res;
            grave.Veins = veins;

            Definitions.Add( grave );
            #endregion
        }

        public override void OnHarvestFinished( Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested )
        {
....
            else if( def == m_Grave )
            {
                int tileID; Map map; Point3D loc;

                if( GetHarvestDetails( from, tool, harvested, out tileID, out map, out loc ) )
                {
                    if( 0.15 > Utility.RandomDouble() )
                    {

                        HarvestResource res = vein.PrimaryResource;

                        if( res == resource )
                        {
                            try
                            {
                                Type chance; int num;
                                double miningskill = from.Skills[SkillName.Mining].Base;

                                if( 0.67 > Utility.RandomDouble() )
                                {

                                    num = (((int)miningskill - 20) + Utility.Random( 40 )) / 20;

                                    if( num < 0 )
                                        num = 0;
                                    else if( num > (Spirit.Length - 1) )
                                        num = Spirit.Length - 1;

                                    if( 0.90 > Utility.RandomDouble() )
                                    {
                                        chance = Spirit[num];
                                        BaseCreature spawned = Activator.CreateInstance( chance, new object[] { } ) as BaseCreature;

                                        if( spawned != null )
                                        {
                                            spawned.MoveToWorld( loc, map );
                                            spawned.Say( "Who has disturbed me!" );
                                            spawned.Combatant = from;
                                        }
                                    }
                                }

                                double stealingskill = from.Skills[SkillName.Stealing].Base;

                                if( (stealingskill > 60) ? (0.22 > Utility.RandomDouble()) : (0.17 > Utility.RandomDouble()) )
                                {
                                    num = ((((int)stealingskill - 30) + Utility.Random( 11 )) / 7) + 1;

                                    if( num < 0 )
                                        num = 0;
                                    else if( num > (GraveGoods.Length - 1) )
                                        num = GraveGoods.Length - 1;

                                    int found = Utility.Random( num );
                                    int level = 1;
                                    if( GraveGoods[found] == typeof( BonePile ) )
                                        level = found + 1;
                                    if( GraveGoods[found] == typeof( GraveTreasureChest ) )
                                        level = found - 3;
                                    BaseContainer goodies = Activator.CreateInstance( GraveGoods[found], new object[] { level } ) as BaseContainer;
                                    if( goodies != null )
                                    {
                                        goodies.MoveToWorld( loc, map );
                                        from.SendMessage( "You dig up something interesting" );
                                    }
                                }
                            }
                            catch { }
                        }
                    }
                }
            }
        }

        private static int[] m_GraveTiles = new int[]
        {
            0x4ED3, 0x4EDF,    0x4EE0,    0x4EE1,    0x4EE2,    0x4EE8
        };

                private static Type[] m_Spirit = new Type[]
        {
            typeof( Zombie ),
            typeof( Skeleton ),
            typeof( Ghoul ),
            typeof( Shade ),
            typeof( Spectre ),
            typeof( Wraith )
        };

        public static Type[] Spirit { get { return m_Spirit; } }

        private static Type[] m_GraveGoods = new Type[]
        {
            typeof( BonePile ),
            typeof( BonePile ),
            typeof( BonePile ),
            typeof( BonePile ),
            typeof( GraveTreasureChest ),
            typeof( GraveTreasureChest ),
            typeof( GraveTreasureChest ),
            typeof( GraveTreasureChest ),
            typeof( GraveTreasureChest ),
            typeof( GraveTreasureChest ),
        };

        public static Type[] GraveGoods { get { return m_GraveGoods; } }

    }
}
 

MIKTHEBUG

Sorceror
i get this error.
although it is in Swedish the name FSGraveDiggingSystem does not exist in the name area Server or something like that.
Code:
Errors:
+ Engines/Harvest/Core/HarvestTarget.cs:
    CS0234: Line 9: Typ- eller namnområdesnamnet FSGraveDiggingSystem finns inte
i namnområdet Server (saknas en sammansättningsreferens?)
 
Top