Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // [RCD]
- Val{
- ARM(default=0, max=2500000, step=2500000)
- ARMH(default=0, max=12800000, step=12800000)
- ARMHA(default=180, min=-360, max=360)
- ARML(default=0, max=150000, step=150000)
- ARMLA(default=360, min=-360, max=360)
- ARMM(default=0, max=1600000, step=1600000)
- ARMMA(default=180, min=-360, max=360)
- COL1(default=16766249, max=16777215)
- COL2(default=40561, max=16777215)
- COLSLC(default=0, max=4)
- GUNSLC(default=0, max=3)
- JFWD(default=0, min=-1000000, max=1000000)
- JLR1(default=0, min=-1000000, max=1000000)
- JLR2(default=0, min=-1000000, max=1000000)
- JUP1(default=0, min=-1000000, max=1000000)
- JUP2(default=0, min=-1000000, max=1000000)
- TRIM(default=45, min=-99999999999999)
- }
- Key{
- }
- Body{
- Core(color=COL1){
- S:Jet(power=JUP1, color=COL1){
- S:Jet(power=JUP2, color=COL1){
- S:Weight(option=2.1, color=COL1){}
- }
- S:TrimF(angle=90, color=COL2){
- E:Jet(angle=180, power=JLR2, color=COL1){}
- }
- }
- S:TrimF(angle=90, color=COL2){
- E:Jet(angle=180, power=JLR1, color=COL1){}
- }
- S:Frame(angle=30, option=1){
- S:Jet(angle=-120, power=-JFWD, color=COL1){}
- }
- S:TrimF(angle=TRIM, color=COL1){
- S:Frame(color=COL1){
- W:Frame(color=COL1){
- W:Cowl(angle=180, color=COL2, effect=#0FFF){}
- N:Cowl(option=3, color=COL2, effect=#0FFF){}
- }
- E:Frame(color=COL1){
- N:Cowl(angle=180, color=COL2, effect=#0FFF){
- S:Cowl(option=3, color=COL2, effect=#0FFF){}
- }
- }
- }
- }
- N:Arm(angle=ARMLA, power=ARML, option=150000, color=COL1, name=AL){}
- N:Arm(angle=ARMMA, power=ARMM, option=1600000, color=COL2, name=AM){}
- N:Arm(angle=ARMHA, power=ARMH, option=12800000, name=AH){}
- }
- }
- Lua{selectedgun = 0 --==150k , 1=1.6m, 2 = 12.8m
- selectedskin = 4
- function mpos()
- return {(_MX()/_WIDTH())*2 - 1,(_MY()/_HEIGHT())*2 -1}
- end
- function rels2t(trig,str)
- if trig>0 then
- JUP1 = JUP1+ (mpos()[2]*-str)
- JUP2=JUP2-(mpos()[2]*-str)
- JLR1=JLR1+(mpos()[1]*str)
- JLR2=JLR2-(mpos()[1]*str)
- end
- end
- function keysnap(n,increment)
- return _KEYDOWN(n)*increment
- end
- function varcontrol(var,setpoint,step)
- --closed loop RC-like control
- if math.abs(var-setpoint)<step then var=setpoint
- elseif var>setpoint then var=var-step else var=var+step end
- return var
- end
- function weaponcontrol(gun,fire,line,prefix)
- local text = ""
- ARMLA = varcontrol(ARMLA,180,12)
- ARMMA = varcontrol(ARMMA,181,12)
- ARMHA = varcontrol(ARMHA,179,12)
- if gun==0 then
- ARMLA = varcontrol(ARMLA, 360,24)
- text = "150K Cannon - "..string.format("%i",_E(AL)/1500).."% Loaded"
- if fire>0 and ARMLA==360 then ARML = 150000 end
- elseif gun==1 then
- ARMMA = varcontrol(ARMMA,360,24)
- text = "1.6M Light Capacitor Weapon - "..string.format("%i",_E(AM)/16000).."% Charged"
- if fire>0 and ARMMA == 360 then ARMM = 1600000 end
- elseif gun==2 then
- ARMHA = varcontrol(ARMHA,360,24)
- text = "12.8M Hi-Yield Capacitor Cannon - "..string.format("%i",_E(AH)/128000).."% Charged"
- if fire>0 and ARMHA==360 then ARMH = 12800000 end
- end
- out(line, prefix..text)
- end
- function colorschemeselect(n,line,prefix)
- --selects color scheme and outputs it on the specified line
- local text = ""
- if n==1 then
- COL1=rgb(255,255,255) COL2=rgb(255,255,100)
- text = "US Air Force" end
- if n==2 then
- COL2=rgb(255,0,0) COL1= rgb(255,200,0)
- text = "Soviets' Red Army"
- end
- if n==3 then
- COL2=rgb(255,255,255) COL1 = rgb(255,0,0)
- text = "Imperial Japanese Air Force"
- end
- if n==4 then
- COL1=rgb(100,100,100) COL2=rgb(200,200,0)
- text = "Wermacht's Luftwaffe" end
- out(line,prefix..text)
- end -- COLORSCHEMESELECT
- function sgn(n)
- if n < 0 then return -1 else return 1 end
- end
- function rgb(r,g,b) --RGB->24BitColor
- return (math.floor((r)*65536))+(math.floor((g)*256))+(math.floor(b))
- end
- function F2PWR(x,y,z,tx,ty)
- JUP1 = ((_YX()*x)+(_YY()*y)+(_YZ()*z)+(_XY()*0)+(_YY()*0))*3
- JUP2 = ((_YX()*x)+(_YY()*y)+(_YZ()*z)-(_XY()*0)-(_YY()*0))*3
- JLR1 = ((_XX()*x)+(_XY()*y)+(_XZ()*z)+(_YX()*0)+(_YX()*0))*3
- JLR2 = ((_XX()*x)+(_XY()*y)+(_XZ()*z)-(_YX()*0)-(_YX()*0))*3
- JFWD=((_ZX()*x)+(_ZY()*y)+(_ZZ()*z))*6
- end
- function rollcorrect()
- TRIM=TRIM+(_AZ()*100)
- end
- function main()
- selectedgun = selectedgun+ keysnap(14,1)
- _ZOOM(60)
- rollcorrect()
- F2PWR(0,_WEIGHT()*9.81,0)
- rels2t(_ML(),10000)
- if selectedgun==3 then selectedgun=0 end
- --printings
- out(0,"Manual-Jet Flight control system")
- colorschemeselect(selectedskin,1,"Color Scheme = ")
- weaponcontrol(selectedgun,_MR(), 2, "Selected Weapon = ")
- out(10,rgb(255,0,0))
- out(11,_FPS())
- out(3,_QZ())
- end}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement