Teklbery

Member
ServUO Version
Publish 57
Ultima Expansion
Endless Journey
Hi! Extremely new to C#.

I am using OrionUO, ver 1.0.38.0.
UO version: 7.0.113.0
ServUO 57.4.1

I want to enable mining while mounted on my server.
Done some digging and Gemini troubleshooting.
Tested:

  • - deleting this line of code in the Mining.cs in the \Scripts\Services\Harvest\ directory.

public override bool CheckHarvest(Mobile from, Item tool, HarvestDefinition def, object toHarvest)
else if (from.Mounted || from.Flying)
{
from.SendLocalizedMessage(501864); // You can't dig while riding or flying.


  • - deleted all codes that send the localized message 501864.
  • Gemini puked some "overriding codes" that should bypass the "you cant dig while riding", instructed me to place them in the Mining.cs and in the HarvestSystem.cs. Of course, after restart the server still requires the player to dismount.

I know mining from horseback makes no sense, but so doesnt lumberjacking from horseback, and that is allowed.
Anyone would know how to enable mining while mounted?
Thanks!
 
Well removing or using // infront of the lines would have been enough.

But you need to recompile, not just restart.
Use the batch file.
When Im starting the server after a shutdown - the log says "compiling scripts". Is it the same what you have recommended to do?
Will the recompilation through batch file erase items in character´s banks?

I only have two batch files.
_windebug.bat
_winrelease.bat

I created the ServUO.exe through the _winrelease.bat.
- so, do I need to use the winrelease.bat to recompile?
 
same problem here could anybody save me?

C#:
Expand Collapse Copy
using System;
using Server.Items;
using Server.Mobiles;
using Server.Targeting;
using System.Linq;

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

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

                return m_System;
            }
        }

        public HarvestDefinition OreAndStone { get; }

        public HarvestDefinition Sand { get; }

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

            #region Mining for ore and stone
            HarvestDefinition oreAndStone = OreAndStone = new HarvestDefinition();

            // Resource banks are every 8x8 tiles
            oreAndStone.BankWidth = 8;
            oreAndStone.BankHeight = 8;

            // Every bank holds from 10 to 34 ore
            oreAndStone.MinTotal = 10;
            oreAndStone.MaxTotal = 34;

            // A resource bank will respawn its content every 10 to 20 minutes
            oreAndStone.MinRespawn = TimeSpan.FromMinutes(10.0);
            oreAndStone.MaxRespawn = TimeSpan.FromMinutes(20.0);
 

Donations

Total amount
$50.00
Goal
$500.00

Shards

Back