Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Highlight things
- global hList is list(). for p in ship:parts { local pr is p:resources. if pr:length > 0 and pr[0]:capacity > 50 { hList:add(list(p,highlight(p,rgba(0,0,0,0)))). } } on time:second { for hp in hList { set pr to hp[0]:resources. set hp[1]:color to rgba(1 - pr[0]:amount / pr[0]:capacity,pr[0]:amount / pr[0]:capacity,0,1). } return true. }
- for p in ship:partsnamedpattern("wheel") { p:getModule("ModuleWheelBrakes"):SetField("brakes", 200). }
- /me lock throttle to 1.
- /me lock pitch to 90. set comp to 90. set roll to 180. lock steering to heading(comp, pitch, roll).
- /me when velocity:surface:mag > 100 then { lock pitch to 75. when altitude > 10000 then { lock cur_pitch to 90 - VANG(srfprograde:vector, up:vector). lock pitch to cur_pitch - 5. when apoapsis > 80000 then { lock pitch to 0. unlock throttle. } } }.
- /me when periapsis > 80000 then { unlock throttle. }. lock throttle to 1.
- // Wait to stage
- wait until stage:ready. wait 0. stage.
- // Kerbin deorbit script.
- when ship:geoposition:lng > 127 and ship:geoposition:lng < 132 then { when periapsis < 50_000 then { lock throttle to 0. } lock throttle to 0.25. }
- set transferFuel to transferall("LiquidFuel", ship:partstagged("toptank"), ship:partstagged("bottomtank")). set transferFuel:active to true.
- set transferOx to transferall("Oxidizer", ship:partstagged("toptank"), ship:partstagged("bottomtank")). set transferOx:active to true.
- print ship:geoposition:lng. lock throttle to 1. wait 5. lock throttle to 0. stage. // About 300m/s dv.
- when ship:geoposition:lng > 115 and ship:geoposition:lng < 120 then { set warp to 0. } set warp to 3.
- /me when longitude < 10 and longitude > 0 then { lock throttle to 0.2. when periapsis < 40000 then { unlock throttle. } }
- /me lock pitch to
- set nxtalarm to addAlarm("Raw", time:seconds + eta:nextnode - 180, ship:name + "Node", "")
- set nxtAlarm:action to "KillWarpOnly"
- set g to (body:mu / (body:radius + altitude)^2).
- // Extend retractable solar panels.
- for p in ship:partsnamed("solarPanels2") { print p:getmodule("KopernicusSolarPanels"):doevent("extend solar panel"). }
- set places to readjson("0:/kerbin.json").
- set places to readjson("kerbin.json"). print "Distance to KSC: " + round(places["launchpad"]:distance/1000,4) + "km".
- lock steering to lookDirUp( up:forevector, ship:facing:topvector).
- set transfer1 to transferall("Oxidizer", ship:parts[9], ship:parts[17])
- set transfer3 to transferall("LiquidFuel", ship:parts[10], ship:parts[17])
- set transfer3 to transferall("LiquidFuel", ship:parts[10], ship:parts[17])
- set transfer4 to transferall("Oxidizer", ship:parts[10], ship:parts[17])
- set navmode to "surface"
- !set steeringmanager:maxstoppingtime to 20
- // Hoverslam
- lock steering to srfretrograde. lock acc to max(1,(max(0.3,vdot(up:vector,facing:vector)) * ship:availablethrust * 0.7) / mass - body:mu / (body:radius^2)). lock throttle to (-verticalspeed - 2) - sqrt(2 * acc * max(alt:radar - 20+ verticalspeed * 0.5,0.0001)). when verticalspeed > 0 then { lock throttle to 0. lock steering to heading(90,90). }
- /me when geoposition:lng < -150 and geoposition:lng > -160 then { lock throttle to 1. when periapsis < 30_000 then { lock throttle to 0.25. when periapsis < 25_000 then { lock throttle to 0. lock steering to srfretrograde. brakes on. } } }
- Lng: > -150
- deleteAlarm(listAlarms("All")[0]:id)
- ship:partsnamed("HighGainAntenna5")[3]:getmodulebyindex(0):doaction("toggle antenna",true)
- !runscript 0pgtewL5
- brakes off. hs(100). ha(600). stage. set hud_message to "".
- !runscript HQ7mBYUX
Add Comment
Please, Sign In to add comment