Please checkout MSI's Varrock East Miner, it is exactly a script which makes that