Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.
Dig ~ Dig ~ Dig IF Muk is to successfully use a P/E move, use Stealth Rock on the first instance and Earthquake on remaining instances. IF Muk is to use a Dark-type damaging combo, use Protect that action. IF Muk is to use Shadow Sneak, use Earthquake that action.