Modifing the Sample Script

Hey chaps,

I’m looking to expand my C knowledge and wanted to have a go at just modifying the default mining script. All I want is for the script to unload drones once in belt to then recall them before warp out. Sounds easy in my head but after my attempt all I have is a script that unloads the drones, then recalls them…Then unloads them to then recall them…

I’ve looked through the script but there’s quite alot of jargon I don’t get yet which seems to be impeding my progress. Any pointers on where I should be looking and why would be immensely helpful.

cheers

Probably not the best solution, but it works (most of the time) :grinning:

Insert:
if (!(0 < DronesInSpaceCount))
DroneLaunch();

Below:
ModuleToggle(moduleMinerInactive);

@ line 310

This way drones being launched after turning on mining lasers. Still dont know how to remove recalling them after exiting defense.

Edit:
There is actually a better way:
Insert:
if (!(0 < DronesInSpaceCount))
DroneLaunch();

Above:
return InBeltMineStep;

@ line 350

Combined with FightAllRats set to true works great!

2 Likes