Yet Another Mining Script ;)


I discovered Sanderling a few days ago and I’m in love. It’s very nice work, congratulations and thanks to the authors!

The subject of my post is threefold:

  • Thank the authors
  • Participate modestly
  • To ask questions

I started from this Mine.ore.cs

I added the use of ShieldBoost written by Terpla whose description is on this thread:

I also emerge the PickNextMiningSiteFromSystemMenu and InitiateDockToOrWarpToLocationInSolarSystemMenu functions in order to be able to do without a bookmark to mine (beginners-ore-asteroid-miner.cs)

Finally, I added some options:

  • Using Micro Warp Drive if available
  • Use of crystals for mining (optional)
  • Added a parameterizable filter on the Ore to be mined (without changing the overview)
  • Return drones automatically after a fight

The most interesting feature is obviously the use of crytals :

void LoadMiningCrystalForTarget(Sanderling.Accumulation.IShipUiModule module, Sanderling.Parse.IShipUiTarget target)
	string[] targetTextRow = target?.TextRow;
	if (targetTextRow != null && targetTextRow.Length > 0) {
		string baseOre = BaseOreFromAsteroidName(String.Join(" ", targetTextRow));
		if (!String.IsNullOrEmpty(baseOre)) {
			var foundCrystal = module?.TooltipLast?.Value?.LabelText?.FirstOrDefault(entry => entry.Text.RegexMatchSuccessIgnoreCase("Mining Crystal"));
			if (foundCrystal != null && foundCrystal.Text.Contains(baseOre))
			var menuCrystal = Menu?.FirstOrDefault()?.EntryFirstMatchingRegexPattern(baseOre +".*mining.*crystal", RegexOptions.IgnoreCase);
			if (menuCrystal != null)
			else if (foundCrystal != null)
				Sanderling.MouseClickLeft( Menu?.FirstOrDefault()?.EntryFirstMatchingRegexPattern("unload to cargo", RegexOptions.IgnoreCase));

You can find this complete dirty script here: mining script -
Be indulgent, I know very little about the C # :slight_smile:

It seems to be a bug (which must have existed before my changes). Sometimes the robot targets something other than rats to defend itself, and sometimes even attacks those same targets. I think it’s a race condition between targeting and taking it into account. I will try to correct this in my next project.

My next project: fork A-Bot (whose architecture is nice) and include the two example scripts in the form of modules (traveling and mining). I will name this project simply and with a lot of imagination: “E-Bot”:wink:

So, if you read me so far, here are my questions ^^

  • Is there any reason why A-Bot (master) is so far not related to the latest version of sanderling? (lack of time ?)

  • How often do automated mining accounts get banned? What are your experiences? Is reasonable use tolerated by CPP?




Hey zappy, looks like you have discovered a new bot! Thank you for sharing this with us!
I added a link to this bot to the bot catalog: