guenseli Posted March 31, 2010 Report Share Posted March 31, 2010 I have made some little LUA and MACRO files for different aircrafts the last weeks and d'like to share them here. These commands below are for the B17 with Accusim LUA commands To get acces to the single commands you have to do the following: 1) copy the code below 2) insert it into an empty editor or wordpad file and save it as e.g. B17.LUA 3) open FSUIPC menu and choose LUA B17 from the drop down 4) insert different parameter numbers depending on the action you want (green field) (in the picture is an example for the PMDG J41) List of the parameter numbers and their commands for the A2A B17 with Accusim -- 1 = Batteries ON -- 2 = Batteries OFF -- 3 = Cowl flaps open -- 4 = Cowl flaps stop -- 5 = Cowl flaps close -- 6 = APU toggle -- 7 = Primer with auto selection -- 8 = Fuel Valves ON incl savebar -- 9 = Fuel Valves OFF incl savebar -- 10 = Generators ON -- 11 = Generators OFF -- 12 = Panel lights ON -- 13 = Panel lights OFF -- 14 = UV lights ON -- 15 = UV lights OFF -- 16 = Inverter ON -- 17 = Inverter OFF -- 18 = Carbfilter switch ON -- 19 = Carbfilter Switch OFF -- 20 = Carbfilter Switch toggle -- 21 = TurboDial Override toggle -- 22 = NAV1 select -- 23 = NAV2 select -- 24 = ADF1 select -- 25 = ADF2 select -- 26 gunner on station -- 27 gunner off station -- 28 Alarm bell on -- 29 Alarm Bell off -- 30 Hydraulic Pump on -- 31 Hydraulic Pump off -- 1 = Batteries ON -- 2 = Batteries OFF -- 3 = Cowl flaps open -- 4 = Cowl flaps stop -- 5 = Cowl flaps close -- 6 = APU toggle -- 7 = Primer with auto selection -- 8 = Fuel Valves ON incl savebar -- 9 = Fuel Valves OFF incl savebar -- 10 = Generators ON -- 11 = Generators OFF -- 12 = Panel lights ON -- 13 = Panel lights OFF -- 14 = UV lights ON -- 15 = UV lights OFF -- 16 = Inverter ON -- 17 = Inverter OFF -- 18 = Carbfilter switch ON -- 19 = Carbfilter Switch OFF -- 20 = Carbfilter Switch toggle -- 21 = TurboDial Override toggle -- 22 = NAV1 select -- 23 = NAV2 select -- 24 = ADF1 select -- 25 = ADF2 select -- 26 gunner on station -- 27 gunner off station -- 28 Alarm bell on -- 29 Alarm Bell off -- 30 Hydraulic Pump on -- 31 Hydraulic Pump off -- ALL Batteries ON if ipcPARAM == 1 then ipc.writeLvar("L:Battery1Switch", 1) ipc.sleep(200) ipc.writeLvar("L:Battery2Switch", 1) ipc.sleep(150) ipc.writeLvar("L:Battery3Switch", 1) end -- ALL Batteries OFF if ipcPARAM == 2 then ipc.writeLvar("L:Battery1Switch", 0) ipc.sleep(250) ipc.writeLvar("L:Battery2Switch", 0) ipc.sleep(200) ipc.writeLvar("L:Battery3Switch", 0) end -- All cowlflaps open if ipcPARAM == 3 then ipc.writeLvar("L:CowlFlap1SwitchPos", 2) ipc.sleep(5) ipc.writeLvar("L:CowlFlap2SwitchPos", 2) ipc.sleep(5) ipc.writeLvar("L:CowlFlap3SwitchPos", 2) ipc.sleep(5) ipc.writeLvar("L:CowlFlap4SwitchPos", 2) end -- All cowlflaps stop if ipcPARAM == 4 then ipc.writeLvar("L:CowlFlap1SwitchPos", 1) ipc.sleep(5) ipc.writeLvar("L:CowlFlap2SwitchPos", 1) ipc.sleep(5) ipc.writeLvar("L:CowlFlap3SwitchPos", 1) ipc.sleep(5) ipc.writeLvar("L:CowlFlap4SwitchPos", 1) end -- All cowlflaps close if ipcPARAM == 5 then ipc.writeLvar("L:CowlFlap1SwitchPos", 0) ipc.sleep(5) ipc.writeLvar("L:CowlFlap2SwitchPos", 0) ipc.sleep(5) ipc.writeLvar("L:CowlFlap3SwitchPos", 0) ipc.sleep(5) ipc.writeLvar("L:CowlFlap4SwitchPos", 0) end -- APU toggle if ipcPARAM == 6 then LVarSet = "L:APUSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -- Primer with auto selection if ipcPARAM == 7 then Tvar = ipc.readLvar("L:EngineSelection") if Tvar == 1 then PVar = 1 end if Tvar == 2 then PVar = 2 end if Tvar == 4 then PVar = 3 end if Tvar == 8 then PVar = 4 end if Tvar == 15 then Pvar = 0 end ipc.writeLvar("L:PrimerSel", PVar) ipc.sleep(500) ipc.writeLvar("L:PrimerOn", 1) end -- Fuel Valves ON incl savebar if ipcPARAM == 8 then ipc.writeLvar("L:FuelValvesSafe", 1) ipc.sleep(300) ipc.writeLvar("L:Eng1FuelCutOffSwitch", 1) ipc.sleep(200) ipc.writeLvar("L:Eng2FuelCutOffSwitch", 1) ipc.sleep(150) ipc.writeLvar("L:Eng3FuelCutOffSwitch", 1) ipc.sleep(250) ipc.writeLvar("L:Eng4FuelCutOffSwitch", 1) ipc.sleep(200) ipc.writeLvar("L:FuelValvesSafe", 0) end -- Fuel Valves OFF incl savebar if ipcPARAM == 9 then ipc.writeLvar("L:FuelValvesSafe", 1) ipc.sleep(300) ipc.writeLvar("L:Eng1FuelCutOffSwitch", 0) ipc.sleep(100) ipc.writeLvar("L:Eng2FuelCutOffSwitch", 0) ipc.sleep(250) ipc.writeLvar("L:Eng3FuelCutOffSwitch", 0) ipc.sleep(150) ipc.writeLvar("L:Eng4FuelCutOffSwitch", 0) ipc.sleep(200) ipc.writeLvar("L:FuelValvesSafe", 0) end -- Generators ON if ipcPARAM == 10 then ipc.writeLvar("L:Eng1_GeneratorSwitch", 1) ipc.sleep(100) ipc.writeLvar("L:Eng4_GeneratorSwitch", 1) ipc.sleep(300) ipc.writeLvar("L:Eng2_GeneratorSwitch", 1) ipc.sleep(150) ipc.writeLvar("L:Eng3_GeneratorSwitch", 1) end -- Generators OFF if ipcPARAM == 11 then ipc.writeLvar("L:Eng1_GeneratorSwitch", 0) ipc.sleep(150) ipc.writeLvar("L:Eng4_GeneratorSwitch", 0) ipc.sleep(250) ipc.writeLvar("L:Eng2_GeneratorSwitch", 0) ipc.sleep(100) ipc.writeLvar("L:Eng3_GeneratorSwitch", 0) end -- Panel lights ON if ipcPARAM == 12 then ipc.writeLvar("L:InstrumentLightKnob1State", 2) end -- Panel lights OFF if ipcPARAM == 13 then ipc.writeLvar("L:InstrumentLightKnob1State", 0) end -- UV lights ON if ipcPARAM == 14 then ipc.writeLvar("L:InstrumentLightKnob1State", 1) end -- UV lights OFF if ipcPARAM == 15 then ipc.writeLvar("L:InstrumentLightKnob1State", 0) end -- Inverter ON if ipcPARAM == 16 then ipc.writeLvar("L:InverterSwitch", 0) ipc.sleep(350) end -- Inverter OFF if ipcPARAM == 17 then ipc.writeLvar("L:InverterSwitch", 1) ipc.sleep(350) end -- CarbFilter ON if ipcPARAM == 18 then ipc.writeLvar("L:CarbFilterOnSwitch", 1) end -- CarbFilter OFF if ipcPARAM == 19 then ipc.writeLvar("L:CarbFilterOnSwitch", 0) end -- CarbFilter toggle if ipcPARAM == 20 then LVarSet = "L:CarbFilterOnSwitch" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -- Turbo Dial Override Switch if ipcPARAM == 21 then LVarSet = "L:FullDial" val = 0 if ipc.readLvar(LVarSet) == 0 then val = 1 end ipc.writeLvar(LVarSet, val) end -- NAV1 select if ipcPARAM == 22 then ipc.writeLvar("L:RadioCompassControl", 3) end -- NAV2 select if ipcPARAM == 23 then ipc.writeLvar("L:RadioCompassControl", 2) end -- ADF1 select if ipcPARAM == 24 then ipc.writeLvar("L:RadioCompassControl", a) end -- ADF2 select if ipcPARAM == 25 then ipc.writeLvar("L:RadioCompassControl", 1) end -- gunner on station if ipcPARAM == 26 then ipc.writeLvar("L:TurretsON", 1) end -- gunner off station if ipcPARAM == 27 then ipc.writeLvar("L:TurretsON", 0) end -- Alarm Bell on if ipcPARAM == 28 then ipc.writeLvar("L:AlarmBellSwitch", 1) end -- Alarm Bell off if ipcPARAM == 29 then ipc.writeLvar("L:AlarmBellSwitch", 0) end -- Hydraulic Pump on if ipcPARAM == 30 then ipc.writeLvar("L:HydrModeSwitch", 1) end -- Hydraulic Pump off if ipcPARAM == 31 then ipc.writeLvar("L:HydrModeSwitch", 0) end MACRO [Macros] // Module="window.dll" 1=L:c1TurnControlKnob=INC 2=L:c1TurnControlKnob=DEC 3=L:c1TurnControlKnob=SET 4=L:c1MasterSwitch=SET 5=L:c1ElevSwitch=TOG 6=L:c1CenterElevatorKnob=INC 7=L:c1CenterElevatorKnob=DEC 8=L:c1CenterElevatorKnob=SET 9=L:CabinVent=INC 10=L:CabinVent=DEC Have fun! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now