I'm trying to figure out a way to recreate a mining system that used to be on a POL server I played on called Crystal Gate. This mining system would basically loop the mining routine to harvest ore until the vein ran dry or your tool broke.

Is it possible to recreate this in ServUO? If so, where would I look to start scripting it? I've taken a look at some of the harvesting scripts etc, but I don't think it's as easy as a config param or anything.

Thanks!

Dave
 
You can set up a macro with Razor. There's also the Recall Mining that players used to do. They would keep a chest locked down on their outside steps and using a previously marked runebook and the Recall Mining from CEO, they could start it and walk away. Are you only trying to set this up in-game, like say as a command (players would just type Automine for example and it would start)?
 
You can set up a macro with Razor. There's also the Recall Mining that players used to do. They would keep a chest locked down on their outside steps and using a previously marked runebook and the Recall Mining from CEO, they could start it and walk away. Are you only trying to set this up in-game, like say as a command (players would just type Automine for example and it would start)?

Well the way it used to work on CG (which is what I'm trying to duplicate) is that you'd basically just double click your pickaxe and click a spot to mine. The avatar would just keep mining until either the ore was gone or his tool would break or you moved. It wouldn't be a command to type, it'd just keep looping till the player stopped it. (Removes the need to create a last obj / last targ macro in Razor).
 
You would need to modify the OnHarvestFinished method in the harvest scripts such as Mining.cs to do a check and see if ore is still available in the vein and if so to start the BeginHarvesting method in HarvestSystem.cs. I can't decide to myself whether or not this would be a tough job as on the face of it it's just adding a few checks but might require some deeper customization to get it to work correctly.
 
@dmurphy I think it's a bit more than that, that was my thought as well. Just go into when the harvest finishes and loop it back to begin again until there is no ore. (Basically it'd just repeat the method for harvest); however, and maybe I'm in the wrong spot (just returning to UO development after a lonnnggg break). I'm checking in Scripts\Services\Harvest\Mining.cs. That is the right script?
 
That is the correct script for mining, yes. It is Derived from the base class HarvestSystem which is located in Scripts\Services\Harvest\Core

You could create a timer to check every n seconds (Preferably the time it takes to harvest + a few ms) to see if the user is in the same x-y-z location and if their is ore available in the node and if so to trigger the mining action again and if not destroy the timer. I think that might be the best way to getting it done.
 
@dmurphy question really quick:
public virtual HarvestResource MutateResource

What is the script referring to when it says 'MutateResource'? Is this for higher level ores?
 
@dmurphy question really quick:
public virtual HarvestResource MutateResource

What is the script referring to when it says 'MutateResource'? Is this for higher level ores?

If I remember correctly that is to change the ore that is in the vein depending on some specifics such as racial bonuses (Elves have a higher chance at getting higher level ores)
 
Back