Getting past the gate and not crashing on the landing pad is the hard part. The rest is easy.
You do NOT have to write scripts that automatically land the spuCraft. It is so much simpler to define a switch that will return to manual control. Then you can land by hand.