Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --
- -- Script modified from FlyMeToTheMun by Jontu
- -- Original script by R4m0n
- --
- function KMunODriver(alt, malt)
- print "Launching..."
- mechjeb.launchTo(alt*1000, 0)
- wait(mechjeb.free)
- mechjeb.autoStageActivate()
- print "TMI..."
- mechjeb.transfer("Mun", 200000)
- wait(mechjeb.free)
- print "Warping to SoI..."
- mechjeb.warpToEvent("soi")
- wait(mechjeb.free)
- mechjeb.autoStageActivate()
- print "Adjusting Pe"
- mechjeb.changePe(malt*1000)
- wait(mechjeb.free)
- print "Warping to Pe..."
- mechjeb.warpToEvent("pe", 30)
- wait(mechjeb.free)
- print "Circularizing orbit..."
- mechjeb.circularize()
- wait(mechjeb.free)
- mechjeb.autoStageDeactivate()
- print "Orbit Achieved"
- m = mechjeb.getModule("OrbitOper")
- m.enabled = false
- end
- function KMunO(alt, malt)
- local co = coroutine.create(KMunODriver)
- coroutine.resume(co, alt, malt)
- end
- print "Usage: KMunO(alt, malt)"
- print "alt is Kerbin Orbit Altitude in km"
- print "malt is Mun Orbit Altitude in km"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement