Jump to content
Sign in to follow this  
towzaa

Request for Captainsim C-130

Recommended Posts

Anyone Plz. Create some modules of CS C-130 please...

 

Here's mylittle worked codes

 

 

-- ## External Lights Panel #####################################
 
function Taxi_Lights_On ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("b065SwMainVar", 1)
end
 
function Taxi_Lights_Off ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("b065SwMainVar", 0)
end
 
function Taxi_Lights_Toggle ()
if _t("taxilightstgl") then
         Taxi_Lights_On ()
else
         Taxi_Lights_Off ()
end
end
 
-----------------------------------------------------
function Landing_Lights_On ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("b068SwMainVar", 1)
      ipc.writeLvar("b069SwMainVar", 1)
end
 
function Landing_Lights_Off ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("b068SwMainVar", 0)
      ipc.writeLvar("b069SwMainVar", 0)
end
 
function Landing_Lights_Toggle ()
if _t("landlighttoggle") then
         Landing_Lights_On ()
else
         Landing_Lights_Off ()
end
end
---------------------------------------------------
function Landing_Lights_Motor_Left_On ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("switch_landing_light_motor_left", 1)
end
 
function Landing_Lights_Motor_Left_Off ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("switch_landing_light_motor_left", 0)
end
 
function Landing_Lights_Motor_Left_Toggle ()
if _t("landlightmotorlefttoggle") then
         Landing_Lights_Motor_Left_On ()
else
         Landing_Lights_Motor_Left_Off ()
end
end
-----------------------------------------------------
function Landing_Lights_Motor_Right_On ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("switch_landing_light_motor_right", 1)
end
 
function Landing_Lights_Motor_Right_Off ()
 ipc.writeLvar("iSndPl", 69)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("switch_landing_light_motor_right", 0)
end
 
function Landing_Lights_Motor_Right_Toggle ()
if _t("landlightmotorrighttoggle") then
         Landing_Lights_Motor_Right_On ()
else
         Landing_Lights_Motor_Right_Off ()
end
end
 
-- --------------------------------------------------
-- ## Temp Datum Control Valve #####################################
 
-- ENG 1
function ENG1_Auto ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x011PosRudVar", 1)
end
 
function ENG1_Locked ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x011PosRudVar", 0)
end
 
function ENG1_Null ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x011PosRudVar", -1)
end
 
-- ENG 2
function ENG2_Auto ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x012PosRudVar", 1)
end
 
function ENG2_Locked ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x012PosRudVar", 0)
end
 
function ENG2_Null ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x012PosRudVar", -1)
end
 
-- ENG 3
function ENG3_Auto ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x013PosRudVar", 1)
end
 
function ENG3_Locked ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x013PosRudVar", 0)
end
 
function ENG3_Null ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x013PosRudVar", -1)
end
 
-- ENG 4
function ENG4_Auto ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x014PosRudVar", 1)
end
 
function ENG4_Locked ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x014PosRudVar", 0)
end
 
function ENG4_Null ()
 ipc.writeLvar("iSndPl", 423)
      ipc.sleep(150)
      ipc.writeLvar("iSndPl", 0)
      ipc.writeLvar("x014PosRudVar", -1)
end
 
-- ## Low Speed Ground Idle #####################################
 
function ENG1_ON ()
 ipc.writeLvar("pRpm1ButtonPos", 1)
end
 
function ENG1_OFF ()
 ipc.writeLvar("pRpm1ButtonPos", 0)
end
 
function ENG1_TOGGLE ()
if _t("LSGI_ENG1") then
        ENG1_ON ()
else
        ENG1_OFF ()
end
end
 
function ENG2_ON ()
 ipc.writeLvar("pRpm2ButtonPos", 1)
end
 
function ENG2_OFF ()
 ipc.writeLvar("pRpm2ButtonPos", 0)
end
 
function ENG2_TOGGLE ()
if _t("LSGI_ENG2") then
        ENG2_ON ()
else
        ENG2_OFF ()
end
end
 
function ENG3_ON ()
 ipc.writeLvar("pRpm3ButtonPos", 1)
end
 
function ENG3_OFF ()
 ipc.writeLvar("pRpm3ButtonPos", 0)
end
 
function ENG3_TOGGLE ()
if _t("LSGI_ENG3") then
        ENG3_ON ()
else
        ENG3_OFF ()
end
end
 
function ENG4_ON ()
 ipc.writeLvar("pRpm4ButtonPos", 1)
end
 
function ENG4_OFF ()
 ipc.writeLvar("pRpm4ButtonPos", 0)
end
 
function ENG4_TOGGLE ()
if _t("LSGI_ENG4") then
        ENG4_ON ()
else
        ENG4_OFF ()
end
end

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...