SHARE
TWEET

FlyMeToTheMun 2.1

a guest Jun 3rd, 2012 9,171 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function FlyMeToTheMunDriver(lat, lon)
  2.     print "Launching..."
  3.     mechjeb.launchTo(125000, 0)
  4.     wait(mechjeb.free)
  5.     mechjeb.autoStageActivate()
  6.     print "TMI..."
  7.     mechjeb.transfer("Mun", 200000)
  8.     wait(mechjeb.free)
  9.     print "Warping to SoI..."
  10.     mechjeb.warpToEvent("soi")
  11.     wait(mechjeb.free)
  12.     print "Warping to Pe..."
  13.     mechjeb.warpToEvent("pe", 30)
  14.     wait(mechjeb.free)
  15.     print "Circularizing orbit..."
  16.     mechjeb.circularize()
  17.     wait(mechjeb.free)
  18.     print "Landing..."
  19.     if (lat == nil or lon == nil) then
  20.         mechjeb.landAt(0, 0)
  21.     else
  22.         mechjeb.landAt(lat, lon)
  23.     end
  24.     wait(mechjeb.free)
  25.     mechjeb.autoStageDeactivate()
  26.     print "Landed!"
  27. end
  28.  
  29. function FlyMeToTheMun(lat, lon)
  30.     local co = coroutine.create(FlyMeToTheMunDriver)
  31.     coroutine.resume(co, lat, lon)
  32. end
  33.  
  34. print "Usage: FlyMeToTheMun(lat, lon)"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top