----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Title: Range Script, TACG-218 -- Orig. Author: "Turbine" Howland -- Version: 1.0 -- Initial Date: 2023-09-16 -- Description: This is an initial release of a range object on the Syria -- public mission. -- Changelog: Version | Date | Author | Description -- 1.0 | 2023-08-09 | Turbine | Initial Release -- 2.0 | 2023-12-05 | Turbine | Added the server port and debugging info from Crits ATIS updates ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -- Define Local Variables ----------------------------------------------------------------------------- local SRS_PATH = "C:\\Program Files\\DCS-SimpleRadio-Standalone\\" -- Set this as the path to your local SRS installation. local SRS_PORT = 0000 -- Set the default port! If you have one server, this will be your port. -- Simple debug function, do not touch! --local function DebugLogger(message) -- if DEBUGGING then -- env.info("RANGE SCRIPT: " .. message) -- end --end ----------------------------------------------------------------------------- -- Define Servers Information -- -- Template: -- { -- SERVER_NAME = "Name", -- SRS_PORT = "5002" -- } ----------------------------------------------------------------------------- local SERVER_INFO = { { SERVER_NAME = "Nerd Navy | Public", SRS_PORT = 5002, }, { SERVER_NAME = "Nerd Navy | Cold War", SRS_PORT = 5003, }, { SERVER_NAME = "Nerd Navy | WWII", SRS_PORT = 5004, }, { SERVER_NAME = "Nerd Test Chamber", SRS_PORT = 5005, }, { SERVER_NAME = "Nerd Navy | Mission", SRS_PORT = 5006, } } ----------------------------------------------------------------------------- -- Check to see if the SRS_PORT can be found. ----------------------------------------------------------------------------- for i, v in ipairs(SERVER_INFO) do if v.SERVER_NAME == BASE.ServerName then SRS_PORT = v.SRS_PORT end end if SRS_PORT == 0000 then env.info("RANGE SCRIPT: !!!! ERROR !!!! Could not found a server name, your port is set to 0000!!!") else env.info("RANGE SCRIPT: Server name found and SRS port is: " .. SRS_PORT) end ----------------------------------------------------------------------------- -- Define ER58 Bombing Range ----------------------------------------------------------------------------- local bombtargets={"ER58 BTG NW", "ER58 BTG NE", "ER58 BTG SW", "ER58 BTG SE"} BombingRange=RANGE:New("ER58 Graded Bombing Range") BombingRange:AddBombingTargets(bombtargets, 20) BombingRange:SetRangeZone(ZONE:New("ER58 Bombing Range Zone")) BombingRange:SetBombTargetSmokeColor(SMOKECOLOR.White) BombingRange:SetMessageTimeDuration(20) BombingRange:SetRangeControl(295) BombingRange:SetInstructorRadio(305) BombingRange:TrackRocketsON() BombingRange:TrackBombsON() BombingRange:TrackMissilesON() BombingRange:SetSRS(SRS_PATH,SRS_PORT,coalition.side.BLUE) BombingRange:SetSRSRangeControl(295,radio.modulation.AM,nil,"en-US",((math.random(1,2) == 1) and "male" or "female"),"ER58 Tower") BombingRange:SetSRSRangeInstructor(305,radio.modulation.AM,nil,"en-US",((math.random(1,2) == 1) and "male" or "female"),"ER58 Tower") BombingRange:SetAutosaveOn() BombingRange:SetFunkManOn() BombingRange:Start()