Here are my script for mining. Script is using sorcecery for getting rid of agro, but it's easily changeable to any other class.
You have to provide path around mine. For best results path should be closed circle. You have to name every point where you want to check for veins (20m radius) by...