dictionary = 
{
    ["DictKey_GroupName_647"] = "SAM site 01 #032",
    ["DictKey_UnitName_52"] = "Unit #035",
    ["DictKey_GroupName_1243"] = "SAM site 01 #020",
    ["DictKey_WptName_1009"] = "",
    ["DictKey_WptName_3113"] = "",
    ["DictKey_UnitName_3354"] = "Tanque de combustible #001",
    ["DictKey_UnitName_2756"] = "Oil tower",
    ["DictKey_GroupName_5415"] = "Magic",
    ["DictKey_GroupName_467"] = "TANKER 307",
    ["DictKey_WptName_5414"] = "",
    ["DictKey_UnitName_5026"] = "Unit #327",
    ["DictKey_WptName_4015"] = "",
    ["DictKey_WptName_2235"] = "",
    ["DictKey_UnitName_4262"] = "",
    ["DictKey_WptName_5344"] = "",
    ["DictKey_UnitName_980"] = " #070",
    ["DictKey_WptName_247"] = "",
    ["DictKey_WptName_3436"] = "",
    ["DictKey_GroupName_2200"] = "Plant #053",
    ["DictKey_GroupName_4485"] = "F14 Carrier Spawn CAT",
    ["DictKey_WptName_690"] = "",
    ["DictKey_GroupName_1466"] = "SAM site 01 #009",
    ["DictKey_UnitName_238"] = "",
    ["DictKey_WptName_2096"] = "",
    ["DictKey_UnitName_2086"] = "Plant #005",
    ["DictKey_UnitName_4105"] = "Piloto #034",
    ["DictKey_WptName_2739"] = "",
    ["DictKey_WptName_823"] = "",
    ["DictKey_UnitName_2714"] = "Plant #068",
    ["DictKey_WptName_2502"] = "",
    ["DictKey_GroupName_2335"] = "Refinery #006",
    ["DictKey_UnitName_2858"] = "Unidad #032",
    ["DictKey_UnitName_1158"] = "Unit #222",
    ["DictKey_UnitName_4230"] = "",
    ["DictKey_GroupName_1893"] = "Oil tower #023",
    ["DictKey_GroupName_1548"] = "Oil platform #002",
    ["DictKey_GroupName_2416"] = "Refinery #068",
    ["DictKey_WptName_4059"] = "",
    ["DictKey_WptName_639"] = "",
    ["DictKey_WptName_1886"] = "",
    ["DictKey_UnitName_5067"] = "Unit #360",
    ["DictKey_WptName_5214"] = "",
    ["DictKey_UnitName_2597"] = "Plant #067",
    ["DictKey_UnitName_4763"] = "",
    ["DictKey_WptName_4371"] = "",
    ["DictKey_UnitName_939"] = "Unit #226",
    ["DictKey_WptName_304"] = "",
    ["DictKey_UnitName_691"] = " #007",
    ["DictKey_GroupName_1986"] = "Plant #008",
    ["DictKey_WptName_2295"] = "",
    ["DictKey_UnitName_3800"] = "Unidad #053",
    ["DictKey_UnitName_270"] = "Unit #047",
    ["DictKey_GroupName_3530"] = "Refinery #100",
    ["DictKey_UnitName_3760"] = "Munición #016",
    ["DictKey_GroupName_3135"] = "Nuevo objeto estático #005",
    ["DictKey_GroupName_477"] = "New Static Object #006",
    ["DictKey_WptName_3520"] = "",
    ["DictKey_UnitName_5247"] = "Enfield 2-2 ",
    ["DictKey_WptName_1796"] = "",
    ["DictKey_UnitName_40"] = "Unit #025",
    ["DictKey_UnitName_1879"] = "Oil tower #001",
    ["DictKey_GroupName_727"] = " #032",
    ["DictKey_WptName_5100"] = "AA TGT",
    ["DictKey_GroupName_2933"] = "Rudan Conversion #004",
    ["DictKey_descriptionNeutralsTask_4"] = "",
    ["DictKey_GroupName_5090"] = "Combat Training A10C Instructor",
    ["DictKey_UnitName_2321"] = "Refinery #001",
    ["DictKey_WptName_2003"] = "",
    ["DictKey_UnitName_4954"] = "",
    ["DictKey_WptName_753"] = "",
    ["DictKey_WptName_5220"] = "",
    ["DictKey_UnitName_5001"] = "Unit #306",
    ["DictKey_WptName_5116"] = "",
    ["DictKey_GroupName_2939"] = "Rudan Conversion #006",
    ["DictKey_UnitName_3360"] = "Tanque de combustible #005",
    ["DictKey_GroupName_3389"] = "Tanque de combustible #001",
    ["DictKey_GroupName_742"] = "New Static Object #001",
    ["DictKey_WptName_3761"] = "",
    ["DictKey_WptName_586"] = "",
    ["DictKey_UnitName_3291"] = "Tanque de combustible #004",
    ["DictKey_UnitName_210"] = "",
    ["DictKey_UnitName_435"] = "Unit #001",
    ["DictKey_UnitName_3162"] = "Refinery",
    ["DictKey_WptName_826"] = "",
    ["DictKey_UnitName_741"] = "Pilot #017",
    ["DictKey_GroupName_3449"] = "Refinery #077",
    ["DictKey_UnitName_4676"] = "Unit #148",
    ["DictKey_UnitName_1227"] = "Unit #262",
    ["DictKey_UnitName_4487"] = "Springfield 1-2",
    ["DictKey_WptName_4556"] = "",
    ["DictKey_WptName_1727"] = "",
    ["DictKey_UnitName_527"] = " #011",
    ["DictKey_GroupName_2677"] = "Plant #067",
    ["DictKey_GroupName_2491"] = "Plant #035",
    ["DictKey_WptName_5152"] = "",
    ["DictKey_WptName_3277"] = "",
    ["DictKey_UnitName_294"] = "Unit #065",
    ["DictKey_UnitName_4899"] = "",
    ["DictKey_UnitName_5034"] = "Unit #333",
    ["DictKey_WptName_4594"] = "",
    ["DictKey_UnitName_4191"] = "",
    ["DictKey_GroupName_1396"] = "New Airplane Group #005",
    ["DictKey_UnitName_3785"] = "Unidad #044",
    ["DictKey_UnitName_4670"] = "Unit #142",
    ["DictKey_UnitName_1657"] = "Refinery #002",
    ["DictKey_GroupName_5395"] = "SEAD Kish Island",
    ["DictKey_UnitName_2462"] = "Refinery #006",
    ["DictKey_UnitName_4773"] = "",
    ["DictKey_WptName_4510"] = "",
    ["DictKey_UnitName_5000"] = "Unit #305",
    ["DictKey_UnitName_3654"] = "Munición #004",
    ["DictKey_GroupName_778"] = "",
    ["DictKey_GroupName_3428"] = "Plant #113",
    ["DictKey_UnitName_3825"] = " #084",
    ["DictKey_WptName_1465"] = "",
    ["DictKey_UnitName_1111"] = "Unit #138",
    ["DictKey_UnitName_2624"] = "Plant #069",
    ["DictKey_GroupName_1123"] = "",
    ["DictKey_UnitName_350"] = "",
    ["DictKey_GroupName_993"] = "New Airplane Group #007",
    ["DictKey_UnitName_1270"] = "",
    ["DictKey_UnitName_91"] = "Unit #059",
    ["DictKey_UnitName_3231"] = "Refinery #078",
    ["DictKey_UnitName_2934"] = "Rudan Conversion #003",
    ["DictKey_UnitName_2198"] = "Plant #008",
    ["DictKey_UnitName_3642"] = "Munición #001",
    ["DictKey_UnitName_4181"] = "",
    ["DictKey_WptName_3457"] = "",
    ["DictKey_GroupName_3059"] = "Plant #018",
    ["DictKey_UnitName_384"] = "Unit #128",
    ["DictKey_WptName_4111"] = "",
    ["DictKey_WptName_3023"] = "",
    ["DictKey_UnitName_2366"] = "Refinery #002",
    ["DictKey_UnitName_306"] = "Unit #072",
    ["DictKey_UnitName_2354"] = "Refinery #005",
    ["DictKey_UnitName_3863"] = "Refinery #097",
    ["DictKey_UnitName_1515"] = "",
    ["DictKey_WptName_4544"] = "",
    ["DictKey_GroupName_2584"] = "Plant #080",
    ["DictKey_WptName_1544"] = "",
    ["DictKey_UnitName_1411"] = "Pilot #018",
    ["DictKey_WptName_663"] = "",
    ["DictKey_ActionText_3944"] = "mist.respawnGroup('Texaco', true)",
    ["DictKey_UnitName_3783"] = "Unidad #042",
    ["DictKey_WptName_1125"] = "",
    ["DictKey_UnitName_1525"] = "Unidad #002",
    ["DictKey_WptName_2622"] = "",
    ["DictKey_WptName_804"] = "",
    ["DictKey_GroupName_3879"] = "M2000 Al Dhafra AB",
    ["DictKey_UnitName_4073"] = "Unidad #070",
    ["DictKey_UnitName_836"] = "Pilot #018",
    ["DictKey_WptName_2541"] = "",
    ["DictKey_UnitName_1909"] = "Oil tower #005",
    ["DictKey_UnitName_1512"] = "Unit #008",
    ["DictKey_UnitName_400"] = "Unit #057",
    ["DictKey_UnitName_4956"] = "",
    ["DictKey_UnitName_4904"] = "",
    ["DictKey_UnitName_1507"] = "Unit #120",
    ["DictKey_GroupName_1572"] = "Refinery #012",
    ["DictKey_UnitName_4263"] = "",
    ["DictKey_GroupName_2977"] = "Oil ship #001",
    ["DictKey_UnitName_1325"] = "Unit #055",
    ["DictKey_WptName_2658"] = "",
    ["DictKey_UnitName_2035"] = "Plant #004",
    ["DictKey_UnitName_3882"] = "Uzi 4-3",
    ["DictKey_WptName_1733"] = "",
    ["DictKey_UnitName_604"] = "Unit #191",
    ["DictKey_WptName_2460"] = "",
    ["DictKey_WptName_105"] = "",
    ["DictKey_GroupName_3590"] = "Refinery #108",
    ["DictKey_WptName_1056"] = "",
    ["DictKey_UnitName_3501"] = "Tanque de combustible",
    ["DictKey_GroupName_3185"] = "Refinery #080",
    ["DictKey_UnitName_2369"] = "Refinery #003",
    ["DictKey_UnitName_2387"] = "Refinery #002",
    ["DictKey_GroupName_3560"] = "Refinery #104",
    ["DictKey_WptName_4593"] = "",
    ["DictKey_WptName_1739"] = "",
    ["DictKey_WptName_1976"] = "",
    ["DictKey_UnitName_2675"] = "Plant #065",
    ["DictKey_UnitName_1358"] = "Unit #089",
    ["DictKey_UnitName_1675"] = "Refinery #005",
    ["DictKey_WptName_330"] = "",
    ["DictKey_GroupName_3425"] = "Plant #112",
    ["DictKey_GroupName_2389"] = "Refinery #052",
    ["DictKey_WptName_5451"] = "",
    ["DictKey_UnitName_4344"] = "Piloto #009",
    ["DictKey_UnitName_1154"] = "Unit #216",
    ["DictKey_GroupName_3473"] = "Tanque de combustible #023",
    ["DictKey_GroupName_3248"] = "Refinery #088",
    ["DictKey_UnitName_432"] = "Unit #063",
    ["DictKey_UnitName_4861"] = "",
    ["DictKey_UnitName_3495"] = "Refinery #080",
    ["DictKey_WptName_2063"] = "",
    ["DictKey_UnitName_1978"] = "Plant #004",
    ["DictKey_WptName_5302"] = "",
    ["DictKey_UnitName_3435"] = "Plant #112",
    ["DictKey_WptName_3361"] = "",
    ["DictKey_GroupName_3735"] = "Munición #019",
    ["DictKey_WptName_537"] = "",
    ["DictKey_WptName_3014"] = "",
    ["DictKey_UnitName_4709"] = "Unit #202",
    ["DictKey_WptName_3634"] = "",
    ["DictKey_WptName_3996"] = "",
    ["DictKey_UnitName_4432"] = "",
    ["DictKey_GroupName_4815"] = "",
    ["DictKey_WptName_630"] = "",
    ["DictKey_UnitName_425"] = "Unit #151",
    ["DictKey_WptName_4027"] = "",
    ["DictKey_UnitName_2417"] = "Refinery #005",
    ["DictKey_WptName_4079"] = "",
    ["DictKey_GroupName_1551"] = "Oil platform #005",
    ["DictKey_WptName_3907"] = "",
    ["DictKey_UnitName_4644"] = "Unit #054",
    ["DictKey_UnitName_4687"] = "Unit #172",
    ["DictKey_UnitName_4701"] = "Unit #188",
    ["DictKey_UnitName_2474"] = "Plant #037",
    ["DictKey_UnitName_530"] = " #011",
    ["DictKey_UnitName_3832"] = "",
    ["DictKey_GroupName_493"] = "M-2000 Siri Island CAP",
    ["DictKey_GroupName_3147"] = "Nuevo grupo de aviones",
    ["DictKey_WptName_2108"] = "",
    ["DictKey_WptName_3607"] = "",
    ["DictKey_UnitName_2065"] = "Plant #006",
    ["DictKey_WptName_4494"] = "",
    ["DictKey_WptName_3143"] = "",
    ["DictKey_WptName_683"] = "",
    ["DictKey_UnitName_1741"] = "Refinery #002",
    ["DictKey_GroupName_1695"] = "Refinery #005",
    ["DictKey_WptName_5369"] = "",
    ["DictKey_WptName_4355"] = "",
    ["DictKey_UnitName_4727"] = "Unit #237",
    ["DictKey_GroupName_4442"] = "f-5 Havadarya Island CAP #002",
    ["DictKey_UnitName_1417"] = "Pilot #020",
    ["DictKey_UnitName_5071"] = "Unit #364",
    ["DictKey_UnitName_4667"] = "Unit #139",
    ["DictKey_UnitName_645"] = "Unit #200",
    ["DictKey_UnitName_386"] = "Unit #130",
    ["DictKey_WptName_4022"] = "",
    ["DictKey_WptName_2718"] = "",
    ["DictKey_UnitName_3639"] = "Munición #004",
    ["DictKey_UnitName_209"] = "",
    ["DictKey_UnitName_4106"] = "Piloto #035",
    ["DictKey_UnitName_1996"] = "Plant",
    ["DictKey_UnitName_1543"] = "Oil platform #001",
    ["DictKey_WptName_5113"] = "",
    ["DictKey_WptName_3559"] = "",
    ["DictKey_WptName_1616"] = "",
    ["DictKey_UnitName_1207"] = "Unit #245",
    ["DictKey_WptName_5166"] = "AA TGT",
    ["DictKey_UnitName_10"] = "Unit #013",
    ["DictKey_ActionText_4608"] = "An SU-25T target Ppractice drone has spawned north of Abu Dhabi at 15000 feet.\
(don't worry it is unarmed)\
\
Good luck practicing!",
    ["DictKey_UnitName_1495"] = "Unit #110",
    ["DictKey_WptName_562"] = "",
    ["DictKey_UnitName_4951"] = "",
    ["DictKey_UnitName_454"] = "Pilot #007",
    ["DictKey_WptName_2610"] = "",
    ["DictKey_WptName_2105"] = "",
    ["DictKey_WptName_1844"] = "",
    ["DictKey_WptName_3073"] = "",
    ["DictKey_UnitName_981"] = " #070",
    ["DictKey_UnitName_728"] = "",
    ["DictKey_UnitName_963"] = "Unit #238",
    ["DictKey_WptName_3493"] = "",
    ["DictKey_GroupName_690"] = "10 #002",
    ["DictKey_GroupName_2284"] = "Refinery #003",
    ["DictKey_UnitName_4434"] = "Pilot #022",
    ["DictKey_GroupName_3141"] = "Nuevo objeto estático #007",
    ["DictKey_WptName_512"] = "",
    ["DictKey_UnitName_4419"] = "Colt 1-2 #004",
    ["DictKey_GroupName_1965"] = "Plant #001",
    ["DictKey_WptName_2971"] = "",
    ["DictKey_WptName_5217"] = "",
    ["DictKey_WptName_5110"] = "",
    ["DictKey_GroupName_2704"] = "Plant #107",
    ["DictKey_UnitName_1223"] = "Unit #258",
    ["DictKey_UnitName_1496"] = "Unit #111",
    ["DictKey_UnitName_773"] = "New Static Object #009",
    ["DictKey_WptName_697"] = "",
    ["DictKey_WptName_1424"] = "",
    ["DictKey_GroupName_1797"] = "Refinery #045",
    ["DictKey_UnitName_2165"] = "Plant #012",
    ["DictKey_GroupName_1545"] = "Oil platform #001",
    ["DictKey_UnitName_3903"] = "12 #001",
    ["DictKey_WptName_136"] = "",
    ["DictKey_GroupName_2842"] = "Oil tower #065",
    ["DictKey_UnitName_43"] = "Unit #028",
    ["DictKey_WptName_144"] = "",
    ["DictKey_UnitName_1485"] = "Unit #102",
    ["DictKey_UnitName_3792"] = "Unidad #047",
    ["DictKey_UnitName_5306"] = "AV-8B Carrier #001",
    ["DictKey_WptName_1367"] = "",
    ["DictKey_UnitName_917"] = "Pilot #022",
    ["DictKey_UnitName_4404"] = "Colt 1-2 #001",
    ["DictKey_GroupName_2891"] = "Weapons storage",
    ["DictKey_GroupName_3702"] = "Munición #002",
    ["DictKey_GroupName_1908"] = "Oil tower #028",
    ["DictKey_WptName_3667"] = "",
    ["DictKey_UnitName_3845"] = "Unidad #058",
    ["DictKey_WptName_4429"] = "",
    ["DictKey_WptName_3247"] = "",
    ["DictKey_WptName_999"] = "",
    ["DictKey_WptName_2724"] = "",
    ["DictKey_WptName_3885"] = "",
    ["DictKey_WptName_4560"] = "",
    ["DictKey_UnitName_4171"] = "",
    ["DictKey_UnitName_3866"] = "Refinery #096",
    ["DictKey_UnitName_1239"] = "Unit #020",
    ["DictKey_UnitName_2095"] = "Plant #001",
    ["DictKey_UnitName_426"] = "Unit #152",
    ["DictKey_WptName_429"] = "",
    ["DictKey_WptName_581"] = "",
    ["DictKey_WptName_4606"] = "",
    ["DictKey_WptName_2217"] = "",
    ["DictKey_WptName_2814"] = "",
    ["DictKey_WptName_5242"] = "",
    ["DictKey_WptName_3286"] = "",
    ["DictKey_WptName_62"] = "",
    ["DictKey_WptName_4598"] = "",
    ["DictKey_WptName_3589"] = "",
    ["DictKey_GroupName_2725"] = "Oil tower",
    ["DictKey_WptName_1156"] = "",
    ["DictKey_UnitName_4689"] = "Unit #174",
    ["DictKey_UnitName_430"] = "Unit #061",
    ["DictKey_UnitName_2162"] = "Plant #011",
    ["DictKey_UnitName_1107"] = "Unit #135",
    ["DictKey_WptName_806"] = "",
    ["DictKey_UnitName_373"] = "Unit #121",
    ["DictKey_WptName_375"] = "",
    ["DictKey_UnitName_1245"] = "Unit #268",
    ["DictKey_WptName_3150"] = "",
    ["DictKey_GroupName_5322"] = "AV-8B Carrier #002",
    ["DictKey_WptName_3433"] = "",
    ["DictKey_UnitName_3660"] = "Munición #003",
    ["DictKey_UnitName_1942"] = "Oil platform",
    ["DictKey_UnitName_4463"] = "Pilot #024",
    ["DictKey_ActionText_3931"] = "trigger.action.outText('LSO AI Script by Alerax Initiated \\nVersion: 2.2.0 Released: 2018.10.31', 10)\
--[==[\
\
• Alerax's LSO AI Script •\
\
Author: Alerax\
Special Thanks: randomtroubledmind, GYRO_N5EG, VMFA-42 HighwaymanEd\
With Support from: \
    VMFA-42 SabreTooths (https://discord.gg/sC96S8)\
\
INSTALLATION:\
I have simplified the installation significantly. There are largely two parts to the installation, the script and sound files.\
\
Firstly, here are the steps to install the script file into your mission.\
\
1)    Open your mission or create a new one in the Mission Editor.\
2)    Go to the Trigger panel.\
3)    On the first column, select new Trigger (rename this to whatever you like), and change condition to “MISSION START”.\
4)    On the third column, select new Action “Do Script File”. Select open and locate the \"Alerax_LSO_Script_Release_v2.2.lua\" file.\
5)    Rename your CV to “Stennis_AI” (case sensitive).\
6)    Save the mission.\
\
Secondly, the sound file installation no longer requires you to install each sound file one by one. However, you’ll need a “.zip” file program \
for this to work. Also, make sure that you close out of the Mission Editor before you do this step, else DCS Mission Editor may overwrite your \
mission file.\
\
1)    Locate and select your mission (.miz) file.\
2)    Press F2 to rename the mission file and change the “.miz” to “.zip”. This will allow you directly place the sound files into the mission.\
3)    Open the newly converted .zip file and place the \"Alerax_LSO_AI_Script\" folder into the root directory (same directory as the “l10n” folder).\
4)    Close out of the .zip file.\
5)    Press F2 and rename the mission back from “.zip” to “.miz”.\
\
Done!\
\
--]==]\
--------------------------------------------------------------------------------\
fFtizLrqbVrS7o2m6aFrohDz0 = \"Stennis_AI\"\
Oc8N3yy4et1o0sOjO1UgWn4gn = 305000000 \
baHlGpuZuIAWTkKd4ZdxPf0bD = 40 \
sGGEKtkt3iiBFIy2kcTxAYwCS = 1 \
BcHUN95xXqgcqK2rcoQKjlYms = 0 \
bKl2XJ8WL2eUTEoUlARvPzE8U = 0 \
LSO = {}\
function LSO.KQBB7ix4s3wR5ROH3Zq7krmAU(OhMhunJpQxJRM0kCLNYqkTVyG,lhQSvTZ9WyJKIOfnw6mlEIMC5)\
    local lfWAD1zFVRxNhhOYdK8Jcx2xL\
    local Q997dWNWwLL48b2vNFm03rZ5l = Unit.getByName(OhMhunJpQxJRM0kCLNYqkTVyG)\
    if Q997dWNWwLL48b2vNFm03rZ5l ~= nil then\
        local SiItE60zCeCJTGistrxZ7fQ54 = tonumber(Q997dWNWwLL48b2vNFm03rZ5l:getID())\
        local MEoUlARvPzE8URK62tTnupDHY = tonumber(Q997dWNWwLL48b2vNFm03rZ5l:getGroup():getID())\
        local JOUCuCcIrKPSIcKl2XJ8WL2eU = tonumber(Q997dWNWwLL48b2vNFm03rZ5l:getCountry())\
        local G5sQd6TvGGEKtkt3iiBFIy2kc = 0\
        for iKd4ZdxPf0bDx68L9gpdPZ0Y4, tAYwCS5uKueLbaHlGpuZuIAWT in pairs(env.mission.coalition) do\
            for nbVrS7o2m6aFrohDz0qU1Waev, llr919JfYhlpfJhSzugFtizLr in pairs (tAYwCS5uKueLbaHlGpuZuIAWT.country) do\
                if JOUCuCcIrKPSIcKl2XJ8WL2eU == llr919JfYhlpfJhSzugFtizLr.id then\
                    for uPf0bDx68L9gpdPZ0Y4wEMnCB, VuKueLbaHlGpuZuIAWTkKd4Zd in pairs (llr919JfYhlpfJhSzugFtizLr) do\
                        if type(VuKueLbaHlGpuZuIAWTkKd4Zd) == 'table' and #VuKueLbaHlGpuZuIAWTkKd4Zd.group > 0 then\
                            for l4gnjxR9ijvXRqs5czJw83317, KTiQVc8N3yy4et1o0sOjO1UgW in pairs (VuKueLbaHlGpuZuIAWTkKd4Zd.group) do\
                                if type(KTiQVc8N3yy4et1o0sOjO1UgW) == 'table' and MEoUlARvPzE8URK62tTnupDHY == KTiQVc8N3yy4et1o0sOjO1UgW.groupId then\
                                    for ZL9gpdPZ0Y4wEMnCBUZ2SmEvc, ClGpuZuIAWTkKd4ZdxPf0bDx6 in pairs (KTiQVc8N3yy4et1o0sOjO1UgW) do\
                                        if ZL9gpdPZ0Y4wEMnCBUZ2SmEvc == lhQSvTZ9WyJKIOfnw6mlEIMC5 then\
                                            lfWAD1zFVRxNhhOYdK8Jcx2xL = ClGpuZuIAWTkKd4ZdxPf0bDx6\
                                            G5sQd6TvGGEKtkt3iiBFIy2kc = 1\
                                            break\
                                        end\
                                        for lsvlP7YFkmLjoFBgw11xIWuRt, zBtPMdD6d9nqI89lwqZiE2pi6 in pairs (KTiQVc8N3yy4et1o0sOjO1UgW.units) do\
                                            if SiItE60zCeCJTGistrxZ7fQ54 == zBtPMdD6d9nqI89lwqZiE2pi6.unitId then\
                                                for J1t7GYBJ6f3EzzxDldmWsauyB, V4AL0xVwZkykhawsTANUP3noO in pairs (zBtPMdD6d9nqI89lwqZiE2pi6) do\
                                                    if J1t7GYBJ6f3EzzxDldmWsauyB == lhQSvTZ9WyJKIOfnw6mlEIMC5 then\
                                                        lfWAD1zFVRxNhhOYdK8Jcx2xL = V4AL0xVwZkykhawsTANUP3noO\
                                                        G5sQd6TvGGEKtkt3iiBFIy2kc = 1\
                                                        break\
                                                    end\
                                                end\
                                            end\
                                            if G5sQd6TvGGEKtkt3iiBFIy2kc == 1 then break end\
                                        end\
                                        if G5sQd6TvGGEKtkt3iiBFIy2kc == 1 then break end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        end\
    end\
    return lfWAD1zFVRxNhhOYdK8Jcx2xL\
end\
function LSO.JDfpqouc4cM21kpsiM4VChjIg()\
    local AIy2kcTxAYwCS5uKueLbaHlGp = ''\
    if sVX8keN5sQd6TvGGEKtkt3iiB == 1 then \
        AIy2kcTxAYwCS5uKueLbaHlGp = 'red'\
    elseif sVX8keN5sQd6TvGGEKtkt3iiB == 2 then \
        AIy2kcTxAYwCS5uKueLbaHlGp = 'blue'\
    else\
        AIy2kcTxAYwCS5uKueLbaHlGp = 'neutrals'\
    end\
    for QhlpfJhSzugFtizLrqbVrS7o2 = 1,#env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country,1 do\
        if env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane ~= nil then\
            for d4ZdxPf0bDx68L9gpdPZ0Y4wE = 1,#env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane.group,1 do\
                if env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane.group[d4ZdxPf0bDx68L9gpdPZ0Y4wE].units ~= nil then\
                    for NrS7o2m6aFrohDz0qU1WaevVX = 1,#env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane.group[d4ZdxPf0bDx68L9gpdPZ0Y4wE].units,1 do\
                        if env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane.group[d4ZdxPf0bDx68L9gpdPZ0Y4wE].units[NrS7o2m6aFrohDz0qU1WaevVX].type == 'FA-18C_hornet' then\
                            local OhMhunJpQxJRM0kCLNYqkTVyG = env.getValueDictByKey(env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane.group[d4ZdxPf0bDx68L9gpdPZ0Y4wE].units[NrS7o2m6aFrohDz0qU1WaevVX].name)\
                            local uXdYHeEDaO9SXsXb4pmNdGxsG = env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane.group[d4ZdxPf0bDx68L9gpdPZ0Y4wE].groupId\
                            local a6jEF46hKnWfSZmwjVPQOUCuC = env.mission.coalition[AIy2kcTxAYwCS5uKueLbaHlGp].country[QhlpfJhSzugFtizLrqbVrS7o2].plane.group[d4ZdxPf0bDx68L9gpdPZ0Y4wE].units[NrS7o2m6aFrohDz0qU1WaevVX].onboard_num\
                            KXFxFgvuNSVLfxo5KMbJO5hGW[#KXFxFgvuNSVLfxo5KMbJO5hGW+1] = OhMhunJpQxJRM0kCLNYqkTVyG\
                            JMdD6d9nqI89lwqZiE2pi6IST[#JMdD6d9nqI89lwqZiE2pi6IST+1] = uXdYHeEDaO9SXsXb4pmNdGxsG\
                            CrXomUyTCHcHUN95xXqgcqK2r[#CrXomUyTCHcHUN95xXqgcqK2r+1] = a6jEF46hKnWfSZmwjVPQOUCuC\
                            if jfgek2ajC87rei8CaLIn9ymbs[uXdYHeEDaO9SXsXb4pmNdGxsG] == nil then\
                                LSO.NnhQSvTZ9WyJKIOfnw6mlEIMC('VyRIp36v38pk0gKKhrGeBcF0v',uXdYHeEDaO9SXsXb4pmNdGxsG,OhMhunJpQxJRM0kCLNYqkTVyG,'','')    \
                            end\
                            if Se7t9AgtAvJ4luwHa3CFipMWJ[JMdD6d9nqI89lwqZiE2pi6IST[#JMdD6d9nqI89lwqZiE2pi6IST]] == nil then\
                                Se7t9AgtAvJ4luwHa3CFipMWJ[JMdD6d9nqI89lwqZiE2pi6IST[#JMdD6d9nqI89lwqZiE2pi6IST]] = {}\
                                xaLIn9ymbsEkj44AL0xVwZkyk[JMdD6d9nqI89lwqZiE2pi6IST[#JMdD6d9nqI89lwqZiE2pi6IST]] = {}\
                                Jd6TvGGEKtkt3iiBFIy2kcTxA = 1\
                            end\
                            coQKjlYmsCp1cdbhIQZzPO7bf[#coQKjlYmsCp1cdbhIQZzPO7bf+1] = Jd6TvGGEKtkt3iiBFIy2kcTxA\
                            Jd6TvGGEKtkt3iiBFIy2kcTxA = Jd6TvGGEKtkt3iiBFIy2kcTxA+1\
                        end\
                    end\
                end\
            end\
        end\
    end\
    for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#KXFxFgvuNSVLfxo5KMbJO5hGW,1 do\
        LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(Jd6TvGGEKtkt3iiBFIy2kcTxA,'YCaLIn9ymbsEkj44AL0xVwZky')\
    end\
end\
function LSO.ETtZH158Ys1Bjd0od2ivaaUEb(OhMhunJpQxJRM0kCLNYqkTVyG)\
    local SiItE60zCeCJTGistrxZ7fQ54 = Unit.getByName(OhMhunJpQxJRM0kCLNYqkTVyG)\
    local AkmLjoFBgw11xIWuRtVhMhunJ = SiItE60zCeCJTGistrxZ7fQ54:getVelocity()\
    local UrZ5lyXdYHeEDaO9SXsXb4pmN = AkmLjoFBgw11xIWuRtVhMhunJ.x\
    local CWuRtVhMhunJpQxJRM0kCLNYq = AkmLjoFBgw11xIWuRtVhMhunJ.z\
    local XfQ54nsvlP7YFkmLjoFBgw11x = AkmLjoFBgw11xIWuRtVhMhunJ.y\
    local vCeCJTGistrxZ7fQ54nsvlP7Y = math.sqrt(UrZ5lyXdYHeEDaO9SXsXb4pmN*UrZ5lyXdYHeEDaO9SXsXb4pmN + CWuRtVhMhunJpQxJRM0kCLNYq*CWuRtVhMhunJpQxJRM0kCLNYq + XfQ54nsvlP7YFkmLjoFBgw11x*XfQ54nsvlP7YFkmLjoFBgw11x)*tR9ijvXRqs5czJw83317PX6qW \
    local myNlIjM7m85XjgHnAHCQbcBDO = math.atan2(CWuRtVhMhunJpQxJRM0kCLNYq,UrZ5lyXdYHeEDaO9SXsXb4pmN)\
        if myNlIjM7m85XjgHnAHCQbcBDO < 0 then myNlIjM7m85XjgHnAHCQbcBDO = myNlIjM7m85XjgHnAHCQbcBDO + 2 * math.pi end\
    local myNlIjM7m85XjgHnAHCQbcBDO = myNlIjM7m85XjgHnAHCQbcBDO * iM7m85XjgHnAHCQbcBDOhUtMp\
    return myNlIjM7m85XjgHnAHCQbcBDO, vCeCJTGistrxZ7fQ54nsvlP7Y \
end\
function LSO.xQ7L6PUpb80mjKaDKGUXfFGS3(S3rZ5lyXdYHeEDaO9SXsXb4pm,nkTVyG2c0BwwuAiqzTpoHvyoS)\
    local uVjGzmY997dWNWwLL48b2vNFm = Unit.getByName(S3rZ5lyXdYHeEDaO9SXsXb4pm)\
    local tIWuRtVhMhunJpQxJRM0kCLNY = Unit.getByName(nkTVyG2c0BwwuAiqzTpoHvyoS)\
    if uVjGzmY997dWNWwLL48b2vNFm == nil or tIWuRtVhMhunJpQxJRM0kCLNY == nil then\
        return 999999,999999\
    else\
        local HdGxsG0iItE60zCeCJTGistrx = uVjGzmY997dWNWwLL48b2vNFm:getPosition()\
        local o1ZDqODsIVAAkkR1gObMfAPBy = tIWuRtVhMhunJpQxJRM0kCLNY:getPosition()\
        local aHlGpuZuIAWTkKd4ZdxPf0bDx = o1ZDqODsIVAAkkR1gObMfAPBy.p.x - HdGxsG0iItE60zCeCJTGistrx.p.x\
        local cRTiQVc8N3yy4et1o0sOjO1Ug = o1ZDqODsIVAAkkR1gObMfAPBy.p.z - HdGxsG0iItE60zCeCJTGistrx.p.z\
        local KoyNlIjM7m85XjgHnAHCQbcBD = math.sqrt(aHlGpuZuIAWTkKd4ZdxPf0bDx*aHlGpuZuIAWTkKd4ZdxPf0bDx + cRTiQVc8N3yy4et1o0sOjO1Ug*cRTiQVc8N3yy4et1o0sOjO1Ug)*cPZ0Y4wEMnCBUZ2SmEvcRTiQV \
        local XRRoyNlIjM7m85XjgHnAHCQbc = math.atan2(cRTiQVc8N3yy4et1o0sOjO1Ug, aHlGpuZuIAWTkKd4ZdxPf0bDx)\
            if XRRoyNlIjM7m85XjgHnAHCQbc < 0 then XRRoyNlIjM7m85XjgHnAHCQbc = XRRoyNlIjM7m85XjgHnAHCQbc + 2 * math.pi end\
            XRRoyNlIjM7m85XjgHnAHCQbc = XRRoyNlIjM7m85XjgHnAHCQbc * iM7m85XjgHnAHCQbcBDOhUtMp\
        return KoyNlIjM7m85XjgHnAHCQbcBD, XRRoyNlIjM7m85XjgHnAHCQbc \
    end\
end\
function LSO.FEZF7N072gBS13eHA9cOWjtgS(S3rZ5lyXdYHeEDaO9SXsXb4pm,nkTVyG2c0BwwuAiqzTpoHvyoS,gpMWJlfgek2ajC87rei8CaLIn,sEMnCBUZ2SmEvcRTiQVc8N3yy)\
    local KvPzE8URK62tTnupDHYoqBNHg, Q7fQ54nsvlP7YFkmLjoFBgw11 = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(S3rZ5lyXdYHeEDaO9SXsXb4pm)\
    local YPX6qWVe25VpYywaXlaZfr76R, U17PX6qWVe25VpYywaXlaZfr7 = LSO.xQ7L6PUpb80mjKaDKGUXfFGS3(S3rZ5lyXdYHeEDaO9SXsXb4pm,nkTVyG2c0BwwuAiqzTpoHvyoS)\
    local Vet1o0sOjO1UgWn4gnjxR9ijv = KvPzE8URK62tTnupDHYoqBNHg + gpMWJlfgek2ajC87rei8CaLIn + sEMnCBUZ2SmEvcRTiQVc8N3yy/2\
    local PRqs5czJw83317PX6qWVe25Vp = KvPzE8URK62tTnupDHYoqBNHg + gpMWJlfgek2ajC87rei8CaLIn - sEMnCBUZ2SmEvcRTiQVc8N3yy/2\
        if Vet1o0sOjO1UgWn4gnjxR9ijv > 360 then Vet1o0sOjO1UgWn4gnjxR9ijv = Vet1o0sOjO1UgWn4gnjxR9ijv - 360 end\
        if PRqs5czJw83317PX6qWVe25Vp > 360 then PRqs5czJw83317PX6qWVe25Vp = PRqs5czJw83317PX6qWVe25Vp - 360 end\
    local TSmEvcRTiQVc8N3yy4et1o0sO = 0\
    if Vet1o0sOjO1UgWn4gnjxR9ijv < PRqs5czJw83317PX6qWVe25Vp then\
        if U17PX6qWVe25VpYywaXlaZfr7 >= PRqs5czJw83317PX6qWVe25Vp or U17PX6qWVe25VpYywaXlaZfr7 <= Vet1o0sOjO1UgWn4gnjxR9ijv then\
            TSmEvcRTiQVc8N3yy4et1o0sO = 1\
        end\
    else\
        if U17PX6qWVe25VpYywaXlaZfr7 >= PRqs5czJw83317PX6qWVe25Vp and U17PX6qWVe25VpYywaXlaZfr7 <= Vet1o0sOjO1UgWn4gnjxR9ijv then\
            TSmEvcRTiQVc8N3yy4et1o0sO = 1\
        end\
    end\
    return TSmEvcRTiQVc8N3yy4et1o0sO \
end\
function LSO.QuVTr5q9eIerkGC3uXNJXhzYJ(cbhIQZzPO7bf5yRIp36v38pk0, yDn7E4jAezinSEBtPMdD6d9nq)\
    if cbhIQZzPO7bf5yRIp36v38pk0 == 0 then\
        local NX8keN5sQd6TvGGEKtkt3iiBF = mwT3Qsmnlr919JfYhlpfJhSzu:getPosition()\
        AYBJ6f3EzzxDldmWsauyBrVu5 = 0\
        local KK62tTnupDHYoqBNHgyVjGzmY = {id = world.VolumeType.SPHERE, params = {point = NX8keN5sQd6TvGGEKtkt3iiBF.p, radius = (baHlGpuZuIAWTkKd4ZdxPf0bD+1)*Ne25VpYywaXlaZfr76RRoyNlI}} \
        world.searchObjects(Object.Category.UNIT, KK62tTnupDHYoqBNHgyVjGzmY, LSO.Olny0Ddv8gDMAb664aSKTtZH1)\
        if AYBJ6f3EzzxDldmWsauyBrVu5 == 0 and timer.getAbsTime() >= suNSVLfxo5KMbJO5hGWHrXomU then\
            for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS,1 do\
                LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(Jd6TvGGEKtkt3iiBFIy2kcTxA,'YCaLIn9ymbsEkj44AL0xVwZky')\
            end\
            suNSVLfxo5KMbJO5hGWHrXomU = math.floor(timer.getAbsTime()+0.5)+30\
        elseif AYBJ6f3EzzxDldmWsauyBrVu5 > 0 then\
            for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#KXFxFgvuNSVLfxo5KMbJO5hGW,1 do\
                if Unit.getByName(KXFxFgvuNSVLfxo5KMbJO5hGW[Jd6TvGGEKtkt3iiBFIy2kcTxA]) == nil and WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] ~= 999 then\
                    LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(Jd6TvGGEKtkt3iiBFIy2kcTxA,'YCaLIn9ymbsEkj44AL0xVwZky')\
                    WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] = 999\
                end\
            end\
        end\
        return yDn7E4jAezinSEBtPMdD6d9nq + 1*LVLfxo5KMbJO5hGWHrXomUyTC\
    else\
        return nil\
    end\
end\
function LSO.Olny0Ddv8gDMAb664aSKTtZH1(zMnCBUZ2SmEvcRTiQVc8N3yy4)\
    local NX8keN5sQd6TvGGEKtkt3iiBF = mwT3Qsmnlr919JfYhlpfJhSzu:getPosition()\
    local kqI89lwqZiE2pi6ISTRXFxFgv = zMnCBUZ2SmEvcRTiQVc8N3yy4:getName()\
    local pXb4pmNdGxsG0iItE60zCeCJT = zMnCBUZ2SmEvcRTiQVc8N3yy4:getTypeName()\
    local mqBNHgyVjGzmY997dWNWwLL48 = zMnCBUZ2SmEvcRTiQVc8N3yy4:getGroup()\
    local b2vNFm03rZ5lyXdYHeEDaO9SX = zMnCBUZ2SmEvcRTiQVc8N3yy4:getGroup():getID()\
    local oMJaQ3a6jEF46hKnWfSZmwjVP = zMnCBUZ2SmEvcRTiQVc8N3yy4:getCoalition()\
    if pXb4pmNdGxsG0iItE60zCeCJT == 'FA-18C_hornet' and oMJaQ3a6jEF46hKnWfSZmwjVP == sVX8keN5sQd6TvGGEKtkt3iiB then\
        local YPX6qWVe25VpYywaXlaZfr76R, U17PX6qWVe25VpYywaXlaZfr7 = LSO.xQ7L6PUpb80mjKaDKGUXfFGS3(fFtizLrqbVrS7o2m6aFrohDz0,kqI89lwqZiE2pi6ISTRXFxFgv)\
        local pOjO1UgWn4gnjxR9ijvXRqs5c, Dy2kcTxAYwCS5uKueLbaHlGpu = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(fFtizLrqbVrS7o2m6aFrohDz0)\
        local m5KMbJO5hGWHrXomUyTCHcHUN = 0\
        for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS+1,1 do\
            if kqI89lwqZiE2pi6ISTRXFxFgv == ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Jd6TvGGEKtkt3iiBFIy2kcTxA] then\
                if WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 100 or WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 999 then\
                    m5KMbJO5hGWHrXomUyTCHcHUN = Jd6TvGGEKtkt3iiBFIy2kcTxA\
                    break\
                end\
            end\
        end\
        if YPX6qWVe25VpYywaXlaZfr76R <= vPO7bf5yRIp36v38pk0gKKhrG*baHlGpuZuIAWTkKd4ZdxPf0bD and Unit.isActive(zMnCBUZ2SmEvcRTiQVc8N3yy4) == true then\
            if m5KMbJO5hGWHrXomUyTCHcHUN ~= 0 and YPX6qWVe25VpYywaXlaZfr76R >= 1000 then\
                WKMbJO5hGWHrXomUyTCHcHUN9[m5KMbJO5hGWHrXomUyTCHcHUN] = 0\
                LSO.NnhQSvTZ9WyJKIOfnw6mlEIMC('ni6ISTRXFxFgvuNSVLfxo5KMb',JMdD6d9nqI89lwqZiE2pi6IST[m5KMbJO5hGWHrXomUyTCHcHUN],'',coQKjlYmsCp1cdbhIQZzPO7bf[m5KMbJO5hGWHrXomUyTCHcHUN],m5KMbJO5hGWHrXomUyTCHcHUN)\
            end\
            AYBJ6f3EzzxDldmWsauyBrVu5 = AYBJ6f3EzzxDldmWsauyBrVu5+1\
        elseif YPX6qWVe25VpYywaXlaZfr76R > vPO7bf5yRIp36v38pk0gKKhrG*baHlGpuZuIAWTkKd4ZdxPf0bD and YPX6qWVe25VpYywaXlaZfr76R <= vPO7bf5yRIp36v38pk0gKKhrG*(baHlGpuZuIAWTkKd4ZdxPf0bD+1) and Unit.isActive(zMnCBUZ2SmEvcRTiQVc8N3yy4) == true then\
            LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(m5KMbJO5hGWHrXomUyTCHcHUN,'YCaLIn9ymbsEkj44AL0xVwZky') \
        end\
    end\
    return true\
end\
function LSO.WofWAD1zFVRxNhhOYdK8Jcx2x(M1WaevVX8keN5sQd6TvGGEKtk)\
    local NX8keN5sQd6TvGGEKtkt3iiBF = mwT3Qsmnlr919JfYhlpfJhSzu:getPosition()\
    local pOjO1UgWn4gnjxR9ijvXRqs5c, Dy2kcTxAYwCS5uKueLbaHlGpu = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(fFtizLrqbVrS7o2m6aFrohDz0)\
    local QDDn7E4jAezinSEBtPMdD6d9n = 0 \
    local oI89lwqZiE2pi6ISTRXFxFgvu = -17 \
    local mmUyTCHcHUN95xXqgcqK2rcoQ = {-10, 2, 14, 26, -22} \
    local EjlYmsCp1cdbhIQZzPO7bf5yR = oI89lwqZiE2pi6ISTRXFxFgvu - mmUyTCHcHUN95xXqgcqK2rcoQ[M1WaevVX8keN5sQd6TvGGEKtk]*math.tan(t68L9gpdPZ0Y4wEMnCBUZ2SmE*RuIAWTkKd4ZdxPf0bDx68L9gp)\
    local NwZkykhawsTANUP3noOQ1t7GY = NX8keN5sQd6TvGGEKtkt3iiBF.p.x + mmUyTCHcHUN95xXqgcqK2rcoQ[M1WaevVX8keN5sQd6TvGGEKtk]*math.cos(pOjO1UgWn4gnjxR9ijvXRqs5c*RuIAWTkKd4ZdxPf0bDx68L9gp)-EjlYmsCp1cdbhIQZzPO7bf5yR*math.sin(pOjO1UgWn4gnjxR9ijvXRqs5c*RuIAWTkKd4ZdxPf0bDx68L9gp)\
    local xJ6f3EzzxDldmWsauyBrVu5MG = NX8keN5sQd6TvGGEKtkt3iiBF.p.z + mmUyTCHcHUN95xXqgcqK2rcoQ[M1WaevVX8keN5sQd6TvGGEKtk]*math.sin(pOjO1UgWn4gnjxR9ijvXRqs5c*RuIAWTkKd4ZdxPf0bDx68L9gp)+EjlYmsCp1cdbhIQZzPO7bf5yR*math.cos(pOjO1UgWn4gnjxR9ijvXRqs5c*RuIAWTkKd4ZdxPf0bDx68L9gp)\
    return NwZkykhawsTANUP3noOQ1t7GY, xJ6f3EzzxDldmWsauyBrVu5MG\
end\
function LSO.XkrmAUVlny0Ddv8gDMAb664aS(OhMhunJpQxJRM0kCLNYqkTVyG)\
    local pOjO1UgWn4gnjxR9ijvXRqs5c, Dy2kcTxAYwCS5uKueLbaHlGpu = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(fFtizLrqbVrS7o2m6aFrohDz0)\
    local NZ2SmEvcRTiQVc8N3yy4et1o0 = pOjO1UgWn4gnjxR9ijvXRqs5c-180\
        if NZ2SmEvcRTiQVc8N3yy4et1o0 <0 then NZ2SmEvcRTiQVc8N3yy4et1o0 = NZ2SmEvcRTiQVc8N3yy4et1o0+360 end\
    local SiItE60zCeCJTGistrxZ7fQ54 = Unit.getByName(OhMhunJpQxJRM0kCLNYqkTVyG)    \
    local ysIVAAkkR1gObMfAPByqMJaQ3 = SiItE60zCeCJTGistrxZ7fQ54:getPosition()\
    local pVu5MGtRGvLYDDn7E4jAezinS, cIrKPSIcKl2XJ8WL2eUTEoUlA = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(OhMhunJpQxJRM0kCLNYqkTVyG)\
    local HSVLfxo5KMbJO5hGWHrXomUyT = 12 \
    local tFgvuNSVLfxo5KMbJO5hGWHrX = 0\
    for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,4,1 do\
        local qRGvLYDDn7E4jAezinSEBtPMd, y6d9nqI89lwqZiE2pi6ISTRXF\
        qRGvLYDDn7E4jAezinSEBtPMd, y6d9nqI89lwqZiE2pi6ISTRXF = LSO.WofWAD1zFVRxNhhOYdK8Jcx2x(Jd6TvGGEKtkt3iiBFIy2kcTxA)\
        local aHlGpuZuIAWTkKd4ZdxPf0bDx = ysIVAAkkR1gObMfAPByqMJaQ3.p.x - qRGvLYDDn7E4jAezinSEBtPMd\
        local cRTiQVc8N3yy4et1o0sOjO1Ug = ysIVAAkkR1gObMfAPByqMJaQ3.p.z - y6d9nqI89lwqZiE2pi6ISTRXF\
        local KoyNlIjM7m85XjgHnAHCQbcBD = math.sqrt(aHlGpuZuIAWTkKd4ZdxPf0bDx*aHlGpuZuIAWTkKd4ZdxPf0bDx + cRTiQVc8N3yy4et1o0sOjO1Ug*cRTiQVc8N3yy4et1o0sOjO1Ug) \
        local XRRoyNlIjM7m85XjgHnAHCQbc = math.atan2(cRTiQVc8N3yy4et1o0sOjO1Ug, aHlGpuZuIAWTkKd4ZdxPf0bDx)\
            if XRRoyNlIjM7m85XjgHnAHCQbc < 0 then XRRoyNlIjM7m85XjgHnAHCQbc = XRRoyNlIjM7m85XjgHnAHCQbc + 2 * math.pi end\
            XRRoyNlIjM7m85XjgHnAHCQbc = XRRoyNlIjM7m85XjgHnAHCQbc * 180/math.pi\
        local Vet1o0sOjO1UgWn4gnjxR9ijv = NZ2SmEvcRTiQVc8N3yy4et1o0 - t68L9gpdPZ0Y4wEMnCBUZ2SmE + 90\
        local PRqs5czJw83317PX6qWVe25Vp = NZ2SmEvcRTiQVc8N3yy4et1o0 - t68L9gpdPZ0Y4wEMnCBUZ2SmE - 90\
            if Vet1o0sOjO1UgWn4gnjxR9ijv > 360 then Vet1o0sOjO1UgWn4gnjxR9ijv = Vet1o0sOjO1UgWn4gnjxR9ijv - 360 end\
            if PRqs5czJw83317PX6qWVe25Vp > 360 then PRqs5czJw83317PX6qWVe25Vp = PRqs5czJw83317PX6qWVe25Vp - 360 end\
        local TSmEvcRTiQVc8N3yy4et1o0sO = 0\
        if Vet1o0sOjO1UgWn4gnjxR9ijv < PRqs5czJw83317PX6qWVe25Vp then\
            if XRRoyNlIjM7m85XjgHnAHCQbc >= PRqs5czJw83317PX6qWVe25Vp or XRRoyNlIjM7m85XjgHnAHCQbc <= Vet1o0sOjO1UgWn4gnjxR9ijv then\
                TSmEvcRTiQVc8N3yy4et1o0sO = 1\
            end\
        else\
            if XRRoyNlIjM7m85XjgHnAHCQbc >= PRqs5czJw83317PX6qWVe25Vp and XRRoyNlIjM7m85XjgHnAHCQbc <= Vet1o0sOjO1UgWn4gnjxR9ijv then\
                TSmEvcRTiQVc8N3yy4et1o0sO = 1\
            end\
        end\
        if TSmEvcRTiQVc8N3yy4et1o0sO == 1 and KoyNlIjM7m85XjgHnAHCQbcBD <= HSVLfxo5KMbJO5hGWHrXomUyT and cIrKPSIcKl2XJ8WL2eUTEoUlA <= Dy2kcTxAYwCS5uKueLbaHlGpu*1.2 then\
            tFgvuNSVLfxo5KMbJO5hGWHrX = Jd6TvGGEKtkt3iiBFIy2kcTxA \
        end\
        if Jd6TvGGEKtkt3iiBFIy2kcTxA == 4 and TSmEvcRTiQVc8N3yy4et1o0sO == 0 then\
            tFgvuNSVLfxo5KMbJO5hGWHrX = 5 \
        end\
    end\
    return tFgvuNSVLfxo5KMbJO5hGWHrX\
end\
function LSO.W8Ys1Bjd0od2ivaaUEbBQ7L6P(UEzzxDldmWsauyBrVu5MGtRGv, g8CaLIn9ymbsEkj44AL0xVwZk, i44AL0xVwZkykhawsTANUP3no, Xt9AgtAvJ4luwHa3CFipMWJlf, fek2ajC87rei8CaLIn9ymbsEk, tFgvuNSVLfxo5KMbJO5hGWHrX)\
    local ukhawsTANUP3noOQ1t7GYBJ6f\
    local HQ1t7GYBJ6f3EzzxDldmWsauy\
    local PomUyTCHcHUN95xXqgcqK2rco = {}\
    local BtRGvLYDDn7E4jAezinSEBtPM = {}\
    local QBJ6f3EzzxDldmWsauyBrVu5M = {}\
    local WISTRXFxFgvuNSVLfxo5KMbJO = {'X ','IM ','IC ','AR '}\
    local xrVu5MGtRGvLYDDn7E4jAezin = {'LUL','(LUL)','','(LUR)','LUR'}\
    local LEBtPMdD6d9nqI89lwqZiE2pi = {'DL','(DL)','','(DR)','DR'}\
    local JKjlYmsCp1cdbhIQZzPO7bf5y = {'H','(H)','','(LO)','LO'}\
    local KIp36v38pk0gKKhrGeBcF0v1e = {'/','(/)','','(\\\\)','\\\\'}\
    for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#fek2ajC87rei8CaLIn9ymbsEk,1 do\
        if fek2ajC87rei8CaLIn9ymbsEk[Jd6TvGGEKtkt3iiBFIy2kcTxA] > 0 then\
            local y87rei8CaLIn9ymbsEkj44AL0 =  math.floor(i44AL0xVwZkykhawsTANUP3no[Jd6TvGGEKtkt3iiBFIy2kcTxA]/fek2ajC87rei8CaLIn9ymbsEk[Jd6TvGGEKtkt3iiBFIy2kcTxA]+0.5)\
            local wvJ4luwHa3CFipMWJlfgek2aj =  math.floor(Xt9AgtAvJ4luwHa3CFipMWJlf[Jd6TvGGEKtkt3iiBFIy2kcTxA]/fek2ajC87rei8CaLIn9ymbsEk[Jd6TvGGEKtkt3iiBFIy2kcTxA]+0.5)\
            BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA] = y87rei8CaLIn9ymbsEkj44AL0\
            QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA] = wvJ4luwHa3CFipMWJlfgek2aj\
        end\
    end\
    PomUyTCHcHUN95xXqgcqK2rco[1] = xrVu5MGtRGvLYDDn7E4jAezin[BtRGvLYDDn7E4jAezinSEBtPM[1]]..JKjlYmsCp1cdbhIQZzPO7bf5y[QBJ6f3EzzxDldmWsauyBrVu5M[1]]\
    for Jd6TvGGEKtkt3iiBFIy2kcTxA = 2,#fek2ajC87rei8CaLIn9ymbsEk,1 do\
        if fek2ajC87rei8CaLIn9ymbsEk[Jd6TvGGEKtkt3iiBFIy2kcTxA] > 0 then\
            local AxFgvuNSVLfxo5KMbJO5hGWHr\
            local cD6d9nqI89lwqZiE2pi6ISTRX\
            if BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA-1] == 3 then\
                AxFgvuNSVLfxo5KMbJO5hGWHr = LEBtPMdD6d9nqI89lwqZiE2pi[BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA]]\
            elseif BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA-1] ~= 3 then\
                AxFgvuNSVLfxo5KMbJO5hGWHr = xrVu5MGtRGvLYDDn7E4jAezin[BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA]]\
            end\
            if QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA-1] == 3 then\
                cD6d9nqI89lwqZiE2pi6ISTRX = KIp36v38pk0gKKhrGeBcF0v1e[QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA]]\
            elseif QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA-1] ~= 3 then\
                cD6d9nqI89lwqZiE2pi6ISTRX = JKjlYmsCp1cdbhIQZzPO7bf5y[QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA]]\
            end\
            PomUyTCHcHUN95xXqgcqK2rco[Jd6TvGGEKtkt3iiBFIy2kcTxA] = AxFgvuNSVLfxo5KMbJO5hGWHr..cD6d9nqI89lwqZiE2pi6ISTRX\
            if BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA-1] ~= 3 and QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 3 and BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 3 then\
                PomUyTCHcHUN95xXqgcqK2rco[Jd6TvGGEKtkt3iiBFIy2kcTxA] = 'NC'\
            elseif QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA-1] ~= 3 and QBJ6f3EzzxDldmWsauyBrVu5M[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 3 and BtRGvLYDDn7E4jAezinSEBtPM[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 3 then\
                PomUyTCHcHUN95xXqgcqK2rco[Jd6TvGGEKtkt3iiBFIy2kcTxA] = 'NC'\
            end\
        end\
    end\
    for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#fek2ajC87rei8CaLIn9ymbsEk,1 do\
        if PomUyTCHcHUN95xXqgcqK2rco[Jd6TvGGEKtkt3iiBFIy2kcTxA] == '' then\
            WISTRXFxFgvuNSVLfxo5KMbJO[Jd6TvGGEKtkt3iiBFIy2kcTxA] = ''\
        end\
        if fek2ajC87rei8CaLIn9ymbsEk[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 0 then\
            WISTRXFxFgvuNSVLfxo5KMbJO[Jd6TvGGEKtkt3iiBFIy2kcTxA] = ''\
            PomUyTCHcHUN95xXqgcqK2rco[Jd6TvGGEKtkt3iiBFIy2kcTxA] = ''\
        end\
    end\
    HQ1t7GYBJ6f3EzzxDldmWsauy = PomUyTCHcHUN95xXqgcqK2rco[1]..WISTRXFxFgvuNSVLfxo5KMbJO[1]..PomUyTCHcHUN95xXqgcqK2rco[2]..WISTRXFxFgvuNSVLfxo5KMbJO[2]..PomUyTCHcHUN95xXqgcqK2rco[3]..WISTRXFxFgvuNSVLfxo5KMbJO[3]..PomUyTCHcHUN95xXqgcqK2rco[4]..WISTRXFxFgvuNSVLfxo5KMbJO[4]\
    local fKKhrGeBcF0v1e7t9AgtAvJ4l = UEzzxDldmWsauyBrVu5MGtRGv/(g8CaLIn9ymbsEkj44AL0xVwZk*2)\
    if fKKhrGeBcF0v1e7t9AgtAvJ4l >= 3.90 and tFgvuNSVLfxo5KMbJO5hGWHrX == 3 and QBJ6f3EzzxDldmWsauyBrVu5M[4] == 0 and BtRGvLYDDn7E4jAezinSEBtPM[4] == 0 then\
        ukhawsTANUP3noOQ1t7GYBJ6f = '_OK_'\
    elseif fKKhrGeBcF0v1e7t9AgtAvJ4l >= 3.75 then\
        ukhawsTANUP3noOQ1t7GYBJ6f = 'OK'\
    elseif fKKhrGeBcF0v1e7t9AgtAvJ4l >= 3.00 and fKKhrGeBcF0v1e7t9AgtAvJ4l < 3.75 then\
        ukhawsTANUP3noOQ1t7GYBJ6f = '(OK)'\
    elseif fKKhrGeBcF0v1e7t9AgtAvJ4l >= 2.25 and fKKhrGeBcF0v1e7t9AgtAvJ4l < 3.00 then\
        ukhawsTANUP3noOQ1t7GYBJ6f = '--'\
    else\
        ukhawsTANUP3noOQ1t7GYBJ6f = 'C'\
    end\
    if QBJ6f3EzzxDldmWsauyBrVu5M[4] == 1 or QBJ6f3EzzxDldmWsauyBrVu5M[4] == 5 or BtRGvLYDDn7E4jAezinSEBtPM[4] == 1 or BtRGvLYDDn7E4jAezinSEBtPM[4] == 5 then\
        ukhawsTANUP3noOQ1t7GYBJ6f = 'C' \
    elseif tFgvuNSVLfxo5KMbJO5hGWHrX == 1 then\
        ukhawsTANUP3noOQ1t7GYBJ6f = '--' \
    end\
    return ukhawsTANUP3noOQ1t7GYBJ6f, HQ1t7GYBJ6f3EzzxDldmWsauy\
end\
function LSO.Npb80mjKaDKGUXfFGS3XwPbzW(SiItE60zCeCJTGistrxZ7fQ54,fHnAHCQbcBDOhUtMpwT3Qsmnl)\
    local dBcF0v1e7t9AgtAvJ4luwHa3C = Unit.getPlayerName(SiItE60zCeCJTGistrxZ7fQ54)\
    if dBcF0v1e7t9AgtAvJ4luwHa3C == nil then dBcF0v1e7t9AgtAvJ4luwHa3C = 'AI' end\
    K9ijvXRqs5czJw83317PX6qWV[#K9ijvXRqs5czJw83317PX6qWV+1] = string.format([[ %-3s %-20s | %-40s ]],ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[fHnAHCQbcBDOhUtMpwT3Qsmnl],dBcF0v1e7t9AgtAvJ4luwHa3C,LCHcHUN95xXqgcqK2rcoQKjlY[fHnAHCQbcBDOhUtMpwT3Qsmnl][#LCHcHUN95xXqgcqK2rcoQKjlY[fHnAHCQbcBDOhUtMpwT3Qsmnl]])\
end\
function LSO.klEIMC5ofWAD1zFVRxNhhOYdK()\
    local GUP3noOQ1t7GYBJ6f3EzzxDld = 0\
    local kWsauyBrVu5MGtRGvLYDDn7E4 = 0\
    local umbsEkj44AL0xVwZkykhawsTA = 0\
    local RiE2pi6ISTRXFxFgvuNSVLfxo = 0\
    for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS,1 do\
        if ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Jd6TvGGEKtkt3iiBFIy2kcTxA] ~= nil then\
            if WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 0 then\
                GUP3noOQ1t7GYBJ6f3EzzxDld = GUP3noOQ1t7GYBJ6f3EzzxDld + 1\
            elseif WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 1 then\
                kWsauyBrVu5MGtRGvLYDDn7E4 = kWsauyBrVu5MGtRGvLYDDn7E4 + 1\
            elseif WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] == 2 then\
                umbsEkj44AL0xVwZkykhawsTA = umbsEkj44AL0xVwZkykhawsTA + 1\
            elseif WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] >= 6 and WKMbJO5hGWHrXomUyTCHcHUN9[Jd6TvGGEKtkt3iiBFIy2kcTxA] <= 50 then\
                RiE2pi6ISTRXFxFgvuNSVLfxo = RiE2pi6ISTRXFxFgvuNSVLfxo + 1\
            end\
        end\
    end\
    return GUP3noOQ1t7GYBJ6f3EzzxDld, kWsauyBrVu5MGtRGvLYDDn7E4, umbsEkj44AL0xVwZkykhawsTA, RiE2pi6ISTRXFxFgvuNSVLfxo\
end\
function LSO.GNLRzHQ9FEXLPF9HifUG5TIZb(SiItE60zCeCJTGistrxZ7fQ54,fHnAHCQbcBDOhUtMpwT3Qsmnl,UiiBFIy2kcTxAYwCS5uKueLba)\
    local mhDz0qU1WaevVX8keN5sQd6Tv\
    local dBcF0v1e7t9AgtAvJ4luwHa3C = Unit.getPlayerName(SiItE60zCeCJTGistrxZ7fQ54)\
    if dBcF0v1e7t9AgtAvJ4luwHa3C == nil then dBcF0v1e7t9AgtAvJ4luwHa3C = 'AI' end\
    if lfs and io then\
        local If0bDx68L9gpdPZ0Y4wEMnCBU = ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[fHnAHCQbcBDOhUtMpwT3Qsmnl]..'_'..dBcF0v1e7t9AgtAvJ4luwHa3C..' ('..math.floor(timer.getAbsTime()+0.5)..')'\
        local Ed4ZdxPf0bDx68L9gpdPZ0Y4w = [[Mods\\Alerax_LSO_AI\\]]\
        local qKueLbaHlGpuZuIAWTkKd4Zdx = lfs.mkdir(lfs.writedir()..Ed4ZdxPf0bDx68L9gpdPZ0Y4w)\
        local BGEKtkt3iiBFIy2kcTxAYwCS5 = lfs.writedir()..Ed4ZdxPf0bDx68L9gpdPZ0Y4w..If0bDx68L9gpdPZ0Y4wEMnCBU..'.doc'\
        local Q2SmEvcRTiQVc8N3yy4et1o0s = io.open(BGEKtkt3iiBFIy2kcTxAYwCS5, 'w')\
        for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#UiiBFIy2kcTxAYwCS5uKueLba[fHnAHCQbcBDOhUtMpwT3Qsmnl],1 do\
            Q2SmEvcRTiQVc8N3yy4et1o0s:write(UiiBFIy2kcTxAYwCS5uKueLba[fHnAHCQbcBDOhUtMpwT3Qsmnl][Jd6TvGGEKtkt3iiBFIy2kcTxA],'\\n\\t')\
        end\
        Q2SmEvcRTiQVc8N3yy4et1o0s:close()\
        mhDz0qU1WaevVX8keN5sQd6Tv = ''\
    else\
        mhDz0qU1WaevVX8keN5sQd6Tv = '*'\
    end\
    return mhDz0qU1WaevVX8keN5sQd6Tv\
end\
function LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(kdmWsauyBrVu5MGtRGvLYDDn7)\
    local MANUP3noOQ1t7GYBJ6f3EzzxD = {}\
    local to5KMbJO5hGWHrXomUyTCHcHU = kdmWsauyBrVu5MGtRGvLYDDn7.lHvyoSr1ZDqODsIVAAkkR1gOb\
    local dk2ajC87rei8CaLIn9ymbsEkj = kdmWsauyBrVu5MGtRGvLYDDn7.OwLL48b2vNFm03rZ5lyXdYHeE\
    local cF0v1e7t9AgtAvJ4luwHa3CFi = kdmWsauyBrVu5MGtRGvLYDDn7.RmwjVPQOUCuCcIrKPSIcKl2XJ\
    local Qfr76RRoyNlIjM7m85XjgHnAH = {'tf0','tf1','tf2','tf3','tf4','tf5','tf6','tf7','tf8','tf9'}\
    local fcqK2rcoQKjlYmsCp1cdbhIQZ = {'tm0','tm1','tm2','tm3','tm4','tm5','tm6','tm7','tm8','tm9'}\
    local ZnqI89lwqZiE2pi6ISTRXFxFg = {'tl0','tl1','tl2','tl3','tl4','tl5','tl6','tl7','tl8','tl9'}\
    local H7bf5yRIp36v38pk0gKKhrGeB = {'sg01','sg02','sg03','sg04','sg05','sg06','sg07','sg08','sg09','sg10',\
                        'sg11','sg12','sg13','sg14','sg15','sg16','sg17','sg18','sg19','sg20',}\
    if to5KMbJO5hGWHrXomUyTCHcHU == '' then\
        MANUP3noOQ1t7GYBJ6f3EzzxD = {cF0v1e7t9AgtAvJ4luwHa3CFi,'','',''}\
    else\
        if dk2ajC87rei8CaLIn9ymbsEkj == 3 then\
            to5KMbJO5hGWHrXomUyTCHcHU = tonumber(to5KMbJO5hGWHrXomUyTCHcHU)\
            if to5KMbJO5hGWHrXomUyTCHcHU <10 then\
                to5KMbJO5hGWHrXomUyTCHcHU = tostring('0' .. '0' .. to5KMbJO5hGWHrXomUyTCHcHU)\
            elseif to5KMbJO5hGWHrXomUyTCHcHU < 100 then\
                to5KMbJO5hGWHrXomUyTCHcHU = tostring('0' .. to5KMbJO5hGWHrXomUyTCHcHU)\
            else\
                to5KMbJO5hGWHrXomUyTCHcHU = tostring(to5KMbJO5hGWHrXomUyTCHcHU)\
            end\
            fUtMpwT3Qsmnlr919JfYhlpfJ = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'(%d)%d%d')\
            gSzugFtizLrqbVrS7o2m6aFro = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'%d(%d)%d')\
            gDz0qU1WaevVX8keN5sQd6TvG = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'%d%d(%d)')\
            if cF0v1e7t9AgtAvJ4luwHa3CFi == '' then\
                MANUP3noOQ1t7GYBJ6f3EzzxD = {Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1], fcqK2rcoQKjlYmsCp1cdbhIQZ[gSzugFtizLrqbVrS7o2m6aFro+1], Qfr76RRoyNlIjM7m85XjgHnAH[gDz0qU1WaevVX8keN5sQd6TvG+1], cF0v1e7t9AgtAvJ4luwHa3CFi}\
            else\
                MANUP3noOQ1t7GYBJ6f3EzzxD = {Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1], fcqK2rcoQKjlYmsCp1cdbhIQZ[gSzugFtizLrqbVrS7o2m6aFro+1], ZnqI89lwqZiE2pi6ISTRXFxFg[gDz0qU1WaevVX8keN5sQd6TvG+1], cF0v1e7t9AgtAvJ4luwHa3CFi}\
            end\
        elseif dk2ajC87rei8CaLIn9ymbsEkj == 2 then\
            to5KMbJO5hGWHrXomUyTCHcHU = tonumber(to5KMbJO5hGWHrXomUyTCHcHU)\
            if to5KMbJO5hGWHrXomUyTCHcHU <10 then\
                to5KMbJO5hGWHrXomUyTCHcHU = tostring('0' .. to5KMbJO5hGWHrXomUyTCHcHU)\
            else\
                to5KMbJO5hGWHrXomUyTCHcHU = tostring(to5KMbJO5hGWHrXomUyTCHcHU)\
            end\
            fUtMpwT3Qsmnlr919JfYhlpfJ = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'(%d)%d')\
            gSzugFtizLrqbVrS7o2m6aFro = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'%d(%d)')\
            if cF0v1e7t9AgtAvJ4luwHa3CFi == '' then\
                MANUP3noOQ1t7GYBJ6f3EzzxD = {'',Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1],fcqK2rcoQKjlYmsCp1cdbhIQZ[gSzugFtizLrqbVrS7o2m6aFro+1],cF0v1e7t9AgtAvJ4luwHa3CFi}\
            else\
                MANUP3noOQ1t7GYBJ6f3EzzxD = {'',Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1],ZnqI89lwqZiE2pi6ISTRXFxFg[gSzugFtizLrqbVrS7o2m6aFro+1],cF0v1e7t9AgtAvJ4luwHa3CFi}\
            end\
        elseif dk2ajC87rei8CaLIn9ymbsEkj == 1 then\
            MANUP3noOQ1t7GYBJ6f3EzzxD = {H7bf5yRIp36v38pk0gKKhrGeB[to5KMbJO5hGWHrXomUyTCHcHU],'',cF0v1e7t9AgtAvJ4luwHa3CFi,''}\
        elseif dk2ajC87rei8CaLIn9ymbsEkj == 4 then\
            to5KMbJO5hGWHrXomUyTCHcHU = tonumber(to5KMbJO5hGWHrXomUyTCHcHU)\
            if to5KMbJO5hGWHrXomUyTCHcHU <10 then\
                MANUP3noOQ1t7GYBJ6f3EzzxD = {H7bf5yRIp36v38pk0gKKhrGeB[to5KMbJO5hGWHrXomUyTCHcHU],'',cF0v1e7t9AgtAvJ4luwHa3CFi,''}\
            elseif to5KMbJO5hGWHrXomUyTCHcHU < 100 then\
                to5KMbJO5hGWHrXomUyTCHcHU = tostring(to5KMbJO5hGWHrXomUyTCHcHU)\
                fUtMpwT3Qsmnlr919JfYhlpfJ = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'(%d)%d')\
                gSzugFtizLrqbVrS7o2m6aFro = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'%d(%d)')\
                if cF0v1e7t9AgtAvJ4luwHa3CFi == '' then\
                    MANUP3noOQ1t7GYBJ6f3EzzxD = {Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1],fcqK2rcoQKjlYmsCp1cdbhIQZ[gSzugFtizLrqbVrS7o2m6aFro+1],cF0v1e7t9AgtAvJ4luwHa3CFi,''}\
                else\
                    MANUP3noOQ1t7GYBJ6f3EzzxD = {Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1],ZnqI89lwqZiE2pi6ISTRXFxFg[gSzugFtizLrqbVrS7o2m6aFro+1],cF0v1e7t9AgtAvJ4luwHa3CFi,''}\
                end\
            else\
                to5KMbJO5hGWHrXomUyTCHcHU = tostring(to5KMbJO5hGWHrXomUyTCHcHU)\
                fUtMpwT3Qsmnlr919JfYhlpfJ = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'(%d)%d%d')\
                gSzugFtizLrqbVrS7o2m6aFro = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'%d(%d)%d')\
                gDz0qU1WaevVX8keN5sQd6TvG = string.match(to5KMbJO5hGWHrXomUyTCHcHU,'%d%d(%d)')\
                if cF0v1e7t9AgtAvJ4luwHa3CFi == '' then\
                    MANUP3noOQ1t7GYBJ6f3EzzxD = {Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1], fcqK2rcoQKjlYmsCp1cdbhIQZ[gSzugFtizLrqbVrS7o2m6aFro+1], Qfr76RRoyNlIjM7m85XjgHnAH[gDz0qU1WaevVX8keN5sQd6TvG+1], cF0v1e7t9AgtAvJ4luwHa3CFi}\
                else\
                    MANUP3noOQ1t7GYBJ6f3EzzxD = {Qfr76RRoyNlIjM7m85XjgHnAH[fUtMpwT3Qsmnlr919JfYhlpfJ+1], fcqK2rcoQKjlYmsCp1cdbhIQZ[gSzugFtizLrqbVrS7o2m6aFro+1], ZnqI89lwqZiE2pi6ISTRXFxFg[gDz0qU1WaevVX8keN5sQd6TvG+1], cF0v1e7t9AgtAvJ4luwHa3CFi}\
                end\
            end\
        end\
    end\
    return MANUP3noOQ1t7GYBJ6f3EzzxD\
end\
function LSO.jCOdteYuVTr5q9eIerkGC3uXN(l9ymbsEkj44AL0xVwZkykhaws, yDn7E4jAezinSEBtPMdD6d9nq)\
    if WhGWHrXomUyTCHcHUN95xXqgc == 1 or WhGWHrXomUyTCHcHUN95xXqgc == nYywaXlaZfr76RRoyNlIjM7m8+(WhGWHrXomUyTCHcHUN95xXqgc-5) then\
        nYywaXlaZfr76RRoyNlIjM7m8 = 1\
    end\
    if nYywaXlaZfr76RRoyNlIjM7m8 <= 4 then\
        local NX8keN5sQd6TvGGEKtkt3iiBF = mwT3Qsmnlr919JfYhlpfJhSzu:getPosition()\
        local AtizLrqbVrS7o2m6aFrohDz0q = {0, 0.35, 0.35, 0.75}\
        if l9ymbsEkj44AL0xVwZkykhaws[nYywaXlaZfr76RRoyNlIjM7m8] ~= '' then\
            trigger.action.radioTransmission('Alerax_LSO_AI_Script/'.. l9ymbsEkj44AL0xVwZkykhaws[nYywaXlaZfr76RRoyNlIjM7m8] ..'.ogg', NX8keN5sQd6TvGGEKtkt3iiBF.p, it3iiBFIy2kcTxAYwCS5uKueL, false, hxR9ijvXRqs5czJw83317PX6q, 100)\
        end\
        nYywaXlaZfr76RRoyNlIjM7m8 = nYywaXlaZfr76RRoyNlIjM7m8 + 1\
        WhGWHrXomUyTCHcHUN95xXqgc = WhGWHrXomUyTCHcHUN95xXqgc + 1\
        return yDn7E4jAezinSEBtPMdD6d9nq + AtizLrqbVrS7o2m6aFrohDz0q[nYywaXlaZfr76RRoyNlIjM7m8]\
    elseif WhGWHrXomUyTCHcHUN95xXqgc == nYywaXlaZfr76RRoyNlIjM7m8+(WhGWHrXomUyTCHcHUN95xXqgc-5) then\
        return nil\
    end\
end\
function LSO.NnhQSvTZ9WyJKIOfnw6mlEIMC(iAezinSEBtPMdD6d9nqI89lwq,WsQd6TvGGEKtkt3iiBFIy2kcT,CMD_OhMhunJpQxJRM0kCLNYqkTVyG,NN95xXqgcqK2rcoQKjlYmsCp1,exo5KMbJO5hGWHrXomUyTCHcH)\
    if iAezinSEBtPMdD6d9nqI89lwq == 'VyRIp36v38pk0gKKhrGeBcF0v' then\
        jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT] = missionCommands.addSubMenuForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'Carrier Menu', nil)\
        missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT, 'Carrier Comm Information', jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=10,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=nil,e0bDx68L9gpdPZ0Y4wEMnCBUZ=nil})\
        missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT, 'Weather Condition Status', jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=11,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=nil,e0bDx68L9gpdPZ0Y4wEMnCBUZ=nil})\
        missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT, 'Grading Report Summary', jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=12,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=nil,e0bDx68L9gpdPZ0Y4wEMnCBUZ=nil})\
        zkj44AL0xVwZkykhawsTANUP3[WsQd6TvGGEKtkt3iiBFIy2kcT] = missionCommands.addSubMenuForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'--Carrier OPTIONS Select Menu--', jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT])\
            missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT, 'Carrier Recovery: CASE I', zkj44AL0xVwZkykhawsTANUP3[WsQd6TvGGEKtkt3iiBFIy2kcT], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=1,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=nil,e0bDx68L9gpdPZ0Y4wEMnCBUZ=nil})\
            missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT, 'Carrier Recovery: CASE III (WIP)', zkj44AL0xVwZkykhawsTANUP3[WsQd6TvGGEKtkt3iiBFIy2kcT], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=3,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=nil,e0bDx68L9gpdPZ0Y4wEMnCBUZ=nil})\
    elseif iAezinSEBtPMdD6d9nqI89lwq == 'ni6ISTRXFxFgvuNSVLfxo5KMb' then\
        local nK2rcoQKjlYmsCp1cdbhIQZzP = 0\
        for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,#KXFxFgvuNSVLfxo5KMbJO5hGW,1 do\
            if WsQd6TvGGEKtkt3iiBFIy2kcT == JMdD6d9nqI89lwqZiE2pi6IST[Jd6TvGGEKtkt3iiBFIy2kcTxA] then\
                if coQKjlYmsCp1cdbhIQZzPO7bf[Jd6TvGGEKtkt3iiBFIy2kcTxA] > nK2rcoQKjlYmsCp1cdbhIQZzP then\
                    nK2rcoQKjlYmsCp1cdbhIQZzP = coQKjlYmsCp1cdbhIQZzPO7bf[Jd6TvGGEKtkt3iiBFIy2kcTxA]\
                end\
            end\
        end\
        for Jd6TvGGEKtkt3iiBFIy2kcTxA = 1,nK2rcoQKjlYmsCp1cdbhIQZzP,1 do\
            xaLIn9ymbsEkj44AL0xVwZkyk[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA] = {}\
            if Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA] ~= nil then\
                missionCommands.removeItemForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT, Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA])\
            end\
            for GnCBUZ2SmEvcRTiQVc8N3yy4e = 1,#KXFxFgvuNSVLfxo5KMbJO5hGW,1 do\
                if JMdD6d9nqI89lwqZiE2pi6IST[GnCBUZ2SmEvcRTiQVc8N3yy4e] == WsQd6TvGGEKtkt3iiBFIy2kcT and coQKjlYmsCp1cdbhIQZzPO7bf[GnCBUZ2SmEvcRTiQVc8N3yy4e] == Jd6TvGGEKtkt3iiBFIy2kcTxA then\
                    if WKMbJO5hGWHrXomUyTCHcHUN9[GnCBUZ2SmEvcRTiQVc8N3yy4e] == 100 or WKMbJO5hGWHrXomUyTCHcHUN9[GnCBUZ2SmEvcRTiQVc8N3yy4e] == 999 then\
                        Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA] = missionCommands.addSubMenuForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'  '..CrXomUyTCHcHUN95xXqgcqK2r[GnCBUZ2SmEvcRTiQVc8N3yy4e]..' ----------------', jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT])\
                        break\
                    elseif WKMbJO5hGWHrXomUyTCHcHUN9[GnCBUZ2SmEvcRTiQVc8N3yy4e] ~= nil then\
                        local dBcF0v1e7t9AgtAvJ4luwHa3C = Unit.getPlayerName(Unit.getByName(KXFxFgvuNSVLfxo5KMbJO5hGW[GnCBUZ2SmEvcRTiQVc8N3yy4e]))\
                        if dBcF0v1e7t9AgtAvJ4luwHa3C == nil then dBcF0v1e7t9AgtAvJ4luwHa3C = 'AI' end\
                        local yaO9SXsXb4pmNdGxsG0iItE60 = ''\
                        if bKl2XJ8WL2eUTEoUlARvPzE8U == 1 then yaO9SXsXb4pmNdGxsG0iItE60 = ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[GnCBUZ2SmEvcRTiQVc8N3yy4e] end\
                        Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA] = missionCommands.addSubMenuForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'  '..CrXomUyTCHcHUN95xXqgcqK2r[GnCBUZ2SmEvcRTiQVc8N3yy4e]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - CALLS', jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT])\
                            xaLIn9ymbsEkj44AL0xVwZkyk[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA][1] = missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,yaO9SXsXb4pmNdGxsG0iItE60..' Request Marshal Single', Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=20,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=GnCBUZ2SmEvcRTiQVc8N3yy4e,e0bDx68L9gpdPZ0Y4wEMnCBUZ=KXFxFgvuNSVLfxo5KMbJO5hGW[GnCBUZ2SmEvcRTiQVc8N3yy4e]})\
                            xaLIn9ymbsEkj44AL0xVwZkyk[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA][2] = missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,yaO9SXsXb4pmNdGxsG0iItE60..' Request Marshal Sectional', Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=25,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=GnCBUZ2SmEvcRTiQVc8N3yy4e,e0bDx68L9gpdPZ0Y4wEMnCBUZ=KXFxFgvuNSVLfxo5KMbJO5hGW[GnCBUZ2SmEvcRTiQVc8N3yy4e]})\
                            xaLIn9ymbsEkj44AL0xVwZkyk[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA][3] = missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,yaO9SXsXb4pmNdGxsG0iItE60..' Request Enter Pattern', Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=21,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=GnCBUZ2SmEvcRTiQVc8N3yy4e,e0bDx68L9gpdPZ0Y4wEMnCBUZ=KXFxFgvuNSVLfxo5KMbJO5hGW[GnCBUZ2SmEvcRTiQVc8N3yy4e]})\
                            xaLIn9ymbsEkj44AL0xVwZkyk[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA][4] = missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,yaO9SXsXb4pmNdGxsG0iItE60..' Request Straight-in', Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=22,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=GnCBUZ2SmEvcRTiQVc8N3yy4e,e0bDx68L9gpdPZ0Y4wEMnCBUZ=KXFxFgvuNSVLfxo5KMbJO5hGW[GnCBUZ2SmEvcRTiQVc8N3yy4e]})\
                            xaLIn9ymbsEkj44AL0xVwZkyk[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA][5] = missionCommands.addCommandForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,yaO9SXsXb4pmNdGxsG0iItE60..'   RESET', Se7t9AgtAvJ4luwHa3CFipMWJ[WsQd6TvGGEKtkt3iiBFIy2kcT][Jd6TvGGEKtkt3iiBFIy2kcTxA], LSO.YJcx2xLEZF7N072gBS13eHA9c, {H95xXqgcqK2rcoQKjlYmsCp1c=23,BEKtkt3iiBFIy2kcTxAYwCS5u=WsQd6TvGGEKtkt3iiBFIy2kcT,EueLbaHlGpuZuIAWTkKd4ZdxP=GnCBUZ2SmEvcRTiQVc8N3yy4e,e0bDx68L9gpdPZ0Y4wEMnCBUZ=KXFxFgvuNSVLfxo5KMbJO5hGW[GnCBUZ2SmEvcRTiQVc8N3yy4e]})\
                        break\
                    end\
                end\
            end\
        end\
    elseif iAezinSEBtPMdD6d9nqI89lwq == 'hnSEBtPMdD6d9nqI89lwqZiE2_all' then\
        missionCommands.removeItemForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT, jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT])\
        jfgek2ajC87rei8CaLIn9ymbs[WsQd6TvGGEKtkt3iiBFIy2kcT] = nil\
    end\
end\
function LSO.YJcx2xLEZF7N072gBS13eHA9c(cdbhIQZzPO7bf5yRIp36v38pk)\
    local wNUP3noOQ1t7GYBJ6f3EzzxDl = cdbhIQZzPO7bf5yRIp36v38pk.H95xXqgcqK2rcoQKjlYmsCp1c\
    local WsQd6TvGGEKtkt3iiBFIy2kcT = cdbhIQZzPO7bf5yRIp36v38pk.BEKtkt3iiBFIy2kcTxAYwCS5u\
    local Uc0BwwuAiqzTpoHvyoSr1ZDqO = cdbhIQZzPO7bf5yRIp36v38pk.EueLbaHlGpuZuIAWTkKd4ZdxP\
    local OhMhunJpQxJRM0kCLNYqkTVyG = cdbhIQZzPO7bf5yRIp36v38pk.e0bDx68L9gpdPZ0Y4wEMnCBUZ\
    if wNUP3noOQ1t7GYBJ6f3EzzxDl == 20 or wNUP3noOQ1t7GYBJ6f3EzzxDl == 21 or wNUP3noOQ1t7GYBJ6f3EzzxDl == 22 or wNUP3noOQ1t7GYBJ6f3EzzxDl == 23 or wNUP3noOQ1t7GYBJ6f3EzzxDl == 25 then\
        if ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO] ~= nil and ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == OhMhunJpQxJRM0kCLNYqkTVyG then\
            local dBcF0v1e7t9AgtAvJ4luwHa3C = Unit.getPlayerName(Unit.getByName(ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO]))\
            if Ypk0gKKhrGeBcF0v1e7t9AgtA == 1 then\
                trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'Wait for current radio transmission to complete', 5)\
            elseif dBcF0v1e7t9AgtAvJ4luwHa3C == nil then\
                trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'Command for AI unit, unable to proceed', 5)\
            elseif VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == 0 then\
                if wNUP3noOQ1t7GYBJ6f3EzzxDl == 20 and Ypk0gKKhrGeBcF0v1e7t9AgtA == 0 then\
                    trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Request Marshal Single', 5)\
                    VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = 1\
                end\
                if wNUP3noOQ1t7GYBJ6f3EzzxDl == 21 and Ypk0gKKhrGeBcF0v1e7t9AgtA == 0 then\
                    trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Request Enter Pattern', 5)\
                    VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = 2\
                end\
                if wNUP3noOQ1t7GYBJ6f3EzzxDl == 22 and Ypk0gKKhrGeBcF0v1e7t9AgtA == 0 then\
                    trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Request Straight-in', 5)\
                    VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = 3\
                end\
                if wNUP3noOQ1t7GYBJ6f3EzzxDl == 23 and Ypk0gKKhrGeBcF0v1e7t9AgtA == 0 then\
                    trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - No Inbound Requested', 5)\
                    VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = 0\
                end\
                if wNUP3noOQ1t7GYBJ6f3EzzxDl == 25 and Ypk0gKKhrGeBcF0v1e7t9AgtA == 0 then\
                    local aZfr76RRoyNlIjM7m85XjgHnA = 250 \
                    local EfYhlpfJhSzugFtizLrqbVrS7 = 0\
                    for ns5czJw83317PX6qWVe25VpYy = 1,#KXFxFgvuNSVLfxo5KMbJO5hGW,1 do\
                        local CCQbcBDOhUtMpwT3Qsmnlr919, vJw83317PX6qWVe25VpYywaXl = LSO.xQ7L6PUpb80mjKaDKGUXfFGS3(ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO],KXFxFgvuNSVLfxo5KMbJO5hGW[ns5czJw83317PX6qWVe25VpYy])\
                        if CCQbcBDOhUtMpwT3Qsmnlr919 <= aZfr76RRoyNlIjM7m85XjgHnA and ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO] ~= KXFxFgvuNSVLfxo5KMbJO5hGW[ns5czJw83317PX6qWVe25VpYy] then\
                            aZfr76RRoyNlIjM7m85XjgHnA = CCQbcBDOhUtMpwT3Qsmnlr919\
                            EfYhlpfJhSzugFtizLrqbVrS7 = ns5czJw83317PX6qWVe25VpYy\
                        end\
                    end\
                    if EfYhlpfJhSzugFtizLrqbVrS7 > 0 then\
                        local AipMWJlfgek2ajC87rei8CaLI = Unit.getPlayerName(Unit.getByName(ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[EfYhlpfJhSzugFtizLrqbVrS7]))\
                        trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' // '..ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[EfYhlpfJhSzugFtizLrqbVrS7]..' '..AipMWJlfgek2ajC87rei8CaLI..' - Request Marshal Sectional', 5)\
                        ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = EfYhlpfJhSzugFtizLrqbVrS7\
                        VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = 1\
                        VMGtRGvLYDDn7E4jAezinSEBt[EfYhlpfJhSzugFtizLrqbVrS7] = 4\
                    elseif EfYhlpfJhSzugFtizLrqbVrS7 == 0 then\
                        trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - No Section Flight Found', 5)\
                        ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = 0\
                        VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] = 0\
                    end\
                end\
            elseif VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] > 0 then\
                if wNUP3noOQ1t7GYBJ6f3EzzxDl ~= 23 and WKMbJO5hGWHrXomUyTCHcHUN9[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == 1 then\
                    if VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == 1 or VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == 4 then\
                        local z4jAezinSEBtPMdD6d9nqI89l = 0\
                        for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
                            if ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] then\
                                z4jAezinSEBtPMdD6d9nqI89l = t83317PX6qWVe25VpYywaXlaZ+1\
                                break\
                            elseif ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == R9WyJKIOfnw6mlEIMC5ofWAD1[t83317PX6qWVe25VpYywaXlaZ] then\
                                z4jAezinSEBtPMdD6d9nqI89l = t83317PX6qWVe25VpYywaXlaZ+1\
                                break\
                            end\
                        end\
                        trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Already Requested Inbound, Marshal Angels '..z4jAezinSEBtPMdD6d9nqI89l, 5)\
                    elseif VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == 2 then\
                        trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Already Requested Enter Pattern', 5)\
                    elseif VMGtRGvLYDDn7E4jAezinSEBt[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == 3 then\
                        trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Already Requested Straight-in', 5)\
                    end\
                elseif wNUP3noOQ1t7GYBJ6f3EzzxDl ~= 23 and WKMbJO5hGWHrXomUyTCHcHUN9[Uc0BwwuAiqzTpoHvyoSr1ZDqO] > 1 then\
                    trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Signal Charlie in Pattern', 5)\
                elseif wNUP3noOQ1t7GYBJ6f3EzzxDl == 23 then\
                    trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[Uc0BwwuAiqzTpoHvyoSr1ZDqO]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' - Reset to Inbound', 5)\
                    LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(Uc0BwwuAiqzTpoHvyoSr1ZDqO,'YCaLIn9ymbsEkj44AL0xVwZky')\
                end\
            end\
        elseif ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO] == nil or ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[Uc0BwwuAiqzTpoHvyoSr1ZDqO] ~= OhMhunJpQxJRM0kCLNYqkTVyG then\
            if wNUP3noOQ1t7GYBJ6f3EzzxDl == 20 or wNUP3noOQ1t7GYBJ6f3EzzxDl == 21 or wNUP3noOQ1t7GYBJ6f3EzzxDl == 22 then\
                trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'Unable to contact Carrier', 5)\
            end\
        end\
    end\
    local pOjO1UgWn4gnjxR9ijvXRqs5c, Dy2kcTxAYwCS5uKueLbaHlGpu = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(fFtizLrqbVrS7o2m6aFrohDz0)\
    if wNUP3noOQ1t7GYBJ6f3EzzxDl == 10 then\
        local jpsiM4VChjIglCOdteYuVTr5q, LkKd4ZdxPf0bDx68L9gpdPZ0Y\
        if it3iiBFIy2kcTxAYwCS5uKueL == 0 then jpsiM4VChjIglCOdteYuVTr5q = 'AM' elseif it3iiBFIy2kcTxAYwCS5uKueL == 1 then jpsiM4VChjIglCOdteYuVTr5q = 'FM' end\
        if scRTiQVc8N3yy4et1o0sOjO1U == nil then scRTiQVc8N3yy4et1o0sOjO1U = 'N/A' end\
        if CjM7m85XjgHnAHCQbcBDOhUtM == nil then CjM7m85XjgHnAHCQbcBDOhUtM = 'N/A' end\
        if sGGEKtkt3iiBFIy2kcTxAYwCS == 1 then LkKd4ZdxPf0bDx68L9gpdPZ0Y = 'I' elseif sGGEKtkt3iiBFIy2kcTxAYwCS == 3 then LkKd4ZdxPf0bDx68L9gpdPZ0Y = 'III' end\
        fIQZzPO7bf5yRIp36v38pk0gK,EhrGeBcF0v1e7t9AgtAvJ4luw,WxXqgcqK2rcoQKjlYmsCp1cdb,Ca3CFipMWJlfgek2ajC87rei8 = LSO.klEIMC5ofWAD1zFVRxNhhOYdK()\
        trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,[[99 - Carrier Air Space \
        Marshal Freq: ]].. string.format('%3.3f',Oc8N3yy4et1o0sOjO1UgWn4gn/1000000) .. [[ Mhz (]] .. jpsiM4VChjIglCOdteYuVTr5q .. [[) \
        LSO Freq: ]].. string.format('%3.3f',ndPZ0Y4wEMnCBUZ2SmEvcRTiQ/1000000) .. [[ Mhz (]] .. jpsiM4VChjIglCOdteYuVTr5q .. [[) \
        Tacan Channel: ]] .. scRTiQVc8N3yy4et1o0sOjO1U .. [[ \
        ICLS Channel: ]] .. CjM7m85XjgHnAHCQbcBDOhUtM .. [[ \
            # of A/C Inbound: ]] .. fIQZzPO7bf5yRIp36v38pk0gK .. [[ \
            # of A/C Marshal: ]] .. EhrGeBcF0v1e7t9AgtAvJ4luw .. [[ \
            # of A/C Holding: ]] .. WxXqgcqK2rcoQKjlYmsCp1cdb .. [[ \
            # of A/C Pattern: ]] .. Ca3CFipMWJlfgek2ajC87rei8 .. [[ \
        Selected Recovery Case : CASE ]] .. LkKd4ZdxPf0bDx68L9gpdPZ0Y, 30) \
    end\
    if wNUP3noOQ1t7GYBJ6f3EzzxDl == 11 then\
        local PdYHeEDaO9SXsXb4pmNdGxsG0 = mwT3Qsmnlr919JfYhlpfJhSzu:getPosition() \
        local gMhunJpQxJRM0kCLNYqkTVyG2, hItE60zCeCJTGistrxZ7fQ54ns, pIVAAkkR1gObMfAPByqMJaQ3a, c0BwwuAiqzTpoHvyoSr1ZDqOD\
        gMhunJpQxJRM0kCLNYqkTVyG2 = 0\
        c0BwwuAiqzTpoHvyoSr1ZDqOD = 0\
        gMhunJpQxJRM0kCLNYqkTVyG2, hItE60zCeCJTGistrxZ7fQ54n = atmosphere.getTemperatureAndPressure(PdYHeEDaO9SXsXb4pmNdGxsG0.p) \
            hItE60zCeCJTGistrxZ7fQ54n = math.floor((env.mission.weather.qnh*c8N3yy4et1o0sOjO1UgWn4gnj*100+0.5))/100 \
        PdYHeEDaO9SXsXb4pmNdGxsG0.p.y = PdYHeEDaO9SXsXb4pmNdGxsG0.p.y+rZuIAWTkKd4ZdxPf0bDx68L9g/cPZ0Y4wEMnCBUZ2SmEvcRTiQV\
        pIVAAkkR1gObMfAPByqMJaQ3a = atmosphere.getWind(PdYHeEDaO9SXsXb4pmNdGxsG0.p)\
            local pvlP7YFkmLjoFBgw11xIWuRtV = math.floor(math.sqrt(pIVAAkkR1gObMfAPByqMJaQ3a.x*pIVAAkkR1gObMfAPByqMJaQ3a.x + pIVAAkkR1gObMfAPByqMJaQ3a.z*pIVAAkkR1gObMfAPByqMJaQ3a.z + pIVAAkkR1gObMfAPByqMJaQ3a.y*pIVAAkkR1gObMfAPByqMJaQ3a.y)*tR9ijvXRqs5czJw83317PX6qW+0.5) \
            local Z97dWNWwLL48b2vNFm03rZ5ly = math.atan2(pIVAAkkR1gObMfAPByqMJaQ3a.z,pIVAAkkR1gObMfAPByqMJaQ3a.x)\
                if Z97dWNWwLL48b2vNFm03rZ5ly < 0 then Z97dWNWwLL48b2vNFm03rZ5ly = Z97dWNWwLL48b2vNFm03rZ5ly + 2 * math.pi end\
            local Z97dWNWwLL48b2vNFm03rZ5ly = math.floor(Z97dWNWwLL48b2vNFm03rZ5ly * iM7m85XjgHnAHCQbcBDOhUtMp+0.5)\
        c0BwwuAiqzTpoHvyoSr1ZDqOD = env.mission.weather.groundTurbulence\
            c0BwwuAiqzTpoHvyoSr1ZDqOD = c0BwwuAiqzTpoHvyoSr1ZDqOD*tR9ijvXRqs5czJw83317PX6qW \
            c0BwwuAiqzTpoHvyoSr1ZDqOD = math.floor(c0BwwuAiqzTpoHvyoSr1ZDqOD+0.5)/10\
        local ahIQZzPO7bf5yRIp36v38pk0g = math.floor(pOjO1UgWn4gnjxR9ijvXRqs5c+0.5)\
        local Z5xXqgcqK2rcoQKjlYmsCp1cd = ahIQZzPO7bf5yRIp36v38pk0g-9\
            if Z5xXqgcqK2rcoQKjlYmsCp1cd < 0 then Z5xXqgcqK2rcoQKjlYmsCp1cd=Z5xXqgcqK2rcoQKjlYmsCp1cd+360 end\
        local sHa3CFipMWJlfgek2ajC87rei,EKhrGeBcF0v1e7t9AgtAvJ4lu\
            sHa3CFipMWJlfgek2ajC87rei,EKhrGeBcF0v1e7t9AgtAvJ4lu = math.modf(hItE60zCeCJTGistrxZ7fQ54n)\
            EKhrGeBcF0v1e7t9AgtAvJ4lu = math.floor(EKhrGeBcF0v1e7t9AgtAvJ4lu*100)\
        trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,[[99 - Weather Condition Advisory \
        Carrier BRC (True): ]]..ahIQZzPO7bf5yRIp36v38pk0g..[[°, for ]]..math.floor(Dy2kcTxAYwCS5uKueLbaHlGpu+0.5)..[[ kts \
        Final Bearing (True): ]]..Z5xXqgcqK2rcoQKjlYmsCp1cd..[[° \
        Winds: ]]..Z97dWNWwLL48b2vNFm03rZ5ly..[[°, for ]]..pvlP7YFkmLjoFBgw11xIWuRtV..[[ ± ]]..c0BwwuAiqzTpoHvyoSr1ZDqOD..[[ kts \
        Altimeter: ]]..sHa3CFipMWJlfgek2ajC87rei..[[.]]..EKhrGeBcF0v1e7t9AgtAvJ4lu.. [[ inHg]], 30)\
    end\
    if wNUP3noOQ1t7GYBJ6f3EzzxDl == 12 then\
        if #K9ijvXRqs5czJw83317PX6qWV == 0 then\
            trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'No Grade Report Available', 30)\
        else\
            local M3Qsmnlr919JfYhlpfJhSzugF = 15\
            local nMWJlfgek2ajC87rei8CaLIn9 = 1\
            if #K9ijvXRqs5czJw83317PX6qWV > M3Qsmnlr919JfYhlpfJhSzugF then\
                nMWJlfgek2ajC87rei8CaLIn9 = #K9ijvXRqs5czJw83317PX6qWV-M3Qsmnlr919JfYhlpfJhSzugF \
            end\
            local ZymbsEkj44AL0xVwZkykhawsT = ''\
            for Jd6TvGGEKtkt3iiBFIy2kcTxA = nMWJlfgek2ajC87rei8CaLIn9,#K9ijvXRqs5czJw83317PX6qWV,1 do\
                ZymbsEkj44AL0xVwZkykhawsT = ZymbsEkj44AL0xVwZkykhawsT..'\\n\\t'..K9ijvXRqs5czJw83317PX6qWV[Jd6TvGGEKtkt3iiBFIy2kcTxA]\
            end\
            trigger.action.outTextForGroup(WsQd6TvGGEKtkt3iiBFIy2kcT,'Grading Report Summary: '..ZymbsEkj44AL0xVwZkykhawsT, 30)\
        end\
    end\
    if wNUP3noOQ1t7GYBJ6f3EzzxDl == 1 then\
        sGGEKtkt3iiBFIy2kcTxAYwCS = 1\
        trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,'Carrier Recovery: CASE I SELECTED', 5)\
    end\
    if wNUP3noOQ1t7GYBJ6f3EzzxDl == 3 then\
        sGGEKtkt3iiBFIy2kcTxAYwCS = 3\
        trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,'Carrier Recovery: CASE III SELECTED', 5)\
    end\
end\
function LSO.B5TIZbQQBB7ix4s3wR5ROH3Zq(vzxDldmWsauyBrVu5MGtRGvLY,gawsTANUP3noOQ1t7GYBJ6f3E)\
    if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
    end\
end\
function LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(r38pk0gKKhrGeBcF0v1e7t9Ag,zzzxDldmWsauyBrVu5MGtRGvL)\
    for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
        if ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] == ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[r38pk0gKKhrGeBcF0v1e7t9Ag] then\
            ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] = 'cGxsG0iItE60zCeCJTGistrxZ'\
            break\
        elseif R9WyJKIOfnw6mlEIMC5ofWAD1[t83317PX6qWVe25VpYywaXlaZ] == ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[r38pk0gKKhrGeBcF0v1e7t9Ag] then\
            R9WyJKIOfnw6mlEIMC5ofWAD1[t83317PX6qWVe25VpYywaXlaZ] = 'PwPbzWPDfpqouc4cM21kpsiM4'\
            break\
        end\
    end\
    if zzzxDldmWsauyBrVu5MGtRGvL == 'YCaLIn9ymbsEkj44AL0xVwZky' then\
        ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[r38pk0gKKhrGeBcF0v1e7t9Ag] = KXFxFgvuNSVLfxo5KMbJO5hGW[r38pk0gKKhrGeBcF0v1e7t9Ag]\
        ksCp1cdbhIQZzPO7bf5yRIp36.ABgw11xIWuRtVhMhunJpQxJRM[r38pk0gKKhrGeBcF0v1e7t9Ag] = JMdD6d9nqI89lwqZiE2pi6IST[r38pk0gKKhrGeBcF0v1e7t9Ag]\
        ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[r38pk0gKKhrGeBcF0v1e7t9Ag] = CrXomUyTCHcHUN95xXqgcqK2r[r38pk0gKKhrGeBcF0v1e7t9Ag]\
        ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
        WKMbJO5hGWHrXomUyTCHcHUN9[r38pk0gKKhrGeBcF0v1e7t9Ag] = 100\
        VMGtRGvLYDDn7E4jAezinSEBt[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
        LCHcHUN95xXqgcqK2rcoQKjlY[r38pk0gKKhrGeBcF0v1e7t9Ag] = {}\
        d25VpYywaXlaZfr76RRoyNlIj[r38pk0gKKhrGeBcF0v1e7t9Ag] = {}\
        LSO.NnhQSvTZ9WyJKIOfnw6mlEIMC('ni6ISTRXFxFgvuNSVLfxo5KMb',JMdD6d9nqI89lwqZiE2pi6IST[r38pk0gKKhrGeBcF0v1e7t9Ag],KXFxFgvuNSVLfxo5KMbJO5hGW[r38pk0gKKhrGeBcF0v1e7t9Ag],coQKjlYmsCp1cdbhIQZzPO7bf[r38pk0gKKhrGeBcF0v1e7t9Ag],r38pk0gKKhrGeBcF0v1e7t9Ag)\
    end\
    knlr919JfYhlpfJhSzugFtizL[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
    NChjIglCOdteYuVTr5q9eIerk[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
    rNSVLfxo5KMbJO5hGWHrXomUy[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
    sT3Qsmnlr919JfYhlpfJhSzug[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
    U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[r38pk0gKKhrGeBcF0v1e7t9Ag] = {}\
    U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[r38pk0gKKhrGeBcF0v1e7t9Ag] = {}\
    pCp1cdbhIQZzPO7bf5yRIp36v[r38pk0gKKhrGeBcF0v1e7t9Ag] = {}\
    for GnCBUZ2SmEvcRTiQVc8N3yy4e = 1,4,1 do\
        U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[r38pk0gKKhrGeBcF0v1e7t9Ag][GnCBUZ2SmEvcRTiQVc8N3yy4e] = 0\
        U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[r38pk0gKKhrGeBcF0v1e7t9Ag][GnCBUZ2SmEvcRTiQVc8N3yy4e] = 0\
        pCp1cdbhIQZzPO7bf5yRIp36v[r38pk0gKKhrGeBcF0v1e7t9Ag][GnCBUZ2SmEvcRTiQVc8N3yy4e] = 0\
    end\
    bqK2rcoQKjlYmsCp1cdbhIQZz.RkCLNYqkTVyG2c0BwwuAiqzTp[r38pk0gKKhrGeBcF0v1e7t9Ag] = 4\
    bqK2rcoQKjlYmsCp1cdbhIQZz.BistrxZ7fQ54nsvlP7YFkmLjo[r38pk0gKKhrGeBcF0v1e7t9Ag] = 4\
    I5hGWHrXomUyTCHcHUN95xXqg.RkCLNYqkTVyG2c0BwwuAiqzTp[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
    I5hGWHrXomUyTCHcHUN95xXqg.BistrxZ7fQ54nsvlP7YFkmLjo[r38pk0gKKhrGeBcF0v1e7t9Ag] = 0\
end\
function LSO.hKaDKGUXfFGS3XwPbzWPDfpqo(cbhIQZzPO7bf5yRIp36v38pk0, yDn7E4jAezinSEBtPMdD6d9nq)\
    if cbhIQZzPO7bf5yRIp36v38pk0 == 0 then\
        if #ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS > 0 then\
            for saXlaZfr76RRoyNlIjM7m85Xj = 1,#ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS,1 do\
                if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] ~= 100 and WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] ~= 999 and Unit.getByName(ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[saXlaZfr76RRoyNlIjM7m85Xj]) ~= nil then\
                    local d7t9AgtAvJ4luwHa3CFipMWJl = ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[saXlaZfr76RRoyNlIjM7m85Xj]\
                    local lQKjlYmsCp1cdbhIQZzPO7bf5, egek2ajC87rei8CaLIn9ymbsE = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(d7t9AgtAvJ4luwHa3CFipMWJl)\
                    local OVe25VpYywaXlaZfr76RRoyNl, fWn4gnjxR9ijvXRqs5czJw833 = LSO.ETtZH158Ys1Bjd0od2ivaaUEb(fFtizLrqbVrS7o2m6aFrohDz0)\
                    local On4gnjxR9ijvXRqs5czJw8331, zZF7N072gBS13eHA9cOWjtgSM = LSO.xQ7L6PUpb80mjKaDKGUXfFGS3(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl)\
                    local uRIp36v38pk0gKKhrGeBcF0v1 = Unit.getByName(d7t9AgtAvJ4luwHa3CFipMWJl)\
                    local oXomUyTCHcHUN95xXqgcqK2rc = uRIp36v38pk0gKKhrGeBcF0v1:getGroup():getID()\
                    local lSEBtPMdD6d9nqI89lwqZiE2p = uRIp36v38pk0gKKhrGeBcF0v1:getPosition()\
                    local ij44AL0xVwZkykhawsTANUP3n = lSEBtPMdD6d9nqI89lwqZiE2p.p.x\
                    local mOQ1t7GYBJ6f3EzzxDldmWsau = lSEBtPMdD6d9nqI89lwqZiE2p.p.z\
                    local PFxFgvuNSVLfxo5KMbJO5hGWH = lSEBtPMdD6d9nqI89lwqZiE2p.p.y*cPZ0Y4wEMnCBUZ2SmEvcRTiQV \
                    local uBrVu5MGtRGvLYDDn7E4jAezi = mwT3Qsmnlr919JfYhlpfJhSzu:getPosition() \
                    local DrKPSIcKl2XJ8WL2eUTEoUlAR, rPzE8URK62tTnupDHYoqBNHgy\
                    DrKPSIcKl2XJ8WL2eUTEoUlAR, rPzE8URK62tTnupDHYoqBNHgy = LSO.WofWAD1zFVRxNhhOYdK8Jcx2x(5)\
                    local T7PX6qWVe25VpYywaXlaZfr76 = DrKPSIcKl2XJ8WL2eUTEoUlAR\
                    local KRoyNlIjM7m85XjgHnAHCQbcB = rPzE8URK62tTnupDHYoqBNHgy\
                    local oqbVrS7o2m6aFrohDz0qU1Wae = rZuIAWTkKd4ZdxPf0bDx68L9g \
                    local PdYHeEDaO9SXsXb4pmNdGxsG0 = uBrVu5MGtRGvLYDDn7E4jAezi\
                        PdYHeEDaO9SXsXb4pmNdGxsG0.p.y = PdYHeEDaO9SXsXb4pmNdGxsG0.p.y+rZuIAWTkKd4ZdxPf0bDx68L9g/cPZ0Y4wEMnCBUZ2SmEvcRTiQV\
                    local gMhunJpQxJRM0kCLNYqkTVyG2, hItE60zCeCJTGistrxZ7fQ54ns, pIVAAkkR1gObMfAPByqMJaQ3a, c0BwwuAiqzTpoHvyoSr1ZDqOD\
                    gMhunJpQxJRM0kCLNYqkTVyG2 = 0\
                    c0BwwuAiqzTpoHvyoSr1ZDqOD = 0\
                    gMhunJpQxJRM0kCLNYqkTVyG2, hItE60zCeCJTGistrxZ7fQ54n = atmosphere.getTemperatureAndPressure(PdYHeEDaO9SXsXb4pmNdGxsG0.p) \
                        hItE60zCeCJTGistrxZ7fQ54n = math.floor((env.mission.weather.qnh*c8N3yy4et1o0sOjO1UgWn4gnj*100+0.5))/100 \
                    pIVAAkkR1gObMfAPByqMJaQ3a = atmosphere.getWind(PdYHeEDaO9SXsXb4pmNdGxsG0.p)\
                        local pvlP7YFkmLjoFBgw11xIWuRtV = math.floor(math.sqrt(pIVAAkkR1gObMfAPByqMJaQ3a.x*pIVAAkkR1gObMfAPByqMJaQ3a.x + pIVAAkkR1gObMfAPByqMJaQ3a.z*pIVAAkkR1gObMfAPByqMJaQ3a.z + pIVAAkkR1gObMfAPByqMJaQ3a.y*pIVAAkkR1gObMfAPByqMJaQ3a.y)*tR9ijvXRqs5czJw83317PX6qW+0.5) \
                        local Z97dWNWwLL48b2vNFm03rZ5ly = math.atan2(pIVAAkkR1gObMfAPByqMJaQ3a.z,pIVAAkkR1gObMfAPByqMJaQ3a.x)\
                            if Z97dWNWwLL48b2vNFm03rZ5ly < 0 then Z97dWNWwLL48b2vNFm03rZ5ly = Z97dWNWwLL48b2vNFm03rZ5ly + 2 * math.pi end\
                            Z97dWNWwLL48b2vNFm03rZ5ly = math.floor(Z97dWNWwLL48b2vNFm03rZ5ly*iM7m85XjgHnAHCQbcBDOhUtMp+0.5)\
                    c0BwwuAiqzTpoHvyoSr1ZDqOD = env.mission.weather.groundTurbulence\
                        c0BwwuAiqzTpoHvyoSr1ZDqOD = c0BwwuAiqzTpoHvyoSr1ZDqOD*tR9ijvXRqs5czJw83317PX6qW \
                        c0BwwuAiqzTpoHvyoSr1ZDqOD = math.floor(c0BwwuAiqzTpoHvyoSr1ZDqOD+0.5)/10\
                    local ArohDz0qU1WaevVX8keN5sQd6 = OVe25VpYywaXlaZfr76RRoyNl\
                    local mfJhSzugFtizLrqbVrS7o2m6a = 360 - ArohDz0qU1WaevVX8keN5sQd6\
                    local QywaXlaZfr76RRoyNlIjM7m85 = 3\
                    local PjgHnAHCQbcBDOhUtMpwT3Qsm = 0 \
                    local q3iiBFIy2kcTxAYwCS5uKueLb = (ij44AL0xVwZkykhawsTANUP3n-T7PX6qWVe25VpYywaXlaZfr76)*math.cos(mfJhSzugFtizLrqbVrS7o2m6a*RuIAWTkKd4ZdxPf0bDx68L9gp)-(mOQ1t7GYBJ6f3EzzxDldmWsau-KRoyNlIjM7m85XjgHnAHCQbcB)*math.sin(mfJhSzugFtizLrqbVrS7o2m6a*RuIAWTkKd4ZdxPf0bDx68L9gp)+QywaXlaZfr76RRoyNlIjM7m85\
                    local X8L9gpdPZ0Y4wEMnCBUZ2SmEv = (ij44AL0xVwZkykhawsTANUP3n-T7PX6qWVe25VpYywaXlaZfr76)*math.sin(mfJhSzugFtizLrqbVrS7o2m6a*RuIAWTkKd4ZdxPf0bDx68L9gp)+(mOQ1t7GYBJ6f3EzzxDldmWsau-KRoyNlIjM7m85XjgHnAHCQbcB)*math.cos(mfJhSzugFtizLrqbVrS7o2m6a*RuIAWTkKd4ZdxPf0bDx68L9gp)+PjgHnAHCQbcBDOhUtMpwT3Qsm\
                    local dxPf0bDx68L9gpdPZ0Y4wEMnC = math.sqrt(q3iiBFIy2kcTxAYwCS5uKueLb*q3iiBFIy2kcTxAYwCS5uKueLb + X8L9gpdPZ0Y4wEMnCBUZ2SmEv*X8L9gpdPZ0Y4wEMnCBUZ2SmEv)*cPZ0Y4wEMnCBUZ2SmEvcRTiQV \
                    local L5uKueLbaHlGpuZuIAWTkKd4Z = math.abs(math.atan(X8L9gpdPZ0Y4wEMnCBUZ2SmEv/q3iiBFIy2kcTxAYwCS5uKueLb)*iM7m85XjgHnAHCQbcBDOhUtMp)\
                    local xHcHUN95xXqgcqK2rcoQKjlYm = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,110,40) \
                    local FYDDn7E4jAezinSEBtPMdD6d9 = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,260,20) \
                    local ajC87rei8CaLIn9ymbsEkj44A = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,300,20) \
                    local JX6qWVe25VpYywaXlaZfr76RR = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,170,20) \
                    local IO7bf5yRIp36v38pk0gKKhrGe = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,180-t68L9gpdPZ0Y4wEMnCBUZ2SmE-45/2,45) \
                    local iykhawsTANUP3noOQ1t7GYBJ6 = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,180-t68L9gpdPZ0Y4wEMnCBUZ2SmE+45/2,45) \
                    local Dw83317PX6qWVe25VpYywaXla = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,180-t68L9gpdPZ0Y4wEMnCBUZ2SmE,15) \
                    local et1o0sOjO1UgWn4gnjxR9ijvX = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,0,180) \
                    local Xo2m6aFrohDz0qU1WaevVX8ke = LSO.FEZF7N072gBS13eHA9cOWjtgS(fFtizLrqbVrS7o2m6aFrohDz0,d7t9AgtAvJ4luwHa3CFipMWJl,180,140) \
                    if sGGEKtkt3iiBFIy2kcTxAYwCS == 1 then\
                        fIQZzPO7bf5yRIp36v38pk0gK,EhrGeBcF0v1e7t9AgtAvJ4luw,WxXqgcqK2rcoQKjlYmsCp1cdb,Ca3CFipMWJlfgek2ajC87rei8 = LSO.klEIMC5ofWAD1zFVRxNhhOYdK()\
                        if uRIp36v38pk0gKKhrGeBcF0v1:getPlayerName() == nil and WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 2 end \
                        if math.floor(timer.getAbsTime()+0.5) >= Y7rei8CaLIn9ymbsEkj44AL0x then Ypk0gKKhrGeBcF0v1e7t9AgtA = 0 end\
                        if math.floor(timer.getAbsTime()+0.5) >= sJ4luwHa3CFipMWJlfgek2ajC then xp1cdbhIQZzPO7bf5yRIp36v3 = 0 end\
                        if Ypk0gKKhrGeBcF0v1e7t9AgtA == 0 and math.floor(timer.getAbsTime()+0.5) >= rLYDDn7E4jAezinSEBtPMdD6d then\
                            local tqZiE2pi6ISTRXFxFgvuNSVLf = ''\
                            for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
                                if ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] == 'cGxsG0iItE60zCeCJTGistrxZ' then\
                                    tqZiE2pi6ISTRXFxFgvuNSVLf = ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ+1]\
                                    break\
                                end\
                            end\
                            if d7t9AgtAvJ4luwHa3CFipMWJl == tqZiE2pi6ISTRXFxFgvuNSVLf then\
                                local z4jAezinSEBtPMdD6d9nqI89l = 0\
                                for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
                                    if d7t9AgtAvJ4luwHa3CFipMWJl == ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] then\
                                        for er76RRoyNlIjM7m85XjgHnAHC = 1,t83317PX6qWVe25VpYywaXlaZ,1 do\
                                            if ZeIerkGC3uXNJXhzYJVnhQSvT[er76RRoyNlIjM7m85XjgHnAHC] == 'cGxsG0iItE60zCeCJTGistrxZ' then\
                                                z4jAezinSEBtPMdD6d9nqI89l = er76RRoyNlIjM7m85XjgHnAHC+1\
                                                ZeIerkGC3uXNJXhzYJVnhQSvT[er76RRoyNlIjM7m85XjgHnAHC] = d7t9AgtAvJ4luwHa3CFipMWJl\
                                                ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] = 'cGxsG0iItE60zCeCJTGistrxZ'\
                                                if z4jAezinSEBtPMdD6d9nqI89l == 3 then\
                                                    local VXjgHnAHCQbcBDOhUtMpwT3Qs, C89lwqZiE2pi6ISTRXFxFgvuN\
                                                    if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                                        R9WyJKIOfnw6mlEIMC5ofWAD1[er76RRoyNlIjM7m85XjgHnAHC] = R9WyJKIOfnw6mlEIMC5ofWAD1[t83317PX6qWVe25VpYywaXlaZ]\
                                                        R9WyJKIOfnw6mlEIMC5ofWAD1[t83317PX6qWVe25VpYywaXlaZ] = 'PwPbzWPDfpqouc4cM21kpsiM4'\
                                                        VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=''},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_PushAngels'},\
                                                                    [3]={lHvyoSr1ZDqODsIVAAkkR1gOb=z4jAezinSEBtPMdD6d9nqI89l,OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                                        C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,1.5,3.8}\
                                                    elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                                        VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_PushAngels'},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=z4jAezinSEBtPMdD6d9nqI89l,OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                                        C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,2.3}\
                                                    end\
                                                    WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                                    for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                                        local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                                        hxR9ijvXRqs5czJw83317PX6q=Oc8N3yy4et1o0sOjO1UgWn4gn\
                                                        timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                                    end\
                                                    Ypk0gKKhrGeBcF0v1e7t9AgtA = 1\
                                                    Y7rei8CaLIn9ymbsEkj44AL0x = math.floor(timer.getAbsTime()+0.5)+2\
                                                end\
                                                rLYDDn7E4jAezinSEBtPMdD6d = math.floor(timer.getAbsTime()+0.5)+15 \
                                                if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..', '..ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]]..' Push to Angels '..z4jAezinSEBtPMdD6d9nqI89l, 5)\
                                                elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Push to Angels '..z4jAezinSEBtPMdD6d9nqI89l, 5)\
                                                end\
                                                break\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                            if VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] == 1 then\
                                local z4jAezinSEBtPMdD6d9nqI89l = 0\
                                for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
                                    if ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] == 'cGxsG0iItE60zCeCJTGistrxZ' then\
                                        ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] = d7t9AgtAvJ4luwHa3CFipMWJl\
                                        if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                            R9WyJKIOfnw6mlEIMC5ofWAD1[t83317PX6qWVe25VpYywaXlaZ] = KXFxFgvuNSVLfxo5KMbJO5hGW[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]] \
                                        end\
                                        z4jAezinSEBtPMdD6d9nqI89l = t83317PX6qWVe25VpYywaXlaZ+1\
                                        break\
                                    end\
                                end\
                                local VXjgHnAHCQbcBDOhUtMpwT3Qs, C89lwqZiE2pi6ISTRXFxFgvuN\
                                if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=''},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Free_Marshal'},\
                                                [3]={lHvyoSr1ZDqODsIVAAkkR1gOb='',OwLL48b2vNFm03rZ5lyXdYHeE='',RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Angels'},[4]={lHvyoSr1ZDqODsIVAAkkR1gOb=z4jAezinSEBtPMdD6d9nqI89l,OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,1.5,3.8,4.2}\
                                elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Free_Marshal'},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb='',OwLL48b2vNFm03rZ5lyXdYHeE='',RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Angels'},\
                                                [3]={lHvyoSr1ZDqODsIVAAkkR1gOb=z4jAezinSEBtPMdD6d9nqI89l,OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,2.3,2.7}\
                                end\
                                WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                    local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    hxR9ijvXRqs5czJw83317PX6q=Oc8N3yy4et1o0sOjO1UgWn4gn\
                                    timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                end\
                                Ypk0gKKhrGeBcF0v1e7t9AgtA = 1\
                                Y7rei8CaLIn9ymbsEkj44AL0x = math.floor(timer.getAbsTime()+0.5)+4\
                                if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..', '..KXFxFgvuNSVLfxo5KMbJO5hGW[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]]..' Freedom Marshal, Angels '..z4jAezinSEBtPMdD6d9nqI89l, 10)\
                                elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Freedom Marshal, Angels '..z4jAezinSEBtPMdD6d9nqI89l, 10)\
                                end\
                                WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 1\
                                WKMbJO5hGWHrXomUyTCHcHUN9[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]] = 1\
                            elseif VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] == 2 or VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] == 3 then\
                                xcF0v1e7t9AgtAvJ4luwHa3CF = LSO.KQBB7ix4s3wR5ROH3Zq7krmAU(d7t9AgtAvJ4luwHa3CFipMWJl,'Radio')\
                                local LxAYwCS5uKueLbaHlGpuZuIAW = 0\
                                local G5sQd6TvGGEKtkt3iiBFIy2kc = 0\
                                for o919JfYhlpfJhSzugFtizLrqb = 1,2,1 do\
                                    for JbcBDOhUtMpwT3Qsmnlr919Jf = 1,#xcF0v1e7t9AgtAvJ4luwHa3CF[o919JfYhlpfJhSzugFtizLrqb].channels do\
                                        if ndPZ0Y4wEMnCBUZ2SmEvcRTiQ/1000000 == xcF0v1e7t9AgtAvJ4luwHa3CF[o919JfYhlpfJhSzugFtizLrqb].channels[JbcBDOhUtMpwT3Qsmnlr919Jf] then\
                                            LxAYwCS5uKueLbaHlGpuZuIAW = JbcBDOhUtMpwT3Qsmnlr919Jf\
                                            G5sQd6TvGGEKtkt3iiBFIy2kc = 1\
                                            break\
                                        end\
                                    end\
                                    if G5sQd6TvGGEKtkt3iiBFIy2kc == 1 then break end\
                                end\
                                rVTr5q9eIerkGC3uXNJXhzYJV = 0\
                                c4cM21kpsiM4VChjIglCOdteY = ''\
                                EaDKGUXfFGS3XwPbzWPDfpqou = ''\
                                if VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] == 2 then\
                                    if WxXqgcqK2rcoQKjlYmsCp1cdb+Ca3CFipMWJlfgek2ajC87rei8 <= oU1WaevVX8keN5sQd6TvGGEKt and EhrGeBcF0v1e7t9AgtAvJ4luw == 0 then\
                                        c4cM21kpsiM4VChjIglCOdteY = 'LSO_Signal(Charlie_p)'\
                                        EaDKGUXfFGS3XwPbzWPDfpqou = 'Pattern'\
                                    else\
                                        rVTr5q9eIerkGC3uXNJXhzYJV = 1\
                                    end\
                                elseif VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] == 3 then\
                                    if WxXqgcqK2rcoQKjlYmsCp1cdb+Ca3CFipMWJlfgek2ajC87rei8 == 0 and EhrGeBcF0v1e7t9AgtAvJ4luw == 0 then\
                                        c4cM21kpsiM4VChjIglCOdteY = 'LSO_Signal(Charlie_s)'\
                                        EaDKGUXfFGS3XwPbzWPDfpqou = 'Straight-in'\
                                    else\
                                        rVTr5q9eIerkGC3uXNJXhzYJV = 1\
                                    end\
                                end\
                                if rVTr5q9eIerkGC3uXNJXhzYJV == 0 then\
                                    if LxAYwCS5uKueLbaHlGpuZuIAW == 0 then\
                                        VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=c4cM21kpsiM4VChjIglCOdteY},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb='',OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Manual'}}\
                                        C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,3.0}\
                                        WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                        for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                            local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                            hxR9ijvXRqs5czJw83317PX6q=Oc8N3yy4et1o0sOjO1UgWn4gn\
                                            timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        end\
                                        Ypk0gKKhrGeBcF0v1e7t9AgtA = 1\
                                        Y7rei8CaLIn9ymbsEkj44AL0x = math.floor(timer.getAbsTime()+0.5)+3\
                                        trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Signal Charlie '..EaDKGUXfFGS3XwPbzWPDfpqou..', Check-in Button Manual', 10)\
                                    else\
                                        VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=c4cM21kpsiM4VChjIglCOdteY},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=LxAYwCS5uKueLbaHlGpuZuIAW,OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                        C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,3.0}\
                                        WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                        for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                            local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                            hxR9ijvXRqs5czJw83317PX6q=Oc8N3yy4et1o0sOjO1UgWn4gn\
                                            timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        end\
                                        Ypk0gKKhrGeBcF0v1e7t9AgtA = 1\
                                        Y7rei8CaLIn9ymbsEkj44AL0x = math.floor(timer.getAbsTime()+0.5)+4\
                                        trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Signal Charlie '..EaDKGUXfFGS3XwPbzWPDfpqou..', Check-in Button '..LxAYwCS5uKueLbaHlGpuZuIAW, 10)\
                                    end\
                                    if VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] == 2 then \
                                        WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 2\
                                    elseif VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] == 3 then \
                                        WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 50 \
                                    end\
                                elseif rVTr5q9eIerkGC3uXNJXhzYJV == 1 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Signal(Delta)'}}\
                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01}\
                                    WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                    for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                        local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        hxR9ijvXRqs5czJw83317PX6q=Oc8N3yy4et1o0sOjO1UgWn4gn\
                                        timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    end\
                                    Ypk0gKKhrGeBcF0v1e7t9AgtA = 1\
                                    Y7rei8CaLIn9ymbsEkj44AL0x = math.floor(timer.getAbsTime()+0.5)+3\
                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Signal Delta, Request Marshal', 10)\
                                    WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 0\
                                    VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] = 0\
                                end\
                            end\
                        end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 1 then\
                            for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
                                if ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] == d7t9AgtAvJ4luwHa3CFipMWJl then\
                                    z4jAezinSEBtPMdD6d9nqI89l = t83317PX6qWVe25VpYywaXlaZ+1\
                                    break\
                                end\
                            end\
                            if ajC87rei8CaLIn9ymbsEkj44A == 1 then\
                                local F0xVwZkykhawsTANUP3noOQ1t = OVe25VpYywaXlaZfr76RRoyNl-120\
                                    if F0xVwZkykhawsTANUP3noOQ1t < 0 then F0xVwZkykhawsTANUP3noOQ1t=F0xVwZkykhawsTANUP3noOQ1t+360 end\
                                local XGYBJ6f3EzzxDldmWsauyBrVu = uRIp36v38pk0gKKhrGeBcF0v1:getVelocity()\
                                local jr919JfYhlpfJhSzugFtizLrq = Unit.getFuel(uRIp36v38pk0gKKhrGeBcF0v1)\
                                local igHnAHCQbcBDOhUtMpwT3Qsmn = Unit.getFuel(uRIp36v38pk0gKKhrGeBcF0v1)\
                                local bVrS7o2m6aFrohDz0qU1WaevV = 20\
                                for k6aFrohDz0qU1WaevVX8keN5s = 1,#ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS,1 do\
                                    if WKMbJO5hGWHrXomUyTCHcHUN9[k6aFrohDz0qU1WaevVX8keN5s] == 1 and k6aFrohDz0qU1WaevVX8keN5s ~= ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] then \
                                        bVrS7o2m6aFrohDz0qU1WaevV = Unit.getFuel(Unit.getByName(ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[k6aFrohDz0qU1WaevVX8keN5s]))\
                                        local uwaXlaZfr76RRoyNlIjM7m85X, Kqs5czJw83317PX6qWVe25VpY = LSO.xQ7L6PUpb80mjKaDKGUXfFGS3(fFtizLrqbVrS7o2m6aFrohDz0,ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS[k6aFrohDz0qU1WaevVX8keN5s])\
                                        if bVrS7o2m6aFrohDz0qU1WaevV <= 0.25 and bVrS7o2m6aFrohDz0qU1WaevV < igHnAHCQbcBDOhUtMpwT3Qsmn and uwaXlaZfr76RRoyNlIjM7m85X <= vPO7bf5yRIp36v38pk0gKKhrG*6 then\
                                            igHnAHCQbcBDOhUtMpwT3Qsmn = bVrS7o2m6aFrohDz0qU1WaevV\
                                        end\
                                    end\
                                end\
                                local tqZiE2pi6ISTRXFxFgvuNSVLf = ''\
                                for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
                                    if ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] ~= 'cGxsG0iItE60zCeCJTGistrxZ' then\
                                        tqZiE2pi6ISTRXFxFgvuNSVLf = ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ]\
                                        break\
                                    end\
                                end\
                                if timer.getAbsTime() >= e3EzzxDldmWsauyBrVu5MGtRG and math.abs(lQKjlYmsCp1cdbhIQZzPO7bf5-F0xVwZkykhawsTANUP3noOQ1t) <= 20 and dxPf0bDx68L9gpdPZ0Y4wEMnC >= vPO7bf5yRIp36v38pk0gKKhrG*4 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*6 and math.abs(PFxFgvuNSVLfxo5KMbJO5hGWH-z4jAezinSEBtPMdD6d9nqI89l*1000) <= 500 and math.abs(XGYBJ6f3EzzxDldmWsauyBrVu.y*cPZ0Y4wEMnCBUZ2SmEvcRTiQV*60) <= 1000 then                                 \
                                    if WxXqgcqK2rcoQKjlYmsCp1cdb+Ca3CFipMWJlfgek2ajC87rei8 <= oU1WaevVX8keN5sQd6TvGGEKt and d7t9AgtAvJ4luwHa3CFipMWJl == tqZiE2pi6ISTRXFxFgvuNSVLf then\
                                        xcF0v1e7t9AgtAvJ4luwHa3CF = LSO.KQBB7ix4s3wR5ROH3Zq7krmAU(d7t9AgtAvJ4luwHa3CFipMWJl,'Radio')\
                                        local LxAYwCS5uKueLbaHlGpuZuIAW = 0\
                                        local G5sQd6TvGGEKtkt3iiBFIy2kc = 0\
                                        for o919JfYhlpfJhSzugFtizLrqb = 1,2,1 do\
                                            for JbcBDOhUtMpwT3Qsmnlr919Jf = 1,#xcF0v1e7t9AgtAvJ4luwHa3CF[o919JfYhlpfJhSzugFtizLrqb].channels do\
                                                if ndPZ0Y4wEMnCBUZ2SmEvcRTiQ/1000000 == xcF0v1e7t9AgtAvJ4luwHa3CF[o919JfYhlpfJhSzugFtizLrqb].channels[JbcBDOhUtMpwT3Qsmnlr919Jf] then\
                                                    LxAYwCS5uKueLbaHlGpuZuIAW = JbcBDOhUtMpwT3Qsmnlr919Jf\
                                                    G5sQd6TvGGEKtkt3iiBFIy2kc = 1\
                                                    break\
                                                end\
                                            end\
                                            if G5sQd6TvGGEKtkt3iiBFIy2kc == 1 then break end\
                                        end\
                                        for t83317PX6qWVe25VpYywaXlaZ = 1,#ZeIerkGC3uXNJXhzYJVnhQSvT,1 do\
                                            local BC3uXNJXhzYJVnhQSvTZ9WyJK = 0 \
                                            if ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] == d7t9AgtAvJ4luwHa3CFipMWJl then\
                                                ZeIerkGC3uXNJXhzYJVnhQSvT[t83317PX6qWVe25VpYywaXlaZ] = 'cGxsG0iItE60zCeCJTGistrxZ'\
                                                R9WyJKIOfnw6mlEIMC5ofWAD1[t83317PX6qWVe25VpYywaXlaZ] = 'PwPbzWPDfpqouc4cM21kpsiM4' \
                                                BC3uXNJXhzYJVnhQSvTZ9WyJK = t83317PX6qWVe25VpYywaXlaZ\
                                                break\
                                            end\
                                        end\
                                        if Ypk0gKKhrGeBcF0v1e7t9AgtA == 0 then\
                                            if LxAYwCS5uKueLbaHlGpuZuIAW == 0 then\
                                                local VXjgHnAHCQbcBDOhUtMpwT3Qs, C89lwqZiE2pi6ISTRXFxFgvuN\
                                                if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=''},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Signal(Charlie_p)'},\
                                                                [3]={lHvyoSr1ZDqODsIVAAkkR1gOb='',OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Manual'}}\
                                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,1.5,4.5}\
                                                elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Signal(Charlie_p)'},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb='',OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Manual'}}\
                                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,3.0}\
                                                end\
                                                WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                                for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                                    local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                                    hxR9ijvXRqs5czJw83317PX6q=Oc8N3yy4et1o0sOjO1UgWn4gn\
                                                    timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                                end\
                                                Ypk0gKKhrGeBcF0v1e7t9AgtA = 1\
                                                Y7rei8CaLIn9ymbsEkj44AL0x = math.floor(timer.getAbsTime()+0.5)+3\
                                                if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..', '..ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]]..' Signal Charlie Pattern, Check-in Button Manual', 10)\
                                                elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Signal Charlie Pattern, Check-in Button Manual', 10)\
                                                end\
                                            else\
                                                local VXjgHnAHCQbcBDOhUtMpwT3Qs, C89lwqZiE2pi6ISTRXFxFgvuN\
                                                if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=''},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Signal(Charlie_p)'},\
                                                                [3]={lHvyoSr1ZDqODsIVAAkkR1gOb=LxAYwCS5uKueLbaHlGpuZuIAW,OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,1.5,4.5}\
                                                elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Signal(Charlie_p)'},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=LxAYwCS5uKueLbaHlGpuZuIAW,OwLL48b2vNFm03rZ5lyXdYHeE=1,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,3.0}\
                                                end\
                                                WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                                for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                                    local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                                    hxR9ijvXRqs5czJw83317PX6q=Oc8N3yy4et1o0sOjO1UgWn4gn\
                                                    timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                                end\
                                                Ypk0gKKhrGeBcF0v1e7t9AgtA = 1\
                                                Y7rei8CaLIn9ymbsEkj44AL0x = math.floor(timer.getAbsTime()+0.5)+4\
                                                if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..', '..ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]]..' Signal Charlie Pattern, Check-in Button '..LxAYwCS5uKueLbaHlGpuZuIAW, 5)\
                                                elseif ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                                                    trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Signal Charlie Pattern, Check-in Button '..LxAYwCS5uKueLbaHlGpuZuIAW, 5)\
                                                end\
                                            end\
                                            e3EzzxDldmWsauyBrVu5MGtRG = math.floor(timer.getAbsTime()+0.5)+90\
                                            rLYDDn7E4jAezinSEBtPMdD6d = math.floor(timer.getAbsTime()+0.5)+15 \
                                            WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 2\
                                            if ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj] ~= 0 then \
                                                WKMbJO5hGWHrXomUyTCHcHUN9[ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN[saXlaZfr76RRoyNlIjM7m85Xj]] = 2\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 2 then\
                            if xHcHUN95xXqgcqK2rcoQKjlYm == 1 then\
                                if dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*1 and PFxFgvuNSVLfxo5KMbJO5hGWH > oqbVrS7o2m6aFrohDz0qU1Wae+5 and PFxFgvuNSVLfxo5KMbJO5hGWH <= 1100 then\
                                    if xp1cdbhIQZzPO7bf5yRIp36v3 == 0 then\
                                        trigger.action.radioTransmission('Alerax_LSO_AI_Script/LSO_Clear.ogg', uBrVu5MGtRGvLYDDn7E4jAezi.p, it3iiBFIy2kcTxAYwCS5uKueL, false, ndPZ0Y4wEMnCBUZ2SmEvcRTiQ, 100)\
                                        xp1cdbhIQZzPO7bf5yRIp36v3 = 1\
                                        sJ4luwHa3CFipMWJlfgek2ajC = math.floor(timer.getAbsTime()+0.5)+0.5\
                                        if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                            trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,'Check-in Clear', 5)\
                                        end\
                                        WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 6\
                                    end\
                                end\
                            end\
                        end\
                        local ei8CaLIn9ymbsEkj44AL0xVwZ\
                        if uRIp36v38pk0gKKhrGeBcF0v1:getPlayerName() ~= nil then \
                            ei8CaLIn9ymbsEkj44AL0xVwZ = 30 \
                        else\
                            ei8CaLIn9ymbsEkj44AL0xVwZ = 20 \
                        end\
                        local RgKKhrGeBcF0v1e7t9AgtAvJ4 = 0\
                        for juwHa3CFipMWJlfgek2ajC87r = 1,#WKMbJO5hGWHrXomUyTCHcHUN9,1 do\
                            if WKMbJO5hGWHrXomUyTCHcHUN9[juwHa3CFipMWJlfgek2ajC87r] == 50 then\
                                RgKKhrGeBcF0v1e7t9AgtAvJ4 = 1\
                            end\
                        end\
                        if RgKKhrGeBcF0v1e7t9AgtAvJ4 == 1 then NChjIglCOdteYuVTr5q9eIerk[saXlaZfr76RRoyNlIjM7m85Xj] = NChjIglCOdteYuVTr5q9eIerk[saXlaZfr76RRoyNlIjM7m85Xj] + 1 end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 6 then\
                            if FYDDn7E4jAezinSEBtPMdD6d9 == 1 then\
                                if NChjIglCOdteYuVTr5q9eIerk[saXlaZfr76RRoyNlIjM7m85Xj] < ei8CaLIn9ymbsEkj44AL0xVwZ/LVLfxo5KMbJO5hGWHrXomUyTC and NChjIglCOdteYuVTr5q9eIerk[saXlaZfr76RRoyNlIjM7m85Xj] > 0 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*2.0 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_WaveOff(Intvl)'}}\
                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01}\
                                    WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                    for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                        local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                        timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    end\
                                    LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'WOP INT'\
                                    LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                                    if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                        trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' Incorrect interval, wave off starboard side', 5)\
                                    end\
                                    WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 99 \
                                elseif dxPf0bDx68L9gpdPZ0Y4wEMnC < vPO7bf5yRIp36v38pk0gKKhrG*1.05 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_WaveOff(TCA)'}}\
                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01}\
                                    WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                    for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                        local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                        timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    end\
                                    LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'WOP TCA'\
                                    LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                                    if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                        trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' You are too close abeam, wave off starboard side', 5)\
                                    end\
                                    WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 99 \
                                elseif dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*1.55 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*2.0 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_WaveOff(TWA)'}}\
                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01}\
                                    WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                    for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                        local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                        timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    end\
                                    LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'WOP TWA'\
                                    LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                                    if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                        trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' You are too wide abeam, wave off starboard side', 5)\
                                    end\
                                    WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 99 \
                                elseif dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*2.0 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*4.0 then\
                                    LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'Spin Pattern'\
                                    LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                                    if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                        trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' in Spin Pattern', 5)\
                                    end\
                                    WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 2 \
                                elseif dxPf0bDx68L9gpdPZ0Y4wEMnC >= vPO7bf5yRIp36v38pk0gKKhrG*1.05 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*1.55 then\
                                    if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                        trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,'Port Checkpoint: Passed', 30)\
                                    end\
                                    for juwHa3CFipMWJlfgek2ajC87r = 1,#WKMbJO5hGWHrXomUyTCHcHUN9,1 do\
                                        NChjIglCOdteYuVTr5q9eIerk[juwHa3CFipMWJlfgek2ajC87r] = 0\
                                    end\
                                    WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 50\
                                end\
                            end\
                        end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 50 and VMGtRGvLYDDn7E4jAezinSEBt[saXlaZfr76RRoyNlIjM7m85Xj] ~= 3 then\
                            if JX6qWVe25VpYywaXlaZfr76RR == 1 then\
                                if dxPf0bDx68L9gpdPZ0Y4wEMnC >= vPO7bf5yRIp36v38pk0gKKhrG*1.1 then\
                                    if uRIp36v38pk0gKKhrGeBcF0v1:getPlayerName() ~= nil then \
                                        VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_LongInGroove'}}\
                                        C89lwqZiE2pi6ISTRXFxFgvuN = {0.01}\
                                        WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                        for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                            local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                            hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                            timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        end\
                                        LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'WOP LIG'\
                                        LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                                        if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                            trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' You are long in the groove, wave off starboard side', 5)\
                                        end\
                                        WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 99 \
                                    end\
                                end\
                            end\
                        end\
                    end\
                    if sGGEKtkt3iiBFIy2kcTxAYwCS == 3 then\
                        local u4et1o0sOjO1UgWn4gnjxR9ij = {-30,-15,0,15,30} \
                        local VwEMnCBUZ2SmEvcRTiQVc8N3y = {6000,7000,8000,9000,10000} \
                        local rXRqs5czJw83317PX6qWVe25V = {21,22,23,24,25} \
                        local HjO1UgWn4gnjxR9ijvXRqs5cz = OVe25VpYywaXlaZfr76RRoyNl - t68L9gpdPZ0Y4wEMnCBUZ2SmE\
                        if HjO1UgWn4gnjxR9ijvXRqs5cz < 0 then HjO1UgWn4gnjxR9ijvXRqs5cz=HjO1UgWn4gnjxR9ijvXRqs5cz+360 end\
                        if HjO1UgWn4gnjxR9ijvXRqs5cz > 360 then HjO1UgWn4gnjxR9ijvXRqs5cz=HjO1UgWn4gnjxR9ijvXRqs5cz-360 end\
                        HjO1UgWn4gnjxR9ijvXRqs5cz = math.floor(HjO1UgWn4gnjxR9ijvXRqs5cz + 0.5)\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                            if Xo2m6aFrohDz0qU1WaevVX8ke == 1 and dxPf0bDx68L9gpdPZ0Y4wEMnC >= vPO7bf5yRIp36v38pk0gKKhrG*15 and dxPf0bDx68L9gpdPZ0Y4wEMnC < vPO7bf5yRIp36v38pk0gKKhrG*20 and PFxFgvuNSVLfxo5KMbJO5hGWH <= 5000 then\
                                VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Free_Approach'},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=HjO1UgWn4gnjxR9ijvXRqs5cz,OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,3}\
                                WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                    local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                    timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                end\
                                WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 3\
                            end\
                        end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 3 then\
                            if Xo2m6aFrohDz0qU1WaevVX8ke == 1 and dxPf0bDx68L9gpdPZ0Y4wEMnC < vPO7bf5yRIp36v38pk0gKKhrG*15 then\
                                local Cp36v38pk0gKKhrGeBcF0v1e7 = 0\
                                if IO7bf5yRIp36v38pk0gKKhrGe == 1 then\
                                    Cp36v38pk0gKKhrGeBcF0v1e7 = OVe25VpYywaXlaZfr76RRoyNl-(180-L5uKueLbaHlGpuZuIAWTkKd4Z+t68L9gpdPZ0Y4wEMnCBUZ2SmE)/2\
                                elseif iykhawsTANUP3noOQ1t7GYBJ6 == 1 then\
                                    Cp36v38pk0gKKhrGeBcF0v1e7 = OVe25VpYywaXlaZfr76RRoyNl+(180-L5uKueLbaHlGpuZuIAWTkKd4Z-t68L9gpdPZ0Y4wEMnCBUZ2SmE)/2\
                                elseif Dw83317PX6qWVe25VpYywaXla == 1 then\
                                    Cp36v38pk0gKKhrGeBcF0v1e7 = OVe25VpYywaXlaZfr76RRoyNl\
                                end\
                                if Cp36v38pk0gKKhrGeBcF0v1e7 < 0 then Cp36v38pk0gKKhrGeBcF0v1e7=Cp36v38pk0gKKhrGeBcF0v1e7+360 end\
                                if Cp36v38pk0gKKhrGeBcF0v1e7 > 360 then Cp36v38pk0gKKhrGeBcF0v1e7=Cp36v38pk0gKKhrGeBcF0v1e7-360 end\
                                Cp36v38pk0gKKhrGeBcF0v1e7 = math.floor(Cp36v38pk0gKKhrGeBcF0v1e7 + 0.5)\
                                if Dw83317PX6qWVe25VpYywaXla == 1 then\
                                elseif IO7bf5yRIp36v38pk0gKKhrGe == 1 or iykhawsTANUP3noOQ1t7GYBJ6 == 1 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Heading(Turn)'},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=Cp36v38pk0gKKhrGeBcF0v1e7,OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Radial'}}\
                                    C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,2.5}\
                                    WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                    for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                        local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                        hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                        timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    end\
                                end\
                                WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 4\
                            end\
                        end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 4 then\
                            if dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*15 and Dw83317PX6qWVe25VpYywaXla == 1 then\
                                local p9AgtAvJ4luwHa3CFipMWJlfg = HjO1UgWn4gnjxR9ijvXRqs5cz\
                                VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Final(Fly)'},[2]={lHvyoSr1ZDqODsIVAAkkR1gOb=p9AgtAvJ4luwHa3CFipMWJlfg,OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ=''}}\
                                C89lwqZiE2pi6ISTRXFxFgvuN = {0.01,3}\
                                WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                    local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                    timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                end\
                                WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 6\
                            end\
                        end\
                        if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 6 then\
                            if Dw83317PX6qWVe25VpYywaXla == 1 and dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*2 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*3 and PFxFgvuNSVLfxo5KMbJO5hGWH > 1000 and PFxFgvuNSVLfxo5KMbJO5hGWH <= 1400 then    \
                                VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Approach'}}\
                                C89lwqZiE2pi6ISTRXFxFgvuN = {0.01}\
                                WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                    local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                    timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                end\
                                WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 50\
                            end\
                        end\
                    end\
                    if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 50 and Xo2m6aFrohDz0qU1WaevVX8ke == 1 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*0.75 and PFxFgvuNSVLfxo5KMbJO5hGWH > oqbVrS7o2m6aFrohDz0qU1Wae+5 then\
                        local NjGzmY997dWNWwLL48b2vNFm0 = 0 \
                        if knlr919JfYhlpfJhSzugFtizL[saXlaZfr76RRoyNlIjM7m85Xj] == 0 and sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] == 0 then\
                            trigger.action.radioTransmission('Alerax_LSO_AI_Script/LSO_CallTheBall.ogg', uBrVu5MGtRGvLYDDn7E4jAezi.p, it3iiBFIy2kcTxAYwCS5uKueL, false, ndPZ0Y4wEMnCBUZ2SmEvcRTiQ, 100)\
                            knlr919JfYhlpfJhSzugFtizL[saXlaZfr76RRoyNlIjM7m85Xj] = 1\
                        end\
                        if knlr919JfYhlpfJhSzugFtizL[saXlaZfr76RRoyNlIjM7m85Xj] == 1 and sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] == 4/LVLfxo5KMbJO5hGWHrXomUyTC then\
                            trigger.action.radioTransmission('Alerax_LSO_AI_Script/LSO_Roger.ogg', uBrVu5MGtRGvLYDDn7E4jAezi.p, it3iiBFIy2kcTxAYwCS5uKueL, false, ndPZ0Y4wEMnCBUZ2SmEvcRTiQ, 100)\
                            knlr919JfYhlpfJhSzugFtizL[saXlaZfr76RRoyNlIjM7m85Xj] = 2\
                        end\
                        local MvGGEKtkt3iiBFIy2kcTxAYwC = t68L9gpdPZ0Y4wEMnCBUZ2SmE \
                        local jaZfr76RRoyNlIjM7m85XjgHn = 1.5 \
                        local czJw83317PX6qWVe25VpYywaX = 3.0 \
                        local Xv38pk0gKKhrGeBcF0v1e7t9A = dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(MvGGEKtkt3iiBFIy2kcTxAYwC*RuIAWTkKd4ZdxPf0bDx68L9gp)\
                        local xUZ2SmEvcRTiQVc8N3yy4et1o = Xv38pk0gKKhrGeBcF0v1e7t9A - dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(czJw83317PX6qWVe25VpYywaX*RuIAWTkKd4ZdxPf0bDx68L9gp)/2 - 25\
                        local RsOjO1UgWn4gnjxR9ijvXRqs5 = Xv38pk0gKKhrGeBcF0v1e7t9A - dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(jaZfr76RRoyNlIjM7m85XjgHn*RuIAWTkKd4ZdxPf0bDx68L9gp)/2 - 20\
                        local ZJfYhlpfJhSzugFtizLrqbVrS = Xv38pk0gKKhrGeBcF0v1e7t9A + dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(jaZfr76RRoyNlIjM7m85XjgHn*RuIAWTkKd4ZdxPf0bDx68L9gp)/2 + 20\
                        local wHCQbcBDOhUtMpwT3Qsmnlr91 = Xv38pk0gKKhrGeBcF0v1e7t9A + dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(czJw83317PX6qWVe25VpYywaX*RuIAWTkKd4ZdxPf0bDx68L9gp)/2 + 25\
                        local xDOhUtMpwT3Qsmnlr919JfYhl = dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(L5uKueLbaHlGpuZuIAWTkKd4Z*RuIAWTkKd4ZdxPf0bDx68L9gp)\
                        local uTCHcHUN95xXqgcqK2rcoQKjl = 0\
                        local G7m85XjgHnAHCQbcBDOhUtMpw = 0\
                        local QmsCp1cdbhIQZzPO7bf5yRIp3 = {'RightLineUp(L)','RightLineUp(S)','--','ComeLeft(S)','ComeLeft(L)'}\
                        if xDOhUtMpwT3Qsmnlr919JfYhl <= xUZ2SmEvcRTiQVc8N3yy4et1o  then\
                            uTCHcHUN95xXqgcqK2rcoQKjl,G7m85XjgHnAHCQbcBDOhUtMpw,NjGzmY997dWNWwLL48b2vNFm0 = 1,2,1\
                        elseif xDOhUtMpwT3Qsmnlr919JfYhl <= RsOjO1UgWn4gnjxR9ijvXRqs5 and xDOhUtMpwT3Qsmnlr919JfYhl > xUZ2SmEvcRTiQVc8N3yy4et1o then\
                            uTCHcHUN95xXqgcqK2rcoQKjl,G7m85XjgHnAHCQbcBDOhUtMpw,NjGzmY997dWNWwLL48b2vNFm0 = 2,3,0\
                        elseif xDOhUtMpwT3Qsmnlr919JfYhl >= ZJfYhlpfJhSzugFtizLrqbVrS and xDOhUtMpwT3Qsmnlr919JfYhl < wHCQbcBDOhUtMpwT3Qsmnlr91 then\
                            uTCHcHUN95xXqgcqK2rcoQKjl,G7m85XjgHnAHCQbcBDOhUtMpw,NjGzmY997dWNWwLL48b2vNFm0 = 4,3,0\
                        elseif xDOhUtMpwT3Qsmnlr919JfYhl >= wHCQbcBDOhUtMpwT3Qsmnlr91 then\
                            uTCHcHUN95xXqgcqK2rcoQKjl,G7m85XjgHnAHCQbcBDOhUtMpw,NjGzmY997dWNWwLL48b2vNFm0 = 5,2,1\
                        else\
                            uTCHcHUN95xXqgcqK2rcoQKjl,G7m85XjgHnAHCQbcBDOhUtMpw,NjGzmY997dWNWwLL48b2vNFm0 = 3,4,0\
                        end\
                        local u2kcTxAYwCS5uKueLbaHlGpuZ = 3.6 \
                        local IZ0Y4wEMnCBUZ2SmEvcRTiQVc = 0.9 \
                        local rIAWTkKd4ZdxPf0bDx68L9gpd = 1.8 \
                        local A9HifUG5TIZbQQBB7ix4s3wR5 = dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(u2kcTxAYwCS5uKueLbaHlGpuZ*RuIAWTkKd4ZdxPf0bDx68L9gp)+oqbVrS7o2m6aFrohDz0qU1Wae\
                        local KOH3Zq7krmAUVlny0Ddv8gDMA = A9HifUG5TIZbQQBB7ix4s3wR5 + dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(rIAWTkKd4ZdxPf0bDx68L9gpd*RuIAWTkKd4ZdxPf0bDx68L9gp)*5/9 + 0\
                        local b664aSKTtZH158Ys1Bjd0od2i = A9HifUG5TIZbQQBB7ix4s3wR5 + dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(IZ0Y4wEMnCBUZ2SmEvcRTiQVc*RuIAWTkKd4ZdxPf0bDx68L9gp)/2 + 0\
                        local PfFGS3XwPbzWPDfpqouc4cM21 = A9HifUG5TIZbQQBB7ix4s3wR5 - dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(IZ0Y4wEMnCBUZ2SmEvcRTiQVc*RuIAWTkKd4ZdxPf0bDx68L9gp)/2 - 0\
                        local raaUEbBQ7L6PUpb80mjKaDKGU = A9HifUG5TIZbQQBB7ix4s3wR5 - dxPf0bDx68L9gpdPZ0Y4wEMnC*math.tan(rIAWTkKd4ZdxPf0bDx68L9gpd*RuIAWTkKd4ZdxPf0bDx68L9gp)*4/9 - 0\
                        local ghOYdK8Jcx2xLEZF7N072gBS1 = 0\
                        local YN3yy4et1o0sOjO1UgWn4gnjx = 0\
                        local UeHA9cOWjtgSMNLRzHQ9FEXLP = {'High(L)','High(S)','--','Power(S)','Power(L)'}\
                        if PFxFgvuNSVLfxo5KMbJO5hGWH >= KOH3Zq7krmAUVlny0Ddv8gDMA then\
                            ghOYdK8Jcx2xLEZF7N072gBS1,YN3yy4et1o0sOjO1UgWn4gnjx,NjGzmY997dWNWwLL48b2vNFm0 = 1,2,1\
                        elseif PFxFgvuNSVLfxo5KMbJO5hGWH >= b664aSKTtZH158Ys1Bjd0od2i and PFxFgvuNSVLfxo5KMbJO5hGWH < KOH3Zq7krmAUVlny0Ddv8gDMA then\
                            ghOYdK8Jcx2xLEZF7N072gBS1,YN3yy4et1o0sOjO1UgWn4gnjx,NjGzmY997dWNWwLL48b2vNFm0 = 2,3,0\
                        elseif PFxFgvuNSVLfxo5KMbJO5hGWH <= PfFGS3XwPbzWPDfpqouc4cM21 and PFxFgvuNSVLfxo5KMbJO5hGWH > raaUEbBQ7L6PUpb80mjKaDKGU then\
                            ghOYdK8Jcx2xLEZF7N072gBS1,YN3yy4et1o0sOjO1UgWn4gnjx,NjGzmY997dWNWwLL48b2vNFm0 = 4,3,0\
                        elseif PFxFgvuNSVLfxo5KMbJO5hGWH <= raaUEbBQ7L6PUpb80mjKaDKGU then\
                            ghOYdK8Jcx2xLEZF7N072gBS1,YN3yy4et1o0sOjO1UgWn4gnjx,NjGzmY997dWNWwLL48b2vNFm0 = 5,2,1\
                        else\
                            ghOYdK8Jcx2xLEZF7N072gBS1,YN3yy4et1o0sOjO1UgWn4gnjx,NjGzmY997dWNWwLL48b2vNFm0 = 3,4,0\
                        end\
                        local tVwZkykhawsTANUP3noOQ1t7G = {0.75,0.45,0.15,0.10}\
                        for GnCBUZ2SmEvcRTiQVc8N3yy4e = 1,#tVwZkykhawsTANUP3noOQ1t7G,1 do\
                            if dxPf0bDx68L9gpdPZ0Y4wEMnC >= vPO7bf5yRIp36v38pk0gKKhrG*(tVwZkykhawsTANUP3noOQ1t7G[GnCBUZ2SmEvcRTiQVc8N3yy4e]-0.05) and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*tVwZkykhawsTANUP3noOQ1t7G[GnCBUZ2SmEvcRTiQVc8N3yy4e] then\
                                pCp1cdbhIQZzPO7bf5yRIp36v[saXlaZfr76RRoyNlIjM7m85Xj][GnCBUZ2SmEvcRTiQVc8N3yy4e] = pCp1cdbhIQZzPO7bf5yRIp36v[saXlaZfr76RRoyNlIjM7m85Xj][GnCBUZ2SmEvcRTiQVc8N3yy4e] + 1\
                                U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj][GnCBUZ2SmEvcRTiQVc8N3yy4e] = U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj][GnCBUZ2SmEvcRTiQVc8N3yy4e] + uTCHcHUN95xXqgcqK2rcoQKjl\
                                U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj][GnCBUZ2SmEvcRTiQVc8N3yy4e] = U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj][GnCBUZ2SmEvcRTiQVc8N3yy4e] + ghOYdK8Jcx2xLEZF7N072gBS1\
                            end\
                        end\
                        if dxPf0bDx68L9gpdPZ0Y4wEMnC >= vPO7bf5yRIp36v38pk0gKKhrG*0.1 then\
                            rNSVLfxo5KMbJO5hGWHrXomUy[saXlaZfr76RRoyNlIjM7m85Xj] =  rNSVLfxo5KMbJO5hGWHrXomUy[saXlaZfr76RRoyNlIjM7m85Xj] + YN3yy4et1o0sOjO1UgWn4gnjx + G7m85XjgHnAHCQbcBDOhUtMpw\
                            sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] = sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] + 1\
                        end\
                        if dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*0.15 and G7m85XjgHnAHCQbcBDOhUtMpw < bqK2rcoQKjlYmsCp1cdbhIQZz.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj] and sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] >= VjAezinSEBtPMdD6d9nqI89lw then\
                            nZiE2pi6ISTRXFxFgvuNSVLfx = sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj]-I5hGWHrXomUyTCHcHUN95xXqg.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj]\
                        end\
                        bqK2rcoQKjlYmsCp1cdbhIQZz.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj] = G7m85XjgHnAHCQbcBDOhUtMpw\
                        if dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*0.15 and YN3yy4et1o0sOjO1UgWn4gnjx < bqK2rcoQKjlYmsCp1cdbhIQZz.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj] and sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] >= VjAezinSEBtPMdD6d9nqI89lw then\
                            dmWsauyBrVu5MGtRGvLYDDn7E = sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj]-I5hGWHrXomUyTCHcHUN95xXqg.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj]\
                        end\
                        bqK2rcoQKjlYmsCp1cdbhIQZz.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj] = YN3yy4et1o0sOjO1UgWn4gnjx\
                        local ftAvJ4luwHa3CFipMWJlfgek2 = (sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj]-I5hGWHrXomUyTCHcHUN95xXqg.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj])/nZiE2pi6ISTRXFxFgvuNSVLfx\
                        local COfnw6mlEIMC5ofWAD1zFVRxN = (sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj]-I5hGWHrXomUyTCHcHUN95xXqg.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj])/(dmWsauyBrVu5MGtRGvLYDDn7E+1/LVLfxo5KMbJO5hGWHrXomUyTC)\
                        if dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*0.15 and dxPf0bDx68L9gpdPZ0Y4wEMnC >= vPO7bf5yRIp36v38pk0gKKhrG*0.1 and NjGzmY997dWNWwLL48b2vNFm0 == 1 then\
                            trigger.action.radioTransmission('Alerax_LSO_AI_Script/LSO_WaveOff.ogg', uBrVu5MGtRGvLYDDn7E4jAezi.p, it3iiBFIy2kcTxAYwCS5uKueL, false, ndPZ0Y4wEMnCBUZ2SmEvcRTiQ, 100)\
                            local rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL\
                            rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL = LSO.W8Ys1Bjd0od2ivaaUEbBQ7L6P(rNSVLfxo5KMbJO5hGWHrXomUy[saXlaZfr76RRoyNlIjM7m85Xj],sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj],pCp1cdbhIQZzPO7bf5yRIp36v[saXlaZfr76RRoyNlIjM7m85Xj])\
                            LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'WO '..hC87rei8CaLIn9ymbsEkj44AL\
                            LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                            if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,'WAVE-OFF!', 5)\
                            end\
                            WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 99 \
                            break\
                        elseif knlr919JfYhlpfJhSzugFtizL[saXlaZfr76RRoyNlIjM7m85Xj] == 2 and dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*0.15 and ftAvJ4luwHa3CFipMWJlfgek2 == math.floor(ftAvJ4luwHa3CFipMWJlfgek2) and sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] >= VjAezinSEBtPMdD6d9nqI89lw then\
                            trigger.action.radioTransmission('Alerax_LSO_AI_Script/LSO_'.. QmsCp1cdbhIQZzPO7bf5yRIp3[uTCHcHUN95xXqgcqK2rcoQKjl] ..'.ogg', uBrVu5MGtRGvLYDDn7E4jAezi.p, it3iiBFIy2kcTxAYwCS5uKueL, false, ndPZ0Y4wEMnCBUZ2SmEvcRTiQ, 100) \
                            if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,QmsCp1cdbhIQZzPO7bf5yRIp3[uTCHcHUN95xXqgcqK2rcoQKjl], 5)\
                            end\
                            nZiE2pi6ISTRXFxFgvuNSVLfx = VjAezinSEBtPMdD6d9nqI89lw\
                            I5hGWHrXomUyTCHcHUN95xXqg.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj] = sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj]\
                        elseif knlr919JfYhlpfJhSzugFtizL[saXlaZfr76RRoyNlIjM7m85Xj] == 2 and dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*0.15 and COfnw6mlEIMC5ofWAD1zFVRxN == math.floor(COfnw6mlEIMC5ofWAD1zFVRxN) and sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj] >= VjAezinSEBtPMdD6d9nqI89lw then\
                            trigger.action.radioTransmission('Alerax_LSO_AI_Script/LSO_'.. UeHA9cOWjtgSMNLRzHQ9FEXLP[ghOYdK8Jcx2xLEZF7N072gBS1] ..'.ogg', uBrVu5MGtRGvLYDDn7E4jAezi.p, it3iiBFIy2kcTxAYwCS5uKueL, false, ndPZ0Y4wEMnCBUZ2SmEvcRTiQ, 100) \
                            if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,UeHA9cOWjtgSMNLRzHQ9FEXLP[ghOYdK8Jcx2xLEZF7N072gBS1], 5)\
                            end\
                            dmWsauyBrVu5MGtRGvLYDDn7E = VjAezinSEBtPMdD6d9nqI89lw\
                            I5hGWHrXomUyTCHcHUN95xXqg.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj] = sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj]\
                        end\
                    elseif WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 50 or WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 99 then\
                        if dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*0.1 and PFxFgvuNSVLfxo5KMbJO5hGWH <= oqbVrS7o2m6aFrohDz0qU1Wae+5 then\
                            local WjEF46hKnWfSZmwjVPQOUCuCc = LSO.XkrmAUVlny0Ddv8gDMAb664aS(d7t9AgtAvJ4luwHa3CFipMWJl)\
                            if WjEF46hKnWfSZmwjVPQOUCuCc > 0 and WjEF46hKnWfSZmwjVPQOUCuCc < 5 then\
                                if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 50 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_Welcome'}}\
                                elseif WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 99 then\
                                    VXjgHnAHCQbcBDOhUtMpwT3Qs = {[1]={lHvyoSr1ZDqODsIVAAkkR1gOb=ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj],OwLL48b2vNFm03rZ5lyXdYHeE=3,RmwjVPQOUCuCcIrKPSIcKl2XJ='LSO_TalkBoss'}}\
                                end\
                                local C89lwqZiE2pi6ISTRXFxFgvuN = {0.01}\
                                WhGWHrXomUyTCHcHUN95xXqgc = 1\
                                for q1o0sOjO1UgWn4gnjxR9ijvXR = 1,#C89lwqZiE2pi6ISTRXFxFgvuN,1 do\
                                    local DO5hGWHrXomUyTCHcHUN95xXq = LSO.DXhzYJVnhQSvTZ9WyJKIOfnw6(VXjgHnAHCQbcBDOhUtMpwT3Qs[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                    hxR9ijvXRqs5czJw83317PX6q=ndPZ0Y4wEMnCBUZ2SmEvcRTiQ\
                                    timer.scheduleFunction(LSO.jCOdteYuVTr5q9eIerkGC3uXN, DO5hGWHrXomUyTCHcHUN95xXq, timer.getTime()+C89lwqZiE2pi6ISTRXFxFgvuN[q1o0sOjO1UgWn4gnjxR9ijvXR])\
                                end\
                                local rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL\
                                rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL = LSO.W8Ys1Bjd0od2ivaaUEbBQ7L6P(rNSVLfxo5KMbJO5hGWHrXomUy[saXlaZfr76RRoyNlIjM7m85Xj],sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj],pCp1cdbhIQZzPO7bf5yRIp36v[saXlaZfr76RRoyNlIjM7m85Xj],WjEF46hKnWfSZmwjVPQOUCuCc)\
                                if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 50 then\
                                    LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = rwHa3CFipMWJlfgek2ajC87re..' '..WjEF46hKnWfSZmwjVPQOUCuCc..' '..hC87rei8CaLIn9ymbsEkj44AL\
                                elseif WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 99 then\
                                    K9ijvXRqs5czJw83317PX6qWV[#K9ijvXRqs5czJw83317PX6qWV] = nil\
                                    LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]] = 'WO C'..' '..WjEF46hKnWfSZmwjVPQOUCuCc..' '..hC87rei8CaLIn9ymbsEkj44AL\
                                end\
                                LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                                local dBcF0v1e7t9AgtAvJ4luwHa3C = Unit.getPlayerName(uRIp36v38pk0gKKhrGeBcF0v1)\
                                    if dBcF0v1e7t9AgtAvJ4luwHa3C == nil then dBcF0v1e7t9AgtAvJ4luwHa3C = 'AI' end\
                                d25VpYywaXlaZfr76RRoyNlIj[saXlaZfr76RRoyNlIjM7m85Xj][1] = ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' Grading Summary:'\
                                d25VpYywaXlaZfr76RRoyNlIj[saXlaZfr76RRoyNlIjM7m85Xj][2] = '--Carrier Conditions: BRC '..math.floor(OVe25VpYywaXlaZfr76RRoyNl+0.5)..'°, for '..math.floor(fWn4gnjxR9ijvXRqs5czJw833+0.5)..' kts--'\
                                d25VpYywaXlaZfr76RRoyNlIj[saXlaZfr76RRoyNlIjM7m85Xj][3] = '--Weather Conditions: Winds '..Z97dWNWwLL48b2vNFm03rZ5ly..'°, for '..pvlP7YFkmLjoFBgw11xIWuRtV..' ± '..c0BwwuAiqzTpoHvyoSr1ZDqOD..' kts--'\
                                local qizLrqbVrS7o2m6aFrohDz0qU = ''\
                                for QwCS5uKueLbaHlGpuZuIAWTkK = 1,#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj],1 do\
                                    local qAvJ4luwHa3CFipMWJlfgek2a = #LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]-QwCS5uKueLbaHlGpuZuIAWTkK+1\
                                    SWaevVX8keN5sQd6TvGGEKtkt = 'Pass#'..qAvJ4luwHa3CFipMWJlfgek2a.. ': '..LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][qAvJ4luwHa3CFipMWJlfgek2a]\
                                    qizLrqbVrS7o2m6aFrohDz0qU = qizLrqbVrS7o2m6aFrohDz0qU..'\\n\\t'..SWaevVX8keN5sQd6TvGGEKtkt\
                                    d25VpYywaXlaZfr76RRoyNlIj[saXlaZfr76RRoyNlIjM7m85Xj][QwCS5uKueLbaHlGpuZuIAWTkK+3] = SWaevVX8keN5sQd6TvGGEKtkt\
                                end\
                                qizLrqbVrS7o2m6aFrohDz0qU = '\\n\\t'..d25VpYywaXlaZfr76RRoyNlIj[saXlaZfr76RRoyNlIjM7m85Xj][2]..'\\n\\t'..d25VpYywaXlaZfr76RRoyNlIj[saXlaZfr76RRoyNlIjM7m85Xj][3]..qizLrqbVrS7o2m6aFrohDz0qU\
                                local DhSzugFtizLrqbVrS7o2m6aFr = LSO.GNLRzHQ9FEXLPF9HifUG5TIZb(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj,d25VpYywaXlaZfr76RRoyNlIj)\
                                trigger.action.outTextForCoalition(sVX8keN5sQd6TvGGEKtkt3iiB,ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT[saXlaZfr76RRoyNlIjM7m85Xj]..' '..dBcF0v1e7t9AgtAvJ4luwHa3C..' Grading Summary'..DhSzugFtizLrqbVrS7o2m6aFr..': '..qizLrqbVrS7o2m6aFrohDz0qU, 30)\
                                LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(saXlaZfr76RRoyNlIjM7m85Xj,'YCaLIn9ymbsEkj44AL0xVwZky') \
                            elseif WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 50 and WjEF46hKnWfSZmwjVPQOUCuCc == 5 then\
                                trigger.action.radioTransmission('Alerax_LSO_AI_Script/LSO_Bolter.ogg', uBrVu5MGtRGvLYDDn7E4jAezi.p, it3iiBFIy2kcTxAYwCS5uKueL, false, ndPZ0Y4wEMnCBUZ2SmEvcRTiQ, 100) \
                                local rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL\
                                rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL = LSO.W8Ys1Bjd0od2ivaaUEbBQ7L6P(rNSVLfxo5KMbJO5hGWHrXomUy[saXlaZfr76RRoyNlIjM7m85Xj],sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj],pCp1cdbhIQZzPO7bf5yRIp36v[saXlaZfr76RRoyNlIjM7m85Xj])\
                                LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'B '..hC87rei8CaLIn9ymbsEkj44AL\
                                LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                                if BcHUN95xXqgcqK2rcoQKjlYms == 1 then\
                                    trigger.action.outTextForGroup(oXomUyTCHcHUN95xXqgcqK2rc,'BOLTER! BOLTER!', 5)\
                                end\
                                WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 99 \
                            end\
                        end\
                    end\
                    if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 50 and dxPf0bDx68L9gpdPZ0Y4wEMnC > vPO7bf5yRIp36v38pk0gKKhrG*0.1 and dxPf0bDx68L9gpdPZ0Y4wEMnC <= vPO7bf5yRIp36v38pk0gKKhrG*0.5 and PFxFgvuNSVLfxo5KMbJO5hGWH > oqbVrS7o2m6aFrohDz0qU1Wae+5 and et1o0sOjO1UgWn4gnjxR9ijvX == 1   then\
                        local rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL\
                        rwHa3CFipMWJlfgek2ajC87re, hC87rei8CaLIn9ymbsEkj44AL = LSO.W8Ys1Bjd0od2ivaaUEbBQ7L6P(rNSVLfxo5KMbJO5hGWHrXomUy[saXlaZfr76RRoyNlIjM7m85Xj],sT3Qsmnlr919JfYhlpfJhSzug[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp[saXlaZfr76RRoyNlIjM7m85Xj],U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo[saXlaZfr76RRoyNlIjM7m85Xj],pCp1cdbhIQZzPO7bf5yRIp36v[saXlaZfr76RRoyNlIjM7m85Xj])\
                        LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj][#LCHcHUN95xXqgcqK2rcoQKjlY[saXlaZfr76RRoyNlIjM7m85Xj]+1] = 'OWO '..hC87rei8CaLIn9ymbsEkj44AL\
                        LSO.Npb80mjKaDKGUXfFGS3XwPbzW(uRIp36v38pk0gKKhrGeBcF0v1,saXlaZfr76RRoyNlIjM7m85Xj)\
                        WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 99 \
                    end\
                    if WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] == 99 and et1o0sOjO1UgWn4gnjxR9ijvX == 1 and PFxFgvuNSVLfxo5KMbJO5hGWH > oqbVrS7o2m6aFrohDz0qU1Wae+5 then\
                        LSO.IWjtgSMNLRzHQ9FEXLPF9HifU(saXlaZfr76RRoyNlIjM7m85Xj,'ihawsTANUP3noOQ1t7GYBJ6f3') \
                        WKMbJO5hGWHrXomUyTCHcHUN9[saXlaZfr76RRoyNlIjM7m85Xj] = 6 \
                    end\
                end\
            end\
        end\
        return yDn7E4jAezinSEBtPMdD6d9nq + 1*LVLfxo5KMbJO5hGWHrXomUyTC\
    else\
        return nil\
    end\
end\
mwT3Qsmnlr919JfYhlpfJhSzu = Unit.getByName(fFtizLrqbVrS7o2m6aFrohDz0)\
sVX8keN5sQd6TvGGEKtkt3iiB = mwT3Qsmnlr919JfYhlpfJhSzu:getCoalition()\
t68L9gpdPZ0Y4wEMnCBUZ2SmE = 9 \
rZuIAWTkKd4ZdxPf0bDx68L9g = 65 \
oU1WaevVX8keN5sQd6TvGGEKt = 6 \
it3iiBFIy2kcTxAYwCS5uKueL = LSO.KQBB7ix4s3wR5ROH3Zq7krmAU(fFtizLrqbVrS7o2m6aFrohDz0,'modulation') \
hxR9ijvXRqs5czJw83317PX6q = 0\
ndPZ0Y4wEMnCBUZ2SmEvcRTiQ = LSO.KQBB7ix4s3wR5ROH3Zq7krmAU(fFtizLrqbVrS7o2m6aFrohDz0,'frequency') \
scRTiQVc8N3yy4et1o0sOjO1U = nil \
CjM7m85XjgHnAHCQbcBDOhUtM = nil \
    local yOhUtMpwT3Qsmnlr919JfYhlp = LSO.KQBB7ix4s3wR5ROH3Zq7krmAU(fFtizLrqbVrS7o2m6aFrohDz0,'route')\
    for saXlaZfr76RRoyNlIjM7m85Xj = 1,#yOhUtMpwT3Qsmnlr919JfYhlp.points,1 do\
        for jwqZiE2pi6ISTRXFxFgvuNSVL = 1,#yOhUtMpwT3Qsmnlr919JfYhlp.points[saXlaZfr76RRoyNlIjM7m85Xj].task.params.tasks,1 do\
            if yOhUtMpwT3Qsmnlr919JfYhlp.points[saXlaZfr76RRoyNlIjM7m85Xj].task.params.tasks[jwqZiE2pi6ISTRXFxFgvuNSVL].params.action.id == 'ActivateBeacon' then\
                local oohDz0qU1WaevVX8keN5sQd6T = yOhUtMpwT3Qsmnlr919JfYhlp.points[saXlaZfr76RRoyNlIjM7m85Xj].task.params.tasks[jwqZiE2pi6ISTRXFxFgvuNSVL].params.action.params.channel\
                local eJhSzugFtizLrqbVrS7o2m6aF = yOhUtMpwT3Qsmnlr919JfYhlp.points[saXlaZfr76RRoyNlIjM7m85Xj].task.params.tasks[jwqZiE2pi6ISTRXFxFgvuNSVL].params.action.params.modeChannel\
                scRTiQVc8N3yy4et1o0sOjO1U = oohDz0qU1WaevVX8keN5sQd6T..eJhSzugFtizLrqbVrS7o2m6aF\
            end\
            if yOhUtMpwT3Qsmnlr919JfYhlp.points[saXlaZfr76RRoyNlIjM7m85Xj].task.params.tasks[jwqZiE2pi6ISTRXFxFgvuNSVL].params.action.id == 'ActivateICLS' then\
                CjM7m85XjgHnAHCQbcBDOhUtM = yOhUtMpwT3Qsmnlr919JfYhlp.points[saXlaZfr76RRoyNlIjM7m85Xj].task.params.tasks[jwqZiE2pi6ISTRXFxFgvuNSVL].params.action.params.channel\
            end\
        end\
    end\
KXFxFgvuNSVLfxo5KMbJO5hGW = {} \
JMdD6d9nqI89lwqZiE2pi6IST = {} \
CrXomUyTCHcHUN95xXqgcqK2r = {} \
coQKjlYmsCp1cdbhIQZzPO7bf = {} \
ksCp1cdbhIQZzPO7bf5yRIp36 = {} \
    ksCp1cdbhIQZzPO7bf5yRIp36.GfAPByqMJaQ3a6jEF46hKnWfS = {} \
    ksCp1cdbhIQZzPO7bf5yRIp36.ABgw11xIWuRtVhMhunJpQxJRM = {} \
    ksCp1cdbhIQZzPO7bf5yRIp36.YWL2eUTEoUlARvPzE8URK62tT = {} \
    ksCp1cdbhIQZzPO7bf5yRIp36.lupDHYoqBNHgyVjGzmY997dWN = {} \
WKMbJO5hGWHrXomUyTCHcHUN9 = {} \
VMGtRGvLYDDn7E4jAezinSEBt = {} \
LCHcHUN95xXqgcqK2rcoQKjlY = {} \
knlr919JfYhlpfJhSzugFtizL = {} \
NChjIglCOdteYuVTr5q9eIerk = {} \
rNSVLfxo5KMbJO5hGWHrXomUy = {} \
    sT3Qsmnlr919JfYhlpfJhSzug = {} \
U8pk0gKKhrGeBcF0v1e7t9Agt = {} \
    U8pk0gKKhrGeBcF0v1e7t9Agt.RkCLNYqkTVyG2c0BwwuAiqzTp = {} \
    U8pk0gKKhrGeBcF0v1e7t9Agt.BistrxZ7fQ54nsvlP7YFkmLjo = {} \
    pCp1cdbhIQZzPO7bf5yRIp36v = {} \
bqK2rcoQKjlYmsCp1cdbhIQZz = {} \
    bqK2rcoQKjlYmsCp1cdbhIQZz.RkCLNYqkTVyG2c0BwwuAiqzTp = {} \
    bqK2rcoQKjlYmsCp1cdbhIQZz.BistrxZ7fQ54nsvlP7YFkmLjo = {} \
I5hGWHrXomUyTCHcHUN95xXqg = {} \
    I5hGWHrXomUyTCHcHUN95xXqg.RkCLNYqkTVyG2c0BwwuAiqzTp = {} \
    I5hGWHrXomUyTCHcHUN95xXqg.BistrxZ7fQ54nsvlP7YFkmLjo = {} \
l2m6aFrohDz0qU1WaevVX8keN = {} \
AYBJ6f3EzzxDldmWsauyBrVu5 = 0 \
Ypk0gKKhrGeBcF0v1e7t9AgtA = 0 \
    Y7rei8CaLIn9ymbsEkj44AL0x = 0 \
xp1cdbhIQZzPO7bf5yRIp36v3 = 0 \
    sJ4luwHa3CFipMWJlfgek2ajC = 0 \
K9ijvXRqs5czJw83317PX6qWV = {} \
d25VpYywaXlaZfr76RRoyNlIj = {} \
ZeIerkGC3uXNJXhzYJVnhQSvT = {} \
R9WyJKIOfnw6mlEIMC5ofWAD1 = {}  \
    for saXlaZfr76RRoyNlIjM7m85Xj = 1,20,1 do\
        ZeIerkGC3uXNJXhzYJVnhQSvT[saXlaZfr76RRoyNlIjM7m85Xj] = 'cGxsG0iItE60zCeCJTGistrxZ'\
        R9WyJKIOfnw6mlEIMC5ofWAD1[saXlaZfr76RRoyNlIjM7m85Xj] = 'PwPbzWPDfpqouc4cM21kpsiM4'\
    end\
IhUtMpwT3Qsmnlr919JfYhlpf = 0 \
jfgek2ajC87rei8CaLIn9ymbs = {} \
    zkj44AL0xVwZkykhawsTANUP3 = {}\
    qyBrVu5MGtRGvLYDDn7E4jAez = {}\
    Se7t9AgtAvJ4luwHa3CFipMWJ = {}\
        xaLIn9ymbsEkj44AL0xVwZkyk = {}\
    loOQ1t7GYBJ6f3EzzxDldmWsa = {}\
suNSVLfxo5KMbJO5hGWHrXomU = 0 \
e3EzzxDldmWsauyBrVu5MGtRG = 0 \
rLYDDn7E4jAezinSEBtPMdD6d = 0 \
VjAezinSEBtPMdD6d9nqI89lw = 5.5 \
LVLfxo5KMbJO5hGWHrXomUyTC = 0.5 \
VjAezinSEBtPMdD6d9nqI89lw = VjAezinSEBtPMdD6d9nqI89lw/LVLfxo5KMbJO5hGWHrXomUyTC\
    nZiE2pi6ISTRXFxFgvuNSVLfx = VjAezinSEBtPMdD6d9nqI89lw\
    dmWsauyBrVu5MGtRGvLYDDn7E = VjAezinSEBtPMdD6d9nqI89lw\
vPO7bf5yRIp36v38pk0gKKhrG = 6076 \
tR9ijvXRqs5czJw83317PX6qW = 1.94384 \
cPZ0Y4wEMnCBUZ2SmEvcRTiQV = 3.28084 \
Ne25VpYywaXlaZfr76RRoyNlI = 1852 \
c8N3yy4et1o0sOjO1UgWn4gnj = 0.0393701 \
iM7m85XjgHnAHCQbcBDOhUtMp = 180/math.pi\
RuIAWTkKd4ZdxPf0bDx68L9gp = math.pi/180\
LSO.JDfpqouc4cM21kpsiM4VChjIg()\
timer.scheduleFunction(LSO.QuVTr5q9eIerkGC3uXNJXhzYJ, 0, timer.getTime() + 5)\
timer.scheduleFunction(LSO.hKaDKGUXfFGS3XwPbzWPDfpqo, 0, timer.getTime() + 1*LVLfxo5KMbJO5hGWHrXomUyTC)\
--------------------------------------------------------------------------------",
    ["DictKey_WptName_3158"] = "",
    ["DictKey_UnitName_2585"] = "Plant #073",
    ["DictKey_UnitName_4930"] = "",
    ["DictKey_UnitName_4983"] = "",
    ["DictKey_GroupName_279"] = "SAM site 01 #007",
    ["DictKey_UnitName_627"] = " #063",
    ["DictKey_UnitName_1427"] = "Pilot #023",
    ["DictKey_WptName_2012"] = "",
    ["DictKey_GroupName_3819"] = "Nuevo objeto estático #009",
    ["DictKey_WptName_2853"] = "",
    ["DictKey_GroupName_130"] = "SU-25T Abu MusaIsland SEAD",
    ["DictKey_GroupName_4622"] = "JTAC 1",
    ["DictKey_WptName_819"] = "",
    ["DictKey_UnitName_1546"] = "Oil platform #001",
    ["DictKey_GroupName_1620"] = "Refinery #006",
    ["DictKey_UnitName_101"] = "Unit #065",
    ["DictKey_GroupName_1272"] = "Bandar Abbas HAWK #002",
    ["DictKey_WptName_526"] = "",
    ["DictKey_UnitName_649"] = "Unit #210",
    ["DictKey_WptName_5233"] = "",
    ["DictKey_UnitName_4765"] = "",
    ["DictKey_UnitName_3911"] = "Piloto #024",
    ["DictKey_WptName_4146"] = "",
    ["DictKey_GroupName_1767"] = "Refinery #035",
    ["DictKey_UnitName_2453"] = "Refinery #003",
    ["DictKey_WptName_4938"] = "",
    ["DictKey_GroupName_516"] = "New Static Object #010",
    ["DictKey_GroupName_3853"] = "Refinery #096",
    ["DictKey_GroupName_943"] = "SAM site 01 #035",
    ["DictKey_UnitName_1476"] = "",
    ["DictKey_UnitName_2816"] = "Oil tower #004",
    ["DictKey_WptName_1040"] = "",
    ["DictKey_UnitName_4886"] = "Unit #290",
    ["DictKey_WptName_2229"] = "",
    ["DictKey_WptName_1328"] = "",
    ["DictKey_UnitName_2414"] = "Refinery #004",
    ["DictKey_GroupName_955"] = "SAM site 01 #036",
    ["DictKey_GroupName_245"] = "SAM site 01 #003",
    ["DictKey_UnitName_4888"] = "Unit #292",
    ["DictKey_UnitName_284"] = "Unit #057",
    ["DictKey_GroupName_2482"] = "Plant #033",
    ["DictKey_WptName_2090"] = "",
    ["DictKey_GroupName_2479"] = "Plant #039",
    ["DictKey_GroupName_1743"] = "Refinery",
    ["DictKey_WptName_2039"] = "",
    ["DictKey_GroupName_2034"] = "Plant #024",
    ["DictKey_WptName_929"] = "",
    ["DictKey_GroupName_2854"] = "Nuevo grupo de barcos #004",
    ["DictKey_GroupName_1971"] = "Plant #003",
    ["DictKey_UnitName_5246"] = "Enfield 2-1",
    ["DictKey_WptName_461"] = "",
    ["DictKey_GroupName_2170"] = "Plant #035",
    ["DictKey_WptName_3067"] = "",
    ["DictKey_UnitName_2267"] = "Refinery #017",
    ["DictKey_WptName_1404"] = "",
    ["DictKey_GroupName_1704"] = "Refinery #006",
    ["DictKey_WptName_3091"] = "",
    ["DictKey_UnitName_1360"] = "Unit #091",
    ["DictKey_WptName_364"] = "",
    ["DictKey_UnitName_979"] = " #070",
    ["DictKey_UnitName_2558"] = "Plant #032",
    ["DictKey_GroupName_1848"] = "Oil tower #014",
    ["DictKey_WptName_1688"] = "",
    ["DictKey_UnitName_623"] = " #062",
    ["DictKey_UnitName_4375"] = "Arco 1-1",
    ["DictKey_GroupName_2867"] = "FARP Madrid",
    ["DictKey_UnitName_1843"] = "Oil tower #001",
    ["DictKey_WptName_499"] = "",
    ["DictKey_WptName_841"] = "",
    ["DictKey_UnitName_5357"] = "AV-8B Carrier #004",
    ["DictKey_WptName_4000"] = "",
    ["DictKey_GroupName_2158"] = "Plant #015",
    ["DictKey_UnitName_5288"] = "Enfield 2-3 ",
    ["DictKey_ActionText_3985"] = "mist.respawnGroup('JTAC4', true)",
    ["DictKey_UnitName_1321"] = "Unit #043",
    ["DictKey_GroupName_844"] = " #046",
    ["DictKey_UnitName_2136"] = "Unidad #030",
    ["DictKey_UnitName_4235"] = "",
    ["DictKey_GroupName_1728"] = "Refinery #004",
    ["DictKey_WptName_930"] = "",
    ["DictKey_UnitName_1155"] = "Unit #217",
    ["DictKey_WptName_1241"] = "",
    ["DictKey_UnitName_379"] = "Unit #125",
    ["DictKey_UnitName_451"] = "Pilot #002",
    ["DictKey_UnitName_4870"] = "",
    ["DictKey_UnitName_206"] = "",
    ["DictKey_WptName_5337"] = "",
    ["DictKey_UnitName_4234"] = "",
    ["DictKey_WptName_4536"] = "",
    ["DictKey_WptName_1703"] = "",
    ["DictKey_GroupName_3524"] = "Refinery #099",
    ["DictKey_UnitName_1454"] = "Unit #047",
    ["DictKey_GroupName_1833"] = "Oil tower #004",
    ["DictKey_WptName_3214"] = "",
    ["DictKey_UnitName_4206"] = "",
    ["DictKey_WptName_1928"] = "",
    ["DictKey_WptName_2343"] = "",
    ["DictKey_WptName_1865"] = "",
    ["DictKey_WptName_1251"] = "",
    ["DictKey_UnitName_502"] = "New Static Object #001",
    ["DictKey_UnitName_956"] = "Unit #233",
    ["DictKey_WptName_5212"] = "",
    ["DictKey_UnitName_1167"] = "Unit #215",
    ["DictKey_WptName_5280"] = "",
    ["DictKey_UnitName_465"] = " #050",
    ["DictKey_GroupName_619"] = " #059",
    ["DictKey_WptName_1736"] = "",
    ["DictKey_UnitName_1951"] = "Oil platform #004",
    ["DictKey_WptName_3565"] = "",
    ["DictKey_WptName_444"] = "",
    ["DictKey_GroupName_468"] = "New Static Object #004",
    ["DictKey_GroupName_856"] = "New Static Object #005",
    ["DictKey_GroupName_931"] = "",
    ["DictKey_GroupName_1791"] = "Refinery #043",
    ["DictKey_UnitName_1371"] = "",
    ["DictKey_UnitName_2907"] = "Nuevo objeto estático #008",
    ["DictKey_UnitName_3528"] = "Tanque de combustible #029",
    ["DictKey_WptName_1219"] = "",
    ["DictKey_GroupName_3269"] = "Refinery #091",
    ["DictKey_UnitName_3225"] = "Refinery #077",
    ["DictKey_UnitName_531"] = "",
    ["DictKey_UnitName_4945"] = "",
    ["DictKey_WptName_3740"] = "",
    ["DictKey_UnitName_4476"] = "Pilot #021",
    ["DictKey_WptName_5484"] = "",
    ["DictKey_UnitName_164"] = "CVN-70",
    ["DictKey_WptName_2379"] = "",
    ["DictKey_WptName_4425"] = "",
    ["DictKey_UnitName_4844"] = "",
    ["DictKey_UnitName_2573"] = "Plant #064",
    ["DictKey_UnitName_1036"] = "Unit #009",
    ["DictKey_GroupName_3437"] = "Refinery #078",
    ["DictKey_UnitName_4458"] = " #006",
    ["DictKey_UnitName_4229"] = "",
    ["DictKey_WptName_701"] = "",
    ["DictKey_UnitName_4821"] = "",
    ["DictKey_UnitName_4860"] = "",
    ["DictKey_UnitName_3630"] = "Munición",
    ["DictKey_UnitName_4197"] = "",
    ["DictKey_UnitName_1264"] = "",
    ["DictKey_UnitName_517"] = "",
    ["DictKey_UnitName_2122"] = "Unidad #016",
    ["DictKey_WptName_2881"] = "",
    ["DictKey_WptName_598"] = "",
    ["DictKey_UnitName_4248"] = "",
    ["DictKey_WptName_3140"] = "",
    ["DictKey_UnitName_4169"] = "",
    ["DictKey_UnitName_5085"] = "JTAC7",
    ["DictKey_UnitName_401"] = "Unit #058",
    ["DictKey_GroupName_749"] = " #034",
    ["DictKey_WptName_2409"] = "",
    ["DictKey_UnitName_4640"] = "Unit #043",
    ["DictKey_UnitName_1180"] = "Unit #010",
    ["DictKey_WptName_3484"] = "",
    ["DictKey_GroupName_2530"] = "Plant #070",
    ["DictKey_GroupName_2079"] = "Plant #007",
    ["DictKey_UnitName_4231"] = "",
    ["DictKey_UnitName_5133"] = "Combat Training F14B",
    ["DictKey_UnitName_1099"] = "Unit #060",
    ["DictKey_UnitName_2633"] = "Plant #068",
    ["DictKey_WptName_1398"] = "",
    ["DictKey_ActionText_3953"] = "if Group.getByName('AWACS 303') == nil then\
return true\
else\
return false\
end",
    ["DictKey_UnitName_3423"] = "Tanque de combustible #004",
    ["DictKey_WptName_3418"] = "",
    ["DictKey_UnitName_1361"] = "Unit #092",
    ["DictKey_UnitName_2159"] = "Plant #015",
    ["DictKey_ActionText_4049"] = "mist.respawnGroup('Magic', true)",
    ["DictKey_WptName_311"] = "",
    ["DictKey_WptName_502"] = "",
    ["DictKey_WptName_5211"] = "",
    ["DictKey_GroupName_2942"] = "Rudan Conversion #007",
    ["DictKey_UnitName_4242"] = "",
    ["DictKey_GroupName_3467"] = "Refinery #049",
    ["DictKey_UnitName_3976"] = "JTAC6",
    ["DictKey_UnitName_437"] = " #040",
    ["DictKey_WptName_2493"] = "",
    ["DictKey_WptName_2742"] = "",
    ["DictKey_WptName_3833"] = "",
    ["DictKey_UnitName_4158"] = "Piloto #034",
    ["DictKey_WptName_4504"] = "",
    ["DictKey_WptName_2748"] = "",
    ["DictKey_UnitName_3276"] = "Refinery #080",
    ["DictKey_GroupName_4407"] = "F-14 Carrier CAP #002",
    ["DictKey_UnitName_508"] = "",
    ["DictKey_UnitName_3165"] = "Refinery #077",
    ["DictKey_UnitName_803"] = "Unit #106",
    ["DictKey_UnitName_156"] = "Perry",
    ["DictKey_WptName_2319"] = "",
    ["DictKey_UnitName_1215"] = "Unit #252",
    ["DictKey_UnitName_4590"] = "Pilot #028",
    ["DictKey_WptName_5230"] = "",
    ["DictKey_WptName_1522"] = "",
    ["DictKey_GroupName_3011"] = "Uzi #002",
    ["DictKey_WptName_3755"] = "",
    ["DictKey_GroupName_623"] = "SAM site 01 #028",
    ["DictKey_WptName_2190"] = "",
    ["DictKey_GroupName_73"] = "SAM site 01 #007",
    ["DictKey_WptName_2877"] = "",
    ["DictKey_UnitName_2249"] = "Refinery #018",
    ["DictKey_WptName_410"] = "",
    ["DictKey_UnitName_2062"] = "Plant #005",
    ["DictKey_UnitName_5004"] = "Unit #309",
    ["DictKey_GroupName_255"] = "Abu Masa HAWK Site",
    ["DictKey_UnitName_5039"] = "Unit #338",
    ["DictKey_WptName_1516"] = "",
    ["DictKey_WptName_4026"] = "",
    ["DictKey_WptName_3307"] = "",
    ["DictKey_GroupName_802"] = "New Vehicle Group #001",
    ["DictKey_WptName_5334"] = "",
    ["DictKey_GroupName_1839"] = "Oil tower #002",
    ["DictKey_UnitName_417"] = "Chevy 1-1",
    ["DictKey_UnitName_626"] = "Unit #200",
    ["DictKey_UnitName_4424"] = "Colt 1-2 #005",
    ["DictKey_WptName_924"] = "",
    ["DictKey_UnitName_558"] = "Unit #168",
    ["DictKey_UnitName_1801"] = "Refinery #005",
    ["DictKey_WptName_4519"] = "",
    ["DictKey_WptName_4411"] = "",
    ["DictKey_UnitName_1210"] = "Unit #248",
    ["DictKey_WptName_1146"] = "",
    ["DictKey_ActionRadioText_4525"] = "",
    ["DictKey_GroupName_1296"] = "SAM site 01 #001",
    ["DictKey_WptName_4315"] = "",
    ["DictKey_GroupName_2076"] = "Plant #003",
    ["DictKey_GroupName_1120"] = "SAM site 01 #006",
    ["DictKey_WptName_4047"] = "",
    ["DictKey_WptName_5279"] = "",
    ["DictKey_GroupName_3311"] = "Tanque de combustible #006",
    ["DictKey_UnitName_79"] = "Unit #051",
    ["DictKey_UnitName_1750"] = "Refinery #004",
    ["DictKey_GroupName_2879"] = "",
    ["DictKey_WptName_1286"] = "",
    ["DictKey_WptName_4621"] = "",
    ["DictKey_GroupName_2106"] = "",
    ["DictKey_UnitName_5374"] = "Combat Training F18C Instructor #001",
    ["DictKey_UnitName_2186"] = "Plant #011",
    ["DictKey_WptName_1709"] = "",
    ["DictKey_WptName_704"] = "",
    ["DictKey_WptName_750"] = "",
    ["DictKey_WptName_4562"] = "",
    ["DictKey_GroupName_1719"] = "Refinery #002",
    ["DictKey_WptName_5239"] = "",
    ["DictKey_WptName_4109"] = "",
    ["DictKey_UnitName_3192"] = "Refinery #079",
    ["DictKey_WptName_678"] = "",
    ["DictKey_GroupName_5464"] = "M-2000 Tunb Kochak Island CAP #001",
    ["DictKey_UnitName_2411"] = "Refinery #003",
    ["DictKey_UnitName_2663"] = "Plant #071",
    ["DictKey_WptName_2869"] = "",
    ["DictKey_GroupName_2821"] = "Oil tower #058",
    ["DictKey_UnitName_1582"] = "Refinery #004",
    ["DictKey_UnitName_901"] = "",
    ["DictKey_UnitName_4078"] = "",
    ["DictKey_WptName_821"] = "",
    ["DictKey_GroupName_3774"] = "",
    ["DictKey_GroupName_2963"] = "Rudan Conversion #014",
    ["DictKey_WptName_3313"] = "",
    ["DictKey_UnitName_169"] = "Unit #108",
    ["DictKey_GroupName_328"] = "",
    ["DictKey_UnitName_1118"] = "Unit #177",
    ["DictKey_UnitName_3709"] = "Munición #001",
    ["DictKey_WptName_595"] = "",
    ["DictKey_GroupName_2803"] = "Oil tower #052",
    ["DictKey_WptName_5332"] = "",
    ["DictKey_UnitName_740"] = "Pilot #016",
    ["DictKey_WptName_1913"] = "",
    ["DictKey_UnitName_511"] = "",
    ["DictKey_UnitName_742"] = " #017",
    ["DictKey_UnitName_607"] = "Unit #192",
    ["DictKey_UnitName_629"] = "Unit #201",
    ["DictKey_UnitName_704"] = " #016",
    ["DictKey_UnitName_5399"] = "SEAD Kish Island #003",
    ["DictKey_WptName_2271"] = "",
    ["DictKey_WptName_470"] = "",
    ["DictKey_GroupName_3272"] = "Refinery #092",
    ["DictKey_WptName_5130"] = "AA TGT",
    ["DictKey_UnitName_4810"] = "",
    ["DictKey_UnitName_3136"] = "Nuevo objeto estático #004",
    ["DictKey_UnitName_3841"] = " #088",
    ["DictKey_WptName_5232"] = "",
    ["DictKey_UnitName_3799"] = "Unidad #052",
    ["DictKey_WptName_2685"] = "",
    ["DictKey_UnitName_2127"] = "Unidad #021",
    ["DictKey_UnitName_3345"] = "Tanque de combustible #004",
    ["DictKey_UnitName_4301"] = "F-16 Al Dhafra AB #006",
    ["DictKey_UnitName_1278"] = "Unit #023",
    ["DictKey_UnitName_1240"] = "Unit #157",
    ["DictKey_WptName_2982"] = "",
    ["DictKey_UnitName_3513"] = "Tanque de combustible #001",
    ["DictKey_UnitName_1756"] = "Refinery #001",
    ["DictKey_GroupName_2097"] = "Plant #045",
    ["DictKey_UnitName_2480"] = "Plant #039",
    ["DictKey_WptName_413"] = "",
    ["DictKey_GroupName_2764"] = "Oil tower #045",
    ["DictKey_WptName_5258"] = "",
    ["DictKey_WptName_785"] = "",
    ["DictKey_UnitName_4279"] = "",
    ["DictKey_UnitName_1579"] = "Refinery #006",
    ["DictKey_GroupName_3434"] = "Plant #115",
    ["DictKey_WptName_682"] = "",
    ["DictKey_WptName_656"] = "",
    ["DictKey_WptName_2015"] = "",
    ["DictKey_UnitName_2705"] = "Plant #069",
    ["DictKey_UnitName_4190"] = "",
    ["DictKey_UnitName_4388"] = "Colt 1-1",
    ["DictKey_WptName_2838"] = "",
    ["DictKey_UnitName_361"] = "Unit #084",
    ["DictKey_GroupName_397"] = "A10C Al Minhad AB",
    ["DictKey_UnitName_4237"] = "",
    ["DictKey_WptName_3815"] = "",
    ["DictKey_GroupName_759"] = " #035",
    ["DictKey_GroupName_2629"] = "Plant #095",
    ["DictKey_UnitName_1858"] = "Oil tower #002",
    ["DictKey_GroupName_3557"] = "Tanque de combustible #040",
    ["DictKey_WptName_3562"] = "",
    ["DictKey_UnitName_4444"] = " #002",
    ["DictKey_GroupName_2689"] = "Plant #068",
    ["DictKey_UnitName_3279"] = "Tanque de combustible",
    ["DictKey_UnitName_848"] = "Pilot #006",
    ["DictKey_GroupName_4147"] = "Enfield #004",
    ["DictKey_GroupName_78"] = "SAM site 01 #008",
    ["DictKey_GroupName_3332"] = "Tanque de combustible #013",
    ["DictKey_WptName_5210"] = "",
    ["DictKey_WptName_3758"] = "",
    ["DictKey_UnitName_4796"] = "",
    ["DictKey_GroupName_2593"] = "Plant #083",
    ["DictKey_WptName_791"] = "",
    ["DictKey_UnitName_2958"] = "",
    ["DictKey_UnitName_1510"] = "Unit #123",
    ["DictKey_UnitName_2050"] = "Plant #002",
    ["DictKey_UnitName_1363"] = "Unit #094",
    ["DictKey_UnitName_5052"] = "Unit #349",
    ["DictKey_WptName_3886"] = "",
    ["DictKey_WptName_2866"] = "",
    ["DictKey_UnitName_1044"] = "Unit #172",
    ["DictKey_WptName_4576"] = "",
    ["DictKey_UnitName_2032"] = "Plant #007",
    ["DictKey_UnitName_1891"] = "Oil tower #005",
    ["DictKey_GroupName_3539"] = "Tanque de combustible #036",
    ["DictKey_GroupName_1842"] = "Oil tower #012",
    ["DictKey_UnitName_4780"] = "",
    ["DictKey_UnitName_938"] = "Unit #225",
    ["DictKey_WptName_2253"] = "",
    ["DictKey_UnitName_2002"] = "Plant #002",
    ["DictKey_WptName_686"] = "",
    ["DictKey_WptName_4141"] = "",
    ["DictKey_WptName_2499"] = "",
    ["DictKey_GroupName_5114"] = "Combat Training F14B ",
    ["DictKey_WptName_1802"] = "",
    ["DictKey_WptName_5158"] = "",
    ["DictKey_UnitName_3216"] = "Refinery #079",
    ["DictKey_GroupName_1983"] = "Plant #007",
    ["DictKey_UnitName_1446"] = "Unit #025",
    ["DictKey_GroupName_3803"] = "Tomahawk",
    ["DictKey_WptName_278"] = "",
    ["DictKey_WptName_700"] = "",
    ["DictKey_WptName_3024"] = "",
    ["DictKey_GroupName_1968"] = "Plant #002",
    ["DictKey_WptName_2163"] = "",
    ["DictKey_GroupName_2016"] = "Plant #018",
    ["DictKey_GroupName_5174"] = "Combat Training F18C Trainee",
    ["DictKey_GroupName_2455"] = "Refinery #074",
    ["DictKey_GroupName_522"] = "New Ship Group #002",
    ["DictKey_WptName_3770"] = "",
    ["DictKey_UnitName_1018"] = " #022",
    ["DictKey_WptName_5240"] = "",
    ["DictKey_WptName_1763"] = "",
    ["DictKey_UnitName_1600"] = "Refinery #006",
    ["DictKey_WptName_498"] = "",
    ["DictKey_UnitName_883"] = "Unit #213",
    ["DictKey_WptName_3052"] = "",
    ["DictKey_GroupName_1923"] = "Oil tower #033",
    ["DictKey_WptName_2193"] = "",
    ["DictKey_GroupName_692"] = "New Helicopter Group",
    ["DictKey_UnitName_3823"] = " #049",
    ["DictKey_UnitName_1669"] = "Refinery #003",
    ["DictKey_UnitName_2210"] = "Plant #004",
    ["DictKey_UnitName_947"] = "Unit #022",
    ["DictKey_GroupName_754"] = "New Static Object #005",
    ["DictKey_UnitName_1482"] = "Unit #099",
    ["DictKey_UnitName_2147"] = "Plant #014",
    ["DictKey_WptName_420"] = "",
    ["DictKey_WptName_780"] = "",
    ["DictKey_UnitName_4469"] = "Unit #011",
    ["DictKey_UnitName_4433"] = "",
    ["DictKey_UnitName_3516"] = "Refinery #079",
    ["DictKey_UnitName_5019"] = "Unit #322",
    ["DictKey_WptName_2358"] = "",
    ["DictKey_UnitName_254"] = "",
    ["DictKey_WptName_710"] = "",
    ["DictKey_WptName_3028"] = "",
    ["DictKey_WptName_2021"] = "",
    ["DictKey_WptName_4472"] = "",
    ["DictKey_UnitName_4188"] = "",
    ["DictKey_WptName_97"] = "",
    ["DictKey_UnitName_2555"] = "Plant #033",
    ["DictKey_WptName_4035"] = "",
    ["DictKey_WptName_352"] = "",
    ["DictKey_GroupName_3717"] = "Munición #013",
    ["DictKey_WptName_4901"] = "",
    ["DictKey_WptName_679"] = "",
    ["DictKey_UnitName_4802"] = "",
    ["DictKey_UnitName_2540"] = "Plant #035",
    ["DictKey_UnitName_4177"] = "",
    ["DictKey_WptName_3040"] = "",
    ["DictKey_WptName_479"] = "",
    ["DictKey_GroupName_163"] = "New Ship Group",
    ["DictKey_WptName_3861"] = "",
    ["DictKey_UnitName_4730"] = "Unit #242",
    ["DictKey_WptName_4534"] = "",
    ["DictKey_GroupName_2692"] = "Plant #064",
    ["DictKey_GroupName_133"] = "SAM site 01 #019",
    ["DictKey_UnitName_110"] = "Rezky",
    ["DictKey_WptName_4558"] = "",
    ["DictKey_UnitName_3082"] = "Piloto #002",
    ["DictKey_UnitName_4922"] = "",
    ["DictKey_UnitName_5268"] = "Enfield 2-3 ",
    ["DictKey_GroupName_583"] = "MI-8 Sirri Island",
    ["DictKey_UnitName_2744"] = "Oil tower #004",
    ["DictKey_UnitName_1813"] = "Oil tower",
    ["DictKey_UnitName_1343"] = "Unit #071",
    ["DictKey_WptName_1372"] = "",
    ["DictKey_GroupName_3287"] = "Tanque de combustible #004",
    ["DictKey_UnitName_41"] = "Unit #026",
    ["DictKey_GroupName_2488"] = "Plant #034",
    ["DictKey_UnitName_4180"] = "",
    ["DictKey_UnitName_1362"] = "Unit #093",
    ["DictKey_UnitName_2780"] = "Oil tower #004",
    ["DictKey_GroupName_720"] = " #021",
    ["DictKey_UnitName_3718"] = "Munición #011",
    ["DictKey_UnitName_4822"] = "",
    ["DictKey_GroupName_1374"] = "",
    ["DictKey_GroupName_3458"] = "Tanque de combustible #002",
    ["DictKey_ActionText_4086"] = "mist.respawnGroup('Overlord', true)",
    ["DictKey_UnitName_2762"] = "Oil tower #004",
    ["DictKey_WptName_5333"] = "",
    ["DictKey_WptName_2087"] = "",
    ["DictKey_GroupName_423"] = "Pontiac",
    ["DictKey_ActionText_3952"] = "mist.respawnGroup('AWACS 302', true)",
    ["DictKey_UnitName_4982"] = "",
    ["DictKey_GroupName_2212"] = "Plant #057",
    ["DictKey_WptName_5082"] = "",
    ["DictKey_GroupName_3822"] = " #002",
    ["DictKey_UnitName_1549"] = "Oil platform #002",
    ["DictKey_WptName_694"] = "",
    ["DictKey_UnitName_857"] = "",
    ["DictKey_GroupName_1022"] = "SU-25T Quesm Island CAS",
    ["DictKey_WptName_4091"] = "",
    ["DictKey_WptName_2829"] = "",
    ["DictKey_UnitName_878"] = "Unit #113",
    ["DictKey_GroupName_3383"] = "Tanque de combustible #010",
    ["DictKey_UnitName_2549"] = "Plant #038",
    ["DictKey_WptName_5303"] = "",
    ["DictKey_WptName_2175"] = "",
    ["DictKey_GroupName_593"] = "M-2000 Sir Abu Nuayr",
    ["DictKey_WptName_3090"] = "",
    ["DictKey_WptName_5419"] = "",
    ["DictKey_UnitName_342"] = "",
    ["DictKey_WptName_2187"] = "",
    ["DictKey_WptName_5111"] = "AG RANGE",
    ["DictKey_WptName_1895"] = "",
    ["DictKey_UnitName_1257"] = "",
    ["DictKey_WptName_2466"] = "",
    ["DictKey_GroupName_1707"] = "Refinery #004",
    ["DictKey_UnitName_1073"] = "Unit #053",
    ["DictKey_WptName_4361"] = "",
    ["DictKey_UnitName_1356"] = "Unit #004",
    ["DictKey_GroupName_3647"] = "Munición #010",
    ["DictKey_GroupName_1144"] = "",
    ["DictKey_WptName_5360"] = "",
    ["DictKey_UnitName_5381"] = "SEAD Strike Island Kish",
    ["DictKey_UnitName_3691"] = "Munición #004",
    ["DictKey_GroupName_5168"] = "Combat Training F5E  Instructor",
    ["DictKey_WptName_2313"] = "",
    ["DictKey_WptName_1847"] = "",
    ["DictKey_WptName_948"] = "",
    ["DictKey_GroupName_5045"] = "TGT Practice #005",
    ["DictKey_UnitName_4897"] = "",
    ["DictKey_GroupName_4051"] = "Shell",
    ["DictKey_UnitName_1110"] = "Unit #137",
    ["DictKey_WptName_1529"] = "",
    ["DictKey_WptName_3517"] = "",
    ["DictKey_GroupName_3260"] = "Refinery #077",
    ["DictKey_WptName_1781"] = "",
    ["DictKey_UnitName_4885"] = "Unit #289",
    ["DictKey_WptName_4138"] = "",
    ["DictKey_GroupName_576"] = "AH-1W Sirri Island",
    ["DictKey_UnitName_170"] = "Unit #109",
    ["DictKey_GroupName_4530"] = "",
    ["DictKey_WptName_2676"] = "",
    ["DictKey_UnitName_4414"] = "Colt 1-2 #003",
    ["DictKey_WptName_1985"] = "",
    ["DictKey_WptName_858"] = "",
    ["DictKey_UnitName_964"] = "Unit #024",
    ["DictKey_UnitName_2477"] = "Plant #038",
    ["DictKey_UnitName_1591"] = "Refinery #005",
    ["DictKey_UnitName_764"] = "New Static Object #009",
    ["DictKey_UnitName_636"] = "Unit #205",
    ["DictKey_WptName_5093"] = "AG RANGE",
    ["DictKey_WptName_4620"] = "Bandar Abbas",
    ["DictKey_UnitName_11"] = "Unit #013",
    ["DictKey_UnitName_3627"] = "Munición",
    ["DictKey_UnitName_4671"] = "Unit #143",
    ["DictKey_UnitName_3486"] = "Refinery #079",
    ["DictKey_GroupName_872"] = "SAM site 01 #033",
    ["DictKey_GroupName_2782"] = "Oil tower #001",
    ["DictKey_WptName_4420"] = "",
    ["DictKey_WptName_2988"] = "",
    ["DictKey_UnitName_1079"] = "Unit #059",
    ["DictKey_GroupName_2554"] = "Plant #033",
    ["DictKey_UnitName_591"] = "Unit #181",
    ["DictKey_WptName_2328"] = "",
    ["DictKey_UnitName_2129"] = "Unidad #023",
    ["DictKey_UnitName_2336"] = "Refinery #006",
    ["DictKey_GroupName_4036"] = "Overlord",
    ["DictKey_GroupName_2912"] = "Weapons storage #008",
    ["DictKey_UnitName_737"] = "New Static Object #006",
    ["DictKey_UnitName_3900"] = "Piloto #020",
    ["DictKey_WptName_5454"] = "",
    ["DictKey_WptName_2586"] = "",
    ["DictKey_UnitName_1636"] = "Refinery #002",
    ["DictKey_WptName_5044"] = "",
    ["DictKey_UnitName_3851"] = "Refinery #097",
    ["DictKey_UnitName_3282"] = "Tanque de combustible",
    ["DictKey_GroupName_847"] = " #047",
    ["DictKey_WptName_237"] = "",
    ["DictKey_UnitName_1307"] = "Unit #033",
    ["DictKey_GroupName_2713"] = "Plant #110",
    ["DictKey_UnitName_1230"] = "Unit #264",
    ["DictKey_UnitName_4839"] = "",
    ["DictKey_WptName_3541"] = "",
    ["DictKey_UnitName_2384"] = "Refinery #001",
    ["DictKey_WptName_5392"] = "IP",
    ["DictKey_UnitName_5073"] = "Unit #366",
    ["DictKey_GroupName_2341"] = "Refinery #058",
    ["DictKey_WptName_3604"] = "",
    ["DictKey_UnitName_4342"] = "Pilot #011",
    ["DictKey_WptName_585"] = "",
    ["DictKey_ActionText_4612"] = "",
    ["DictKey_UnitName_1159"] = "Unit #223",
    ["DictKey_GroupName_606"] = "SAM site 01 #023",
    ["DictKey_WptName_2496"] = "",
    ["DictKey_WptName_5335"] = "",
    ["DictKey_WptName_1664"] = "",
    ["DictKey_UnitName_269"] = "Unit #046",
    ["DictKey_WptName_3613"] = "",
    ["DictKey_WptName_2457"] = "",
    ["DictKey_UnitName_139"] = " #005",
    ["DictKey_GroupName_508"] = " #010",
    ["DictKey_WptName_2562"] = "",
    ["DictKey_UnitName_1136"] = "Unit #184",
    ["DictKey_UnitName_3261"] = "Refinery #077",
    ["DictKey_GroupName_2070"] = "Plant #001",
    ["DictKey_WptName_3616"] = "",
    ["DictKey_GroupName_2146"] = "Plant #014",
    ["DictKey_UnitName_337"] = "Unit #048",
    ["DictKey_WptName_1255"] = "",
    ["DictKey_UnitName_1242"] = "Unit #158",
    ["DictKey_WptName_1829"] = "",
    ["DictKey_WptName_102"] = "",
    ["DictKey_WptName_1108"] = "",
    ["DictKey_UnitName_1445"] = "Unit #024",
    ["DictKey_WptName_3199"] = "",
    ["DictKey_UnitName_1178"] = "Unit #008",
    ["DictKey_UnitName_3372"] = "Tanque de combustible #001",
    ["DictKey_GroupName_1914"] = "Oil tower #030",
    ["DictKey_WptName_3178"] = "",
    ["DictKey_GroupName_2494"] = "Plant #036",
    ["DictKey_UnitName_4849"] = "",
    ["DictKey_GroupName_4127"] = "Nuevo objeto estático #002",
    ["DictKey_UnitName_1552"] = "Oil platform #005",
    ["DictKey_WptName_2244"] = "",
    ["DictKey_WptName_5125"] = "",
    ["DictKey_UnitName_3606"] = "Tanque de combustible #031",
    ["DictKey_UnitName_1798"] = "Refinery #001",
    ["DictKey_UnitName_4691"] = "Unit #177",
    ["DictKey_WptName_198"] = "",
    ["DictKey_UnitName_2237"] = "Refinery #014",
    ["DictKey_WptName_5191"] = "",
    ["DictKey_WptName_5032"] = "",
    ["DictKey_UnitName_4871"] = "",
    ["DictKey_UnitName_4992"] = "TGT Practice",
    ["DictKey_UnitName_295"] = "Unit #066",
    ["DictKey_UnitName_3835"] = "",
    ["DictKey_WptName_5179"] = "",
    ["DictKey_UnitName_3925"] = "Unit #113",
    ["DictKey_UnitName_108"] = "Neustrashimy",
    ["DictKey_GroupName_4030"] = "",
    ["DictKey_sortie_5"] = "",
    ["DictKey_WptName_4362"] = "",
    ["DictKey_WptName_199"] = "",
    ["DictKey_UnitName_606"] = " #060",
    ["DictKey_UnitName_1777"] = "Refinery #001",
    ["DictKey_GroupName_664"] = " #062",
    ["DictKey_GroupName_3209"] = "Refinery #080",
    ["DictKey_GroupName_1472"] = "New Vehicle Group #002",
    ["DictKey_UnitName_5068"] = "Unit #361",
    ["DictKey_WptName_203"] = "",
    ["DictKey_WptName_5329"] = "",
    ["DictKey_UnitName_693"] = "Pilot #002",
    ["DictKey_UnitName_4680"] = "Unit #159",
    ["DictKey_WptName_900"] = "",
    ["DictKey_WptName_3196"] = "",
    ["DictKey_UnitName_2107"] = "",
    ["DictKey_UnitName_4128"] = "",
    ["DictKey_WptName_5153"] = "AG RANGE",
    ["DictKey_GroupName_1731"] = "Refinery #003",
    ["DictKey_UnitName_3612"] = "Refinery #099",
    ["DictKey_UnitName_3114"] = "Unidad #005",
    ["DictKey_WptName_4497"] = "",
    ["DictKey_GroupName_611"] = "SAM site 01 #024",
    ["DictKey_UnitName_1864"] = "Oil tower",
    ["DictKey_UnitName_3844"] = "Unidad #057",
    ["DictKey_WptName_4006"] = "",
    ["DictKey_WptName_5307"] = "",
    ["DictKey_UnitName_149"] = "Unit #091",
    ["DictKey_GroupName_108"] = "SAM site 01 #014",
    ["DictKey_WptName_1547"] = "",
    ["DictKey_UnitName_1258"] = "",
    ["DictKey_GroupName_3074"] = "Texaco",
    ["DictKey_UnitName_4282"] = "",
    ["DictKey_GroupName_1941"] = "Oil platform #004",
    ["DictKey_WptName_425"] = "",
    ["DictKey_UnitName_2630"] = "Plant #066",
    ["DictKey_WptName_5264"] = "",
    ["DictKey_UnitName_357"] = "Unit #052",
    ["DictKey_WptName_4313"] = "",
    ["DictKey_UnitName_1140"] = "Unit #188",
    ["DictKey_ActionText_3988"] = "if Group.getByName('JTAC6') == nil then\
return true\
else\
return false\
end",
    ["DictKey_UnitName_5248"] = "Enfield 2-3 ",
    ["DictKey_UnitName_4830"] = "",
    ["DictKey_UnitName_3994"] = "JTAC6",
    ["DictKey_UnitName_2687"] = "Plant #066",
    ["DictKey_UnitName_5063"] = "Unit #358",
    ["DictKey_WptName_2523"] = "",
    ["DictKey_WptName_5338"] = "",
    ["DictKey_ActionText_5437"] = "Welcome to Pigeon's Ulra Realism Mission. This mission is situated around 2010 in the Persian Gulf. \
You are playing as Nato forces.\
\
Be aware: Iranian military aircraft are not allowed to enter the UAE.\
But they will attack when you come too close too Iranian assets.",
    ["DictKey_UnitName_3594"] = "Refinery #098",
    ["DictKey_WptName_3364"] = "",
    ["DictKey_WptName_4050"] = "",
    ["DictKey_UnitName_1825"] = "Oil tower #001",
    ["DictKey_GroupName_2407"] = "Refinery #065",
    ["DictKey_UnitName_4486"] = "Springfield 1-1",
    ["DictKey_WptName_633"] = "",
    ["DictKey_WptName_837"] = "",
    ["DictKey_GroupName_48"] = "SAM site 01 #002",
    ["DictKey_UnitName_2855"] = "Unidad #031",
    ["DictKey_UnitName_4911"] = "",
    ["DictKey_GroupName_1117"] = "SAM site 01 #004",
    ["DictKey_WptName_5483"] = "",
    ["DictKey_WptName_3887"] = "",
    ["DictKey_GroupName_3675"] = "Munición #004",
    ["DictKey_WptName_4492"] = "",
    ["DictKey_UnitName_2750"] = "Oil tower #003",
    ["DictKey_WptName_3689"] = "",
    ["DictKey_GroupName_1317"] = "Moved Qum HAWK",
    ["DictKey_GroupName_3227"] = "Refinery #081",
    ["DictKey_UnitName_1684"] = "Refinery #006",
    ["DictKey_WptName_4377"] = "",
    ["DictKey_WptName_3379"] = "",
    ["DictKey_GroupName_3119"] = "IRN Shell",
    ["DictKey_WptName_2823"] = "",
    ["DictKey_UnitName_2576"] = "Plant #066",
    ["DictKey_WptName_865"] = "",
    ["DictKey_GroupName_2509"] = "Plant #032",
    ["DictKey_UnitName_1765"] = "Refinery",
    ["DictKey_GroupName_628"] = "SAM site 01 #029",
    ["DictKey_UnitName_4739"] = "",
    ["DictKey_GroupName_2206"] = "Plant #055",
    ["DictKey_UnitName_501"] = "12",
    ["DictKey_GroupName_3705"] = "Munición #004",
    ["DictKey_UnitName_3366"] = "Tanque de combustible #002",
    ["DictKey_WptName_451"] = "",
    ["DictKey_GroupName_4880"] = "moved Qum HAWK #003",
    ["DictKey_UnitName_4784"] = "",
    ["DictKey_WptName_2211"] = "",
    ["DictKey_UnitName_399"] = "Unit #056",
    ["DictKey_WptName_725"] = "",
    ["DictKey_UnitName_1699"] = "Refinery #002",
    ["DictKey_UnitName_3075"] = "Texaco",
    ["DictKey_UnitName_4818"] = "",
    ["DictKey_UnitName_4226"] = "",
    ["DictKey_WptName_376"] = "",
    ["DictKey_UnitName_4294"] = "Pilot #002",
    ["DictKey_UnitName_1201"] = "Unit #013",
    ["DictKey_GroupName_2257"] = "Refinery #002",
    ["DictKey_UnitName_2651"] = "Plant #069",
    ["DictKey_WptName_2736"] = "",
    ["DictKey_GroupName_3041"] = "Plant #016",
    ["DictKey_WptName_5095"] = "",
    ["DictKey_UnitName_3772"] = "Munición #016",
    ["DictKey_WptName_4063"] = "",
    ["DictKey_UnitName_4779"] = "",
    ["DictKey_WptName_3568"] = "",
    ["DictKey_UnitName_2141"] = "Plant #012",
    ["DictKey_WptName_5078"] = "",
    ["DictKey_UnitName_1173"] = "Unit #002",
    ["DictKey_WptName_1592"] = "",
    ["DictKey_WptName_5412"] = "",
    ["DictKey_WptName_1946"] = "",
    ["DictKey_UnitName_4929"] = "",
    ["DictKey_WptName_2745"] = "",
    ["DictKey_WptName_3223"] = "",
    ["DictKey_GroupName_3026"] = "Plant #018",
    ["DictKey_UnitName_1484"] = "Unit #101",
    ["DictKey_UnitName_146"] = "Unit #088",
    ["DictKey_UnitName_5109"] = "Combat Training C101EB",
    ["DictKey_UnitName_4705"] = "Unit #193",
    ["DictKey_WptName_4584"] = "",
    ["DictKey_UnitName_398"] = "Hawg 1-1",
    ["DictKey_WptName_5304"] = "",
    ["DictKey_UnitName_1060"] = "Unit #148",
    ["DictKey_WptName_4386"] = "",
    ["DictKey_UnitName_2291"] = "Refinery #005",
    ["DictKey_GroupName_3233"] = "Refinery #083",
    ["DictKey_UnitName_2348"] = "Refinery #003",
    ["DictKey_UnitName_1504"] = "Unit #117",
    ["DictKey_UnitName_1175"] = "Unit #004",
    ["DictKey_WptName_4364"] = "",
    ["DictKey_GroupName_1692"] = "Refinery #001",
    ["DictKey_WptName_3713"] = "",
    ["DictKey_UnitName_4450"] = "Unit #026",
    ["DictKey_UnitName_4187"] = "",
    ["DictKey_WptName_5294"] = "",
    ["DictKey_WptName_5354"] = "",
    ["DictKey_GroupName_5305"] = "AV-8B Carrier #001",
    ["DictKey_UnitName_333"] = "Unit #044",
    ["DictKey_GroupName_3106"] = "MIG-29A Kerman Airport CAS ",
    ["DictKey_UnitName_876"] = "Unit #111",
    ["DictKey_WptName_4453"] = "",
    ["DictKey_GroupName_2578"] = "Plant #078",
    ["DictKey_UnitName_2612"] = "Plant #071",
    ["DictKey_WptName_4446"] = "",
    ["DictKey_UnitName_5199"] = "",
    ["DictKey_WptName_233"] = "",
    ["DictKey_GroupName_1905"] = "Oil tower #027",
    ["DictKey_WptName_4493"] = "",
    ["DictKey_WptName_824"] = "",
    ["DictKey_GroupName_1962"] = "Plant",
    ["DictKey_GroupName_4777"] = "",
    ["DictKey_GroupName_1992"] = "Plant #010",
    ["DictKey_WptName_1691"] = "",
    ["DictKey_UnitName_227"] = "",
    ["DictKey_UnitName_4809"] = "",
    ["DictKey_UnitName_618"] = "Unit #197",
    ["DictKey_UnitName_2964"] = "Rudan Conversion #012",
    ["DictKey_UnitName_4201"] = "",
    ["DictKey_GroupName_2401"] = "Refinery #057",
    ["DictKey_UnitName_2402"] = "Refinery",
    ["DictKey_UnitName_4208"] = "",
    ["DictKey_WptName_4013"] = "",
    ["DictKey_UnitName_380"] = "Unit #126",
    ["DictKey_UnitName_95"] = "Unit #061",
    ["DictKey_UnitName_4964"] = "",
    ["DictKey_WptName_4853"] = "",
    ["DictKey_GroupName_1370"] = "",
    ["DictKey_UnitName_2582"] = "Plant #071",
    ["DictKey_WptName_800"] = "",
    ["DictKey_GroupName_1674"] = "Refinery #032",
    ["DictKey_UnitName_5287"] = "Enfield 2-2 ",
    ["DictKey_GroupName_3587"] = "Tanque de combustible #046",
    ["DictKey_WptName_3499"] = "",
    ["DictKey_UnitName_2468"] = "Plant #035",
    ["DictKey_UnitName_2131"] = "Unidad #025",
    ["DictKey_WptName_5453"] = "",
    ["DictKey_WptName_2820"] = "",
    ["DictKey_UnitName_1198"] = "Unit #010",
    ["DictKey_WptName_5094"] = "AA TGT",
    ["DictKey_WptName_1625"] = "",
    ["DictKey_UnitName_4323"] = "Piloto #008",
    ["DictKey_UnitName_1174"] = "Unit #003",
    ["DictKey_WptName_793"] = "",
    ["DictKey_GroupName_3605"] = "Tanque de combustible #050",
    ["DictKey_UnitName_2591"] = "Plant #070",
    ["DictKey_WptName_4508"] = "",
    ["DictKey_UnitName_3288"] = "Tanque de combustible",
    ["DictKey_UnitName_4682"] = "Unit #166",
    ["DictKey_GroupName_850"] = "New Static Object #001",
    ["DictKey_WptName_3637"] = "",
    ["DictKey_WptName_3370"] = "",
    ["DictKey_WptName_288"] = "",
    ["DictKey_WptName_3049"] = "",
    ["DictKey_UnitName_365"] = "Unit #116",
    ["DictKey_UnitName_4236"] = "",
    ["DictKey_GroupName_680"] = "10 #001",
    ["DictKey_UnitName_4887"] = "Unit #291",
    ["DictKey_WptName_2220"] = "",
    ["DictKey_UnitName_2132"] = "Unidad #026",
    ["DictKey_GroupName_4910"] = "",
    ["DictKey_UnitName_5340"] = "AV-8B Carrier #003",
    ["DictKey_GroupName_2088"] = "Plant #042",
    ["DictKey_GroupName_4156"] = "Enfield #004",
    ["DictKey_WptName_1964"] = "",
    ["DictKey_GroupName_3242"] = "Refinery #086",
    ["DictKey_UnitName_635"] = "Unit #204",
    ["DictKey_WptName_3849"] = "",
    ["DictKey_UnitName_4684"] = "Unit #168",
    ["DictKey_GroupName_2043"] = "Plant #027",
    ["DictKey_WptName_4005"] = "",
    ["DictKey_UnitName_776"] = "New Static Object #011",
    ["DictKey_GroupName_2728"] = "Oil tower",
    ["DictKey_WptName_449"] = "",
    ["DictKey_GroupName_2085"] = "Plant #041",
    ["DictKey_WptName_3818"] = "",
    ["DictKey_ActionText_3949"] = "if Group.getByName('TANKER 307') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_4373"] = "",
    ["DictKey_GroupName_1171"] = "SAM site 01",
    ["DictKey_UnitName_561"] = "",
    ["DictKey_WptName_452"] = "",
    ["DictKey_UnitName_2405"] = "Refinery #001",
    ["DictKey_GroupName_2557"] = "Plant #032",
    ["DictKey_UnitName_4216"] = "",
    ["DictKey_UnitName_1894"] = "Oil tower #002",
    ["DictKey_UnitName_546"] = " #014",
    ["DictKey_UnitName_107"] = "Moskva",
    ["DictKey_WptName_2517"] = "",
    ["DictKey_GroupName_1794"] = "Refinery #044",
    ["DictKey_UnitName_3183"] = "Refinery #078",
    ["DictKey_UnitName_1141"] = "Unit #212",
    ["DictKey_GroupName_4475"] = "Carrier Protection Force",
    ["DictKey_UnitName_4712"] = "Unit #209",
    ["DictKey_GroupName_2572"] = "Plant #076",
    ["DictKey_UnitName_3784"] = "Unidad #043",
    ["DictKey_WptName_2033"] = "",
    ["DictKey_WptName_2607"] = "",
    ["DictKey_WptName_4348"] = "",
    ["DictKey_WptName_4626"] = "",
    ["DictKey_UnitName_4257"] = "",
    ["DictKey_UnitName_1145"] = "",
    ["DictKey_ActionText_4634"] = "AWACS available:\
\
133.00 AM           - Overlord (UAE)\
134.00 AM           - Magic 1-1 ",
    ["DictKey_WptName_201"] = "",
    ["DictKey_WptName_3683"] = "",
    ["DictKey_GroupName_698"] = "New Airplane Group #001",
    ["DictKey_UnitName_4742"] = "",
    ["DictKey_WptName_3137"] = "",
    ["DictKey_UnitName_1443"] = "Unit #022",
    ["DictKey_UnitName_396"] = "Unit #053",
    ["DictKey_WptName_4516"] = "",
    ["DictKey_WptName_732"] = "",
    ["DictKey_WptName_4162"] = "",
    ["DictKey_UnitName_4089"] = "CVN-73",
    ["DictKey_GroupName_3723"] = "Munición #015",
    ["DictKey_WptName_657"] = "",
    ["DictKey_UnitName_4924"] = "",
    ["DictKey_UnitName_4863"] = "",
    ["DictKey_WptName_4596"] = "",
    ["DictKey_GroupName_1956"] = "Nuevo grupo de barcos #002",
    ["DictKey_GroupName_787"] = " #038",
    ["DictKey_UnitName_1831"] = "Oil tower #003",
    ["DictKey_WptName_2661"] = "",
    ["DictKey_WptName_926"] = "",
    ["DictKey_GroupName_862"] = "New Vehicle Group #002",
    ["DictKey_WptName_2944"] = "",
    ["DictKey_UnitName_4528"] = "",
    ["DictKey_GroupName_3326"] = "Tanque de combustible #011",
    ["DictKey_GroupName_5265"] = "F18 Carrier Spawn CAT",
    ["DictKey_UnitName_542"] = " #013",
    ["DictKey_ActionText_3950"] = "mist.respawnGroup('TANKER 307', true)",
    ["DictKey_UnitName_3459"] = "Tanque de combustible #002",
    ["DictKey_UnitName_2056"] = "Plant #007",
    ["DictKey_UnitName_1687"] = "Refinery #004",
    ["DictKey_UnitName_1354"] = "Unit #084",
    ["DictKey_UnitName_2537"] = "Plant #034",
    ["DictKey_WptName_3109"] = "",
    ["DictKey_GroupName_3197"] = "Refinery #080",
    ["DictKey_WptName_921"] = "",
    ["DictKey_UnitName_111"] = "Unit #071",
    ["DictKey_WptName_1685"] = "",
    ["DictKey_UnitName_187"] = "Unit #115",
    ["DictKey_UnitName_468"] = "TANKER 307",
    ["DictKey_WptName_3666"] = "",
    ["DictKey_UnitName_2819"] = "Oil tower #001",
    ["DictKey_WptName_3523"] = "",
    ["DictKey_WptName_2367"] = "",
    ["DictKey_GroupName_1773"] = "Refinery #037",
    ["DictKey_UnitName_2807"] = "Oil tower #005",
    ["DictKey_WptName_3722"] = "",
    ["DictKey_WptName_4595"] = "",
    ["DictKey_UnitName_893"] = "Pilot #009",
    ["DictKey_UnitName_550"] = " #014",
    ["DictKey_WptName_2397"] = "",
    ["DictKey_GroupName_832"] = "New Static Object #002",
    ["DictKey_UnitName_1368"] = "",
    ["DictKey_WptName_5352"] = "",
    ["DictKey_UnitName_2492"] = "Plant #035",
    ["DictKey_WptName_1305"] = "",
    ["DictKey_WptName_2766"] = "",
    ["DictKey_GroupName_2716"] = "Plant #111",
    ["DictKey_UnitName_3240"] = "Refinery #079",
    ["DictKey_UnitName_4037"] = "Overlord",
    ["DictKey_GroupName_174"] = "",
    ["DictKey_WptName_4139"] = "",
    ["DictKey_UnitName_851"] = "",
    ["DictKey_WptName_773"] = "",
    ["DictKey_UnitName_1819"] = "Oil tower",
    ["DictKey_UnitName_59"] = "Unit #039",
    ["DictKey_UnitName_5042"] = "Unit #341",
    ["DictKey_UnitName_2621"] = "Plant #067",
    ["DictKey_ActionText_3935"] = "ctld.JTACAutoLase('Axeman', 1688, true, \"vehicle\");\
\
ctld.JTACAutoLase('Darknight', 1688, true, \"vehicle\");",
    ["DictKey_WptName_3241"] = "",
    ["DictKey_WptName_661"] = "",
    ["DictKey_WptName_3454"] = "",
    ["DictKey_GroupName_4069"] = "OMAN_SAM2",
    ["DictKey_GroupName_3578"] = "Tanque de combustible #045",
    ["DictKey_UnitName_2738"] = "Oil tower",
    ["DictKey_WptName_5342"] = "",
    ["DictKey_WptName_3628"] = "",
    ["DictKey_UnitName_4977"] = "",
    ["DictKey_UnitName_2648"] = "Plant #067",
    ["DictKey_WptName_2547"] = "",
    ["DictKey_WptName_5292"] = "",
    ["DictKey_UnitName_879"] = "Unit #114",
    ["DictKey_GroupName_3126"] = "Nuevo objeto estático #001",
    ["DictKey_UnitName_528"] = " #011",
    ["DictKey_GroupName_3386"] = "Tanque de combustible #011",
    ["DictKey_UnitName_1705"] = "Refinery #006",
    ["DictKey_UnitName_3721"] = "Munición",
    ["DictKey_UnitName_3160"] = "Ford 1-4",
    ["DictKey_UnitName_721"] = "Pilot #012",
    ["DictKey_WptName_5159"] = "AG RANGE",
    ["DictKey_GroupName_2323"] = "Refinery #002",
    ["DictKey_GroupName_3215"] = "Refinery #079",
    ["DictKey_UnitName_4963"] = "",
    ["DictKey_GroupName_2350"] = "Refinery #062",
    ["DictKey_UnitName_5062"] = "Unit #357",
    ["DictKey_WptName_3104"] = "",
    ["DictKey_UnitName_4753"] = "",
    ["DictKey_WptName_2697"] = "",
    ["DictKey_GroupName_1290"] = "SAM site 01 #029",
    ["DictKey_UnitName_4316"] = "F-16 Al Fijarah Intl #003",
    ["DictKey_UnitName_1084"] = "Pilot #005",
    ["DictKey_UnitName_184"] = "Unit #112",
    ["DictKey_WptName_1003"] = "",
    ["DictKey_UnitName_2041"] = "Plant #006",
    ["DictKey_UnitName_3791"] = "Unidad #046",
    ["DictKey_WptName_2382"] = "",
    ["DictKey_WptName_3134"] = "",
    ["DictKey_UnitName_457"] = "Enfield 1-4",
    ["DictKey_WptName_5224"] = "",
    ["DictKey_GroupName_517"] = " #011",
    ["DictKey_UnitName_5091"] = "Combat Training A10C Instructor",
    ["DictKey_UnitName_2937"] = "Rudan Conversion #002",
    ["DictKey_UnitName_2516"] = "Plant #035",
    ["DictKey_WptName_3695"] = "",
    ["DictKey_UnitName_977"] = "Unit #025",
    ["DictKey_WptName_4591"] = "",
    ["DictKey_WptName_3622"] = "",
    ["DictKey_UnitName_1038"] = " #073",
    ["DictKey_UnitName_4238"] = "",
    ["DictKey_UnitName_65"] = "Unit #043",
    ["DictKey_UnitName_3255"] = "Refinery #078",
    ["DictKey_UnitName_389"] = "Unit #131",
    ["DictKey_GroupName_2419"] = "Refinery #069",
    ["DictKey_UnitName_4149"] = "Piloto #034",
    ["DictKey_UnitName_4172"] = "",
    ["DictKey_UnitName_1963"] = "",
    ["DictKey_UnitName_2946"] = "",
    ["DictKey_WptName_2538"] = "",
    ["DictKey_WptName_2694"] = "",
    ["DictKey_WptName_3271"] = "",
    ["DictKey_UnitName_4217"] = "",
    ["DictKey_GroupName_3155"] = "Nuevo grupo de aviones #001",
    ["DictKey_UnitName_5226"] = "Enfield 2-1",
    ["DictKey_GroupName_1974"] = "Plant #004",
    ["DictKey_UnitName_5060"] = "Unit #355",
    ["DictKey_GroupName_4848"] = "",
    ["DictKey_UnitName_2240"] = "Refinery #015",
    ["DictKey_UnitName_3210"] = "Refinery #080",
    ["DictKey_GroupName_1502"] = "Hawk Abu Musa Island",
    ["DictKey_GroupName_4835"] = "",
    ["DictKey_WptName_1292"] = "",
    ["DictKey_GroupName_1542"] = "Oil platform #001",
    ["DictKey_UnitName_360"] = "Unit #083",
    ["DictKey_WptName_1991"] = "",
    ["DictKey_UnitName_329"] = "",
    ["DictKey_WptName_4776"] = "",
    ["DictKey_WptName_4509"] = "",
    ["DictKey_UnitName_1337"] = "Unit #065",
    ["DictKey_UnitName_4808"] = "",
    ["DictKey_UnitName_2252"] = "Refinery #019",
    ["DictKey_UnitName_1080"] = "Unit #175",
    ["DictKey_WptName_373"] = "",
    ["DictKey_UnitName_615"] = "Unit #196",
    ["DictKey_WptName_797"] = "",
    ["DictKey_UnitName_136"] = "Unit #086",
    ["DictKey_WptName_4040"] = "",
    ["DictKey_UnitName_4664"] = "Unit #136",
    ["DictKey_GroupName_3871"] = "",
    ["DictKey_WptName_3103"] = "",
    ["DictKey_WptName_5236"] = "",
    ["DictKey_ActionText_3954"] = "mist.respawnGroup('AWACS 303', true)",
    ["DictKey_WptName_816"] = "",
    ["DictKey_WptName_4498"] = "",
    ["DictKey_WptName_5467"] = "",
    ["DictKey_GroupName_1680"] = "Refinery #034",
    ["DictKey_WptName_4580"] = "",
    ["DictKey_UnitName_1500"] = "Unit #115",
    ["DictKey_UnitName_5070"] = "Unit #363",
    ["DictKey_UnitName_3552"] = "Refinery #099",
    ["DictKey_UnitName_2579"] = "Plant #068",
    ["DictKey_UnitName_450"] = "Enfield 1-1",
    ["DictKey_UnitName_5011"] = "Unit #314",
    ["DictKey_WptName_2571"] = "",
    ["DictKey_WptName_1283"] = "",
    ["DictKey_UnitName_4706"] = "Unit #195",
    ["DictKey_GroupName_687"] = "New Airplane Group",
    ["DictKey_GroupName_2296"] = "Refinery",
    ["DictKey_UnitName_4266"] = "",
    ["DictKey_UnitName_3964"] = "JTAC3",
    ["DictKey_GroupName_2434"] = "Refinery #004",
    ["DictKey_WptName_794"] = "",
    ["DictKey_GroupName_223"] = "",
    ["DictKey_UnitName_1010"] = " #021",
    ["DictKey_WptName_1556"] = "",
    ["DictKey_GroupName_1221"] = "SAM site 01 #018",
    ["DictKey_UnitName_2282"] = "Refinery #002",
    ["DictKey_UnitName_351"] = "Overlord",
    ["DictKey_UnitName_4192"] = "",
    ["DictKey_GroupName_27"] = "",
    ["DictKey_WptName_666"] = "",
    ["DictKey_GroupName_835"] = "New Airplane Group #005",
    ["DictKey_UnitName_4277"] = "",
    ["DictKey_GroupName_3329"] = "Tanque de combustible #012",
    ["DictKey_UnitName_445"] = "Unit #158",
    ["DictKey_UnitName_4984"] = "",
    ["DictKey_UnitName_2955"] = "",
    ["DictKey_GroupName_414"] = "Seerik SA-10",
    ["DictKey_UnitName_3913"] = "Piloto #026",
    ["DictKey_WptName_5291"] = "",
    ["DictKey_WptName_3795"] = "",
    ["DictKey_WptName_2256"] = "",
    ["DictKey_GroupName_3659"] = "Munición #014",
    ["DictKey_GroupName_1287"] = "New Static Object #001",
    ["DictKey_WptName_3640"] = "",
    ["DictKey_GroupName_1578"] = "Refinery #014",
    ["DictKey_UnitName_978"] = " #070",
    ["DictKey_UnitName_148"] = "Unit #090",
    ["DictKey_UnitName_3315"] = "Tanque de combustible #003",
    ["DictKey_UnitName_3700"] = "Munición",
    ["DictKey_UnitName_371"] = "Unit #120",
    ["DictKey_UnitName_5207"] = "Enfield 2-2 ",
    ["DictKey_UnitName_2363"] = "Refinery #001",
    ["DictKey_UnitName_4443"] = "Unit #011",
    ["DictKey_UnitName_1069"] = "Unit #176",
    ["DictKey_WptName_4529"] = "",
    ["DictKey_UnitName_4413"] = "Colt 1-1 #003",
    ["DictKey_GroupName_3254"] = "Refinery #078",
    ["DictKey_UnitName_3468"] = "Refinery #078",
    ["DictKey_WptName_3099"] = "",
    ["DictKey_WptName_1706"] = "",
    ["DictKey_UnitName_4720"] = "Unit #217",
    ["DictKey_ActionText_3981"] = "mist.respawnGroup('JTAC2', true)",
    ["DictKey_UnitName_5007"] = "Unit #312",
    ["DictKey_UnitName_1187"] = "Unit #017",
    ["DictKey_UnitName_1903"] = "Oil tower #003",
    ["DictKey_WptName_1724"] = "",
    ["DictKey_WptName_2628"] = "",
    ["DictKey_WptName_825"] = "",
    ["DictKey_GroupName_1884"] = "Oil tower #020",
    ["DictKey_UnitName_2732"] = "Oil tower",
    ["DictKey_UnitName_161"] = "Unit #103",
    ["DictKey_UnitName_535"] = " #012",
    ["DictKey_UnitName_3889"] = " #091",
    ["DictKey_GroupName_3003"] = "Uzi #003",
    ["DictKey_UnitName_4309"] = "F-16 Al Dhafra AB #001",
    ["DictKey_UnitName_3597"] = "Tanque de combustible #033",
    ["DictKey_GroupName_730"] = "New Static Object #006",
    ["DictKey_WptName_1931"] = "",
    ["DictKey_UnitName_3679"] = "Munición #001",
    ["DictKey_GroupName_217"] = "",
    ["DictKey_GroupName_377"] = "SAM site 01 #014",
    ["DictKey_WptName_510"] = "",
    ["DictKey_UnitName_335"] = "Unit #046",
    ["DictKey_UnitName_3492"] = "Tanque de combustible #003",
    ["DictKey_GroupName_3966"] = "JTAC2",
    ["DictKey_UnitName_1013"] = " #021",
    ["DictKey_WptName_583"] = "",
    ["DictKey_WptName_5377"] = "AA TGT",
    ["DictKey_WptName_4460"] = "",
    ["DictKey_UnitName_4384"] = "",
    ["DictKey_GroupName_495"] = "New Static Object #002",
    ["DictKey_GroupName_1626"] = "Refinery #003",
    ["DictKey_WptName_4474"] = "",
    ["DictKey_UnitName_3303"] = "Tanque de combustible",
    ["DictKey_UnitName_4747"] = "",
    ["DictKey_GroupName_2485"] = "Plant #032",
    ["DictKey_UnitName_5081"] = "JTAC6",
    ["DictKey_WptName_681"] = "",
    ["DictKey_UnitName_1930"] = "Oil tower #002",
    ["DictKey_WptName_1128"] = "",
    ["DictKey_WptName_127"] = "",
    ["DictKey_UnitName_2636"] = "Plant #071",
    ["DictKey_WptName_1094"] = "",
    ["DictKey_UnitName_2396"] = "Refinery #005",
    ["DictKey_WptName_784"] = "",
    ["DictKey_GroupName_1426"] = "New Airplane Group #011",
    ["DictKey_UnitName_744"] = " #017",
    ["DictKey_GroupName_4077"] = "Weapons Storage",
    ["DictKey_WptName_4788"] = "",
    ["DictKey_UnitName_723"] = " #020",
    ["DictKey_UnitName_4962"] = "",
    ["DictKey_UnitName_1263"] = "",
    ["DictKey_WptName_565"] = "",
    ["DictKey_UnitName_3973"] = "JTAC5",
    ["DictKey_GroupName_2791"] = "Oil tower #048",
    ["DictKey_UnitName_2138"] = "Plant #011",
    ["DictKey_GroupName_775"] = "Mi-8",
    ["DictKey_GroupName_1575"] = "Refinery #013",
    ["DictKey_UnitName_5473"] = "12 #003",
    ["DictKey_WptName_2908"] = "",
    ["DictKey_WptName_2760"] = "",
    ["DictKey_GroupName_3509"] = "Refinery #097",
    ["DictKey_GroupName_768"] = "Uzi #005",
    ["DictKey_UnitName_1448"] = "Unit #027",
    ["DictKey_GroupName_3257"] = "Refinery #080",
    ["DictKey_UnitName_637"] = " #064",
    ["DictKey_UnitName_4846"] = "",
    ["DictKey_UnitName_4724"] = "Unit #221",
    ["DictKey_GroupName_1265"] = "New Airplane Group #001",
    ["DictKey_GroupName_963"] = " #065",
    ["DictKey_UnitName_3321"] = "Tanque de combustible",
    ["DictKey_WptName_2529"] = "",
    ["DictKey_WptName_569"] = "",
    ["DictKey_WptName_4539"] = "",
    ["DictKey_UnitName_4209"] = "",
    ["DictKey_GroupName_3917"] = "Lavan Island Hawk",
    ["DictKey_UnitName_2342"] = "Refinery #001",
    ["DictKey_UnitName_4941"] = "",
    ["DictKey_GroupName_2885"] = "Weapons storage #001",
    ["DictKey_UnitName_3769"] = "Munición #022",
    ["DictKey_GroupName_1593"] = "Refinery #019",
    ["DictKey_GroupName_3975"] = "JTAC6",
    ["DictKey_WptName_4385"] = "",
    ["DictKey_GroupName_3290"] = "Tanque de combustible #005",
    ["DictKey_GroupName_2701"] = "Plant #102",
    ["DictKey_UnitName_3027"] = "Plant #018",
    ["DictKey_GroupName_2236"] = "Refinery #014",
    ["DictKey_UnitName_3790"] = "Unidad #045",
    ["DictKey_GroupName_1749"] = "Refinery #004",
    ["DictKey_WptName_4615"] = "",
    ["DictKey_WptName_3701"] = "",
    ["DictKey_UnitName_151"] = "Unit #093",
    ["DictKey_WptName_3092"] = "",
    ["DictKey_UnitName_4744"] = "",
    ["DictKey_ActionText_4087"] = "if Group.getByName('Magic') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_864"] = "",
    ["DictKey_UnitName_1509"] = "Unit #122",
    ["DictKey_GroupName_1520"] = "",
    ["DictKey_WptName_1970"] = "",
    ["DictKey_GroupName_3443"] = "Tanque de combustible #004",
    ["DictKey_WptName_5184"] = "AA TGT",
    ["DictKey_WptName_122"] = "",
    ["DictKey_UnitName_19"] = "Unit #013",
    ["DictKey_WptName_5474"] = "",
    ["DictKey_GroupName_3464"] = "Refinery #080",
    ["DictKey_GroupName_567"] = " #027",
    ["DictKey_WptName_4579"] = "",
    ["DictKey_WptName_2899"] = "",
    ["DictKey_WptName_5194"] = "",
    ["DictKey_WptName_3349"] = "",
    ["DictKey_UnitName_4979"] = "",
    ["DictKey_UnitName_459"] = " #050",
    ["DictKey_WptName_2568"] = "",
    ["DictKey_UnitName_2852"] = "Oil tower #066",
    ["DictKey_UnitName_2831"] = "Oil tower #002",
    ["DictKey_UnitName_2372"] = "Refinery #004",
    ["DictKey_UnitName_1192"] = "Unit #236",
    ["DictKey_UnitName_4758"] = "",
    ["DictKey_WptName_2184"] = "",
    ["DictKey_UnitName_3148"] = "Piloto #012",
    ["DictKey_UnitName_5050"] = "Unit #347",
    ["DictKey_WptName_1637"] = "",
    ["DictKey_WptName_4574"] = "",
    ["DictKey_WptName_3274"] = "",
    ["DictKey_GroupName_3850"] = "Refinery #097",
    ["DictKey_WptName_3202"] = "",
    ["DictKey_UnitName_5416"] = "Magic",
    ["DictKey_WptName_1430"] = "",
    ["DictKey_UnitName_4770"] = "",
    ["DictKey_WptName_677"] = "",
    ["DictKey_UnitName_4995"] = "Unit #300",
    ["DictKey_UnitName_166"] = "Unit #105",
    ["DictKey_GroupName_2755"] = "Oil tower #042",
    ["DictKey_UnitName_1377"] = "",
    ["DictKey_GroupName_1761"] = "Refinery #002",
    ["DictKey_GroupName_3837"] = " #003",
    ["DictKey_UnitName_3676"] = "Munición #004",
    ["DictKey_WptName_5298"] = "",
    ["DictKey_UnitName_1993"] = "Plant #006",
    ["DictKey_GroupName_2740"] = "Oil tower #037",
    ["DictKey_UnitName_1981"] = "Plant #005",
    ["DictKey_ActionText_3986"] = "if Group.getByName('JTAC5') == nil then\
return true\
else\
return false\
end",
    ["DictKey_UnitName_907"] = "Unit #220",
    ["DictKey_UnitName_4241"] = "",
    ["DictKey_UnitName_4683"] = "Unit #167",
    ["DictKey_UnitName_1415"] = "Pilot #019",
    ["DictKey_GroupName_5065"] = "TGT Practice #007",
    ["DictKey_UnitName_3929"] = "Unidad #059",
    ["DictKey_WptName_4044"] = "",
    ["DictKey_GroupName_829"] = "New Static Object",
    ["DictKey_UnitName_1558"] = "Refinery #006",
    ["DictKey_WptName_675"] = "",
    ["DictKey_GroupName_1469"] = "New Vehicle Group #001",
    ["DictKey_WptName_4336"] = "",
    ["DictKey_UnitName_5051"] = "Unit #348",
    ["DictKey_UnitName_2777"] = "Oil tower #002",
    ["DictKey_GroupName_1824"] = "Oil tower #001",
    ["DictKey_UnitName_3570"] = "Tanque de combustible #028",
    ["DictKey_WptName_4499"] = "",
    ["DictKey_UnitName_4719"] = "Unit #216",
    ["DictKey_UnitName_3270"] = "Refinery #080",
    ["DictKey_WptName_503"] = "",
    ["DictKey_GroupName_289"] = "SAM site 01 #008",
    ["DictKey_GroupName_3278"] = "Tanque de combustible #001",
    ["DictKey_WptName_3289"] = "",
    ["DictKey_GroupName_3816"] = "Nuevo objeto estático #008",
    ["DictKey_UnitName_283"] = "Unit #056",
    ["DictKey_WptName_5221"] = "",
    ["DictKey_UnitName_2026"] = "Plant #002",
    ["DictKey_GroupName_3335"] = "Tanque de combustible #014",
    ["DictKey_GroupName_1926"] = "Oil tower #034",
    ["DictKey_WptName_3021"] = "",
    ["DictKey_UnitName_2153"] = "Plant #009",
    ["DictKey_GroupName_976"] = " #066",
    ["DictKey_WptName_3843"] = "",
    ["DictKey_WptName_3451"] = "",
    ["DictKey_UnitName_4399"] = "Pilot #019",
    ["DictKey_UnitName_521"] = " #010",
    ["DictKey_UnitName_327"] = "",
    ["DictKey_GroupName_3575"] = "Tanque de combustible #044",
    ["DictKey_UnitName_3474"] = "Tanque de combustible #004",
    ["DictKey_WptName_3256"] = "",
    ["DictKey_UnitName_274"] = "Unit #051",
    ["DictKey_UnitName_36"] = "",
    ["DictKey_ActionText_5379"] = "A few  SU-25T target practice drones have spawned north of Abu Dhabi at 15000 feet.\
(don't worry they are unarmed)\
\
Good luck rookie!\
",
    ["DictKey_UnitName_568"] = "Unit #174",
    ["DictKey_GroupName_763"] = "New Static Object #010",
    ["DictKey_UnitName_69"] = "Unit #045",
    ["DictKey_WptName_2484"] = "",
    ["DictKey_GroupName_748"] = "New Static Object #004",
    ["DictKey_UnitName_2810"] = "Oil tower",
    ["DictKey_UnitName_863"] = "Unit #107",
    ["DictKey_GroupName_2818"] = "Oil tower #057",
    ["DictKey_WptName_1416"] = "",
    ["DictKey_UnitName_1459"] = "Unit #005",
    ["DictKey_UnitName_3814"] = "",
    ["DictKey_UnitName_1885"] = "Oil tower #003",
    ["DictKey_UnitName_5010"] = "Unit #313",
    ["DictKey_WptName_1793"] = "",
    ["DictKey_UnitName_3318"] = "Tanque de combustible #005",
    ["DictKey_WptName_190"] = "",
    ["DictKey_WptName_4537"] = "",
    ["DictKey_WptName_4603"] = "",
    ["DictKey_UnitName_2892"] = "",
    ["DictKey_WptName_2376"] = "",
    ["DictKey_GroupName_2413"] = "Refinery #067",
    ["DictKey_WptName_14"] = "",
    ["DictKey_UnitName_2495"] = "Plant #036",
    ["DictKey_WptName_4002"] = "",
    ["DictKey_UnitName_499"] = "New Static Object",
    ["DictKey_UnitName_4881"] = "Unit #285",
    ["DictKey_UnitName_3874"] = "Uzi 1-4",
    ["DictKey_WptName_4625"] = "",
    ["DictKey_WptName_1295"] = "",
    ["DictKey_UnitName_5030"] = "Unit #331",
    ["DictKey_UnitName_15"] = "Unit #013",
    ["DictKey_UnitName_1285"] = "",
    ["DictKey_UnitName_644"] = "Unit #199",
    ["DictKey_GroupName_3044"] = "Plant #017",
    ["DictKey_WptName_914"] = "",
    ["DictKey_UnitName_4221"] = "",
    ["DictKey_UnitName_3207"] = "Refinery #078",
    ["DictKey_GroupName_1020"] = "New Airplane Group #010",
    ["DictKey_ActionRadioText_5405"] = "",
    ["DictKey_WptName_2643"] = "",
    ["DictKey_GroupName_2356"] = "Refinery #064",
    ["DictKey_WptName_1229"] = "",
    ["DictKey_UnitName_1332"] = "Unit #060",
    ["DictKey_UnitName_756"] = " #019",
    ["DictKey_WptName_4136"] = "",
    ["DictKey_GroupName_3053"] = "Plant #021",
    ["DictKey_UnitName_2726"] = "Oil tower",
    ["DictKey_WptName_5404"] = "",
    ["DictKey_WptName_4602"] = "",
    ["DictKey_WptName_799"] = "",
    ["DictKey_UnitName_5289"] = "Enfield 2-4",
    ["DictKey_UnitName_340"] = "Unit #051",
    ["DictKey_WptName_4512"] = "",
    ["DictKey_WptName_3385"] = "",
    ["DictKey_UnitName_4917"] = "",
    ["DictKey_UnitName_2846"] = "",
    ["DictKey_WptName_4405"] = "",
    ["DictKey_GroupName_3071"] = "Plant #023",
    ["DictKey_GroupName_4319"] = "M-2000 Al Bateen Airport",
    ["DictKey_UnitName_1172"] = "Unit #001",
    ["DictKey_WptName_912"] = "",
    ["DictKey_UnitName_3507"] = "Tanque de combustible #005",
    ["DictKey_UnitName_3922"] = "Unit #110",
    ["DictKey_UnitName_1344"] = "Unit #003",
    ["DictKey_GroupName_1938"] = "Oil platform #003",
    ["DictKey_GroupName_309"] = "SAM site 01 #009",
    ["DictKey_UnitName_1297"] = "Unit #030",
    ["DictKey_UnitName_1040"] = "Unit #149",
    ["DictKey_WptName_4958"] = "",
    ["DictKey_WptName_3409"] = "",
    ["DictKey_UnitName_64"] = "Unit #042",
    ["DictKey_UnitName_5097"] = "Combat Training A10C Trainee",
    ["DictKey_UnitName_4775"] = "",
    ["DictKey_UnitName_2183"] = "Plant #015",
    ["DictKey_GroupName_1740"] = "Refinery #002",
    ["DictKey_GroupName_1959"] = "Nuevo grupo de barcos #003",
    ["DictKey_WptName_745"] = "",
    ["DictKey_GroupName_3494"] = "Refinery #095",
    ["DictKey_UnitName_3213"] = "Refinery #077",
    ["DictKey_WptName_4366"] = "",
    ["DictKey_WptName_2030"] = "",
    ["DictKey_UnitName_3820"] = "Nuevo objeto estático #008",
    ["DictKey_WptName_1889"] = "",
    ["DictKey_UnitName_1214"] = "Unit #251",
    ["DictKey_UnitName_3829"] = "Unidad #055",
    ["DictKey_UnitName_119"] = "Unit #075",
    ["DictKey_GroupName_3245"] = "Refinery #087",
    ["DictKey_UnitName_1505"] = "Unit #118",
    ["DictKey_GroupName_1878"] = "Oil tower #018",
    ["DictKey_WptName_4152"] = "",
    ["DictKey_UnitName_4907"] = "",
    ["DictKey_UnitName_4075"] = "Unidad #072",
    ["DictKey_GroupName_1953"] = "Nuevo grupo de barcos #001",
    ["DictKey_GroupName_1623"] = "Refinery #004",
    ["DictKey_WptName_778"] = "",
    ["DictKey_UnitName_2961"] = "Rudan Conversion #012",
    ["DictKey_UnitName_779"] = "",
    ["DictKey_WptName_1474"] = "",
    ["DictKey_WptName_3655"] = "",
    ["DictKey_WptName_2448"] = "",
    ["DictKey_WptName_3259"] = "",
    ["DictKey_UnitName_439"] = "Unit #068",
    ["DictKey_UnitName_281"] = "Unit #054",
    ["DictKey_WptName_2802"] = "",
    ["DictKey_UnitName_5201"] = "Pilot #025",
    ["DictKey_WptName_3505"] = "",
    ["DictKey_WptName_5137"] = "",
    ["DictKey_UnitName_928"] = "",
    ["DictKey_UnitName_4736"] = "Unit #280",
    ["DictKey_UnitName_4418"] = "Colt 1-1 #004",
    ["DictKey_UnitName_4804"] = "",
    ["DictKey_WptName_4135"] = "",
    ["DictKey_UnitName_3809"] = "Unidad #058",
    ["DictKey_UnitName_4265"] = "",
    ["DictKey_GroupName_898"] = "New Airplane Group #006",
    ["DictKey_UnitName_415"] = "Uzi 1-3",
    ["DictKey_GroupName_4902"] = "",
    ["DictKey_UnitName_2910"] = "Nuevo objeto estático #009",
    ["DictKey_WptName_3496"] = "",
    ["DictKey_GroupName_2954"] = "Rudan Conversion #011",
    ["DictKey_UnitName_291"] = "Unit #062",
    ["DictKey_WptName_4532"] = "",
    ["DictKey_GroupName_1776"] = "Refinery #038",
    ["DictKey_WptName_3343"] = "",
    ["DictKey_UnitName_967"] = " #069",
    ["DictKey_WptName_4144"] = "",
    ["DictKey_GroupName_2719"] = "",
    ["DictKey_UnitName_1990"] = "Plant #005",
    ["DictKey_GroupName_1439"] = "Bandar Abbas SA-2 #001",
    ["DictKey_UnitName_4260"] = "",
    ["DictKey_GroupName_1998"] = "Plant #012",
    ["DictKey_WptName_4873"] = "",
    ["DictKey_WptName_1087"] = "",
    ["DictKey_UnitName_526"] = "",
    ["DictKey_UnitName_1105"] = "Unit #127",
    ["DictKey_UnitName_1444"] = "Unit #023",
    ["DictKey_WptName_4354"] = "",
    ["DictKey_UnitName_4451"] = " #004",
    ["DictKey_GroupName_3901"] = "M-2000 Tunb Kochak Island CAP",
    ["DictKey_WptName_895"] = "",
    ["DictKey_WptName_2985"] = "",
    ["DictKey_GroupName_2386"] = "Refinery #051",
    ["DictKey_GroupName_3096"] = "AWACS 302",
    ["DictKey_UnitName_61"] = "Unit #041",
    ["DictKey_WptName_2406"] = "",
    ["DictKey_WptName_5336"] = "",
    ["DictKey_UnitName_3297"] = "Tanque de combustible #003",
    ["DictKey_WptName_796"] = "",
    ["DictKey_GroupName_465"] = "New Static Object #003",
    ["DictKey_GroupName_2061"] = "Plant #005",
    ["DictKey_UnitName_5206"] = "Enfield 2-1",
    ["DictKey_WptName_1841"] = "",
    ["DictKey_GroupName_817"] = " #051",
    ["DictKey_GroupName_3461"] = "Tanque de combustible #003",
    ["DictKey_WptName_5275"] = "",
    ["DictKey_UnitName_1202"] = "Unit #014",
    ["DictKey_WptName_2667"] = "",
    ["DictKey_UnitName_4113"] = "Nuevo objeto estático",
    ["DictKey_WptName_5124"] = "AA TGT",
    ["DictKey_GroupName_1896"] = "Oil tower #024",
    ["DictKey_UnitName_240"] = "",
    ["DictKey_UnitName_1326"] = "Unit #056",
    ["DictKey_WptName_1033"] = "",
    ["DictKey_UnitName_4199"] = "",
    ["DictKey_WptName_4568"] = "",
    ["DictKey_WptName_2511"] = "",
    ["DictKey_UnitName_268"] = "Unit #045",
    ["DictKey_WptName_1170"] = "",
    ["DictKey_WptName_1826"] = "",
    ["DictKey_UnitName_1012"] = "Pilot #027",
    ["DictKey_GroupName_1092"] = "",
    ["DictKey_UnitName_1050"] = "Unit #108",
    ["DictKey_UnitName_143"] = "Unit #087",
    ["DictKey_UnitName_5139"] = "Combat Training F14B  Trainee",
    ["DictKey_GroupName_2155"] = "Plant #010",
    ["DictKey_UnitName_3309"] = "Tanque de combustible #004",
    ["DictKey_UnitName_3927"] = "Unit #115",
    ["DictKey_WptName_1471"] = "",
    ["DictKey_WptName_1565"] = "",
    ["DictKey_GroupName_3488"] = "Tanque de combustible #026",
    ["DictKey_WptName_1673"] = "",
    ["DictKey_GroupName_68"] = "SAM site 01 #006",
    ["DictKey_UnitName_4820"] = "",
    ["DictKey_UnitName_167"] = "Unit #106",
    ["DictKey_UnitName_3797"] = "Unidad #050",
    ["DictKey_UnitName_2216"] = "Plant #006",
    ["DictKey_GroupName_480"] = "New Static Object #004",
    ["DictKey_WptName_2066"] = "",
    ["DictKey_UnitName_4207"] = "",
    ["DictKey_ActionText_4609"] = "Twoo  AI Usaf  F-18C's  have spawned at the Stennis to defend the Carrier Fleet\
",
    ["DictKey_UnitName_2231"] = "Plant #007",
    ["DictKey_GroupName_3726"] = "Munición #016",
    ["DictKey_UnitName_260"] = "Unit #036",
    ["DictKey_UnitName_221"] = "",
    ["DictKey_WptName_2649"] = "",
    ["DictKey_WptName_458"] = "",
    ["DictKey_WptName_4391"] = "",
    ["DictKey_WptName_5422"] = "",
    ["DictKey_UnitName_2627"] = "Plant #064",
    ["DictKey_UnitName_845"] = "",
    ["DictKey_UnitName_271"] = "Unit #048",
    ["DictKey_WptName_2598"] = "",
    ["DictKey_WptName_5054"] = "",
    ["DictKey_GroupName_1554"] = "Oil platform #005",
    ["DictKey_UnitName_1235"] = "Unit #020",
    ["DictKey_WptName_818"] = "",
    ["DictKey_UnitName_381"] = "Unit #127",
    ["DictKey_ActionText_4633"] = "Welcome to Pigeon's Ulra Realism Mission. This mission is situated around 2010 in the Persian Gulf. \
You are playing as Nato forces.\
\
Be aware: Iranian military aircraft are not allowed to enter the UAE.\
But they will attack when you come too close too Iranian assets.",
    ["DictKey_GroupName_859"] = "New Static Object #007",
    ["DictKey_GroupName_4061"] = "OMAN_SAM1",
    ["DictKey_UnitName_2192"] = "Plant #013",
    ["DictKey_UnitName_4710"] = "Unit #207",
    ["DictKey_GroupName_949"] = "SAM site 01 #035",
    ["DictKey_UnitName_1212"] = "Unit #249",
    ["DictKey_GroupName_5076"] = "JTAC6",
    ["DictKey_WptName_1026"] = "",
    ["DictKey_GroupName_2569"] = "Plant #075",
    ["DictKey_UnitName_2771"] = "Oil tower #005",
    ["DictKey_WptName_1817"] = "",
    ["DictKey_WptName_5361"] = "",
    ["DictKey_WptName_4601"] = "",
    ["DictKey_UnitName_2483"] = "Plant #033",
    ["DictKey_UnitName_3057"] = "Plant #016",
    ["DictKey_WptName_5283"] = "",
    ["DictKey_WptName_4496"] = "",
    ["DictKey_UnitName_1491"] = "Unit #106",
    ["DictKey_WptName_492"] = "",
    ["DictKey_WptName_3424"] = "",
    ["DictKey_WptName_2601"] = "",
    ["DictKey_UnitName_4648"] = "Unit #066",
    ["DictKey_UnitName_1440"] = "Unit #019",
    ["DictKey_GroupName_3894"] = "Uzi #010",
    ["DictKey_WptName_275"] = "",
    ["DictKey_WptName_1119"] = "",
    ["DictKey_UnitName_490"] = "New Static Object #002",
    ["DictKey_WptName_1298"] = "",
    ["DictKey_WptName_405"] = "",
    ["DictKey_GroupName_510"] = "New Static Object #007",
    ["DictKey_WptName_2914"] = "",
    ["DictKey_UnitName_364"] = "Unit #087",
    ["DictKey_UnitName_3036"] = "Plant #021",
    ["DictKey_UnitName_3724"] = "Munición #003",
    ["DictKey_UnitName_931"] = " #066",
    ["DictKey_WptName_1643"] = "",
    ["DictKey_WptName_2613"] = "",
    ["DictKey_WptName_5086"] = "",
    ["DictKey_UnitName_397"] = "Unit #054",
    ["DictKey_UnitName_1218"] = "Unit #255",
    ["DictKey_GroupName_1233"] = "SAM site 01 #012",
    ["DictKey_UnitName_1939"] = "Oil platform",
    ["DictKey_UnitName_2134"] = "Unidad #028",
    ["DictKey_GroupName_3756"] = "Munición #022",
    ["DictKey_UnitName_4685"] = "Unit #169",
    ["DictKey_UnitName_2588"] = "Plant #073",
    ["DictKey_GroupName_1827"] = "Oil tower",
    ["DictKey_UnitName_681"] = " #006",
    ["DictKey_GroupName_6"] = "SAM site 01",
    ["DictKey_UnitName_1666"] = "Refinery #004",
    ["DictKey_WptName_1799"] = "",
    ["DictKey_UnitName_4944"] = "",
    ["DictKey_UnitName_2315"] = "Refinery #006",
    ["DictKey_UnitName_2092"] = "Plant",
    ["DictKey_UnitName_453"] = "Pilot #003",
    ["DictKey_UnitName_74"] = "Unit #048",
    ["DictKey_WptName_3122"] = "",
    ["DictKey_GroupName_2103"] = "Plant #047",
    ["DictKey_UnitName_843"] = "Pilot #008",
    ["DictKey_WptName_762"] = "",
    ["DictKey_ActionText_3979"] = "mist.respawnGroup('JTAC1', true)",
    ["DictKey_UnitName_4071"] = "Unidad #068",
    ["DictKey_WptName_1410"] = "",
    ["DictKey_UnitName_4215"] = "",
    ["DictKey_WptName_2060"] = "",
    ["DictKey_UnitName_4170"] = "",
    ["DictKey_UnitName_1102"] = "Unit #124",
    ["DictKey_GroupName_3638"] = "Munición #007",
    ["DictKey_UnitName_4203"] = "",
    ["DictKey_GroupName_631"] = "SAM site 01 #030",
    ["DictKey_WptName_3055"] = "",
    ["DictKey_WptName_3220"] = "",
    ["DictKey_UnitName_216"] = "",
    ["DictKey_WptName_1697"] = "",
    ["DictKey_UnitName_3258"] = "Refinery #080",
    ["DictKey_WptName_1694"] = "",
    ["DictKey_UnitName_105"] = "Unit #067",
    ["DictKey_WptName_462"] = "",
    ["DictKey_WptName_5290"] = "",
    ["DictKey_GroupName_2767"] = "Oil tower #046",
    ["DictKey_WptName_2640"] = "",
    ["DictKey_UnitName_2943"] = "Rudan Conversion #006",
    ["DictKey_WptName_3172"] = "",
    ["DictKey_ActionText_3942"] = "mist.respawnGroup('Texaco', true)",
    ["DictKey_GroupName_934"] = "",
    ["DictKey_WptName_3043"] = "",
    ["DictKey_UnitName_1045"] = "Unit #173",
    ["DictKey_UnitName_1828"] = "Oil tower",
    ["DictKey_GroupName_416"] = "AJS37 Al minhad AB",
    ["DictKey_UnitName_1051"] = "Unit #109",
    ["DictKey_UnitName_3895"] = " #043",
    ["DictKey_GroupName_3371"] = "Tanque de combustible #006",
    ["DictKey_UnitName_1498"] = "Unit #113",
    ["DictKey_GroupName_2326"] = "Refinery #003",
    ["DictKey_UnitName_5390"] = "SEAD Strike Island Kish #002",
    ["DictKey_UnitName_402"] = "Unit #059",
    ["DictKey_UnitName_534"] = " #012",
    ["DictKey_GroupName_1617"] = "Refinery",
    ["DictKey_UnitName_3504"] = "Tanque de combustible #004",
    ["DictKey_WptName_423"] = "",
    ["DictKey_WptName_1419"] = "",
    ["DictKey_GroupName_152"] = "Stennis_AI",
    ["DictKey_UnitName_1453"] = "Unit #046",
    ["DictKey_UnitName_4799"] = "",
    ["DictKey_GroupName_3362"] = "Tanque de combustible #015",
    ["DictKey_WptName_399"] = "",
    ["DictKey_UnitName_2696"] = "Plant #070",
    ["DictKey_UnitName_899"] = "Pilot #021",
    ["DictKey_GroupName_1293"] = "SAM site 01 #003",
    ["DictKey_UnitName_523"] = "Unit #104",
    ["DictKey_WptName_684"] = "",
    ["DictKey_UnitName_416"] = "Unit #143",
    ["DictKey_WptName_4571"] = "",
    ["DictKey_UnitName_1618"] = "Refinery",
    ["DictKey_UnitName_910"] = "Unit #223",
    ["DictKey_WptName_1661"] = "",
    ["DictKey_GroupName_2019"] = "Plant #019",
    ["DictKey_UnitName_1597"] = "Refinery",
    ["DictKey_UnitName_1244"] = "Unit #267",
    ["DictKey_WptName_3472"] = "",
    ["DictKey_UnitName_533"] = " #012",
    ["DictKey_GroupName_4854"] = "",
    ["DictKey_WptName_2099"] = "",
    ["DictKey_WptName_2340"] = "",
    ["DictKey_WptName_1580"] = "",
    ["DictKey_GroupName_1746"] = "Refinery #006",
    ["DictKey_UnitName_1333"] = "Unit #002",
    ["DictKey_UnitName_1807"] = "Refinery",
    ["DictKey_GroupName_362"] = "13",
    ["DictKey_UnitName_1460"] = "Unit #073",
    ["DictKey_UnitName_2156"] = "Plant #010",
    ["DictKey_GroupName_4927"] = "",
    ["DictKey_WptName_5417"] = "",
    ["DictKey_WptName_2388"] = "",
    ["DictKey_WptName_1670"] = "",
    ["DictKey_WptName_390"] = "",
    ["DictKey_UnitName_1795"] = "Refinery #003",
    ["DictKey_UnitName_3703"] = "Munición #002",
    ["DictKey_UnitName_1041"] = "Unit #150",
    ["DictKey_GroupName_2422"] = "Refinery",
    ["DictKey_UnitName_319"] = "Unit #079",
    ["DictKey_UnitName_4318"] = "Pilot #003",
    ["DictKey_UnitName_1493"] = "Unit #108",
    ["DictKey_UnitName_4193"] = "",
    ["DictKey_UnitName_3105"] = "Piloto #009",
    ["DictKey_WptName_5301"] = "",
    ["DictKey_GroupName_456"] = "New Static Object",
    ["DictKey_GroupName_2067"] = "Plant",
    ["DictKey_GroupName_3452"] = "Tanque de combustible #001",
    ["DictKey_GroupName_3266"] = "Refinery #090",
    ["DictKey_UnitName_1561"] = "Refinery #004",
    ["DictKey_WptName_3698"] = "",
    ["DictKey_GroupName_4056"] = "Carrier Tanker",
    ["DictKey_UnitName_3312"] = "Tanque de combustible #001",
    ["DictKey_UnitName_1906"] = "Oil tower #004",
    ["DictKey_GroupName_1932"] = "Oil platform #001",
    ["DictKey_UnitName_4772"] = "",
    ["DictKey_WptName_4353"] = "",
    ["DictKey_WptName_2508"] = "",
    ["DictKey_UnitName_1008"] = " #021",
    ["DictKey_GroupName_299"] = "",
    ["DictKey_UnitName_4711"] = "Unit #208",
    ["DictKey_UnitName_1086"] = "Pilot #008",
    ["DictKey_WptName_2859"] = "",
    ["DictKey_ActionText_4588"] = "An Usaf Agressor Predator drone has spawned north of Abu Dhabi at 15000 feet.\
\
Good luck practicing!",
    ["DictKey_WptName_1577"] = "",
    ["DictKey_UnitName_4817"] = "",
    ["DictKey_WptName_5326"] = "",
    ["DictKey_GroupName_3963"] = "JTAC3",
    ["DictKey_UnitName_4249"] = "",
    ["DictKey_UnitName_4647"] = "Unit #057",
    ["DictKey_GroupName_2671"] = "Plant #070",
    ["DictKey_ActionText_4088"] = "mist.respawnGroup('Magic', true)",
    ["DictKey_UnitName_443"] = " #055",
    ["DictKey_WptName_402"] = "",
    ["DictKey_UnitName_1612"] = "Refinery #005",
    ["DictKey_UnitName_496"] = "New Static Object",
    ["DictKey_UnitName_4258"] = "",
    ["DictKey_WptName_713"] = "",
    ["DictKey_UnitName_197"] = "Pilot #001",
    ["DictKey_UnitName_1347"] = "Unit #079",
    ["DictKey_UnitName_1103"] = "Unit #125",
    ["DictKey_GroupName_3419"] = "Tanque de combustible #020",
    ["DictKey_WptName_2117"] = "",
    ["DictKey_UnitName_2225"] = "Plant #002",
    ["DictKey_GroupName_3960"] = "JTAC2",
    ["DictKey_UnitName_207"] = "",
    ["DictKey_WptName_668"] = "",
    ["DictKey_WptName_783"] = "",
    ["DictKey_WptName_5418"] = "",
    ["DictKey_WptName_4448"] = "",
    ["DictKey_UnitName_1031"] = "Unit #074",
    ["DictKey_GroupName_3750"] = "Munición #018",
    ["DictKey_UnitName_532"] = " #012",
    ["DictKey_GroupName_3611"] = "Refinery #110",
    ["DictKey_GroupName_772"] = "New Static Object #013",
    ["DictKey_GroupName_1007"] = " #022",
    ["DictKey_UnitName_739"] = "Pilot #015",
    ["DictKey_GroupName_1713"] = "Refinery #001",
    ["DictKey_GroupName_2758"] = "Oil tower #043",
    ["DictKey_WptName_4381"] = "",
    ["DictKey_UnitName_1455"] = "Unit #048",
    ["DictKey_UnitName_1900"] = "Oil tower",
    ["DictKey_UnitName_280"] = "Unit #053",
    ["DictKey_WptName_2385"] = "",
    ["DictKey_WptName_1008"] = "",
    ["DictKey_UnitName_230"] = "",
    ["DictKey_UnitName_3967"] = "JTAC2",
    ["DictKey_GroupName_1752"] = "Refinery #003",
    ["DictKey_UnitName_3860"] = "Refinery #099",
    ["DictKey_WptName_3601"] = "",
    ["DictKey_WptName_4021"] = "",
    ["DictKey_GroupName_745"] = "New Static Object #001",
    ["DictKey_WptName_1559"] = "",
    ["DictKey_UnitName_4178"] = "",
    ["DictKey_GroupName_3038"] = "Plant #022",
    ["DictKey_GroupName_2542"] = "Plant #036",
    ["DictKey_WptName_5316"] = "",
    ["DictKey_WptName_477"] = "",
    ["DictKey_UnitName_4436"] = "Unit #010",
    ["DictKey_WptName_1787"] = "",
    ["DictKey_WptName_5319"] = "",
    ["DictKey_WptName_4749"] = "",
    ["DictKey_UnitName_1335"] = "Unit #063",
    ["DictKey_WptName_2706"] = "",
    ["DictKey_WptName_2421"] = "",
    ["DictKey_UnitName_479"] = "Ford 1-3",
    ["DictKey_UnitName_3926"] = "Unit #114",
    ["DictKey_GroupName_4435"] = "f-5 Havadarya Island CAP #004",
    ["DictKey_UnitName_610"] = " #060",
    ["DictKey_WptName_3268"] = "",
    ["DictKey_UnitName_4980"] = "",
    ["DictKey_GroupName_504"] = "New Static Object #008",
    ["DictKey_WptName_3358"] = "",
    ["DictKey_WptName_5272"] = "",
    ["DictKey_GroupName_2830"] = "Oil tower #061",
    ["DictKey_UnitName_1348"] = "Unit #080",
    ["DictKey_GroupName_142"] = "SAM site 01 #020",
    ["DictKey_ActionText_3980"] = "if Group.getByName('JTAC2') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_1823"] = "",
    ["DictKey_UnitName_4173"] = "",
    ["DictKey_UnitName_1048"] = "Unit #175",
    ["DictKey_UnitName_94"] = "Unit #060",
    ["DictKey_GroupName_4393"] = "",
    ["DictKey_WptName_3728"] = "",
    ["DictKey_WptName_3058"] = "",
    ["DictKey_WptName_3007"] = "",
    ["DictKey_GroupName_540"] = "New Ship Group #004",
    ["DictKey_GroupName_601"] = "SAM site 01 #022",
    ["DictKey_WptName_5101"] = "",
    ["DictKey_UnitName_2110"] = "Unidad #008",
    ["DictKey_WptName_3298"] = "",
    ["DictKey_UnitName_44"] = "Unit #029",
    ["DictKey_UnitName_1323"] = "Unit #053",
    ["DictKey_WptName_530"] = "",
    ["DictKey_UnitName_1492"] = "Unit #107",
    ["DictKey_UnitName_587"] = "Unit #179",
    ["DictKey_UnitName_1057"] = "Unit #112",
    ["DictKey_UnitName_976"] = "Unit #235",
    ["DictKey_GroupName_3536"] = "Tanque de combustible #035",
    ["DictKey_GroupName_2227"] = "Plant #062",
    ["DictKey_GroupName_1659"] = "Refinery #027",
    ["DictKey_GroupName_1764"] = "Refinery",
    ["DictKey_UnitName_639"] = "Unit #207",
    ["DictKey_UnitName_2928"] = "Rudan Conversion #001",
    ["DictKey_UnitName_3615"] = "Refinery #096",
    ["DictKey_WptName_2154"] = "",
    ["DictKey_UnitName_352"] = "",
    ["DictKey_UnitName_3204"] = "Refinery #079",
    ["DictKey_WptName_897"] = "",
    ["DictKey_UnitName_3694"] = "Munición #001",
    ["DictKey_UnitName_4081"] = "",
    ["DictKey_UnitName_982"] = "Unit #085",
    ["DictKey_GroupName_98"] = "SAM site 01 #012",
    ["DictKey_UnitName_2864"] = "Piloto #001",
    ["DictKey_WptName_2169"] = "",
    ["DictKey_WptName_195"] = "",
    ["DictKey_WptName_1364"] = "",
    ["DictKey_WptName_576"] = "",
    ["DictKey_GroupName_823"] = " #039",
    ["DictKey_UnitName_699"] = "Pilot #005",
    ["DictKey_WptName_814"] = "",
    ["DictKey_WptName_3000"] = "",
    ["DictKey_GroupName_757"] = "New Static Object #005",
    ["DictKey_UnitName_2489"] = "Plant #034",
    ["DictKey_WptName_673"] = "",
    ["DictKey_WptName_871"] = "",
    ["DictKey_UnitName_344"] = "",
    ["DictKey_UnitName_2207"] = "Plant #015",
    ["DictKey_UnitName_325"] = "",
    ["DictKey_UnitName_17"] = "Unit #013",
    ["DictKey_GroupName_1632"] = "Refinery #005",
    ["DictKey_WptName_3250"] = "",
    ["DictKey_GroupName_118"] = "SAM site 01 #016",
    ["DictKey_UnitName_307"] = "Unit #073",
    ["DictKey_WptName_554"] = "",
    ["DictKey_UnitName_5249"] = "Enfield 2-4",
    ["DictKey_UnitName_5421"] = "Rescue1",
    ["DictKey_WptName_3439"] = "",
    ["DictKey_UnitName_226"] = "",
    ["DictKey_WptName_1613"] = "",
    ["DictKey_WptName_432"] = "",
    ["DictKey_ActionText_5410"] = "The first Strike Flight is taking off from the Stennis to destroy enemy air defences at Lavan and Island.\
\
ETT: 50 min",
    ["DictKey_GroupName_1920"] = "Oil tower #032",
    ["DictKey_WptName_1910"] = "",
    ["DictKey_GroupName_702"] = "New Helicopter Group #001",
    ["DictKey_UnitName_1397"] = "Pilot #013",
    ["DictKey_WptName_5075"] = "",
    ["DictKey_WptName_4570"] = "",
    ["DictKey_UnitName_4872"] = "",
    ["DictKey_UnitName_2189"] = "Plant #012",
    ["DictKey_WptName_5385"] = "",
    ["DictKey_WptName_497"] = "",
    ["DictKey_WptName_4586"] = "",
    ["DictKey_UnitName_1169"] = "",
    ["DictKey_GroupName_2518"] = "Plant #066",
    ["DictKey_WptName_4421"] = "",
    ["DictKey_UnitName_1314"] = "Unit #038",
    ["DictKey_WptName_4330"] = "",
    ["DictKey_UnitName_2654"] = "Plant #064",
    ["DictKey_WptName_1304"] = "",
    ["DictKey_WptName_5400"] = "",
    ["DictKey_GroupName_3581"] = "Refinery #106",
    ["DictKey_GroupName_519"] = "",
    ["DictKey_UnitName_4638"] = "Unit #027",
    ["DictKey_UnitName_1506"] = "Unit #119",
    ["DictKey_UnitName_1066"] = "Unit #173",
    ["DictKey_WptName_1553"] = "",
    ["DictKey_GroupName_483"] = "",
    ["DictKey_WptName_4607"] = "",
    ["DictKey_WptName_1422"] = "",
    ["DictKey_UnitName_2967"] = "Rudan Conversion #012",
    ["DictKey_WptName_2084"] = "",
    ["DictKey_UnitName_3438"] = "Refinery #078",
    ["DictKey_UnitName_1338"] = "Unit #002",
    ["DictKey_GroupName_1917"] = "Oil tower #031",
    ["DictKey_WptName_4543"] = "",
    ["DictKey_WptName_3181"] = "",
    ["DictKey_GroupName_4986"] = "TGT Practice #001",
    ["DictKey_UnitName_1065"] = "Unit #172",
    ["DictKey_GroupName_3831"] = "Weapons storage #004",
    ["DictKey_UnitName_355"] = "",
    ["DictKey_GroupName_3078"] = "Sir Abu Nuayr Tanker",
    ["DictKey_WptName_1631"] = "",
    ["DictKey_WptName_4029"] = "",
    ["DictKey_WptName_1619"] = "",
    ["DictKey_UnitName_628"] = " #063",
    ["DictKey_GroupName_3179"] = "Refinery #079",
    ["DictKey_WptName_4123"] = "",
    ["DictKey_WptName_3125"] = "",
    ["DictKey_WptName_5244"] = "",
    ["DictKey_WptName_2535"] = "",
    ["DictKey_UnitName_2243"] = "Refinery #016",
    ["DictKey_UnitName_3549"] = "Tanque de combustible #032",
    ["DictKey_WptName_5320"] = "",
    ["DictKey_GroupName_3551"] = "Refinery #102",
    ["DictKey_GroupName_513"] = "New Static Object #009",
    ["DictKey_UnitName_4655"] = "Unit #127",
    ["DictKey_UnitName_719"] = "",
    ["DictKey_GroupName_4383"] = "",
    ["DictKey_WptName_3430"] = "",
    ["DictKey_WptName_3692"] = "",
    ["DictKey_WptName_3583"] = "",
    ["DictKey_UnitName_3534"] = "Refinery #098",
    ["DictKey_GroupName_3626"] = "Munición #003",
    ["DictKey_WptName_2841"] = "",
    ["DictKey_GroupName_3416"] = "Tanque de combustible #019",
    ["DictKey_UnitName_4639"] = "Unit #042",
    ["DictKey_WptName_348"] = "",
    ["DictKey_UnitName_56"] = "Unit #038",
    ["DictKey_WptName_997"] = "",
    ["DictKey_GroupName_3672"] = "Munición #002",
    ["DictKey_GroupName_1365"] = "",
    ["DictKey_UnitName_267"] = "Unit #044",
    ["DictKey_WptName_5177"] = "AG RANGE",
    ["DictKey_GroupName_3614"] = "Refinery #111",
    ["DictKey_WptName_1301"] = "",
    ["DictKey_UnitName_2133"] = "Unidad #027",
    ["DictKey_GroupName_3669"] = "Munición",
    ["DictKey_WptName_2703"] = "",
    ["DictKey_WptName_692"] = "",
    ["DictKey_UnitName_75"] = "Unit #049",
    ["DictKey_WptName_3463"] = "",
    ["DictKey_UnitName_724"] = "Pilot #014",
    ["DictKey_WptName_5148"] = "AA TGT",
    ["DictKey_WptName_4619"] = "Havadarya",
    ["DictKey_WptName_2310"] = "",
    ["DictKey_WptName_3939"] = "",
    ["DictKey_GroupName_3656"] = "Munición #013",
    ["DictKey_WptName_4624"] = "",
    ["DictKey_WptName_5327"] = "",
    ["DictKey_GroupName_3368"] = "Tanque de combustible #004",
    ["DictKey_WptName_827"] = "",
    ["DictKey_WptName_1853"] = "",
    ["DictKey_GroupName_4130"] = "F-14A Havadarya CAS",
    ["DictKey_UnitName_1096"] = "",
    ["DictKey_GroupName_2470"] = "Plant #036",
    ["DictKey_UnitName_3736"] = "Munición #010",
    ["DictKey_WptName_896"] = "",
    ["DictKey_GroupName_266"] = "SAM site 01 #005",
    ["DictKey_UnitName_4774"] = "",
    ["DictKey_WptName_771"] = "",
    ["DictKey_GroupName_2338"] = "Refinery #053",
    ["DictKey_UnitName_877"] = "Unit #112",
    ["DictKey_WptName_4033"] = "",
    ["DictKey_GroupName_937"] = "SAM site 01 #017",
    ["DictKey_GroupName_3847"] = "Refinery #099",
    ["DictKey_GroupName_700"] = " #017",
    ["DictKey_UnitName_545"] = "Unit #163",
    ["DictKey_UnitName_4019"] = "Enfield 2-4",
    ["DictKey_UnitName_5391"] = "SEAD Strike Island Kish #003",
    ["DictKey_UnitName_4018"] = "Enfield 2-3 ",
    ["DictKey_UnitName_2741"] = "Oil tower #002",
    ["DictKey_UnitName_3869"] = "Refinery #098",
    ["DictKey_GroupName_2347"] = "Refinery #060",
    ["DictKey_GroupName_5021"] = "TGT Practice #003",
    ["DictKey_WptName_1676"] = "",
    ["DictKey_UnitName_4836"] = "",
    ["DictKey_GroupName_3584"] = "Refinery #107",
    ["DictKey_GroupName_63"] = "SAM site 01 #005",
    ["DictKey_GroupName_3653"] = "Munición #012",
    ["DictKey_UnitName_3480"] = "Refinery #077",
    ["DictKey_UnitName_5398"] = "SEAD Kish Island #002",
    ["DictKey_WptName_5325"] = "AAR",
    ["DictKey_UnitName_3621"] = "Munición",
    ["DictKey_WptName_795"] = "",
    ["DictKey_WptName_3962"] = "",
    ["DictKey_WptName_5141"] = "AG RANGE",
    ["DictKey_GroupName_3512"] = "Tanque de combustible #031",
    ["DictKey_UnitName_152"] = "Unit #094",
    ["DictKey_WptName_4367"] = "",
    ["DictKey_UnitName_4866"] = "",
    ["DictKey_GroupName_2903"] = "Weapons storage #005",
    ["DictKey_WptName_5425"] = "",
    ["DictKey_WptName_2872"] = "",
    ["DictKey_GroupName_2308"] = "Refinery #004",
    ["DictKey_WptName_3319"] = "",
    ["DictKey_GroupName_2040"] = "Plant #026",
    ["DictKey_WptName_1519"] = "",
    ["DictKey_WptName_3166"] = "",
    ["DictKey_UnitName_3450"] = "Refinery #077",
    ["DictKey_WptName_4129"] = "",
    ["DictKey_GroupName_2371"] = "Refinery #004",
    ["DictKey_UnitName_3854"] = "Refinery #096",
    ["DictKey_UnitName_1228"] = "Unit #263",
    ["DictKey_GroupName_2743"] = "Oil tower #038",
    ["DictKey_GroupName_760"] = "New Static Object #009",
    ["DictKey_WptName_4378"] = "",
    ["DictKey_WptName_768"] = "",
    ["DictKey_UnitName_957"] = "Unit #234",
    ["DictKey_UnitName_1014"] = "Pilot #028",
    ["DictKey_UnitName_1247"] = "Unit #270",
    ["DictKey_UnitName_3306"] = "Tanque de combustible #002",
    ["DictKey_UnitName_3883"] = "Uzi 4-4",
    ["DictKey_WptName_625"] = "",
    ["DictKey_WptName_3403"] = "",
    ["DictKey_UnitName_4120"] = "Piloto #040",
    ["DictKey_WptName_685"] = "",
    ["DictKey_UnitName_5066"] = "Unit #359",
    ["DictKey_UnitName_4211"] = "",
    ["DictKey_UnitName_575"] = "Unit #175",
    ["DictKey_UnitName_4729"] = "Unit #241",
    ["DictKey_WptName_5119"] = "",
    ["DictKey_UnitName_3591"] = "Refinery #097",
    ["DictKey_WptName_2009"] = "",
    ["DictKey_GroupName_5102"] = "Combat Training C101CC",
    ["DictKey_GroupName_12"] = "New Vehicle Group #001",
    ["DictKey_WptName_3031"] = "",
    ["DictKey_UnitName_3558"] = "Tanque de combustible #029",
    ["DictKey_UnitName_3657"] = "Munición #001",
    ["DictKey_GroupName_3203"] = "Refinery #079",
    ["DictKey_UnitName_1399"] = "Pilot #014",
    ["DictKey_WptName_1859"] = "",
    ["DictKey_WptName_5300"] = "",
    ["DictKey_GroupName_1353"] = "Bandar Abbas HAWK #006",
    ["DictKey_WptName_4582"] = "",
    ["DictKey_GroupName_3068"] = "Plant #017",
    ["DictKey_WptName_367"] = "",
    ["DictKey_WptName_4124"] = "",
    ["DictKey_UnitName_60"] = "Unit #040",
    ["DictKey_GroupName_1638"] = "Refinery",
    ["DictKey_GroupName_525"] = "",
    ["DictKey_GroupName_1854"] = "Oil tower #016",
    ["DictKey_UnitName_582"] = " #051",
    ["DictKey_WptName_3253"] = "",
    ["DictKey_UnitName_1409"] = "Pilot #017",
    ["DictKey_UnitName_2904"] = "Nuevo objeto estático #007",
    ["DictKey_WptName_3280"] = "",
    ["DictKey_GroupName_2888"] = "Nuevo objeto estático #003",
    ["DictKey_UnitName_4506"] = "",
    ["DictKey_WptName_3086"] = "",
    ["DictKey_WptName_2679"] = "",
    ["DictKey_GroupName_3888"] = "AH-1W  Sirri Island",
    ["DictKey_UnitName_1254"] = "",
    ["DictKey_GroupName_4357"] = "EAST TEST",
    ["DictKey_UnitName_369"] = "Unit #118",
    ["DictKey_UnitName_3636"] = "Munición #002",
    ["DictKey_UnitName_4107"] = "Piloto #036",
    ["DictKey_UnitName_1269"] = "",
    ["DictKey_GroupName_1129"] = "",
    ["DictKey_WptName_5375"] = "",
    ["DictKey_GroupName_3789"] = "Kish Silkworn",
    ["DictKey_UnitName_1789"] = "Refinery #006",
    ["DictKey_UnitName_13"] = "Unit #005",
    ["DictKey_UnitName_4132"] = "Piloto #042",
    ["DictKey_UnitName_4877"] = "Unit #283",
    ["DictKey_WptName_1655"] = "",
    ["DictKey_GroupName_1782"] = "Refinery #040",
    ["DictKey_GroupName_528"] = "",
    ["DictKey_UnitName_1735"] = "Refinery #001",
    ["DictKey_UnitName_273"] = "Unit #050",
    ["DictKey_GroupName_4185"] = "",
    ["DictKey_GroupName_1539"] = "Oil platform #001",
    ["DictKey_UnitName_484"] = "",
    ["DictKey_GroupName_3164"] = "Refinery #078",
    ["DictKey_WptName_1022"] = "",
    ["DictKey_WptName_1025"] = "",
    ["DictKey_GroupName_3497"] = "Refinery #096",
    ["DictKey_UnitName_4212"] = "",
    ["DictKey_UnitName_5041"] = "Unit #340",
    ["DictKey_UnitName_16"] = "Unit #013",
    ["DictKey_UnitName_1606"] = "Refinery #003",
    ["DictKey_UnitName_754"] = " #019",
    ["DictKey_WptName_1501"] = "",
    ["DictKey_UnitName_4722"] = "Unit #219",
    ["DictKey_GroupName_5033"] = "TGT Practice #004",
    ["DictKey_WptName_2250"] = "",
    ["DictKey_UnitName_638"] = "Unit #206",
    ["DictKey_GroupName_2863"] = "Nuevo grupo de aviones",
    ["DictKey_WptName_5402"] = "",
    ["DictKey_UnitName_3189"] = "Refinery #077",
    ["DictKey_UnitName_3919"] = "Unit #107",
    ["DictKey_UnitName_2534"] = "Plant #032",
    ["DictKey_WptName_662"] = "",
    ["DictKey_WptName_774"] = "",
    ["DictKey_UnitName_4233"] = "",
    ["DictKey_WptName_619"] = "",
    ["DictKey_WptName_3625"] = "",
    ["DictKey_UnitName_3039"] = "Plant #022",
    ["DictKey_UnitName_89"] = "Unit #057",
    ["DictKey_GroupName_1037"] = " #071",
    ["DictKey_WptName_5370"] = "",
    ["DictKey_UnitName_1497"] = "Unit #112",
    ["DictKey_UnitName_4787"] = "",
    ["DictKey_WptName_3442"] = "",
    ["DictKey_WptName_5215"] = "",
    ["DictKey_WptName_182"] = "",
    ["DictKey_UnitName_1005"] = "Pilot #025",
    ["DictKey_UnitName_374"] = "Unit #122",
    ["DictKey_WptName_1188"] = "",
    ["DictKey_GroupName_4921"] = "",
    ["DictKey_UnitName_1195"] = "Unit #243",
    ["DictKey_WptName_3205"] = "",
    ["DictKey_UnitName_320"] = "Unit #080",
    ["DictKey_UnitName_312"] = "Unit #075",
    ["DictKey_UnitName_4643"] = "Unit #053",
    ["DictKey_GroupName_1436"] = "",
    ["DictKey_WptName_1634"] = "",
    ["DictKey_UnitName_258"] = "Unit #034",
    ["DictKey_UnitName_4072"] = "Unidad #069",
    ["DictKey_UnitName_3462"] = "Tanque de combustible #003",
    ["DictKey_GroupName_1259"] = "New Airplane Group",
    ["DictKey_UnitName_1150"] = "Unit #083",
    ["DictKey_UnitName_1220"] = "Unit #256",
    ["DictKey_WptName_2616"] = "",
    ["DictKey_WptName_4338"] = "",
    ["DictKey_UnitName_3543"] = "Tanque de combustible #030",
    ["DictKey_WptName_3460"] = "",
    ["DictKey_UnitName_1621"] = "Refinery #006",
    ["DictKey_UnitName_2104"] = "Plant #007",
    ["DictKey_GroupName_617"] = "SAM site 01 #026",
    ["DictKey_GroupName_30"] = "SAM site 01 #001",
    ["DictKey_GroupName_2587"] = "Plant #081",
    ["DictKey_GroupName_1860"] = "Oil tower #006",
    ["DictKey_WptName_2325"] = "",
    ["DictKey_WptName_2646"] = "",
    ["DictKey_UnitName_38"] = "Unit #023",
    ["DictKey_WptName_1712"] = "",
    ["DictKey_UnitName_262"] = "Unit #041",
    ["DictKey_GroupName_220"] = "",
    ["DictKey_GroupName_5009"] = "TGT Practice #002",
    ["DictKey_WptName_4471"] = "",
    ["DictKey_UnitName_2708"] = "Plant #071",
    ["DictKey_UnitName_1957"] = "Unidad #005",
    ["DictKey_UnitName_1015"] = "Pilot #029",
    ["DictKey_WptName_4161"] = "",
    ["DictKey_WptName_162"] = "",
    ["DictKey_WptName_5271"] = "",
    ["DictKey_WptName_1652"] = "",
    ["DictKey_WptName_3595"] = "",
    ["DictKey_GroupName_4932"] = "",
    ["DictKey_UnitName_2913"] = " #044",
    ["DictKey_WptName_2811"] = "",
    ["DictKey_WptName_3858"] = "",
    ["DictKey_UnitName_1567"] = "Refinery #001",
    ["DictKey_WptName_4356"] = "",
    ["DictKey_UnitName_1972"] = "Plant #002",
    ["DictKey_WptName_2199"] = "",
    ["DictKey_UnitName_4131"] = "Piloto #041",
    ["DictKey_WptName_1862"] = "",
    ["DictKey_UnitName_1744"] = "Refinery",
    ["DictKey_WptName_811"] = "",
    ["DictKey_UnitName_208"] = "",
    ["DictKey_WptName_4631"] = "",
    ["DictKey_WptName_5382"] = "",
    ["DictKey_WptName_2976"] = "",
    ["DictKey_WptName_5284"] = "",
    ["DictKey_ActionText_3989"] = "mist.respawnGroup('JTAC6', true)",
    ["DictKey_UnitName_2071"] = "Plant #001",
    ["DictKey_WptName_1097"] = "",
    ["DictKey_UnitName_80"] = "Unit #052",
    ["DictKey_WptName_5331"] = "",
    ["DictKey_WptName_5349"] = "",
    ["DictKey_UnitName_5031"] = "Unit #332",
    ["DictKey_UnitName_2972"] = "Unidad #037",
    ["DictKey_UnitName_259"] = "Unit #035",
    ["DictKey_WptName_641"] = "",
    ["DictKey_UnitName_3108"] = "Piloto #011",
    ["DictKey_WptName_3514"] = "",
    ["DictKey_UnitName_983"] = "Unit #086",
    ["DictKey_UnitName_4157"] = "Piloto #033",
    ["DictKey_UnitName_4245"] = "",
    ["DictKey_WptName_712"] = "",
    ["DictKey_GroupName_2806"] = "Oil tower #053",
    ["DictKey_UnitName_4868"] = "",
    ["DictKey_UnitName_436"] = "Unit #067",
    ["DictKey_GroupName_626"] = " #060",
    ["DictKey_WptName_3061"] = "",
    ["DictKey_UnitName_2195"] = "Plant #014",
    ["DictKey_UnitName_4842"] = "",
    ["DictKey_UnitName_441"] = "Unit #154",
    ["DictKey_UnitName_945"] = "Unit #230",
    ["DictKey_UnitName_989"] = "Unit #118",
    ["DictKey_WptName_1098"] = "",
    ["DictKey_GroupName_3275"] = "Tanque de combustible",
    ["DictKey_UnitName_4679"] = "Unit #156",
    ["DictKey_UnitName_4195"] = "",
    ["DictKey_WptName_2304"] = "",
    ["DictKey_WptName_5195"] = "AG RANGE",
    ["DictKey_UnitName_854"] = "New Static Object #001",
    ["DictKey_WptName_2024"] = "",
    ["DictKey_WptName_1949"] = "",
    ["DictKey_UnitName_1067"] = "Unit #174",
    ["DictKey_UnitName_2044"] = "Plant",
    ["DictKey_WptName_3938"] = "",
    ["DictKey_WptName_2775"] = "",
    ["DictKey_WptName_4490"] = "",
    ["DictKey_GroupName_1806"] = "Refinery #048",
    ["DictKey_WptName_4550"] = "",
    ["DictKey_UnitName_2889"] = "",
    ["DictKey_WptName_820"] = "",
    ["DictKey_UnitName_2868"] = "",
    ["DictKey_WptName_2994"] = "",
    ["DictKey_UnitName_622"] = " #062",
    ["DictKey_UnitName_367"] = "Unit #117",
    ["DictKey_UnitName_120"] = "Unit #076",
    ["DictKey_WptName_4564"] = "",
    ["DictKey_UnitName_5074"] = "Unit #367",
    ["DictKey_GroupName_2344"] = "Refinery #059",
    ["DictKey_WptName_4440"] = "",
    ["DictKey_UnitName_2393"] = "Refinery #004",
    ["DictKey_WptName_117"] = "",
    ["DictKey_UnitName_2351"] = "Refinery #004",
    ["DictKey_UnitName_96"] = "Unit #062",
    ["DictKey_GroupName_3398"] = "Tanque de combustible",
    ["DictKey_WptName_4289"] = "",
    ["DictKey_WptName_2878"] = "",
    ["DictKey_GroupName_3305"] = "Tanque de combustible #002",
    ["DictKey_WptName_2604"] = "",
    ["DictKey_UnitName_3112"] = "Unidad #004",
    ["DictKey_UnitName_4740"] = "",
    ["DictKey_WptName_2430"] = "",
    ["DictKey_UnitName_3561"] = "Refinery #097",
    ["DictKey_UnitName_1405"] = "Pilot #016",
    ["DictKey_WptName_1778"] = "",
    ["DictKey_UnitName_4993"] = "Unit #298",
    ["DictKey_UnitName_2973"] = "Unidad #038",
    ["DictKey_GroupName_3762"] = "Munición #001",
    ["DictKey_WptName_2505"] = "",
    ["DictKey_GroupName_3395"] = "Tanque de combustible #005",
    ["DictKey_UnitName_3546"] = "Tanque de combustible #031",
    ["DictKey_WptName_3153"] = "",
    ["DictKey_UnitName_232"] = "",
    ["DictKey_GroupName_538"] = " #014",
    ["DictKey_GroupName_1650"] = "Refinery #024",
    ["DictKey_GroupName_1737"] = "Refinery #005",
    ["DictKey_UnitName_1350"] = "Unit #082",
    ["DictKey_UnitName_20"] = "Unit #013",
    ["DictKey_WptName_2691"] = "",
    ["DictKey_UnitName_1702"] = "Refinery",
    ["DictKey_GroupName_1584"] = "Refinery #016",
    ["DictKey_WptName_1032"] = "",
    ["DictKey_GroupName_2049"] = "Plant #029",
    ["DictKey_GroupName_2969"] = "Weapons storage #009",
    ["DictKey_WptName_225"] = "",
    ["DictKey_UnitName_3961"] = "JTAC2",
    ["DictKey_WptName_5107"] = "",
    ["DictKey_GroupName_3347"] = "Nuevo grupo de helicópteros",
    ["DictKey_UnitName_3477"] = "Tanque de combustible #005",
    ["DictKey_WptName_2532"] = "",
    ["DictKey_UnitName_3877"] = "Piloto #017",
    ["DictKey_UnitName_3930"] = "Unidad #060",
    ["DictKey_GroupName_2668"] = "Plant #106",
    ["DictKey_UnitName_2345"] = "Refinery #002",
    ["DictKey_UnitName_125"] = "Unit #079",
    ["DictKey_UnitName_3333"] = "Tanque de combustible #003",
    ["DictKey_UnitName_3909"] = "Piloto #022",
    ["DictKey_GroupName_3810"] = "Munición",
    ["DictKey_WptName_810"] = "",
    ["DictKey_UnitName_4183"] = "",
    ["DictKey_UnitName_49"] = "Unit #033",
    ["DictKey_UnitName_5036"] = "Unit #335",
    ["DictKey_GroupName_2317"] = "Refinery",
    ["DictKey_WptName_5359"] = "",
    ["DictKey_ActionText_4524"] = "Welcome to Pigeon's Ulra Realism Mission. This mission is situated around 2010 in the Persian Gulf. \
You are playing as Nato forces.\
\
Be aware: Iranian military aircraft are not allowed to enter the UAE.\
But they will attack when you come too close too Iranian assets. \
",
    ["DictKey_ActionRadioText_5407"] = "",
    ["DictKey_GroupName_3865"] = "Refinery #114",
    ["DictKey_UnitName_256"] = "Unit #033",
    ["DictKey_WptName_2625"] = "",
    ["DictKey_WptName_250"] = "",
    ["DictKey_UnitName_892"] = "Pilot #008",
    ["DictKey_UnitName_5058"] = "Unit #353",
    ["DictKey_UnitName_4666"] = "Unit #138",
    ["DictKey_GroupName_3699"] = "Munición",
    ["DictKey_WptName_2688"] = "",
    ["DictKey_UnitName_2528"] = "Plant #039",
    ["DictKey_ActionText_3945"] = "if Group.getByName('Overlord') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_5384"] = "",
    ["DictKey_GroupName_1671"] = "Refinery #031",
    ["DictKey_WptName_2078"] = "",
    ["DictKey_WptName_1742"] = "",
    ["DictKey_UnitName_1447"] = "Unit #026",
    ["DictKey_GroupName_558"] = " #024",
    ["DictKey_WptName_3884"] = "",
    ["DictKey_WptName_5449"] = "",
    ["DictKey_UnitName_292"] = "Unit #063",
    ["DictKey_GroupName_723"] = "New Airplane Group #004",
    ["DictKey_UnitName_4665"] = "Unit #137",
    ["DictKey_UnitName_5103"] = "Combat Training C101CC",
    ["DictKey_GroupName_3284"] = "Tanque de combustible #003",
    ["DictKey_WptName_2835"] = "",
    ["DictKey_WptName_2433"] = "",
    ["DictKey_UnitName_1053"] = "",
    ["DictKey_GroupName_4939"] = "",
    ["DictKey_UnitName_2522"] = "Plant #037",
    ["DictKey_UnitName_2786"] = "Oil tower #003",
    ["DictKey_UnitName_3051"] = "Plant #019",
    ["DictKey_WptName_5167"] = "",
    ["DictKey_WptName_4814"] = "",
    ["DictKey_UnitName_1186"] = "Unit #016",
    ["DictKey_WptName_2205"] = "",
    ["DictKey_UnitName_3924"] = "Unit #112",
    ["DictKey_WptName_3752"] = "",
    ["DictKey_WptName_2292"] = "",
    ["DictKey_WptName_3151"] = "",
    ["DictKey_UnitName_3706"] = "Munición #004",
    ["DictKey_UnitName_4862"] = "",
    ["DictKey_UnitName_2447"] = "Refinery #001",
    ["DictKey_GroupName_3482"] = "Tanque de combustible #025",
    ["DictKey_UnitName_2047"] = "Plant #001",
    ["DictKey_WptName_834"] = "",
    ["DictKey_UnitName_4966"] = "",
    ["DictKey_GroupName_2773"] = "Oil tower",
    ["DictKey_UnitName_952"] = "Unit #023",
    ["DictKey_UnitName_285"] = "Unit #058",
    ["DictKey_UnitName_4713"] = "Unit #210",
    ["DictKey_WptName_5274"] = "",
    ["DictKey_UnitName_4202"] = "",
    ["DictKey_WptName_474"] = "",
    ["DictKey_GroupName_2930"] = "Rudan Conversion #003",
    ["DictKey_GroupName_5156"] = "Combat Training F5E  Trainee",
    ["DictKey_WptName_353"] = "",
    ["DictKey_UnitName_4827"] = "",
    ["DictKey_WptName_5394"] = "",
    ["DictKey_UnitName_4394"] = "",
    ["DictKey_GroupName_3296"] = "Tanque de combustible #003",
    ["DictKey_UnitName_4971"] = "",
    ["DictKey_UnitName_3937"] = "Normand",
    ["DictKey_UnitName_2171"] = "Plant #014",
    ["DictKey_WptName_3992"] = "",
    ["DictKey_GroupName_2073"] = "Plant #002",
    ["DictKey_UnitName_1585"] = "Refinery #003",
    ["DictKey_UnitName_3429"] = "Plant #112",
    ["DictKey_WptName_3749"] = "",
    ["DictKey_WptName_2565"] = "",
    ["DictKey_WptName_831"] = "",
    ["DictKey_WptName_3481"] = "",
    ["DictKey_UnitName_1564"] = "Refinery #003",
    ["DictKey_GroupName_2997"] = "Uzi #001",
    ["DictKey_WptName_3304"] = "",
    ["DictKey_WptName_4616"] = "Kish",
    ["DictKey_WptName_5216"] = "",
    ["DictKey_GroupName_4427"] = "Carrier Protection Force F-18C",
    ["DictKey_GroupName_3111"] = "MOBILE SAM",
    ["DictKey_UnitName_1834"] = "Oil tower #004",
    ["DictKey_UnitName_277"] = "Unit #052",
    ["DictKey_GroupName_2800"] = "Oil tower #051",
    ["DictKey_UnitName_153"] = "Stennis_AI",
    ["DictKey_WptName_538"] = "",
    ["DictKey_UnitName_4981"] = "",
    ["DictKey_UnitName_3327"] = "Tanque de combustible #004",
    ["DictKey_WptName_1400"] = "",
    ["DictKey_GroupName_3338"] = "Tanque de combustible #015",
    ["DictKey_UnitName_2949"] = "Rudan Conversion #008",
    ["DictKey_UnitName_665"] = " #065",
    ["DictKey_GroupName_4112"] = "Nuevo objeto estático #001",
    ["DictKey_GroupName_2960"] = "Rudan Conversion #013",
    ["DictKey_WptName_5170"] = "",
    ["DictKey_UnitName_1016"] = "Pilot #030",
    ["DictKey_WptName_3350"] = "",
    ["DictKey_WptName_2751"] = "",
    ["DictKey_UnitName_2519"] = "Plant #036",
    ["DictKey_GroupName_2452"] = "Refinery #073",
    ["DictKey_UnitName_2279"] = "Refinery #001",
    ["DictKey_GroupName_2329"] = "Refinery #004",
    ["DictKey_UnitName_1153"] = "Unit #086",
    ["DictKey_WptName_2478"] = "",
    ["DictKey_GroupName_3132"] = "Nuevo objeto estático #004",
    ["DictKey_UnitName_4272"] = "",
    ["DictKey_GroupName_1490"] = "Bandar Abbas HAWK #008",
    ["DictKey_UnitName_1537"] = "Oil platform #001",
    ["DictKey_UnitName_1104"] = "Unit #126",
    ["DictKey_UnitName_214"] = "",
    ["DictKey_UnitName_2606"] = "Plant #066",
    ["DictKey_UnitName_1528"] = "",
    ["DictKey_WptName_1376"] = "",
    ["DictKey_UnitName_1039"] = "Unit #148",
    ["DictKey_WptName_2334"] = "",
    ["DictKey_WptName_2226"] = "",
    ["DictKey_UnitName_2615"] = "Plant #070",
    ["DictKey_WptName_4915"] = "",
    ["DictKey_UnitName_5209"] = "Enfield 2-4",
    ["DictKey_UnitName_1093"] = "",
    ["DictKey_GroupName_3572"] = "Tanque de combustible #043",
    ["DictKey_UnitName_5077"] = "JTAC6",
    ["DictKey_UnitName_3142"] = "Nuevo objeto estático #006",
    ["DictKey_UnitName_4200"] = "",
    ["DictKey_ActionText_3934"] = "-- CONFIG OVERIDE\
ctld.slingLoad = false;\
ctld.maximumDistanceLogistic = 1000;",
    ["DictKey_ActionText_4522"] = "An Usaf Agressor Predator drone has spawned north of Abu Dhabi at 15000 feet.\
\
Good luck practicing!",
    ["DictKey_WptName_1700"] = "",
    ["DictKey_UnitName_353"] = "",
    ["DictKey_GroupName_4328"] = "MIG29A Bandar-e-Jask Airfield",
    ["DictKey_GroupName_2100"] = "Plant #046",
    ["DictKey_GroupName_2149"] = "Plant #008",
    ["DictKey_WptName_4430"] = "",
    ["DictKey_WptName_4137"] = "",
    ["DictKey_WptName_2902"] = "",
    ["DictKey_UnitName_838"] = "Pilot #019",
    ["DictKey_UnitName_1624"] = "Refinery #004",
    ["DictKey_UnitName_18"] = "Unit #013",
    ["DictKey_WptName_1883"] = "",
    ["DictKey_GroupName_2302"] = "Refinery #002",
    ["DictKey_UnitName_1456"] = "Unit #049",
    ["DictKey_UnitName_630"] = " #063",
    ["DictKey_UnitName_434"] = "Unit #065",
    ["DictKey_UnitName_4659"] = "Unit #131",
    ["DictKey_WptName_1658"] = "",
    ["DictKey_UnitName_4840"] = "",
    ["DictKey_UnitName_4457"] = "Unit #027",
    ["DictKey_WptName_1116"] = "",
    ["DictKey_GroupName_3744"] = "Munición #022",
    ["DictKey_GroupName_2650"] = "Plant #069",
    ["DictKey_UnitName_2672"] = "Plant #070",
    ["DictKey_GroupName_3617"] = "Munición",
    ["DictKey_WptName_4291"] = "",
    ["DictKey_UnitName_5228"] = "Enfield 2-3 ",
    ["DictKey_UnitName_4268"] = "",
    ["DictKey_WptName_1024"] = "",
    ["DictKey_GroupName_3563"] = "Refinery #105",
    ["DictKey_UnitName_4831"] = "",
    ["DictKey_GroupName_2797"] = "Oil tower #050",
    ["DictKey_GroupName_3620"] = "Munición #001",
    ["DictKey_UnitName_300"] = "",
    ["DictKey_UnitName_456"] = "Enfield 1-3",
    ["DictKey_WptName_4548"] = "",
    ["DictKey_GroupName_769"] = "New Static Object #012",
    ["DictKey_WptName_5106"] = "AA TGT",
    ["DictKey_WptName_191"] = "",
    ["DictKey_UnitName_2429"] = "Refinery #002",
    ["DictKey_UnitName_5023"] = "Unit #324",
    ["DictKey_GroupName_2275"] = "Refinery",
    ["DictKey_UnitName_212"] = "",
    ["DictKey_WptName_3094"] = "",
    ["DictKey_GroupName_2815"] = "Oil tower #056",
    ["DictKey_UnitName_3489"] = "Tanque de combustible #002",
    ["DictKey_GroupName_930"] = " #063",
    ["DictKey_WptName_2160"] = "",
    ["DictKey_WptName_5190"] = "AA TGT",
    ["DictKey_GroupName_2404"] = "Refinery #061",
    ["DictKey_WptName_4288"] = "",
    ["DictKey_GroupName_5420"] = "Rescue",
    ["DictKey_WptName_3812"] = "",
    ["DictKey_GroupName_5198"] = "",
    ["DictKey_GroupName_2197"] = "Plant #052",
    ["DictKey_WptName_2793"] = "",
    ["DictKey_UnitName_539"] = "Unit #160",
    ["DictKey_UnitName_1969"] = "Plant #001",
    ["DictKey_UnitName_2898"] = "Nuevo objeto estático #001",
    ["DictKey_UnitName_331"] = "",
    ["DictKey_UnitName_2564"] = "Plant #065",
    ["DictKey_WptName_4098"] = "",
    ["DictKey_UnitName_3033"] = "Plant #020",
    ["DictKey_GroupName_2440"] = "Refinery #006",
    ["DictKey_UnitName_4812"] = "",
    ["DictKey_UnitName_3588"] = "Tanque de combustible #029",
    ["DictKey_WptName_933"] = "",
    ["DictKey_WptName_1535"] = "",
    ["DictKey_UnitName_1708"] = "Refinery #004",
    ["DictKey_UnitName_4748"] = "",
    ["DictKey_WptName_3017"] = "",
    ["DictKey_GroupName_1887"] = "Oil tower #021",
    ["DictKey_GroupName_2870"] = "FARP Londres",
    ["DictKey_WptName_5146"] = "",
    ["DictKey_WptName_2463"] = "",
    ["DictKey_WptName_3577"] = "",
    ["DictKey_UnitName_4746"] = "",
    ["DictKey_WptName_5363"] = "",
    ["DictKey_UnitName_4409"] = "Colt 1-2 #002",
    ["DictKey_UnitName_4942"] = "",
    ["DictKey_GroupName_3299"] = "Tanque de combustible #005",
    ["DictKey_UnitName_3124"] = "",
    ["DictKey_UnitName_5048"] = "Unit #345",
    ["DictKey_UnitName_2435"] = "Refinery #004",
    ["DictKey_WptName_1721"] = "",
    ["DictKey_UnitName_1185"] = "Unit #015",
    ["DictKey_UnitName_3881"] = "Uzi 4-2",
    ["DictKey_UnitName_2465"] = "Plant #034",
    ["DictKey_UnitName_2901"] = "",
    ["DictKey_GroupName_2827"] = "Oil tower #060",
    ["DictKey_WptName_2451"] = "",
    ["DictKey_UnitName_1281"] = "Unit #026",
    ["DictKey_UnitName_336"] = "Unit #047",
    ["DictKey_WptName_1871"] = "",
    ["DictKey_WptName_3340"] = "",
    ["DictKey_WptName_4426"] = "",
    ["DictKey_UnitName_3645"] = "Munición #003",
    ["DictKey_UnitName_84"] = "Unit #054",
    ["DictKey_GroupName_3167"] = "Refinery #079",
    ["DictKey_GroupName_1530"] = "Oil platform",
    ["DictKey_WptName_4390"] = "",
    ["DictKey_GroupName_322"] = "",
    ["DictKey_WptName_4285"] = "",
    ["DictKey_WptName_5313"] = "",
    ["DictKey_GroupName_1284"] = "New Static Object",
    ["DictKey_WptName_2950"] = "",
    ["DictKey_WptName_1523"] = "",
    ["DictKey_UnitName_4865"] = "",
    ["DictKey_UnitName_1693"] = "Refinery #001",
    ["DictKey_WptName_1598"] = "",
    ["DictKey_UnitName_1250"] = "Unit #273",
    ["DictKey_UnitName_428"] = " #048",
    ["DictKey_UnitName_1217"] = "Unit #254",
    ["DictKey_UnitName_1162"] = "Unit #226",
    ["DictKey_WptName_4335"] = "",
    ["DictKey_UnitName_3567"] = "Tanque de combustible #033",
    ["DictKey_UnitName_1714"] = "Refinery #001",
    ["DictKey_UnitName_4965"] = "",
    ["DictKey_UnitName_1248"] = "Unit #271",
    ["DictKey_UnitName_2813"] = "Oil tower #002",
    ["DictKey_WptName_2337"] = "",
    ["DictKey_UnitName_5049"] = "Unit #346",
    ["DictKey_UnitName_4895"] = "",
    ["DictKey_UnitName_2996"] = "",
    ["DictKey_UnitName_3522"] = "Tanque de combustible #003",
    ["DictKey_WptName_5173"] = "",
    ["DictKey_GroupName_356"] = "Bandar Abbas SA-10",
    ["DictKey_WptName_2102"] = "",
    ["DictKey_UnitName_3010"] = " #078",
    ["DictKey_WptName_2075"] = "",
    ["DictKey_UnitName_4845"] = "",
    ["DictKey_UnitName_5057"] = "Unit #352",
    ["DictKey_GroupName_1845"] = "Oil tower #013",
    ["DictKey_GroupName_2218"] = "Plant #059",
    ["DictKey_UnitName_211"] = "",
    ["DictKey_UnitName_35"] = "Unit #021",
    ["DictKey_WptName_4583"] = "",
    ["DictKey_UnitName_419"] = "Unit #146",
    ["DictKey_UnitName_4823"] = "",
    ["DictKey_UnitName_648"] = "Unit #209",
    ["DictKey_WptName_2905"] = "",
    ["DictKey_WptName_2274"] = "",
    ["DictKey_UnitName_1810"] = "Oil tower",
    ["DictKey_UnitName_3117"] = "Unidad #039",
    ["DictKey_UnitName_3712"] = "Munición #003",
    ["DictKey_GroupName_2260"] = "Refinery #003",
    ["DictKey_GroupName_383"] = "SAM site 01 #015",
    ["DictKey_UnitName_4009"] = "Enfield 2-1",
    ["DictKey_UnitName_4878"] = "Unit #284",
    ["DictKey_GroupName_1830"] = "Oil tower #003",
    ["DictKey_GroupName_3359"] = "Tanque de combustible #005",
    ["DictKey_UnitName_2501"] = "Plant #038",
    ["DictKey_WptName_2935"] = "",
    ["DictKey_GroupName_2221"] = "Plant #060",
    ["DictKey_WptName_881"] = "",
    ["DictKey_UnitName_4623"] = "JTAC 1",
    ["DictKey_WptName_515"] = "",
    ["DictKey_UnitName_5397"] = "SEAD Kish Island #001",
    ["DictKey_GroupName_979"] = "New Static Object #005",
    ["DictKey_GroupName_3401"] = "Tanque de combustible #002",
    ["DictKey_WptName_521"] = "",
    ["DictKey_UnitName_4650"] = "Unit #069",
    ["DictKey_WptName_672"] = "",
    ["DictKey_UnitName_3116"] = "Unidad #006",
    ["DictKey_GroupName_93"] = "SAM site 01 #011",
    ["DictKey_WptName_132"] = "",
    ["DictKey_WptName_5348"] = "",
    ["DictKey_UnitName_1213"] = "Unit #250",
    ["DictKey_UnitName_22"] = "Unit #013",
    ["DictKey_GroupName_2848"] = "Oil tower #067",
    ["DictKey_UnitName_4466"] = "",
    ["DictKey_UnitName_1663"] = "Refinery #006",
    ["DictKey_WptName_67"] = "",
    ["DictKey_UnitName_553"] = "Unit #166",
    ["DictKey_WptName_3490"] = "",
    ["DictKey_WptName_222"] = "",
    ["DictKey_WptName_4292"] = "",
    ["DictKey_UnitName_4936"] = "",
    ["DictKey_WptName_3802"] = "",
    ["DictKey_WptName_4517"] = "",
    ["DictKey_GroupName_3230"] = "Refinery #082",
    ["DictKey_GroupName_1132"] = "Bandar Abbas HAWK #001",
    ["DictKey_WptName_5098"] = "",
    ["DictKey_UnitName_537"] = "Unit #159",
    ["DictKey_GroupName_1635"] = "Refinery #002",
    ["DictKey_GroupName_1302"] = "SAM site 01 #007",
    ["DictKey_WptName_4337"] = "",
    ["DictKey_UnitName_418"] = "Unit #145",
    ["DictKey_UnitName_946"] = "Unit #231",
    ["DictKey_GroupName_2164"] = "Plant #033",
    ["DictKey_WptName_570"] = "",
    ["DictKey_UnitName_2130"] = "Unidad #024",
    ["DictKey_UnitName_1249"] = "Unit #272",
    ["DictKey_UnitName_4653"] = "Unit #125",
    ["DictKey_UnitName_287"] = "Unit #060",
    ["DictKey_UnitName_4912"] = "",
    ["DictKey_UnitName_1573"] = "Refinery #002",
    ["DictKey_UnitName_1190"] = "Unit #228",
    ["DictKey_GroupName_3593"] = "Refinery #109",
    ["DictKey_GroupName_248"] = "SAM site 01 #004",
    ["DictKey_WptName_2730"] = "",
    ["DictKey_WptName_582"] = "",
    ["DictKey_WptName_5393"] = "",
    ["DictKey_GroupName_2809"] = "Oil tower #054",
    ["DictKey_UnitName_2801"] = "Oil tower #001",
    ["DictKey_WptName_5481"] = "",
    ["DictKey_GroupName_3293"] = "Tanque de combustible #001",
    ["DictKey_UnitName_2300"] = "Refinery #001",
    ["DictKey_UnitName_308"] = "Unit #074",
    ["DictKey_WptName_5196"] = "AA TGT",
    ["DictKey_WptName_3367"] = "",
    ["DictKey_WptName_3373"] = "",
    ["DictKey_UnitName_1046"] = "Unit #174",
    ["DictKey_UnitName_3830"] = "Unidad #056",
    ["DictKey_WptName_5134"] = "",
    ["DictKey_GroupName_2656"] = "Plant #103",
    ["DictKey_UnitName_5127"] = "Combat Training F14B  InstructorCombat Training F14B  Instructor",
    ["DictKey_UnitName_954"] = " #068",
    ["DictKey_WptName_765"] = "",
    ["DictKey_WptName_4395"] = "",
    ["DictKey_UnitName_564"] = "Unit #171",
    ["DictKey_WptName_1730"] = "",
    ["DictKey_UnitName_178"] = "",
    ["DictKey_GroupName_2428"] = "Refinery #002",
    ["DictKey_UnitName_3793"] = "Unidad #048",
    ["DictKey_UnitName_566"] = "Unit #172",
    ["DictKey_UnitName_3089"] = "Piloto #007",
    ["DictKey_WptName_2081"] = "",
    ["DictKey_UnitName_455"] = "Enfield 1-2",
    ["DictKey_GroupName_1863"] = "Oil tower #007",
    ["DictKey_WptName_798"] = "",
    ["DictKey_UnitName_547"] = "Unit #164",
    ["DictKey_WptName_1979"] = "",
    ["DictKey_WptName_3870"] = "",
    ["DictKey_UnitName_4807"] = "",
    ["DictKey_GroupName_408"] = "M2000 Al Minhad AB (France)",
    ["DictKey_WptName_969"] = "",
    ["DictKey_WptName_370"] = "",
    ["DictKey_UnitName_414"] = "Uzi 1-2",
    ["DictKey_WptName_57"] = "",
    ["DictKey_GroupName_1527"] = "",
    ["DictKey_UnitName_4194"] = "",
    ["DictKey_UnitName_392"] = "Unit #133",
    ["DictKey_WptName_5123"] = "AG RANGE",
    ["DictKey_GroupName_2383"] = "Refinery #050",
    ["DictKey_WptName_2400"] = "",
    ["DictKey_UnitName_3751"] = "Munición #018",
    ["DictKey_GroupName_2254"] = "Refinery #001",
    ["DictKey_descriptionRedTask_2"] = "",
    ["DictKey_UnitName_4264"] = "",
    ["DictKey_WptName_747"] = "",
    ["DictKey_UnitName_4397"] = "Pilot #015",
    ["DictKey_UnitName_493"] = "New Static Object #006",
    ["DictKey_UnitName_1294"] = "Unit #029",
    ["DictKey_UnitName_3739"] = "Munición #012",
    ["DictKey_WptName_2214"] = "",
    ["DictKey_GroupName_5132"] = "Combat Training F14B  #001",
    ["DictKey_WptName_1811"] = "",
    ["DictKey_ActionText_4636"] = "JTAC Drones available:\
\
JTAC4 Siri Island                    -Laser Code: 1660\
JTAC5 Abu Musa Island        -Laser Code: 1670\
JTAC6 Player Conrolled       -Laser Code:  1680\
\
Call the JTAC in beforehand because they will have to fly to the TGT area!",
    ["DictKey_UnitName_438"] = "Unit #005",
    ["DictKey_UnitName_1236"] = "Unit #153",
    ["DictKey_WptName_1961"] = "",
    ["DictKey_UnitName_4859"] = "",
    ["DictKey_UnitName_2330"] = "Refinery #004",
    ["DictKey_UnitName_24"] = "Unit #015",
    ["DictKey_WptName_3846"] = "",
    ["DictKey_UnitName_1609"] = "Refinery #001",
    ["DictKey_WptName_3767"] = "",
    ["DictKey_UnitName_1324"] = "Unit #054",
    ["DictKey_GroupName_4738"] = "",
    ["DictKey_WptName_5189"] = "AG RANGE",
    ["DictKey_UnitName_1672"] = "Refinery #001",
    ["DictKey_UnitName_4287"] = "",
    ["DictKey_WptName_1766"] = "",
    ["DictKey_WptName_5350"] = "",
    ["DictKey_UnitName_4668"] = "Unit #140",
    ["DictKey_GroupName_2882"] = "Weapons storage #004",
    ["DictKey_UnitName_2940"] = "",
    ["DictKey_UnitName_4179"] = "",
    ["DictKey_ActionText_4085"] = "if Group.getByName('Overlord') == nil then\
return true\
else\
return false\
end",
    ["DictKey_GroupName_2551"] = "Plant #039",
    ["DictKey_UnitName_1208"] = "Unit #246",
    ["DictKey_WptName_812"] = "",
    ["DictKey_WptName_1820"] = "",
    ["DictKey_GroupName_4825"] = "",
    ["DictKey_WptName_3997"] = "",
    ["DictKey_UnitName_1225"] = "Unit #260",
    ["DictKey_UnitName_1927"] = "Oil tower #005",
    ["DictKey_WptName_2862"] = "",
    ["DictKey_UnitName_4732"] = "Unit #276",
    ["DictKey_UnitName_525"] = " #011",
    ["DictKey_WptName_1166"] = "",
    ["DictKey_UnitName_4851"] = "",
    ["DictKey_UnitName_1152"] = "Unit #085",
    ["DictKey_UnitName_3107"] = "Piloto #010",
    ["DictKey_UnitName_2423"] = "Refinery",
    ["DictKey_GroupName_2746"] = "Oil tower #039",
    ["DictKey_GroupName_2410"] = "Refinery #066",
    ["DictKey_GroupName_1517"] = "moved Qum TOR",
    ["DictKey_UnitName_3576"] = "Tanque de combustible #031",
    ["DictKey_UnitName_589"] = "Unit #180",
    ["DictKey_WptName_4535"] = "",
    ["DictKey_WptName_4879"] = "",
    ["DictKey_WptName_542"] = "",
    ["DictKey_UnitName_4174"] = "",
    ["DictKey_WptName_485"] = "",
    ["DictKey_GroupName_2536"] = "Plant #034",
    ["DictKey_WptName_3016"] = "",
    ["DictKey_UnitName_4651"] = "Unit #070",
    ["DictKey_WptName_2682"] = "",
    ["DictKey_UnitName_115"] = "Unit #073",
    ["DictKey_GroupName_58"] = "SAM site 01 #004",
    ["DictKey_UnitName_313"] = "",
    ["DictKey_UnitName_193"] = "Pilot #005",
    ["DictKey_WptName_4155"] = "",
    ["DictKey_UnitName_1467"] = "Unit #076",
    ["DictKey_UnitName_3139"] = "",
    ["DictKey_UnitName_4662"] = "Unit #134",
    ["DictKey_WptName_475"] = "",
    ["DictKey_UnitName_617"] = " #061",
    ["DictKey_UnitName_3673"] = "Munición #002",
    ["DictKey_UnitName_4857"] = "",
    ["DictKey_GroupName_2374"] = "Refinery #005",
    ["DictKey_WptName_4415"] = "",
    ["DictKey_GroupName_2632"] = "Plant #096",
    ["DictKey_UnitName_1461"] = "Unit #074",
    ["DictKey_WptName_2574"] = "",
    ["DictKey_GroupName_3413"] = "Tanque de combustible #018",
    ["DictKey_WptName_241"] = "",
    ["DictKey_WptName_5378"] = "",
    ["DictKey_UnitName_3840"] = "Unit #021",
    ["DictKey_UnitName_2783"] = "Oil tower #001",
    ["DictKey_WptName_5197"] = "",
    ["DictKey_UnitName_1555"] = "Oil platform #005",
    ["DictKey_UnitName_640"] = "Unit #208",
    ["DictKey_WptName_374"] = "",
    ["DictKey_UnitName_4852"] = "",
    ["DictKey_UnitName_4726"] = "Unit #235",
    ["DictKey_GroupName_3212"] = "Refinery #077",
    ["DictKey_WptName_1769"] = "",
    ["DictKey_WptName_5482"] = "",
    ["DictKey_UnitName_2123"] = "Unidad #017",
    ["DictKey_UnitName_1161"] = "Unit #225",
    ["DictKey_UnitName_731"] = "",
    ["DictKey_ActionText_5409"] = "An USAF JTAC predator drone is underway too Sirri Island.\
N25.53.818 E54.32.489 ELEV 10ft \
 JTAC4  Lasercode: 1660\
",
    ["DictKey_UnitName_4052"] = "Shell",
    ["DictKey_UnitName_2150"] = "Plant #008",
    ["DictKey_UnitName_674"] = "",
    ["DictKey_UnitName_4829"] = "",
    ["DictKey_UnitName_4752"] = "",
    ["DictKey_UnitName_3174"] = "Refinery #077",
    ["DictKey_UnitName_4673"] = "Unit #145",
    ["DictKey_WptName_469"] = "",
    ["DictKey_ActionText_5411"] = "The Second Strike Flight is taking off from the Stennis to destroy enemy air defences at Lavan and Island.\
 \
ETT: 25 min",
    ["DictKey_WptName_4058"] = "",
    ["DictKey_WptName_5282"] = "",
    ["DictKey_GroupName_180"] = "New Ship Group #001",
    ["DictKey_WptName_3610"] = "",
    ["DictKey_WptName_2481"] = "",
    ["DictKey_WptName_4513"] = "",
    ["DictKey_GroupName_2368"] = "Refinery #003",
    ["DictKey_UnitName_2020"] = "Plant",
    ["DictKey_UnitName_3763"] = "Munición #018",
    ["DictKey_UnitName_4400"] = "Pilot #020",
    ["DictKey_UnitName_598"] = "Unit #186",
    ["DictKey_WptName_658"] = "",
    ["DictKey_UnitName_2177"] = "Plant #009",
    ["DictKey_UnitName_5006"] = "Unit #311",
    ["DictKey_UnitName_2720"] = "",
    ["DictKey_WptName_2232"] = "",
    ["DictKey_UnitName_4792"] = "",
    ["DictKey_GroupName_4343"] = "MIg-29A Shiraz International Airport CAP #001",
    ["DictKey_UnitName_4057"] = "Texaco 1-1",
    ["DictKey_GroupName_2188"] = "Plant #049",
    ["DictKey_WptName_2965"] = "",
    ["DictKey_WptName_5165"] = "AG RANGE",
    ["DictKey_GroupName_2539"] = "Plant #035",
    ["DictKey_GroupName_449"] = "F-18C Carrier Spawn Hot",
    ["DictKey_UnitName_5018"] = "Unit #321",
    ["DictKey_UnitName_599"] = "Unit #187",
    ["DictKey_WptName_3968"] = "",
    ["DictKey_UnitName_3916"] = "Piloto Uzi 2-4",
    ["DictKey_GroupName_4417"] = "F-14 Carrier CAP #004",
    ["DictKey_WptName_1982"] = "",
    ["DictKey_WptName_5270"] = "",
    ["DictKey_WptName_4514"] = "",
    ["DictKey_WptName_411"] = "",
    ["DictKey_GroupName_2230"] = "Plant #063",
    ["DictKey_UnitName_154"] = "Unit #096",
    ["DictKey_UnitName_4955"] = "",
    ["DictKey_GroupName_5186"] = "Combat Training AV-8B Trainee",
    ["DictKey_GroupName_1809"] = "Oil tower",
    ["DictKey_UnitName_4759"] = "",
    ["DictKey_UnitName_3465"] = "Refinery #080",
    ["DictKey_UnitName_3402"] = "Tanque de combustible #002",
    ["DictKey_UnitName_2931"] = "Rudan Conversion #002",
    ["DictKey_GroupName_2431"] = "Refinery #003",
    ["DictKey_GroupName_2662"] = "Plant #105",
    ["DictKey_GroupName_614"] = "SAM site 01 #025",
    ["DictKey_GroupName_1001"] = "MI-8 Quesm Island",
    ["DictKey_UnitName_1423"] = "Pilot #022",
    ["DictKey_GroupName_1629"] = "Refinery #001",
    ["DictKey_WptName_400"] = "IP",
    ["DictKey_UnitName_515"] = " #009",
    ["DictKey_UnitName_5037"] = "Unit #336",
    ["DictKey_UnitName_1852"] = "Oil tower #004",
    ["DictKey_UnitName_4271"] = "",
    ["DictKey_WptName_5136"] = "AA TGT",
    ["DictKey_WptName_4140"] = "",
    ["DictKey_GroupName_4094"] = "F-14B Carrier Spawn Hot",
    ["DictKey_WptName_1667"] = "",
    ["DictKey_UnitName_303"] = "Unit #070",
    ["DictKey_UnitName_992"] = "Unit #183",
    ["DictKey_UnitName_3842"] = " #089",
    ["DictKey_WptName_2148"] = "",
    ["DictKey_GroupName_1059"] = "Bandar Lengeh HAWK Site",
    ["DictKey_WptName_861"] = "",
    ["DictKey_WptName_805"] = "",
    ["DictKey_GroupName_1478"] = "Bandar Abbas HAWK #007",
    ["DictKey_GroupName_486"] = "New Static Object #007",
    ["DictKey_WptName_4533"] = "",
    ["DictKey_UnitName_2546"] = "Plant #037",
    ["DictKey_WptName_1628"] = "",
    ["DictKey_WptName_4145"] = "",
    ["DictKey_UnitName_4700"] = "Unit #187",
    ["DictKey_GroupName_2824"] = "Oil tower #059",
    ["DictKey_UnitName_2124"] = "Unidad #018",
    ["DictKey_UnitName_5035"] = "Unit #334",
    ["DictKey_UnitName_2678"] = "Plant #067",
    ["DictKey_UnitName_1032"] = "Unit #134",
    ["DictKey_UnitName_4716"] = "Unit #213",
    ["DictKey_WptName_2331"] = "",
    ["DictKey_UnitName_2792"] = "Oil tower",
    ["DictKey_UnitName_4677"] = "Unit #149",
    ["DictKey_UnitName_3682"] = "Munición #003",
    ["DictKey_GroupName_3491"] = "Tanque de combustible #027",
    ["DictKey_WptName_4572"] = "",
    ["DictKey_GroupName_2918"] = "Peace Ruby #001",
    ["DictKey_WptName_3262"] = "",
    ["DictKey_UnitName_3742"] = "Munición #001",
    ["DictKey_UnitName_522"] = " #010",
    ["DictKey_WptName_2865"] = "",
    ["DictKey_GroupName_501"] = "New Static Object #001",
    ["DictKey_UnitName_4703"] = "Unit #190",
    ["DictKey_WptName_5434"] = "",
    ["DictKey_WptName_5295"] = "",
    ["DictKey_WptName_2953"] = "",
    ["DictKey_UnitName_4867"] = "",
    ["DictKey_UnitName_4663"] = "Unit #135",
    ["DictKey_ActionText_3932"] = "--[[--\
MIST Mission Scripting Tools.\
## Description:\
MIssion Scripting Tools (MIST) is a collection of Lua functions\
and databases that is intended to be a supplement to the standard\
Lua functions included in the simulator scripting engine.\
\
MIST functions and databases provide ready-made solutions to many common\
scripting tasks and challenges, enabling easier scripting and saving\
mission scripters time. The table mist.flagFuncs contains a set of\
Lua functions (that are similar to Slmod functions) that do not\
require detailed Lua knowledge to use.\
\
However, the majority of MIST does require knowledge of the Lua language,\
and, if you are going to utilize these components of MIST, it is necessary\
that you read the Simulator Scripting Engine guide on the official ED wiki.\
\
## Links:\
\
ED Forum Thread: <http://forums.eagle.ru/showthread.php?t=98616>\
\
##Github:\
\
Development <https://github.com/mrSkortch/MissionScriptingTools>\
\
Official Releases <https://github.com/mrSkortch/MissionScriptingTools/tree/master>\
\
@script MIST\
@author Speed\
@author Grimes\
@author lukrop\
]]\
mist = {}\
\
-- don't change these\
mist.majorVersion = 4\
mist.minorVersion = 3\
mist.build = 74\
\
-- forward declaration of log shorthand\
local log\
\
do -- the main scope\
    local coroutines = {}\
\
    local tempSpawnedUnits = {} -- birth events added here\
    local tempSpawnedGroups = {}\
    local tempSpawnGroupsCounter = 0\
    \
    local mistAddedObjects = {} -- mist.dynAdd unit data added here\
    local mistAddedGroups = {} -- mist.dynAdd groupdata added here\
    local writeGroups = {}\
    local lastUpdateTime = 0\
\
    local updateAliveUnitsCounter = 0\
    local updateTenthSecond = 0\
    \
    local mistGpId = 7000\
    local mistUnitId = 7000\
    local mistDynAddIndex = {[' air '] = 0, [' hel '] = 0, [' gnd '] = 0, [' bld '] = 0, [' static '] = 0, [' shp '] = 0}\
\
    local scheduledTasks = {}\
    local taskId = 0\
    local idNum = 0\
\
    mist.nextGroupId = 1\
    mist.nextUnitId = 1\
\
    local dbLog\
    \
    local function initDBs() -- mist.DBs scope\
        mist.DBs = {}\
\
        mist.DBs.missionData = {}\
        if env.mission then\
\
            mist.DBs.missionData.startTime = env.mission.start_time\
            mist.DBs.missionData.theatre = env.mission.theatre\
            mist.DBs.missionData.version = env.mission.version\
            mist.DBs.missionData.files = {}\
            if type(env.mission.resourceCounter) == 'table' then\
                for fIndex, fData in pairs (env.mission.resourceCounter) do\
                    mist.DBs.missionData.files[#mist.DBs.missionData.files + 1] =    mist.utils.deepCopy(fIndex)\
                end\
            end\
            -- if we add more coalition specific data then bullsye should be categorized by coaliton. For now its just the bullseye table\
            mist.DBs.missionData.bullseye = {red = {}, blue = {}}\
            mist.DBs.missionData.bullseye.red.x = env.mission.coalition.red.bullseye.x --should it be point.x?\
            mist.DBs.missionData.bullseye.red.y = env.mission.coalition.red.bullseye.y\
            mist.DBs.missionData.bullseye.blue.x = env.mission.coalition.blue.bullseye.x\
            mist.DBs.missionData.bullseye.blue.y = env.mission.coalition.blue.bullseye.y\
        end\
\
        mist.DBs.zonesByName = {}\
        mist.DBs.zonesByNum = {}\
\
\
        if env.mission.triggers and env.mission.triggers.zones then\
            for zone_ind, zone_data in pairs(env.mission.triggers.zones) do\
                if type(zone_data) == 'table' then\
                    local zone = mist.utils.deepCopy(zone_data)\
                    zone.point = {}    -- point is used by SSE\
                    zone.point.x = zone_data.x\
                    zone.point.y = 0\
                    zone.point.z = zone_data.y\
\
                    mist.DBs.zonesByName[zone_data.name] = zone\
                    mist.DBs.zonesByNum[#mist.DBs.zonesByNum + 1] = mist.utils.deepCopy(zone)    --[[deepcopy so that the zone in zones_by_name and the zone in\
                                                                                                zones_by_num se are different objects.. don't want them linked.]]\
                end\
            end\
        end\
\
        mist.DBs.navPoints = {}\
        mist.DBs.units = {}\
        --Build mist.db.units and mist.DBs.navPoints\
        for coa_name, coa_data in pairs(env.mission.coalition) do\
\
            if (coa_name == 'red' or coa_name == 'blue') and type(coa_data) == 'table' then\
                mist.DBs.units[coa_name] = {}\
\
                -- build nav points DB\
                mist.DBs.navPoints[coa_name] = {}\
                if coa_data.nav_points then --navpoints\
                    --mist.debug.writeData (mist.utils.serialize,{'NavPoints',coa_data.nav_points}, 'NavPoints.txt')\
                    for nav_ind, nav_data in pairs(coa_data.nav_points) do\
\
                        if type(nav_data) == 'table' then\
                            mist.DBs.navPoints[coa_name][nav_ind] = mist.utils.deepCopy(nav_data)\
\
                            mist.DBs.navPoints[coa_name][nav_ind].name = nav_data.callsignStr    -- name is a little bit more self-explanatory.\
                            mist.DBs.navPoints[coa_name][nav_ind].point = {}    -- point is used by SSE, support it.\
                            mist.DBs.navPoints[coa_name][nav_ind].point.x = nav_data.x\
                            mist.DBs.navPoints[coa_name][nav_ind].point.y = 0\
                            mist.DBs.navPoints[coa_name][nav_ind].point.z = nav_data.y\
                        end\
                    end\
                end\
                if coa_data.country then --there is a country table\
                    for cntry_id, cntry_data in pairs(coa_data.country) do\
\
                        local countryName = string.lower(cntry_data.name)\
                        mist.DBs.units[coa_name][countryName] = {}\
                        mist.DBs.units[coa_name][countryName].countryId = cntry_data.id\
\
                        if type(cntry_data) == 'table' then    --just making sure\
\
                            for obj_type_name, obj_type_data in pairs(cntry_data) do\
\
                                if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" or obj_type_name == \"static\" then --should be an unncessary check\
\
                                    local category = obj_type_name\
\
                                    if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then    --there's a group!\
\
                                        mist.DBs.units[coa_name][countryName][category] = {}\
\
                                        for group_num, group_data in pairs(obj_type_data.group) do\
\
                                            if group_data and group_data.units and type(group_data.units) == 'table' then    --making sure again- this is a valid group\
\
                                                mist.DBs.units[coa_name][countryName][category][group_num] = {}\
                                                local groupName = group_data.name\
                                                if env.mission.version > 7 then\
                                                    groupName = env.getValueDictByKey(groupName)\
                                                end\
                                                mist.DBs.units[coa_name][countryName][category][group_num].groupName = groupName\
                                                mist.DBs.units[coa_name][countryName][category][group_num].groupId = group_data.groupId\
                                                mist.DBs.units[coa_name][countryName][category][group_num].category = category\
                                                mist.DBs.units[coa_name][countryName][category][group_num].coalition = coa_name\
                                                mist.DBs.units[coa_name][countryName][category][group_num].country = countryName\
                                                mist.DBs.units[coa_name][countryName][category][group_num].countryId = cntry_data.id\
                                                mist.DBs.units[coa_name][countryName][category][group_num].startTime = group_data.start_time\
                                                mist.DBs.units[coa_name][countryName][category][group_num].task = group_data.task\
                                                mist.DBs.units[coa_name][countryName][category][group_num].hidden = group_data.hidden\
\
                                                mist.DBs.units[coa_name][countryName][category][group_num].units = {}\
\
                                                mist.DBs.units[coa_name][countryName][category][group_num].radioSet = group_data.radioSet\
                                                mist.DBs.units[coa_name][countryName][category][group_num].uncontrolled = group_data.uncontrolled\
                                                mist.DBs.units[coa_name][countryName][category][group_num].frequency = group_data.frequency\
                                                mist.DBs.units[coa_name][countryName][category][group_num].modulation = group_data.modulation\
\
                                                for unit_num, unit_data in pairs(group_data.units) do\
                                                    local units_tbl = mist.DBs.units[coa_name][countryName][category][group_num].units    --pointer to the units table for this group\
\
                                                    units_tbl[unit_num] = {}\
                                                    if env.mission.version > 7 then\
                                                        units_tbl[unit_num].unitName = env.getValueDictByKey(unit_data.name)\
                                                    else\
                                                        units_tbl[unit_num].unitName = unit_data.name\
                                                    end\
                                                    units_tbl[unit_num].type = unit_data.type\
                                                    units_tbl[unit_num].skill = unit_data.skill    --will be nil for statics\
                                                    units_tbl[unit_num].unitId = unit_data.unitId\
                                                    units_tbl[unit_num].category = category\
                                                    units_tbl[unit_num].coalition = coa_name\
                                                    units_tbl[unit_num].country = countryName\
                                                    units_tbl[unit_num].countryId = cntry_data.id\
                                                    units_tbl[unit_num].heading = unit_data.heading\
                                                    units_tbl[unit_num].playerCanDrive = unit_data.playerCanDrive\
                                                    units_tbl[unit_num].alt = unit_data.alt\
                                                    units_tbl[unit_num].alt_type = unit_data.alt_type\
                                                    units_tbl[unit_num].speed = unit_data.speed\
                                                    units_tbl[unit_num].livery_id = unit_data.livery_id\
                                                    if unit_data.point then    --ME currently does not work like this, but it might one day\
                                                        units_tbl[unit_num].point = unit_data.point\
                                                    else\
                                                        units_tbl[unit_num].point = {}\
                                                        units_tbl[unit_num].point.x = unit_data.x\
                                                        units_tbl[unit_num].point.y = unit_data.y\
                                                    end\
                                                    units_tbl[unit_num].x = unit_data.x\
                                                    units_tbl[unit_num].y = unit_data.y\
\
                                                    units_tbl[unit_num].callsign = unit_data.callsign\
                                                    units_tbl[unit_num].onboard_num = unit_data.onboard_num\
                                                    units_tbl[unit_num].hardpoint_racks = unit_data.hardpoint_racks\
                                                    units_tbl[unit_num].psi = unit_data.psi\
\
\
                                                    units_tbl[unit_num].groupName = groupName\
                                                    units_tbl[unit_num].groupId = group_data.groupId\
\
                                                    if unit_data.AddPropAircraft then\
                                                        units_tbl[unit_num].AddPropAircraft = unit_data.AddPropAircraft\
                                                    end\
\
                                                    if category == 'static' then\
                                                        units_tbl[unit_num].categoryStatic = unit_data.category\
                                                        units_tbl[unit_num].shape_name = unit_data.shape_name\
                                                        if unit_data.mass then\
                                                            units_tbl[unit_num].mass = unit_data.mass\
                                                        end\
\
                                                        if unit_data.canCargo then\
                                                            units_tbl[unit_num].canCargo = unit_data.canCargo\
                                                        end\
                                                    end\
\
                                                end --for unit_num, unit_data in pairs(group_data.units) do\
                                            end --if group_data and group_data.units then\
                                        end --for group_num, group_data in pairs(obj_type_data.group) do\
                                    end --if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then\
                                end --if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" or obj_type_name == \"static\" then\
                            end --for obj_type_name, obj_type_data in pairs(cntry_data) do\
                        end --if type(cntry_data) == 'table' then\
                    end --for cntry_id, cntry_data in pairs(coa_data.country) do\
                end --if coa_data.country then --there is a country table\
            end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then\
        end --for coa_name, coa_data in pairs(mission.coalition) do\
\
        mist.DBs.unitsByName = {}\
        mist.DBs.unitsById = {}\
        mist.DBs.unitsByCat = {}\
\
        mist.DBs.unitsByCat.helicopter = {}    -- adding default categories\
        mist.DBs.unitsByCat.plane = {}\
        mist.DBs.unitsByCat.ship = {}\
        mist.DBs.unitsByCat.static = {}\
        mist.DBs.unitsByCat.vehicle = {}\
\
        mist.DBs.unitsByNum = {}\
\
        mist.DBs.groupsByName = {}\
        mist.DBs.groupsById = {}\
        mist.DBs.humansByName = {}\
        mist.DBs.humansById = {}\
\
        mist.DBs.dynGroupsAdded = {} -- will be filled by mist.dbUpdate from dynamically spawned groups\
        mist.DBs.activeHumans = {}\
\
        mist.DBs.aliveUnits = {}    -- will be filled in by the \"updateAliveUnits\" coroutine in mist.main.\
\
        mist.DBs.removedAliveUnits = {} -- will be filled in by the \"updateAliveUnits\" coroutine in mist.main.\
\
        mist.DBs.const = {}\
\
        -- not accessible by SSE, must use static list :-/\
        mist.DBs.const.callsigns = {\
            ['NATO'] = {\
                ['rules'] = {\
                    ['groupLimit'] = 9,\
                },\
                ['AWACS'] = {\
                    ['Overlord'] = 1,\
                    ['Magic'] = 2,\
                    ['Wizard'] = 3,\
                    ['Focus'] =     4,\
                    ['Darkstar'] =     5,\
                },\
                ['TANKER'] = {\
                    ['Texaco'] = 1,\
                    ['Arco'] = 2,\
                    ['Shell'] = 3,\
                },\
                ['JTAC'] = {\
                    ['Axeman'] = 1,\
                    ['Darknight'] = 2,\
                    ['Warrior']    = 3,\
                    ['Pointer']    = 4,\
                    ['Eyeball'] = 5,\
                    ['Moonbeam'] = 6,\
                    ['Whiplash'] = 7,\
                    ['Finger'] = 8,\
                    ['Pinpoint'] = 9,\
                    ['Ferret'] = 10,\
                    ['Shaba'] = 11,\
                    ['Playboy'] = 12,\
                    ['Hammer'] = 13,\
                    ['Jaguar'] = 14,\
                    ['Deathstar'] =    15,\
                    ['Anvil'] = 16,\
                    ['Firefly']    = 17,\
                    ['Mantis'] = 18,\
                    ['Badger'] = 19,\
                },\
                ['aircraft'] = {\
                    ['Enfield'] = 1,\
                    ['Springfield'] = 2,\
                    ['Uzi']    = 3,\
                    ['Colt'] = 4,\
                    ['Dodge'] =    5,\
                    ['Ford'] = 6,\
                    ['Chevy'] = 7,\
                    ['Pontiac'] = 8,\
                },\
\
                ['unique'] = {\
                    ['A10'] = {\
                        ['Hawg'] = 9,\
                        ['Boar'] = 10,\
                        ['Pig'] = 11,\
                        ['Tusk'] = 12,\
                        ['rules'] = {\
                            ['canUseAircraft'] = true,\
                            ['appliesTo'] = {\
                                'A-10C',\
                                'A-10A',\
                            },\
                        },\
                    },\
                },\
            },\
        }\
        mist.DBs.const.shapeNames = {\
            [\"Landmine\"] = \"landmine\",\
            [\"FARP CP Blindage\"] = \"kp_ug\",\
            [\"Subsidiary structure C\"] = \"saray-c\",\
            [\"Barracks 2\"] = \"kazarma2\",\
            [\"Small house 2C\"] = \"dom2c\",\
            [\"Military staff\"] = \"aviashtab\",\
            [\"Tech hangar A\"] = \"ceh_ang_a\",\
            [\"Oil derrick\"] = \"neftevyshka\",\
            [\"Tech combine\"] = \"kombinat\",\
            [\"Garage B\"] = \"garage_b\",\
            [\"Airshow_Crowd\"] = \"Crowd1\",\
            [\"Hangar A\"] = \"angar_a\",\
            [\"Repair workshop\"] = \"tech\",\
            [\"Subsidiary structure D\"] = \"saray-d\",\
            [\"FARP Ammo Dump Coating\"] = \"SetkaKP\",\
            [\"Small house 1C area\"] = \"dom2c-all\",\
            [\"Tank 2\"] = \"airbase_tbilisi_tank_01\",\
            [\"Boiler-house A\"] = \"kotelnaya_a\",\
            [\"Workshop A\"] = \"tec_a\",\
            [\"Small werehouse 1\"] = \"s1\",\
            [\"Garage small B\"] = \"garagh-small-b\",\
            [\"Small werehouse 4\"] = \"s4\",\
            [\"Shop\"] = \"magazin\",\
            [\"Subsidiary structure B\"] = \"saray-b\",\
            [\"FARP Fuel Depot\"] = \"GSM Rus\",\
            [\"Coach cargo\"] = \"wagon-gruz\",\
            [\"Electric power box\"] = \"tr_budka\",\
            [\"Tank 3\"] = \"airbase_tbilisi_tank_02\",\
            [\"Red_Flag\"] = \"H-flag_R\",\
            [\"Container red 3\"] = \"konteiner_red3\",\
            [\"Garage A\"] = \"garage_a\",\
            [\"Hangar B\"] = \"angar_b\",\
            [\"Black_Tyre\"] = \"H-tyre_B\",\
            [\"Cafe\"] = \"stolovaya\",\
            [\"Restaurant 1\"] = \"restoran1\",\
            [\"Subsidiary structure A\"] = \"saray-a\",\
            [\"Container white\"] = \"konteiner_white\",\
            [\"Warehouse\"] = \"sklad\",\
            [\"Tank\"] = \"bak\",\
            [\"Railway crossing B\"] = \"pereezd_small\",\
            [\"Subsidiary structure F\"] = \"saray-f\",\
            [\"Farm A\"] = \"ferma_a\",\
            [\"Small werehouse 3\"] = \"s3\",\
            [\"Water tower A\"] = \"wodokachka_a\",\
            [\"Railway station\"] = \"r_vok_sd\",\
            [\"Coach a tank blue\"] = \"wagon-cisterna_blue\",\
            [\"Supermarket A\"] = \"uniwersam_a\",\
            [\"Coach a platform\"] = \"wagon-platforma\",\
            [\"Garage small A\"] = \"garagh-small-a\",\
            [\"TV tower\"] = \"tele_bash\",\
            [\"Comms tower M\"] = \"tele_bash_m\",\
            [\"Small house 1A\"] = \"domik1a\",\
            [\"Farm B\"] = \"ferma_b\",\
            [\"GeneratorF\"] = \"GeneratorF\",\
            [\"Cargo1\"] = \"ab-212_cargo\",\
            [\"Container red 2\"] = \"konteiner_red2\",\
            [\"Subsidiary structure E\"] = \"saray-e\",\
            [\"Coach a passenger\"] = \"wagon-pass\",\
            [\"Black_Tyre_WF\"] = \"H-tyre_B_WF\",\
            [\"Electric locomotive\"] = \"elektrowoz\",\
            [\"Shelter\"] = \"ukrytie\",\
            [\"Coach a tank yellow\"] = \"wagon-cisterna_yellow\",\
            [\"Railway crossing A\"] = \"pereezd_big\",\
            [\".Ammunition depot\"] = \"SkladC\",\
            [\"Small werehouse 2\"] = \"s2\",\
            [\"Windsock\"] = \"H-Windsock_RW\",\
            [\"Shelter B\"] = \"ukrytie_b\",\
            [\"Fuel tank\"] = \"toplivo-bak\",\
            [\"Locomotive\"] = \"teplowoz\",\
            [\".Command Center\"] = \"ComCenter\",\
            [\"Pump station\"] = \"nasos\",\
            [\"Black_Tyre_RF\"] = \"H-tyre_B_RF\",\
            [\"Coach cargo open\"] = \"wagon-gruz-otkr\",\
            [\"Subsidiary structure 3\"] = \"hozdomik3\",\
            [\"FARP Tent\"] = \"PalatkaB\",\
            [\"White_Tyre\"] = \"H-tyre_W\",\
            [\"Subsidiary structure G\"] = \"saray-g\",\
            [\"Container red 1\"] = \"konteiner_red1\",\
            [\"Small house 1B area\"] = \"domik1b-all\",\
            [\"Subsidiary structure 1\"] = \"hozdomik1\",\
            [\"Container brown\"] = \"konteiner_brown\",\
            [\"Small house 1B\"] = \"domik1b\",\
            [\"Subsidiary structure 2\"] = \"hozdomik2\",\
            [\"Chemical tank A\"] = \"him_bak_a\",\
            [\"WC\"] = \"WC\",\
            [\"Small house 1A area\"] = \"domik1a-all\",\
            [\"White_Flag\"] = \"H-Flag_W\",\
            [\"Airshow_Cone\"] = \"Comp_cone\",\
        }\
        \
        \
        -- create mist.DBs.oldAliveUnits\
        -- do\
        -- local intermediate_alive_units = {}    -- between 0 and 0.5 secs old\
        -- local function make_old_alive_units() -- called every 0.5 secs, makes the old_alive_units DB which is just a copy of alive_units that is 0.5 to 1 sec old\
        -- if intermediate_alive_units then\
        -- mist.DBs.oldAliveUnits = mist.utils.deepCopy(intermediate_alive_units)\
        -- end\
        -- intermediate_alive_units = mist.utils.deepCopy(mist.DBs.aliveUnits)\
        -- timer.scheduleFunction(make_old_alive_units, nil, timer.getTime() + 0.5)\
        -- end\
\
        -- make_old_alive_units()\
        -- end\
\
        --Build DBs\
        for coa_name, coa_data in pairs(mist.DBs.units) do\
            for cntry_name, cntry_data in pairs(coa_data) do\
                for category_name, category_data in pairs(cntry_data) do\
                    if type(category_data) == 'table' then\
                        for group_ind, group_data in pairs(category_data) do\
                            if type(group_data) == 'table' and group_data.units and type(group_data.units) == 'table' and #group_data.units > 0 then    -- OCD paradigm programming\
                                mist.DBs.groupsByName[group_data.groupName] = mist.utils.deepCopy(group_data)\
                                mist.DBs.groupsById[group_data.groupId] = mist.utils.deepCopy(group_data)\
                                for unit_ind, unit_data in pairs(group_data.units) do\
                                    mist.DBs.unitsByName[unit_data.unitName] = mist.utils.deepCopy(unit_data)\
                                    mist.DBs.unitsById[unit_data.unitId] = mist.utils.deepCopy(unit_data)\
\
                                    mist.DBs.unitsByCat[unit_data.category] = mist.DBs.unitsByCat[unit_data.category] or {} -- future-proofing against new categories...\
                                    table.insert(mist.DBs.unitsByCat[unit_data.category], mist.utils.deepCopy(unit_data))\
                                    dbLog:info('inserting $1', unit_data.unitName)\
                                    table.insert(mist.DBs.unitsByNum, mist.utils.deepCopy(unit_data))\
\
                                    if unit_data.skill and (unit_data.skill == \"Client\" or unit_data.skill == \"Player\") then\
                                        mist.DBs.humansByName[unit_data.unitName] = mist.utils.deepCopy(unit_data)\
                                        mist.DBs.humansById[unit_data.unitId] = mist.utils.deepCopy(unit_data)\
                                        --if Unit.getByName(unit_data.unitName) then\
                                        --    mist.DBs.activeHumans[unit_data.unitName] = mist.utils.deepCopy(unit_data)\
                                        --    mist.DBs.activeHumans[unit_data.unitName].playerName = Unit.getByName(unit_data.unitName):getPlayerName()\
                                        --end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        end\
\
        --DynDBs\
        mist.DBs.MEunits = mist.utils.deepCopy(mist.DBs.units)\
        mist.DBs.MEunitsByName = mist.utils.deepCopy(mist.DBs.unitsByName)\
        mist.DBs.MEunitsById = mist.utils.deepCopy(mist.DBs.unitsById)\
        mist.DBs.MEunitsByCat = mist.utils.deepCopy(mist.DBs.unitsByCat)\
        mist.DBs.MEunitsByNum = mist.utils.deepCopy(mist.DBs.unitsByNum)\
        mist.DBs.MEgroupsByName = mist.utils.deepCopy(mist.DBs.groupsByName)\
        mist.DBs.MEgroupsById = mist.utils.deepCopy(mist.DBs.groupsById)\
\
        mist.DBs.deadObjects = {}\
\
        do\
            local mt = {}\
\
            function mt.__newindex(t, key, val)\
                local original_key = key --only for duplicate runtime IDs.\
                local key_ind = 1\
                while mist.DBs.deadObjects[key] do\
                    dbLog:warn('duplicate runtime id of previously dead object key: $1', key)\
                    key = tostring(original_key) .. ' #' .. tostring(key_ind)\
                    key_ind = key_ind + 1\
                end\
\
                if mist.DBs.aliveUnits and mist.DBs.aliveUnits[val.object.id_] then\
                    --dbLog:info('object found in alive_units')\
                    val.objectData = mist.utils.deepCopy(mist.DBs.aliveUnits[val.object.id_])\
                    local pos = Object.getPosition(val.object)\
                    if pos then\
                        val.objectPos = pos.p\
                    end\
                    val.objectType = mist.DBs.aliveUnits[val.object.id_].category\
\
                elseif mist.DBs.removedAliveUnits and mist.DBs.removedAliveUnits[val.object.id_] then    -- it didn't exist in alive_units, check old_alive_units\
                    --dbLog:info('object found in old_alive_units')\
                    val.objectData = mist.utils.deepCopy(mist.DBs.removedAliveUnits[val.object.id_])\
                    local pos = Object.getPosition(val.object)\
                    if pos then\
                        val.objectPos = pos.p\
                    end\
                    val.objectType = mist.DBs.removedAliveUnits[val.object.id_].category\
\
                else    --attempt to determine if static object...\
                    --dbLog:info('object not found in alive units or old alive units')\
                    local pos = Object.getPosition(val.object)\
                    if pos then\
                        local static_found = false\
                        for ind, static in pairs(mist.DBs.unitsByCat.static) do\
                            if ((pos.p.x - static.point.x)^2 + (pos.p.z - static.point.y)^2)^0.5 < 0.1 then --really, it should be zero...\
                                dbLog:info('correlated dead static object to position')\
                                val.objectData = static\
                                val.objectPos = pos.p\
                                val.objectType = 'static'\
                                static_found = true\
                                break\
                            end\
                        end\
                        if not static_found then\
                            val.objectPos = pos.p\
                            val.objectType = 'building'\
                        end\
                    else\
                        val.objectType = 'unknown'\
                    end\
                end\
                rawset(t, key, val)\
            end\
\
            setmetatable(mist.DBs.deadObjects, mt)\
        end\
\
        do -- mist unitID funcs\
            for id, idData in pairs(mist.DBs.unitsById) do\
                if idData.unitId > mist.nextUnitId then\
                    mist.nextUnitId = mist.utils.deepCopy(idData.unitId)\
                end\
                if idData.groupId > mist.nextGroupId then\
                    mist.nextGroupId = mist.utils.deepCopy(idData.groupId)\
                end\
            end\
        end\
\
\
    end\
\
    local function updateAliveUnits()    -- coroutine function\
        local lalive_units = mist.DBs.aliveUnits -- local references for faster execution\
        local lunits = mist.DBs.unitsByNum\
        local ldeepcopy = mist.utils.deepCopy\
        local lUnit = Unit\
        local lremovedAliveUnits = mist.DBs.removedAliveUnits\
        local updatedUnits = {}\
\
        if #lunits > 0 then\
            local units_per_run = math.ceil(#lunits/20)\
            if units_per_run < 5 then\
                units_per_run = 5\
            end\
\
            for i = 1, #lunits do\
                if lunits[i].category ~= 'static' then -- can't get statics with Unit.getByName :(\
                    local unit = lUnit.getByName(lunits[i].unitName)\
                    if unit then\
                        --dbLog:info(\"unit named $1 alive!\", lunits[i].unitName) -- spammy\
                        local pos = unit:getPosition()\
                        local newtbl = ldeepcopy(lunits[i])\
                        if pos then\
                            newtbl.pos = pos.p\
                        end\
                        newtbl.unit = unit\
                        --newtbl.rt_id = unit.id_\
                        lalive_units[unit.id_] = newtbl\
                        updatedUnits[unit.id_] = true\
                    end\
                end\
                if i%units_per_run == 0 then\
                    coroutine.yield()\
                end\
            end\
            -- All units updated, remove any \"alive\" units that were not updated- they are dead!\
            for unit_id, unit in pairs(lalive_units) do\
                if not updatedUnits[unit_id] then\
                    lremovedAliveUnits[unit_id] = unit\
                    lalive_units[unit_id] = nil\
                end\
            end\
        end\
    end\
\
    local function dbUpdate(event, objType)\
        dbLog:info('dbUpdate')\
        local newTable = {}\
        newTable.startTime =    0\
        if type(event) == 'string' then -- if name of an object.\
            local newObject\
            if Group.getByName(event) then\
                newObject = Group.getByName(event)\
            elseif StaticObject.getByName(event) then\
                newObject = StaticObject.getByName(event)\
                --    log:info('its static')\
            else\
                log:warn('$1 is not a Unit or Static Object. This should not be possible', event)\
                return false\
            end\
\
            newTable.name = newObject:getName()\
            newTable.groupId = tonumber(newObject:getID())\
            newTable.groupName = newObject:getName()\
            local unitOneRef\
            if objType == 'static' then\
                unitOneRef = newObject\
                newTable.countryId = tonumber(newObject:getCountry())\
                newTable.coalitionId = tonumber(newObject:getCoalition())\
                newTable.category = 'static'\
            else\
                unitOneRef = newObject:getUnits()\
                newTable.countryId = tonumber(unitOneRef[1]:getCountry())\
                newTable.coalitionId = tonumber(unitOneRef[1]:getCoalition())\
                newTable.category = tonumber(newObject:getCategory())\
            end\
            for countryData, countryId in pairs(country.id) do\
                if newTable.country and string.upper(countryData) == string.upper(newTable.country) or countryId == newTable.countryId then\
                    newTable.countryId = countryId\
                    newTable.country = string.lower(countryData)\
                    for coaData, coaId in pairs(coalition.side) do\
                        if coaId == coalition.getCountryCoalition(countryId) then\
                            newTable.coalition = string.lower(coaData)\
                        end\
                    end\
                end\
            end\
            for catData, catId in pairs(Unit.Category) do\
                if objType == 'group' and Group.getByName(newTable.groupName):isExist() then\
                    if catId == Group.getByName(newTable.groupName):getCategory() then\
                        newTable.category = string.lower(catData)\
                    end\
                elseif objType == 'static' and StaticObject.getByName(newTable.groupName):isExist() then\
                    if catId == StaticObject.getByName(newTable.groupName):getCategory() then\
                        newTable.category = string.lower(catData)\
                    end\
\
                end\
            end\
            local gfound = false\
            for index, data in pairs(mistAddedGroups) do\
                if mist.stringMatch(data.name, newTable.groupName) == true then\
                    gfound = true\
                    newTable.task = data.task\
                    newTable.modulation = data.modulation\
                    newTable.uncontrolled = data.uncontrolled\
                    newTable.radioSet = data.radioSet\
                    newTable.hidden = data.hidden\
                    newTable.startTime = data.start_time\
                    mistAddedGroups[index] = nil\
                end\
            end\
\
            if gfound == false then\
                newTable.uncontrolled = false\
                newTable.hidden = false\
            end\
\
            newTable.units = {}\
            if objType == 'group' then\
                for unitId, unitData in pairs(unitOneRef) do\
                    newTable.units[unitId] = {}\
                    newTable.units[unitId].unitName = unitData:getName()\
\
                    newTable.units[unitId].x = mist.utils.round(unitData:getPosition().p.x)\
                    newTable.units[unitId].y = mist.utils.round(unitData:getPosition().p.z)\
                    newTable.units[unitId].point = {}\
                    newTable.units[unitId].point.x = newTable.units[unitId].x\
                    newTable.units[unitId].point.y = newTable.units[unitId].y\
                    newTable.units[unitId].alt = mist.utils.round(unitData:getPosition().p.y)\
                    newTable.units[unitId].speed = mist.vec.mag(unitData:getVelocity())\
\
                    newTable.units[unitId].heading = mist.getHeading(unitData, true)\
\
                    newTable.units[unitId].type = unitData:getTypeName()\
                    newTable.units[unitId].unitId = tonumber(unitData:getID())\
\
\
                    newTable.units[unitId].groupName = newTable.groupName\
                    newTable.units[unitId].groupId = newTable.groupId\
                    newTable.units[unitId].countryId = newTable.countryId\
                    newTable.units[unitId].coalitionId = newTable.coalitionId\
                    newTable.units[unitId].coalition = newTable.coalition\
                    newTable.units[unitId].country = newTable.country\
                    local found = false\
                    for index, data in pairs(mistAddedObjects) do\
                        if mist.stringMatch(data.name, newTable.units[unitId].unitName) == true then\
                            found = true\
                            newTable.units[unitId].livery_id = data.livery_id\
                            newTable.units[unitId].skill = data.skill\
                            newTable.units[unitId].alt_type = data.alt_type\
                            newTable.units[unitId].callsign = data.callsign\
                            newTable.units[unitId].psi = data.psi\
                            mistAddedObjects[index] = nil\
                        end\
                        if found == false then\
                            newTable.units[unitId].skill = \"High\"\
                            newTable.units[unitId].alt_type = \"BARO\"\
                        end\
                    end\
\
                end\
            else -- its a static\
                newTable.category = 'static'\
                newTable.units[1] = {}\
                newTable.units[1].unitName = newObject:getName()\
                newTable.units[1].category = 'static'\
                newTable.units[1].x = mist.utils.round(newObject:getPosition().p.x)\
                newTable.units[1].y = mist.utils.round(newObject:getPosition().p.z)\
                newTable.units[1].point = {}\
                newTable.units[1].point.x = newTable.units[1].x\
                newTable.units[1].point.y = newTable.units[1].y\
                newTable.units[1].alt = mist.utils.round(newObject:getPosition().p.y)\
                newTable.units[1].heading = mist.getHeading(newObject, true)\
                newTable.units[1].type = newObject:getTypeName()\
                newTable.units[1].unitId = tonumber(newObject:getID())\
                newTable.units[1].groupName = newTable.name\
                newTable.units[1].groupId = newTable.groupId\
                newTable.units[1].countryId = newTable.countryId\
                newTable.units[1].country = newTable.country\
                newTable.units[1].coalitionId = newTable.coalitionId\
                newTable.units[1].coalition = newTable.coalition\
                if newObject:getCategory() == 6 and newObject:getCargoDisplayName() then\
                    local mass = newObject:getCargoDisplayName()\
                    mass = string.gsub(mass, ' ', '')\
                    mass = string.gsub(mass, 'kg', '')\
                    newTable.units[1].mass = tonumber(mass)\
                    newTable.units[1].categoryStatic = 'Cargos'\
                    newTable.units[1].canCargo = true\
                    newTable.units[1].shape_name = 'ab-212_cargo'\
                end\
\
                ----- search mist added objects for extra data if applicable\
                for index, data in pairs(mistAddedObjects) do\
                    if mist.stringMatch(data.name, newTable.units[1].unitName) == true then\
                        newTable.units[1].shape_name = data.shape_name -- for statics\
                        newTable.units[1].livery_id = data.livery_id\
                        newTable.units[1].airdromeId = data.airdromeId\
                        newTable.units[1].mass = data.mass\
                        newTable.units[1].canCargo = data.canCargo\
                        newTable.units[1].categoryStatic = data.categoryStatic\
                        newTable.units[1].type = 'cargo1'\
                        mistAddedObjects[index] = nil\
                    end\
                end\
            end\
        end\
        --mist.debug.writeData(mist.utils.serialize,{'msg', newTable}, timer.getAbsTime() ..'Group.lua')\
        newTable.timeAdded = timer.getAbsTime() -- only on the dynGroupsAdded table. For other reference, see start time\
        --mist.debug.dumpDBs()\
        --end\
        dbLog:info('endDbUpdate')\
        return newTable\
    end\
\
    --[[DB update code... FRACK. I need to refactor some of it. \
    \
    The problem is that the DBs need to account better for shared object names. Needs to write over some data and outright remove other.\
    \
    If groupName is used then entire group needs to be rewritten\
        what to do with old groups units DB entries?. Names cant be assumed to be the same.\
    \
    \
    -- new spawn event check.\
    -- event handler filters everything into groups: tempSpawnedGroups\
    -- this function then checks DBs to see if data has changed\
    ]]\
    local function checkSpawnedEventsNew()\
        if tempSpawnGroupsCounter > 0 then\
            --[[local updatesPerRun = math.ceil(#tempSpawnedGroupsCounter/20)\
            if updatesPerRun < 5 then\
                updatesPerRun = 5\
            end]]\
            \
            dbLog:info('iterate')\
            for name, gType in pairs(tempSpawnedGroups) do\
                dbLog:info(name)\
                local updated = false\
                \
                if mist.DBs.groupsByName[name] then\
                    -- first check group level properties, groupId, countryId, coalition\
                    dbLog:info('Found in DBs, check if updated')\
                    local dbTable = mist.DBs.groupsByName[name]\
                    dbLog:info(dbTable)\
                    if gType ~= 'static' then\
                        dbLog:info('Not static')\
                        local _g = Group.getByName(name)\
                        local _u = _g:getUnit(1)\
                        if dbTable.groupId ~= tonumber(_g:getID()) or _u:getCountry() ~= dbTable.countryId or _u:getCoalition() ~= dbTable.coaltionId then\
                            dbLog:info('Group Data mismatch')\
                            updated = true\
                        else\
                            dbLog:info('No Mismatch')\
                        end\
\
                    end\
                end            \
                dbLog:info('Updated: $1', updated)\
                if updated == false and gType ~= 'static' then -- time to check units\
                    dbLog:info('No Group Mismatch, Check Units')\
                    for index, uObject in pairs(Group.getByName(name):getUnits()) do\
                        dbLog:info(index)\
                        if mist.DBs.unitsByName[uObject:getName()] then\
                            dbLog:info('UnitByName table exists')\
                            local uTable = mist.DBs.unitsByName[uObject:getName()]\
                            if tonumber(uObject:getID()) ~= uTable.unitId or uObject:getTypeName() ~= uTable.type  then\
                                dbLog:info('Unit Data mismatch')\
                                updated = true\
                                break\
                            end\
                        end\
                    end\
                end\
                \
                if updated == true or not mist.DBs.groupsByName[name] then\
                    dbLog:info('Get Table')\
                    writeGroups[#writeGroups+1] = {data = dbUpdate(name, gType), isUpdated = updated}\
                \
                end\
                -- Work done, so remove\
                tempSpawnedGroups[name] = nil\
                tempSpawnGroupsCounter = tempSpawnGroupsCounter - 1\
            end            \
        end    \
    end\
    \
    local function updateDBTables()\
        local i = #writeGroups\
\
        local savesPerRun = math.ceil(i/10)\
        if savesPerRun < 5 then\
            savesPerRun = 5\
        end\
        if i > 0 then\
            dbLog:info('updateDBTables')\
            local ldeepCopy = mist.utils.deepCopy\
            for x = 1, i do\
                dbLog:info(writeGroups[x])\
                local newTable = writeGroups[x].data\
                local updated = writeGroups[x].isUpdated\
                local mistCategory\
                if type(newTable.category) == 'string' then\
                    mistCategory = string.lower(newTable.category)\
                end\
\
                if string.upper(newTable.category) == 'GROUND_UNIT' then\
                    mistCategory = 'vehicle'\
                    newTable.category = mistCategory\
                elseif string.upper(newTable.category) == 'AIRPLANE' then\
                    mistCategory = 'plane'\
                    newTable.category = mistCategory\
                elseif string.upper(newTable.category) == 'HELICOPTER' then\
                    mistCategory = 'helicopter'\
                    newTable.category = mistCategory\
                elseif string.upper(newTable.category) == 'SHIP' then\
                    mistCategory = 'ship'\
                    newTable.category = mistCategory\
                end\
                dbLog:info('Update unitsBy')\
                for newId, newUnitData in pairs(newTable.units) do\
                    dbLog:info(newId)\
                    newUnitData.category = mistCategory\
                    if newUnitData.unitId then\
                        dbLog:info('byId')\
                        mist.DBs.unitsById[tonumber(newUnitData.unitId)] = ldeepCopy(newUnitData)\
                    end\
                    dbLog:info(updated)\
                    if mist.DBs.unitsByName[newUnitData.unitName] and updated == true then--if unit existed before and something was updated, write over the entry for a given unit name just in case.\
                        dbLog:info('Updating Unit Tables')\
                        for i = 1, #mist.DBs.unitsByCat[mistCategory] do\
                            if mist.DBs.unitsByCat[mistCategory][i].unitName == newUnitData.unitName then\
                                dbLog:info('Entry Found, Rewriting for unitsByCat')\
                                mist.DBs.unitsByCat[mistCategory][i] = ldeepCopy(newUnitData)\
                                break\
                            end\
                        end \
                        for i = 1, #mist.DBs.unitsByNum do\
                            if mist.DBs.unitsByNum[i].unitName == newUnitData.unitName then\
                                dbLog:info('Entry Found, Rewriting for unitsByNum')\
                                mist.DBs.unitsByNum[i] = ldeepCopy(newUnitData)\
                                break\
                            end\
                        end\
                        \
                    else\
                        dbLog:info('Unitname not in use, add as normal')\
                        mist.DBs.unitsByCat[mistCategory][#mist.DBs.unitsByCat[mistCategory] + 1] = ldeepCopy(newUnitData)\
                        mist.DBs.unitsByNum[#mist.DBs.unitsByNum + 1] = ldeepCopy(newUnitData)\
                    end\
                    mist.DBs.unitsByName[newUnitData.unitName] = ldeepCopy(newUnitData)\
\
                    \
                end\
                -- this is a really annoying DB to populate. Gotta create new tables in case its missing\
                dbLog:info('write mist.DBs.units')\
                if not mist.DBs.units[newTable.coalition] then\
                    mist.DBs.units[newTable.coalition] = {}\
                end\
\
                if not mist.DBs.units[newTable.coalition][newTable.country] then\
                    mist.DBs.units[newTable.coalition][(newTable.country)] = {}\
                    mist.DBs.units[newTable.coalition][(newTable.country)].countryId = newTable.countryId\
                end\
                if not mist.DBs.units[newTable.coalition][newTable.country][mistCategory] then\
                    mist.DBs.units[newTable.coalition][(newTable.country)][mistCategory] = {}\
                end\
                \
                if updated == true then\
                    dbLog:info('Updating DBsUnits')\
                    for i = 1, #mist.DBs.units[newTable.coalition][(newTable.country)][mistCategory] do\
                        if mist.DBs.units[newTable.coalition][(newTable.country)][mistCategory][i].groupName == newTable.groupName then\
                            dbLog:info('Entry Found, Rewriting')\
                            mist.DBs.units[newTable.coalition][(newTable.country)][mistCategory][i] = ldeepCopy(newTable)\
                            break\
                        end\
                    end\
                else\
                    mist.DBs.units[newTable.coalition][(newTable.country)][mistCategory][#mist.DBs.units[newTable.coalition][(newTable.country)][mistCategory] + 1] = ldeepCopy(newTable)\
                end\
                \
\
                if newTable.groupId then\
                    mist.DBs.groupsById[newTable.groupId] = ldeepCopy(newTable)\
                end\
\
                mist.DBs.groupsByName[newTable.name] = ldeepCopy(newTable)\
                mist.DBs.dynGroupsAdded[#mist.DBs.dynGroupsAdded + 1] = ldeepCopy(newTable)\
\
                writeGroups[x] = nil\
                if x%savesPerRun == 0 then\
                    coroutine.yield()\
                end\
            end\
            if timer.getTime() > lastUpdateTime then\
                lastUpdateTime = timer.getTime()\
            end\
            dbLog:info('endUpdateTables')\
        end\
    end\
\
    local function groupSpawned(event)\
        -- dont need to add units spawned in at the start of the mission if mist is loaded in init line\
        if event.id == world.event.S_EVENT_BIRTH and timer.getTime0() < timer.getAbsTime() then\
            dbLog:info('unitSpawnEvent')\
            \
                --table.insert(tempSpawnedUnits,(event.initiator))\
                -------\
                -- New functionality below. \
                -------\
            if Object.getCategory(event.initiator) == 1 and not Unit.getPlayerName(event.initiator) then -- simple player check, will need to later check to see if unit was spawned with a player in a flight\
                dbLog:info('Object is a Unit')\
                dbLog:info(Unit.getGroup(event.initiator):getName())\
                if not tempSpawnedGroups[Unit.getGroup(event.initiator):getName()] then\
                    dbLog:info('added')\
                    tempSpawnedGroups[Unit.getGroup(event.initiator):getName()] = 'group'\
                    tempSpawnGroupsCounter = tempSpawnGroupsCounter + 1\
                end\
            elseif Object.getCategory(event.initiator) == 3 or Object.getCategory(event.initiator) == 6 then\
                dbLog:info('Object is Static')\
                tempSpawnedGroups[StaticObject.getName(event.initiator)] = 'static'\
                tempSpawnGroupsCounter = tempSpawnGroupsCounter + 1\
            end\
                \
            \
        end\
    end\
\
    local function doScheduledFunctions()\
        local i = 1\
        while i <= #scheduledTasks do\
            if not scheduledTasks[i].rep then -- not a repeated process\
                if scheduledTasks[i].t <= timer.getTime() then\
                    local task = scheduledTasks[i] -- local reference\
                    table.remove(scheduledTasks, i)\
                    local err, errmsg = pcall(task.f, unpack(task.vars, 1, table.maxn(task.vars)))\
                    if not err then\
                        log:error('Error in scheduled function: $1', errmsg)\
                    end\
                    --task.f(unpack(task.vars, 1, table.maxn(task.vars)))    -- do the task, do not increment i\
                else\
                    i = i + 1\
                end\
            else\
                if scheduledTasks[i].st and scheduledTasks[i].st <= timer.getTime() then     --if a stoptime was specified, and the stop time exceeded\
                    table.remove(scheduledTasks, i) -- stop time exceeded, do not execute, do not increment i\
                elseif scheduledTasks[i].t <= timer.getTime() then\
                    local task = scheduledTasks[i] -- local reference\
                    task.t = timer.getTime() + task.rep    --schedule next run\
                    local err, errmsg = pcall(task.f, unpack(task.vars, 1, table.maxn(task.vars)))\
                    if not err then\
                        log:error('Error in scheduled function: $1' .. errmsg)\
                    end\
                    --scheduledTasks[i].f(unpack(scheduledTasks[i].vars, 1, table.maxn(scheduledTasks[i].vars)))    -- do the task\
                    i = i + 1\
                else\
                    i = i + 1\
                end\
            end\
        end\
    end\
\
    -- Event handler to start creating the dead_objects table\
    local function addDeadObject(event)\
        if event.id == world.event.S_EVENT_DEAD or event.id == world.event.S_EVENT_CRASH then\
            if event.initiator and event.initiator.id_ and event.initiator.id_ > 0 then\
\
                local id = event.initiator.id_    -- initial ID, could change if there is a duplicate id_ already dead.\
                local val = {object = event.initiator} -- the new entry in mist.DBs.deadObjects.\
\
                local original_id = id    --only for duplicate runtime IDs.\
                local id_ind = 1\
                while mist.DBs.deadObjects[id] do\
                    --log:info('duplicate runtime id of previously dead object id: $1', id)\
                    id = tostring(original_id) .. ' #' .. tostring(id_ind)\
                    id_ind = id_ind + 1\
                end\
\
                if mist.DBs.aliveUnits and mist.DBs.aliveUnits[val.object.id_] then\
                    --log:info('object found in alive_units')\
                    val.objectData = mist.utils.deepCopy(mist.DBs.aliveUnits[val.object.id_])\
                    local pos = Object.getPosition(val.object)\
                    if pos then\
                        val.objectPos = pos.p\
                    end\
                    val.objectType = mist.DBs.aliveUnits[val.object.id_].category\
                    --[[if mist.DBs.activeHumans[Unit.getName(val.object)] then\
                    --trigger.action.outText('remove via death: ' .. Unit.getName(val.object),20)\
                        mist.DBs.activeHumans[Unit.getName(val.object)] = nil\
                    end]]\
                elseif mist.DBs.removedAliveUnits and mist.DBs.removedAliveUnits[val.object.id_] then    -- it didn't exist in alive_units, check old_alive_units\
                    --log:info('object found in old_alive_units')\
                    val.objectData = mist.utils.deepCopy(mist.DBs.removedAliveUnits[val.object.id_])\
                    local pos = Object.getPosition(val.object)\
                    if pos then\
                        val.objectPos = pos.p\
                    end\
                    val.objectType = mist.DBs.removedAliveUnits[val.object.id_].category\
\
                else    --attempt to determine if static object...\
                    --log:info('object not found in alive units or old alive units')\
                    local pos = Object.getPosition(val.object)\
                    if pos then\
                        local static_found = false\
                        for ind, static in pairs(mist.DBs.unitsByCat.static) do\
                            if ((pos.p.x - static.point.x)^2 + (pos.p.z - static.point.y)^2)^0.5 < 0.1 then --really, it should be zero...\
                                --log:info('correlated dead static object to position')\
                                val.objectData = static\
                                val.objectPos = pos.p\
                                val.objectType = 'static'\
                                static_found = true\
                                break\
                            end\
                        end\
                        if not static_found then\
                            val.objectPos = pos.p\
                            val.objectType = 'building'\
                        end\
                    else\
                        val.objectType = 'unknown'\
                    end\
                end\
                mist.DBs.deadObjects[id] = val\
            end\
        end\
    end\
\
    --[[\
        local function addClientsToActive(event)\
            if event.id == world.event.S_EVENT_PLAYER_ENTER_UNIT or event.id == world.event.S_EVENT_BIRTH then\
                log:info(event)\
                if Unit.getPlayerName(event.initiator) then\
                    log:info(Unit.getPlayerName(event.initiator))\
                    local newU = mist.utils.deepCopy(mist.DBs.unitsByName[Unit.getName(event.initiator)])\
                    newU.playerName = Unit.getPlayerName(event.initiator)\
                    mist.DBs.activeHumans[Unit.getName(event.initiator)] = newU\
                    --trigger.action.outText('added: ' .. Unit.getName(event.initiator), 20)\
                end\
            elseif event.id == world.event.S_EVENT_PLAYER_LEAVE_UNIT and event.initiator then\
                if mist.DBs.activeHumans[Unit.getName(event.initiator)] then\
                    mist.DBs.activeHumans[Unit.getName(event.initiator)] = nil\
                    -- trigger.action.outText('removed via control: ' .. Unit.getName(event.initiator), 20)\
                end\
            end\
        end\
\
    mist.addEventHandler(addClientsToActive)\
    ]]\
\
    --- init function.\
    -- creates logger, adds default event handler\
    -- and calls main the first time.\
    -- @function mist.init\
    function mist.init()\
        -- create logger\
        mist.log = mist.Logger:new(\"MIST\")\
        dbLog = mist.Logger:new('MISTDB', 'warning')\
        \
        log = mist.log -- log shorthand\
        -- set warning log level, showing only\
        -- warnings and errors\
        log:setLevel(\"warning\")\
\
        log:info(\"initializing databases\")\
        initDBs()\
\
        -- add event handler for group spawns\
        mist.addEventHandler(groupSpawned)\
        mist.addEventHandler(addDeadObject)\
\
        -- call main the first time therafter it reschedules itself.\
        mist.main()\
        --log:msg('MIST version $1.$2.$3 loaded', mist.majorVersion, mist.minorVersion, mist.build)\
        return\
    end\
\
    --- The main function.\
    -- Run 100 times per second.\
    -- You shouldn't call this function.\
    function mist.main()\
        timer.scheduleFunction(mist.main, {}, timer.getTime() + 0.01)    --reschedule first in case of Lua error\
\
        updateTenthSecond = updateTenthSecond + 1\
        if updateTenthSecond == 10 then\
            updateTenthSecond = 0\
\
            checkSpawnedEventsNew()\
            \
            if not coroutines.updateDBTables then\
                coroutines.updateDBTables = coroutine.create(updateDBTables)\
            end\
\
            coroutine.resume(coroutines.updateDBTables)\
\
            if coroutine.status(coroutines.updateDBTables) == 'dead' then\
                coroutines.updateDBTables = nil\
            end\
        end\
\
        --updating alive units\
        updateAliveUnitsCounter = updateAliveUnitsCounter + 1\
        if updateAliveUnitsCounter == 5 then\
            updateAliveUnitsCounter = 0\
\
            if not coroutines.updateAliveUnits then\
                coroutines.updateAliveUnits = coroutine.create(updateAliveUnits)\
            end\
\
            coroutine.resume(coroutines.updateAliveUnits)\
\
            if coroutine.status(coroutines.updateAliveUnits) == 'dead' then\
                coroutines.updateAliveUnits = nil\
            end\
        end\
\
        doScheduledFunctions()\
    end -- end of mist.main\
\
    --- Returns next unit id.\
    -- @treturn number next unit id.\
    function mist.getNextUnitId()\
        mist.nextUnitId = mist.nextUnitId + 1\
        if mist.nextUnitId > 6900 then\
            mist.nextUnitId = 14000\
        end\
        return mist.nextUnitId\
    end\
\
    --- Returns next group id.\
    -- @treturn number next group id.\
    function mist.getNextGroupId()\
        mist.nextGroupId = mist.nextGroupId + 1\
        if mist.nextGroupId > 6900 then\
            mist.nextGroupId = 14000\
        end\
        return mist.nextGroupId\
    end\
\
    --- Returns timestamp of last database update.\
    -- @treturn timestamp of last database update\
    function mist.getLastDBUpdateTime()\
        return lastUpdateTime\
    end\
\
    --- Spawns a static object to the game world.\
    -- @todo write good docs\
    -- @tparam table staticObj table containing data needed for the object creation\
    function mist.dynAddStatic(newObj)\
\
        if newObj.units and newObj.units[1] then -- if its mist format\
            for entry, val in pairs(newObj.units[1]) do\
                if newObj[entry] and newObj[entry] ~= val or not newObj[entry] then\
                    newObj[entry] = val\
                end\
            end\
        end\
        --log:info(newObj)\
        \
        local cntry = newObj.country\
        if newObj.countryId then\
            cntry = newObj.countryId\
        end\
    \
        local newCountry = ''\
\
        for countryId, countryName in pairs(country.name) do\
            if type(cntry) == 'string' then\
                cntry = cntry:gsub(\"%s+\", \"_\")\
                if tostring(countryName) == string.upper(cntry) then\
                    newCountry = countryName\
                end\
            elseif type(cntry) == 'number' then\
                if countryId == cntry then\
                    newCountry = countryName\
                end\
            end\
        end\
        \
        if newCountry == '' then\
            log:error(\"Country not found: $1\", cntry)\
            return false\
        end\
    \
        if newObj.clone or not newObj.groupId then\
            mistGpId = mistGpId + 1\
            newObj.groupId = mistGpId\
        end\
\
        if newObj.clone or not newObj.unitId then\
            mistUnitId = mistUnitId + 1\
            newObj.unitId = mistUnitId\
        end\
\
        if newObj.clone or not newObj.name then\
            mistDynAddIndex[' static '] = mistDynAddIndex[' static '] + 1\
            newObj.name = (newCountry .. ' static ' .. mistDynAddIndex[' static '])\
        end\
\
        if not newObj.dead then\
            newObj.dead = false\
        end\
\
        if not newObj.heading then\
            newObj.heading = math.random(360)\
        end\
        \
        if newObj.categoryStatic then\
            newObj.category = newObj.categoryStatic\
        end\
        if newObj.mass then\
            newObj.category = 'Cargos'\
        end\
        \
        if newObj.shapeName then\
            newObj.shape_name = newObj.shapeName\
        end\
        \
        if not newObj.shape_name then\
            log:info('shape_name not present')\
            if mist.DBs.const.shapeNames[newObj.type] then\
                newObj.shape_name = mist.DBs.const.shapeNames[newObj.type]\
            end\
        end\
        \
        mistAddedObjects[#mistAddedObjects + 1] = mist.utils.deepCopy(newObj)\
        if newObj.x and newObj.y and newObj.type and type(newObj.x) == 'number' and type(newObj.y) == 'number' and type(newObj.type) == 'string' then\
            --log:info('addStaticObject')\
            coalition.addStaticObject(country.id[newCountry], newObj)\
\
            return newObj\
        end\
        log:error(\"Failed to add static object due to missing or incorrect value. X: $1, Y: $2, Type: $3\", newObj.x, newObj.y, newObj.type)\
        return false\
    end\
\
    --- Spawns a dynamic group into the game world.\
    -- Same as coalition.add function in SSE. checks the passed data to see if its valid.\
    -- Will generate groupId, groupName, unitId, and unitName if needed\
    -- @tparam table newGroup table containting values needed for spawning a group.\
    function mist.dynAdd(newGroup)\
\
        --mist.debug.writeData(mist.utils.serialize,{'msg', newGroup}, 'newGroupOrig.lua')\
        local cntry = newGroup.country\
        if newGroup.countryId then\
            cntry = newGroup.countryId\
        end\
\
        local groupType = newGroup.category\
        local newCountry = ''\
        -- validate data\
        for countryId, countryName in pairs(country.name) do\
            if type(cntry) == 'string' then\
                cntry = cntry:gsub(\"%s+\", \"_\")\
                if tostring(countryName) == string.upper(cntry) then\
                    newCountry = countryName\
                end\
            elseif type(cntry) == 'number' then\
                if countryId == cntry then\
                    newCountry = countryName\
                end\
            end\
        end\
\
        if newCountry == '' then\
            log:error(\"Country not found: $1\", cntry)\
            return false\
        end\
\
        local newCat = ''\
        for catName, catId in pairs(Unit.Category) do\
            if type(groupType) == 'string' then\
                if tostring(catName) == string.upper(groupType) then\
                    newCat = catName\
                end\
            elseif type(groupType) == 'number' then\
                if catId == groupType then\
                    newCat = catName\
                end\
            end\
\
            if catName == 'GROUND_UNIT' and (string.upper(groupType) == 'VEHICLE' or string.upper(groupType) == 'GROUND') then\
                newCat = 'GROUND_UNIT'\
            elseif catName == 'AIRPLANE' and string.upper(groupType) == 'PLANE' then\
                newCat = 'AIRPLANE'\
            end\
        end\
        local typeName\
        if newCat == 'GROUND_UNIT' then\
            typeName = ' gnd '\
        elseif newCat == 'AIRPLANE' then\
            typeName = ' air '\
        elseif newCat == 'HELICOPTER' then\
            typeName = ' hel '\
        elseif newCat == 'SHIP' then\
            typeName = ' shp '\
        elseif newCat == 'BUILDING' then\
            typeName = ' bld '\
        end\
        if newGroup.clone or not newGroup.groupId then\
            mistDynAddIndex[typeName] = mistDynAddIndex[typeName] + 1\
            mistGpId = mistGpId + 1\
            newGroup.groupId = mistGpId\
        end\
        if newGroup.groupName or newGroup.name then\
            if newGroup.groupName then\
                newGroup.name = newGroup.groupName\
            elseif newGroup.name then\
                newGroup.name = newGroup.name\
            end\
        end\
\
        if newGroup.clone and mist.DBs.groupsByName[newGroup.name] or not newGroup.name then\
            newGroup.name = tostring(newCountry .. tostring(typeName) .. mistDynAddIndex[typeName])\
        end\
\
        if not newGroup.hidden then\
            newGroup.hidden = false\
        end\
\
        if not newGroup.visible then\
            newGroup.visible = false\
        end\
\
        if (newGroup.start_time and type(newGroup.start_time) ~= 'number') or not newGroup.start_time then\
            if newGroup.startTime then\
                newGroup.start_time = mist.utils.round(newGroup.startTime)\
            else\
                newGroup.start_time = 0\
            end\
        end\
\
\
        for unitIndex, unitData in pairs(newGroup.units) do\
            local originalName = newGroup.units[unitIndex].unitName or newGroup.units[unitIndex].name\
            if newGroup.clone or not unitData.unitId then\
                mistUnitId = mistUnitId + 1\
                newGroup.units[unitIndex].unitId = mistUnitId\
            end\
            if newGroup.units[unitIndex].unitName or newGroup.units[unitIndex].name then\
                if newGroup.units[unitIndex].unitName then\
                    newGroup.units[unitIndex].name = newGroup.units[unitIndex].unitName\
                elseif newGroup.units[unitIndex].name then\
                    newGroup.units[unitIndex].name = newGroup.units[unitIndex].name\
                end\
            end\
            if newGroup.clone or not unitData.name then\
                newGroup.units[unitIndex].name = tostring(newGroup.name .. ' unit' .. unitIndex)\
            end\
\
            if not unitData.skill then\
                newGroup.units[unitIndex].skill = 'Random'\
            end\
\
            if not unitData.alt then\
                if newCat == 'AIRPLANE' then\
                    newGroup.units[unitIndex].alt = 2000\
                    newGroup.units[unitIndex].alt_type = 'RADIO'\
                    newGroup.units[unitIndex].speed = 150\
                elseif newCat == 'HELICOPTER' then\
                    newGroup.units[unitIndex].alt = 500\
                    newGroup.units[unitIndex].alt_type = 'RADIO'\
                    newGroup.units[unitIndex].speed = 60\
                else\
                    --[[log:info('check height')\
                    newGroup.units[unitIndex].alt = land.getHeight({x = newGroup.units[unitIndex].x, y = newGroup.units[unitIndex].y})\
                    newGroup.units[unitIndex].alt_type = 'BARO']]\
                end\
\
\
            end\
\
            if newCat == 'AIRPLANE' or newCat == 'HELICOPTER' then\
                if newGroup.units[unitIndex].alt_type and newGroup.units[unitIndex].alt_type ~= 'BARO' or not newGroup.units[unitIndex].alt_type then\
                    newGroup.units[unitIndex].alt_type = 'RADIO'\
                end\
                if not unitData.speed then\
                    if newCat == 'AIRPLANE' then\
                        newGroup.units[unitIndex].speed = 150\
                    elseif newCat == 'HELICOPTER' then\
                        newGroup.units[unitIndex].speed = 60\
                    end\
                end\
                if not unitData.payload then\
                    newGroup.units[unitIndex].payload = mist.getPayload(originalName)\
                end\
            end\
            mistAddedObjects[#mistAddedObjects + 1] = mist.utils.deepCopy(newGroup.units[unitIndex])\
        end\
        mistAddedGroups[#mistAddedGroups + 1] = mist.utils.deepCopy(newGroup)\
        if newGroup.route and not newGroup.route.points then\
            if not newGroup.route.points and newGroup.route[1] then\
                local copyRoute = newGroup.route\
                newGroup.route = {}\
                newGroup.route.points = copyRoute\
            end\
        end\
        newGroup.country = newCountry\
\
\
        --mist.debug.writeData(mist.utils.serialize,{'msg', newGroup}, 'newGroup.lua')\
\
        -- sanitize table\
        newGroup.groupName = nil\
        newGroup.clone = nil\
        newGroup.category = nil\
        newGroup.country = nil\
\
        newGroup.tasks = {}\
\
        for unitIndex, unitData in pairs(newGroup.units) do\
            newGroup.units[unitIndex].unitName = nil\
        end\
\
        coalition.addGroup(country.id[newCountry], Unit.Category[newCat], newGroup)\
\
        return newGroup\
\
    end\
\
    --- Schedules a function.\
    -- Modified Slmod task scheduler, superior to timer.scheduleFunction\
    -- @tparam function f function to schedule\
    -- @tparam table vars array containing all parameters passed to the function\
    -- @tparam number t time in seconds from mission start to schedule the function to.\
    -- @tparam[opt] number rep time between repetitions of the function\
    -- @tparam[opt] number st time in seconds from mission start at which the function\
    -- should stop to be rescheduled.\
    -- @treturn number scheduled function id.\
    function mist.scheduleFunction(f, vars, t, rep, st)\
        --verify correct types\
        assert(type(f) == 'function', 'variable 1, expected function, got ' .. type(f))\
        assert(type(vars) == 'table' or vars == nil, 'variable 2, expected table or nil, got ' .. type(f))\
        assert(type(t) == 'number', 'variable 3, expected number, got ' .. type(t))\
        assert(type(rep) == 'number' or rep == nil, 'variable 4, expected number or nil, got ' .. type(rep))\
        assert(type(st) == 'number' or st == nil, 'variable 5, expected number or nil, got ' .. type(st))\
        if not vars then\
            vars = {}\
        end\
        taskId = taskId + 1\
        table.insert(scheduledTasks, {f = f, vars = vars, t = t, rep = rep, st = st, id = taskId})\
        return taskId\
    end\
\
    --- Removes a scheduled function.\
    -- @tparam number id function id\
    -- @treturn boolean true if function was successfully removed, false otherwise.\
    function mist.removeFunction(id)\
        local i = 1\
        while i <= #scheduledTasks do\
            if scheduledTasks[i].id == id then\
                table.remove(scheduledTasks, i)\
            else\
                i = i + 1\
            end\
        end\
    end\
\
    --- Registers an event handler.\
    -- @tparam function f function handling event\
    -- @treturn number id of the event handler\
    function mist.addEventHandler(f) --id is optional!\
        local handler = {}\
        idNum = idNum + 1\
        handler.id = idNum\
        handler.f = f\
        function handler:onEvent(event)\
            self.f(event)\
        end\
        world.addEventHandler(handler)\
        return handler.id\
    end\
\
    --- Removes event handler with given id.\
    -- @tparam number id event handler id\
    -- @treturn boolean true on success, false otherwise\
    function mist.removeEventHandler(id)\
        for key, handler in pairs(world.eventHandlers) do\
            if handler.id and handler.id == id then\
                world.eventHandlers[key] = nil\
                return true\
            end\
        end\
        return false\
    end\
end\
\
-- Begin common funcs\
do\
    --- Returns MGRS coordinates as string.\
    -- @tparam string MGRS MGRS coordinates\
    -- @tparam number acc the accuracy of each easting/northing.\
    -- Can be: 0, 1, 2, 3, 4, or 5.\
    function mist.tostringMGRS(MGRS, acc)\
        if acc == 0 then\
            return MGRS.UTMZone .. ' ' .. MGRS.MGRSDigraph\
        else\
            return MGRS.UTMZone .. ' ' .. MGRS.MGRSDigraph .. ' ' .. string.format('%0' .. acc .. 'd', mist.utils.round(MGRS.Easting/(10^(5-acc)), 0))\
            .. ' ' .. string.format('%0' .. acc .. 'd', mist.utils.round(MGRS.Northing/(10^(5-acc)), 0))\
        end\
    end\
\
    --[[acc:\
    in DM: decimal point of minutes.\
    In DMS: decimal point of seconds.\
    position after the decimal of the least significant digit:\
    So:\
    42.32 - acc of 2.\
    ]]\
    function mist.tostringLL(lat, lon, acc, DMS)\
\
        local latHemi, lonHemi\
        if lat > 0 then\
            latHemi = 'N'\
        else\
            latHemi = 'S'\
        end\
\
        if lon > 0 then\
            lonHemi = 'E'\
        else\
            lonHemi = 'W'\
        end\
\
        lat = math.abs(lat)\
        lon = math.abs(lon)\
\
        local latDeg = math.floor(lat)\
        local latMin = (lat - latDeg)*60\
\
        local lonDeg = math.floor(lon)\
        local lonMin = (lon - lonDeg)*60\
\
        if DMS then    -- degrees, minutes, and seconds.\
            local oldLatMin = latMin\
            latMin = math.floor(latMin)\
            local latSec = mist.utils.round((oldLatMin - latMin)*60, acc)\
\
            local oldLonMin = lonMin\
            lonMin = math.floor(lonMin)\
            local lonSec = mist.utils.round((oldLonMin - lonMin)*60, acc)\
\
            if latSec == 60 then\
                latSec = 0\
                latMin = latMin + 1\
            end\
\
            if lonSec == 60 then\
                lonSec = 0\
                lonMin = lonMin + 1\
            end\
\
            local secFrmtStr -- create the formatting string for the seconds place\
            if acc <= 0 then    -- no decimal place.\
                secFrmtStr = '%02d'\
            else\
                local width = 3 + acc    -- 01.310 - that's a width of 6, for example.\
                secFrmtStr = '%0' .. width .. '.' .. acc .. 'f'\
            end\
\
            return string.format('%02d', latDeg) .. ' ' .. string.format('%02d', latMin) .. '\\' ' .. string.format(secFrmtStr, latSec) .. '\"' .. latHemi .. '     '\
            .. string.format('%02d', lonDeg) .. ' ' .. string.format('%02d', lonMin) .. '\\' ' .. string.format(secFrmtStr, lonSec) .. '\"' .. lonHemi\
\
        else    -- degrees, decimal minutes.\
            latMin = mist.utils.round(latMin, acc)\
            lonMin = mist.utils.round(lonMin, acc)\
\
            if latMin == 60 then\
                latMin = 0\
                latDeg = latDeg + 1\
            end\
\
            if lonMin == 60 then\
                lonMin = 0\
                lonDeg = lonDeg + 1\
            end\
\
            local minFrmtStr -- create the formatting string for the minutes place\
            if acc <= 0 then    -- no decimal place.\
                minFrmtStr = '%02d'\
            else\
                local width = 3 + acc    -- 01.310 - that's a width of 6, for example.\
                minFrmtStr = '%0' .. width .. '.' .. acc .. 'f'\
            end\
\
            return string.format('%02d', latDeg) .. ' ' .. string.format(minFrmtStr, latMin) .. '\\'' .. latHemi .. '     '\
            .. string.format('%02d', lonDeg) .. ' ' .. string.format(minFrmtStr, lonMin) .. '\\'' .. lonHemi\
\
        end\
    end\
\
    --[[ required: az - radian\
        required: dist - meters\
        optional: alt - meters (set to false or nil if you don't want to use it).\
        optional: metric - set true to get dist and alt in km and m.\
        precision will always be nearest degree and NM or km.]]\
    function mist.tostringBR(az, dist, alt, metric)\
        az = mist.utils.round(mist.utils.toDegree(az), 0)\
\
        if metric then\
            dist = mist.utils.round(dist/1000, 0)\
        else\
            dist = mist.utils.round(mist.utils.metersToNM(dist), 0)\
        end\
\
        local s = string.format('%03d', az) .. ' for ' .. dist\
\
        if alt then\
            if metric then\
                s = s .. ' at ' .. mist.utils.round(alt, 0)\
            else\
                s = s .. ' at ' .. mist.utils.round(mist.utils.metersToFeet(alt), 0)\
            end\
        end\
        return s\
    end\
\
    function mist.getNorthCorrection(gPoint)    --gets the correction needed for true north\
        local point = mist.utils.deepCopy(gPoint)\
        if not point.z then --Vec2; convert to Vec3\
            point.z = point.y\
            point.y = 0\
        end\
        local lat, lon = coord.LOtoLL(point)\
        local north_posit = coord.LLtoLO(lat + 1, lon)\
        return math.atan2(north_posit.z - point.z, north_posit.x - point.x)\
    end\
\
    --- Returns skill of the given unit.\
    -- @tparam string unitName unit name\
    -- @return skill of the unit\
    function mist.getUnitSkill(unitName)\
        if mist.DBs.unitsByName[unitName] then\
            if Unit.getByName(unitName) then\
                local lunit = Unit.getByName(unitName)\
                local data = mist.DBs.unitsByName[unitName]\
                if data.unitName == unitName and data.type == lunit:getTypeName() and data.unitId == tonumber(lunit:getID()) and data.skill then\
                    return data.skill\
                end\
            end\
        end\
        log:error(\"Unit not found in DB: $1\", unitName)\
        return false\
    end\
\
    --- Returns an array containing a group's units positions.\
    --    e.g.\
    --        {\
    --            [1] = {x = 299435.224, y = -1146632.6773},\
    --            [2] = {x = 663324.6563, y = 322424.1112}\
    --        }\
    --    @tparam number|string groupIdent group id or name\
    --    @treturn table array containing positions of each group member\
    function mist.getGroupPoints(groupIdent)\
        -- search by groupId and allow groupId and groupName as inputs\
        local gpId = groupIdent\
        if type(groupIdent) == 'string' and not tonumber(groupIdent) then\
            if mist.DBs.MEgroupsByName[groupIdent] then\
                gpId = mist.DBs.MEgroupsByName[groupIdent].groupId\
            else\
                log:error(\"Group not found in mist.DBs.MEgroupsByName: $1\", groupIdent)\
            end\
        end\
\
        for coa_name, coa_data in pairs(env.mission.coalition) do\
            if (coa_name == 'red' or coa_name == 'blue') and type(coa_data) == 'table' then\
                if coa_data.country then --there is a country table\
                    for cntry_id, cntry_data in pairs(coa_data.country) do\
                        for obj_type_name, obj_type_data in pairs(cntry_data) do\
                            if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" then    -- only these types have points\
                                if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then    --there's a group!\
                                    for group_num, group_data in pairs(obj_type_data.group) do\
                                        if group_data and group_data.groupId == gpId then -- this is the group we are looking for\
                                            if group_data.route and group_data.route.points and #group_data.route.points > 0 then\
                                                local points = {}\
                                                for point_num, point in pairs(group_data.route.points) do\
                                                    if not point.point then\
                                                        points[point_num] = { x = point.x, y = point.y }\
                                                    else\
                                                        points[point_num] = point.point    --it's possible that the ME could move to the point = Vec2 notation.\
                                                    end\
                                                end\
                                                return points\
                                            end\
                                            return\
                                        end    --if group_data and group_data.name and group_data.name == 'groupname'\
                                    end --for group_num, group_data in pairs(obj_type_data.group) do\
                                end --if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then\
                            end --if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" or obj_type_name == \"static\" then\
                        end --for obj_type_name, obj_type_data in pairs(cntry_data) do\
                    end --for cntry_id, cntry_data in pairs(coa_data.country) do\
                end --if coa_data.country then --there is a country table\
            end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then\
        end --for coa_name, coa_data in pairs(mission.coalition) do\
    end\
\
    --- getUnitAttitude(unit) return values.\
    -- Yaw, AoA, ClimbAngle - relative to earth reference\
    -- DOES NOT TAKE INTO ACCOUNT WIND.\
    -- @table attitude\
    -- @tfield number Heading in radians, range of 0 to 2*pi,\
    -- relative to true north.\
    -- @tfield number Pitch in radians, range of -pi/2 to pi/2\
    -- @tfield number Roll in radians, range of 0 to 2*pi,\
    -- right roll is positive direction.\
    -- @tfield number Yaw in radians, range of -pi to pi,\
    -- right yaw is positive direction.\
    -- @tfield number AoA in radians, range of -pi to pi,\
    -- rotation of aircraft to the right in comparison to\
    -- flight direction being positive.\
    -- @tfield number ClimbAngle in radians, range of -pi/2 to pi/2\
\
    --- Returns the attitude of a given unit.\
    -- Will work on any unit, even if not an aircraft.\
    -- @tparam Unit unit unit whose attitude is returned.\
    -- @treturn table @{attitude}\
    function mist.getAttitude(unit)\
        local unitpos = unit:getPosition()\
        if unitpos then\
\
            local Heading = math.atan2(unitpos.x.z, unitpos.x.x)\
\
            Heading = Heading + mist.getNorthCorrection(unitpos.p)\
\
            if Heading < 0 then\
                Heading = Heading + 2*math.pi    -- put heading in range of 0 to 2*pi\
            end\
            ---- heading complete.----\
\
            local Pitch = math.asin(unitpos.x.y)\
            ---- pitch complete.----\
\
            -- now get roll:\
            --maybe not the best way to do it, but it works.\
\
            --first, make a vector that is perpendicular to y and unitpos.x with cross product\
            local cp = mist.vec.cp(unitpos.x, {x = 0, y = 1, z = 0})\
\
            --now, get dot product of of this cross product with unitpos.z\
            local dp = mist.vec.dp(cp, unitpos.z)\
\
            --now get the magnitude of the roll (magnitude of the angle between two vectors is acos(vec1.vec2/|vec1||vec2|)\
            local Roll = math.acos(dp/(mist.vec.mag(cp)*mist.vec.mag(unitpos.z)))\
\
            --now, have to get sign of roll.\
            -- by convention, making right roll positive\
            -- to get sign of roll, use the y component of unitpos.z.    For right roll, y component is negative.\
\
            if unitpos.z.y > 0 then -- left roll, flip the sign of the roll\
                Roll = -Roll\
            end\
            ---- roll complete. ----\
\
            --now, work on yaw, AoA, climb, and abs velocity\
            local Yaw\
            local AoA\
            local ClimbAngle\
\
            -- get unit velocity\
            local unitvel = unit:getVelocity()\
            if mist.vec.mag(unitvel) ~= 0 then --must have non-zero velocity!\
                local AxialVel = {}    --unit velocity transformed into aircraft axes directions\
\
                --transform velocity components in direction of aircraft axes.\
                AxialVel.x = mist.vec.dp(unitpos.x, unitvel)\
                AxialVel.y = mist.vec.dp(unitpos.y, unitvel)\
                AxialVel.z = mist.vec.dp(unitpos.z, unitvel)\
\
                --Yaw is the angle between unitpos.x and the x and z velocities\
                --define right yaw as positive\
                Yaw = math.acos(mist.vec.dp({x = 1, y = 0, z = 0}, {x = AxialVel.x, y = 0, z = AxialVel.z})/mist.vec.mag({x = AxialVel.x, y = 0, z = AxialVel.z}))\
\
                --now set correct direction:\
                if AxialVel.z > 0 then\
                    Yaw = -Yaw\
                end\
\
                -- AoA is angle between unitpos.x and the x and y velocities\
                AoA = math.acos(mist.vec.dp({x = 1, y = 0, z = 0}, {x = AxialVel.x, y = AxialVel.y, z = 0})/mist.vec.mag({x = AxialVel.x, y = AxialVel.y, z = 0}))\
\
                --now set correct direction:\
                if AxialVel.y > 0 then\
                    AoA = -AoA\
                end\
\
                ClimbAngle = math.asin(unitvel.y/mist.vec.mag(unitvel))\
            end\
            return { Heading = Heading, Pitch = Pitch, Roll = Roll, Yaw = Yaw, AoA = AoA, ClimbAngle = ClimbAngle}\
        else\
            log:error(\"Couldn't get unit's position\")\
        end\
    end\
\
    --- Returns heading of given unit.\
    -- @tparam Unit unit unit whose heading is returned.\
    -- @param rawHeading\
    -- @treturn number heading of the unit, in range\
    -- of 0 to 2*pi.\
    function mist.getHeading(unit, rawHeading)\
        local unitpos = unit:getPosition()\
        if unitpos then\
            local Heading = math.atan2(unitpos.x.z, unitpos.x.x)\
            if not rawHeading then\
                Heading = Heading + mist.getNorthCorrection(unitpos.p)\
            end\
            if Heading < 0 then\
                Heading = Heading + 2*math.pi    -- put heading in range of 0 to 2*pi\
            end\
            return Heading\
        end\
    end\
\
    --- Returns given unit's pitch\
    -- @tparam Unit unit unit whose pitch is returned.\
    -- @treturn number pitch of given unit\
    function mist.getPitch(unit)\
        local unitpos = unit:getPosition()\
        if unitpos then\
            return math.asin(unitpos.x.y)\
        end\
    end\
\
    --- Returns given unit's roll.\
    -- @tparam Unit unit unit whose roll is returned.\
    -- @treturn number roll of given unit\
    function mist.getRoll(unit)\
        local unitpos = unit:getPosition()\
        if unitpos then\
            -- now get roll:\
            --maybe not the best way to do it, but it works.\
\
            --first, make a vector that is perpendicular to y and unitpos.x with cross product\
            local cp = mist.vec.cp(unitpos.x, {x = 0, y = 1, z = 0})\
\
            --now, get dot product of of this cross product with unitpos.z\
            local dp = mist.vec.dp(cp, unitpos.z)\
\
            --now get the magnitude of the roll (magnitude of the angle between two vectors is acos(vec1.vec2/|vec1||vec2|)\
            local Roll = math.acos(dp/(mist.vec.mag(cp)*mist.vec.mag(unitpos.z)))\
\
            --now, have to get sign of roll.\
            -- by convention, making right roll positive\
            -- to get sign of roll, use the y component of unitpos.z.    For right roll, y component is negative.\
\
            if unitpos.z.y > 0 then -- left roll, flip the sign of the roll\
                Roll = -Roll\
            end\
            return Roll\
        end\
    end\
\
    --- Returns given unit's yaw.\
    -- @tparam Unit unit unit whose yaw is returned.\
    -- @treturn number yaw of given unit.\
    function mist.getYaw(unit)\
        local unitpos = unit:getPosition()\
        if unitpos then\
            -- get unit velocity\
            local unitvel = unit:getVelocity()\
            if mist.vec.mag(unitvel) ~= 0 then --must have non-zero velocity!\
                local AxialVel = {}    --unit velocity transformed into aircraft axes directions\
\
                --transform velocity components in direction of aircraft axes.\
                AxialVel.x = mist.vec.dp(unitpos.x, unitvel)\
                AxialVel.y = mist.vec.dp(unitpos.y, unitvel)\
                AxialVel.z = mist.vec.dp(unitpos.z, unitvel)\
\
                --Yaw is the angle between unitpos.x and the x and z velocities\
                --define right yaw as positive\
                local Yaw = math.acos(mist.vec.dp({x = 1, y = 0, z = 0}, {x = AxialVel.x, y = 0, z = AxialVel.z})/mist.vec.mag({x = AxialVel.x, y = 0, z = AxialVel.z}))\
\
                --now set correct direction:\
                if AxialVel.z > 0 then\
                    Yaw = -Yaw\
                end\
                return Yaw\
            end\
        end\
    end\
\
    --- Returns given unit's angle of attack.\
    -- @tparam Unit unit unit to get AoA from.\
    -- @treturn number angle of attack of the given unit.\
    function mist.getAoA(unit)\
        local unitpos = unit:getPosition()\
        if unitpos then\
            local unitvel = unit:getVelocity()\
            if mist.vec.mag(unitvel) ~= 0 then --must have non-zero velocity!\
                local AxialVel = {}    --unit velocity transformed into aircraft axes directions\
\
                --transform velocity components in direction of aircraft axes.\
                AxialVel.x = mist.vec.dp(unitpos.x, unitvel)\
                AxialVel.y = mist.vec.dp(unitpos.y, unitvel)\
                AxialVel.z = mist.vec.dp(unitpos.z, unitvel)\
\
                -- AoA is angle between unitpos.x and the x and y velocities\
                local AoA = math.acos(mist.vec.dp({x = 1, y = 0, z = 0}, {x = AxialVel.x, y = AxialVel.y, z = 0})/mist.vec.mag({x = AxialVel.x, y = AxialVel.y, z = 0}))\
\
                --now set correct direction:\
                if AxialVel.y > 0 then\
                    AoA = -AoA\
                end\
                return AoA\
            end\
        end\
    end\
\
    --- Returns given unit's climb angle.\
    -- @tparam Unit unit unit to get climb angle from.\
    -- @treturn number climb angle of given unit.\
    function mist.getClimbAngle(unit)\
        local unitpos = unit:getPosition()\
        if unitpos then\
            local unitvel = unit:getVelocity()\
            if mist.vec.mag(unitvel) ~= 0 then --must have non-zero velocity!\
                return math.asin(unitvel.y/mist.vec.mag(unitvel))\
            end\
        end\
    end\
\
    --[[--\
    Unit name table.\
    Many Mist functions require tables of unit names, which are known\
    in Mist as UnitNameTables. These follow a special set of shortcuts\
    borrowed from Slmod. These shortcuts alleviate the problem of entering\
    huge lists of unit names by hand, and in many cases, they remove the\
    need to even know the names of the units in the first place!\
\
    These are the unit table \"short-cut\" commands:\
\
    Prefixes:\
            \"[-u]<unit name>\" - subtract this unit if its in the table\
            \"[g]<group name>\" - add this group to the table\
            \"[-g]<group name>\" - subtract this group from the table\
            \"[c]<country name>\"    - add this country's units\
            \"[-c]<country name>\" - subtract this country's units if any are in the table\
\
    Stand-alone identifiers\
            \"[all]\" - add all units\
            \"[-all]\" - subtract all units (not very useful by itself)\
            \"[blue]\" - add all blue units\
            \"[-blue]\" - subtract all blue units\
            \"[red]\" - add all red coalition units\
            \"[-red]\" - subtract all red units\
\
    Compound Identifiers:\
            \"[c][helicopter]<country name>\"    - add all of this country's helicopters\
            \"[-c][helicopter]<country name>\" - subtract all of this country's helicopters\
            \"[c][plane]<country name>\"    - add all of this country's planes\
            \"[-c][plane]<country name>\" - subtract all of this country's planes\
            \"[c][ship]<country name>\"    - add all of this country's ships\
            \"[-c][ship]<country name>\" - subtract all of this country's ships\
            \"[c][vehicle]<country name>\"    - add all of this country's vehicles\
            \"[-c][vehicle]<country name>\" - subtract all of this country's vehicles\
\
            \"[all][helicopter]\" -    add all helicopters\
            \"[-all][helicopter]\" - subtract all helicopters\
            \"[all][plane]\" - add all    planes\
            \"[-all][plane]\" - subtract all planes\
            \"[all][ship]\" - add all ships\
            \"[-all][ship]\" - subtract all ships\
            \"[all][vehicle]\" - add all vehicles\
            \"[-all][vehicle]\" - subtract all vehicles\
\
            \"[blue][helicopter]\" -    add all blue coalition helicopters\
            \"[-blue][helicopter]\" - subtract all blue coalition helicopters\
            \"[blue][plane]\" - add all blue coalition planes\
            \"[-blue][plane]\" - subtract all blue coalition planes\
            \"[blue][ship]\" - add all blue coalition ships\
            \"[-blue][ship]\" - subtract all blue coalition ships\
            \"[blue][vehicle]\" - add all blue coalition vehicles\
            \"[-blue][vehicle]\" - subtract all blue coalition vehicles\
\
            \"[red][helicopter]\" -    add all red coalition helicopters\
            \"[-red][helicopter]\" - subtract all red coalition helicopters\
            \"[red][plane]\" - add all red coalition planes\
            \"[-red][plane]\" - subtract all red coalition planes\
            \"[red][ship]\" - add all red coalition ships\
            \"[-red][ship]\" - subtract all red coalition ships\
            \"[red][vehicle]\" - add all red coalition vehicles\
            \"[-red][vehicle]\" - subtract all red coalition vehicles\
\
    Country names to be used in [c] and [-c] short-cuts:\
            Turkey\
            Norway\
            The Netherlands\
            Spain\
            11\
            UK\
            Denmark\
            USA\
            Georgia\
            Germany\
            Belgium\
            Canada\
            France\
            Israel\
            Ukraine\
            Russia\
            South Ossetia\
            Abkhazia\
            Italy\
            Australia\
            Austria\
            Belarus\
            Bulgaria\
            Czech Republic\
            China\
            Croatia\
            Finland\
            Greece\
            Hungary\
            India\
            Iran\
            Iraq\
            Japan\
            Kazakhstan\
            North Korea\
            Pakistan\
            Poland\
            Romania\
            Saudi Arabia\
            Serbia, Slovakia\
            South Korea\
            Sweden\
            Switzerland\
            Syria\
            USAF Aggressors\
\
    Do NOT use a '[u]' notation for single units. Single units are referenced\
    the same way as before: Simply input their names as strings.\
\
    These unit tables are evaluated in order, and you cannot subtract a unit\
    from a table before it is added. For example:\
\
            {'[blue]', '[-c]Georgia'}\
\
    will evaluate to all of blue coalition except those units owned by the\
    country named \"Georgia\"; however:\
\
            {'[-c]Georgia', '[blue]'}\
\
    will evaluate to all of the units in blue coalition, because the addition\
    of all units owned by blue coalition occurred AFTER the subtraction of all\
    units owned by Georgia (which actually subtracted nothing at all, since\
    there were no units in the table when the subtraction occurred).\
\
    More examples:\
\
            {'[blue][plane]', '[-c]Georgia', '[-g]Hawg 1'}\
\
    Evaluates to all blue planes, except those blue units owned by the country\
    named \"Georgia\" and the units in the group named \"Hawg1\".\
\
\
            {'[g]arty1', '[g]arty2', '[-u]arty1_AD', '[-u]arty2_AD', 'Shark 11' }\
\
    Evaluates to the unit named \"Shark 11\", plus all the units in groups named\
    \"arty1\" and \"arty2\" except those that are named \"arty1\\_AD\" and \"arty2\\_AD\".\
\
    @table UnitNameTable\
    ]]\
\
    --- Returns a table containing unit names.\
    -- @tparam table tbl sequential strings\
    -- @treturn table @{UnitNameTable}\
    function mist.makeUnitTable(tbl)\
        --Assumption: will be passed a table of strings, sequential\
        log:info(tbl)\
        local units_by_name = {}\
\
        local l_munits = mist.DBs.units    --local reference for faster execution\
        for i = 1, #tbl do\
            local unit = tbl[i]\
            if unit:sub(1,4) == '[-u]' then --subtract a unit\
                if units_by_name[unit:sub(5)] then -- 5 to end\
                units_by_name[unit:sub(5)] = nil    --remove\
            end\
        elseif unit:sub(1,3) == '[g]' then -- add a group\
            for coa, coa_tbl in pairs(l_munits) do\
                for country, country_table in pairs(coa_tbl) do\
                    for unit_type, unit_type_tbl in pairs(country_table) do\
                        if type(unit_type_tbl) == 'table' then\
                            for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                if type(group_tbl) == 'table' and group_tbl.groupName == unit:sub(4) then\
                                    -- index 4 to end\
                                    for unit_ind, unit in pairs(group_tbl.units) do\
                                        units_by_name[unit.unitName] = true    --add\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,4) == '[-g]' then -- subtract a group\
            for coa, coa_tbl in pairs(l_munits) do\
                for country, country_table in pairs(coa_tbl) do\
                    for unit_type, unit_type_tbl in pairs(country_table) do\
                        if type(unit_type_tbl) == 'table' then\
                            for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                if type(group_tbl) == 'table' and group_tbl.groupName == unit:sub(5) then\
                                    -- index 5 to end\
                                    for unit_ind, unit in pairs(group_tbl.units) do\
                                        if units_by_name[unit.unitName] then\
                                            units_by_name[unit.unitName] = nil --remove\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,3) == '[c]' then -- add a country\
            local category = ''\
            local country_start = 4\
            if unit:sub(4,15) == '[helicopter]' then\
                category = 'helicopter'\
                country_start = 16\
            elseif unit:sub(4,10) == '[plane]' then\
                category = 'plane'\
                country_start = 11\
            elseif unit:sub(4,9) == '[ship]' then\
                category = 'ship'\
                country_start = 10\
            elseif unit:sub(4,12) == '[vehicle]' then\
                category = 'vehicle'\
                country_start = 13\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                for country, country_table in pairs(coa_tbl) do\
                    if country == string.lower(unit:sub(country_start)) then     -- match\
                        for unit_type, unit_type_tbl in pairs(country_table) do\
                            if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                                for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                    if type(group_tbl) == 'table' then\
                                        for unit_ind, unit in pairs(group_tbl.units) do\
                                            units_by_name[unit.unitName] = true    --add\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,4) == '[-c]' then -- subtract a country\
            local category = ''\
            local country_start = 5\
            if unit:sub(5,16) == '[helicopter]' then\
                category = 'helicopter'\
                country_start = 17\
            elseif unit:sub(5,11) == '[plane]' then\
                category = 'plane'\
                country_start = 12\
            elseif unit:sub(5,10) == '[ship]' then\
                category = 'ship'\
                country_start = 11\
            elseif unit:sub(5,13) == '[vehicle]' then\
                category = 'vehicle'\
                country_start = 14\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                for country, country_table in pairs(coa_tbl) do\
                    if country == string.lower(unit:sub(country_start)) then     -- match\
                        for unit_type, unit_type_tbl in pairs(country_table) do\
                            if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                                for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                    if type(group_tbl) == 'table' then\
                                        for unit_ind, unit in pairs(group_tbl.units) do\
                                            if units_by_name[unit.unitName] then\
                                                units_by_name[unit.unitName] = nil    --remove\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,6) ==    '[blue]' then -- add blue coalition\
            local category = ''\
            if unit:sub(7) == '[helicopter]' then\
                category = 'helicopter'\
            elseif unit:sub(7) == '[plane]' then\
                category = 'plane'\
            elseif unit:sub(7) == '[ship]' then\
                category = 'ship'\
            elseif unit:sub(7) == '[vehicle]' then\
                category = 'vehicle'\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                if coa == 'blue' then\
                    for country, country_table in pairs(coa_tbl) do\
                        for unit_type, unit_type_tbl in pairs(country_table) do\
                            if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                                for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                    if type(group_tbl) == 'table' then\
                                        for unit_ind, unit in pairs(group_tbl.units) do\
                                            units_by_name[unit.unitName] = true    --add\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,7) == '[-blue]' then -- subtract blue coalition\
            local category = ''\
            if unit:sub(8) == '[helicopter]' then\
                category = 'helicopter'\
            elseif unit:sub(8) == '[plane]' then\
                category = 'plane'\
            elseif unit:sub(8) == '[ship]' then\
                category = 'ship'\
            elseif unit:sub(8) == '[vehicle]' then\
                category = 'vehicle'\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                if coa == 'blue' then\
                    for country, country_table in pairs(coa_tbl) do\
                        for unit_type, unit_type_tbl in pairs(country_table) do\
                            if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                                for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                    if type(group_tbl) == 'table' then\
                                        for unit_ind, unit in pairs(group_tbl.units) do\
                                            if units_by_name[unit.unitName] then\
                                                units_by_name[unit.unitName] = nil    --remove\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,5) == '[red]' then -- add red coalition\
            local category = ''\
            if unit:sub(6) == '[helicopter]' then\
                category = 'helicopter'\
            elseif unit:sub(6) == '[plane]' then\
                category = 'plane'\
            elseif unit:sub(6) == '[ship]' then\
                category = 'ship'\
            elseif unit:sub(6) == '[vehicle]' then\
                category = 'vehicle'\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                if coa == 'red' then\
                    for country, country_table in pairs(coa_tbl) do\
                        for unit_type, unit_type_tbl in pairs(country_table) do\
                            if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                                for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                    if type(group_tbl) == 'table' then\
                                        for unit_ind, unit in pairs(group_tbl.units) do\
                                            units_by_name[unit.unitName] = true    --add\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,6) == '[-red]' then -- subtract red coalition\
            local category = ''\
            if unit:sub(7) == '[helicopter]' then\
                category = 'helicopter'\
            elseif unit:sub(7) == '[plane]' then\
                category = 'plane'\
            elseif unit:sub(7) == '[ship]' then\
                category = 'ship'\
            elseif unit:sub(7) == '[vehicle]' then\
                category = 'vehicle'\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                if coa == 'red' then\
                    for country, country_table in pairs(coa_tbl) do\
                        for unit_type, unit_type_tbl in pairs(country_table) do\
                            if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                                for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                    if type(group_tbl) == 'table' then\
                                        for unit_ind, unit in pairs(group_tbl.units) do\
                                            if units_by_name[unit.unitName] then\
                                                units_by_name[unit.unitName] = nil    --remove\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,5) == '[all]' then -- add all of a certain category (or all categories)\
            local category = ''\
            if unit:sub(6) == '[helicopter]' then\
                category = 'helicopter'\
            elseif unit:sub(6) == '[plane]' then\
                category = 'plane'\
            elseif unit:sub(6) == '[ship]' then\
                category = 'ship'\
            elseif unit:sub(6) == '[vehicle]' then\
                category = 'vehicle'\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                for country, country_table in pairs(coa_tbl) do\
                    for unit_type, unit_type_tbl in pairs(country_table) do\
                        if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                            for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                if type(group_tbl) == 'table' then\
                                    for unit_ind, unit in pairs(group_tbl.units) do\
                                        units_by_name[unit.unitName] = true    --add\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        elseif unit:sub(1,6) == '[-all]' then -- subtract all of a certain category (or all categories)\
            local category = ''\
            if unit:sub(7) == '[helicopter]' then\
                category = 'helicopter'\
            elseif unit:sub(7) == '[plane]' then\
                category = 'plane'\
            elseif unit:sub(7) == '[ship]' then\
                category = 'ship'\
            elseif unit:sub(7) == '[vehicle]' then\
                category = 'vehicle'\
            end\
            for coa, coa_tbl in pairs(l_munits) do\
                for country, country_table in pairs(coa_tbl) do\
                    for unit_type, unit_type_tbl in pairs(country_table) do\
                        if type(unit_type_tbl) == 'table' and (category == '' or unit_type == category) then\
                            for group_ind, group_tbl in pairs(unit_type_tbl) do\
                                if type(group_tbl) == 'table' then\
                                    for unit_ind, unit in pairs(group_tbl.units) do\
                                        if units_by_name[unit.unitName] then\
                                            units_by_name[unit.unitName] = nil    --remove\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        else -- just a regular unit\
            units_by_name[unit] = true    --add\
        end\
    end\
\
    local units_tbl = {}    -- indexed sequentially\
    for unit_name, val in pairs(units_by_name) do\
        if val then\
            units_tbl[#units_tbl + 1] = unit_name    -- add all the units to the table\
        end\
    end\
\
\
    units_tbl.processed = timer.getTime()    --add the processed flag\
    return units_tbl\
end\
\
function mist.getDeadMapObjsInZones(zone_names)\
    -- zone_names: table of zone names\
    -- returns: table of dead map objects (indexed numerically)\
    local map_objs = {}\
    local zones = {}\
    for i = 1, #zone_names do\
        if mist.DBs.zonesByName[zone_names[i]] then\
            zones[#zones + 1] = mist.DBs.zonesByName[zone_names[i]]\
        end\
    end\
    for obj_id, obj in pairs(mist.DBs.deadObjects) do\
        if obj.objectType and obj.objectType == 'building' then --dead map object\
            for i = 1, #zones do\
                if ((zones[i].point.x - obj.objectPos.x)^2 + (zones[i].point.z - obj.objectPos.z)^2)^0.5 <= zones[i].radius then\
                    map_objs[#map_objs + 1] = mist.utils.deepCopy(obj)\
                end\
            end\
        end\
    end\
    return map_objs\
end\
\
function mist.getDeadMapObjsInPolygonZone(zone)\
    -- zone_names: table of zone names\
    -- returns: table of dead map objects (indexed numerically)\
    local map_objs = {}\
    for obj_id, obj in pairs(mist.DBs.deadObjects) do\
        if obj.objectType and obj.objectType == 'building' then --dead map object\
            if mist.pointInPolygon(obj.objectPos, zone) then\
                map_objs[#map_objs + 1] = mist.utils.deepCopy(obj)\
            end\
        end\
    end\
    return map_objs\
end\
\
function mist.pointInPolygon(point, poly, maxalt) --raycasting point in polygon. Code from http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm\
    --[[local type_tbl = {\
        point = {'table'},\
        poly = {'table'},\
        maxalt = {'number', 'nil'},\
        }\
\
    local err, errmsg = mist.utils.typeCheck('mist.pointInPolygon', type_tbl, {point, poly, maxalt})\
    assert(err, errmsg)\
    ]]\
    point = mist.utils.makeVec3(point)\
    local px = point.x\
    local pz = point.z\
    local cn = 0\
    local newpoly = mist.utils.deepCopy(poly)\
\
    if not maxalt or (point.y <= maxalt) then\
        local polysize = #newpoly\
        newpoly[#newpoly + 1] = newpoly[1]\
\
        newpoly[1] = mist.utils.makeVec3(newpoly[1])\
\
        for k = 1, polysize do\
            newpoly[k+1] = mist.utils.makeVec3(newpoly[k+1])\
            if ((newpoly[k].z <= pz) and (newpoly[k+1].z > pz)) or ((newpoly[k].z > pz) and (newpoly[k+1].z <= pz)) then\
                local vt = (pz - newpoly[k].z) / (newpoly[k+1].z - newpoly[k].z)\
                if (px < newpoly[k].x + vt*(newpoly[k+1].x - newpoly[k].x)) then\
                    cn = cn + 1\
                end\
            end\
        end\
\
        return cn%2 == 1\
    else\
        return false\
    end\
end\
\
function mist.getUnitsInPolygon(unit_names, polyZone, max_alt)\
    local units = {}\
\
    for i = 1, #unit_names do\
        units[#units + 1] = Unit.getByName(unitNames[i])\
    end\
\
    local inZoneUnits = {}\
    for i =1, #units do\
        if units[i]:isActive() and mist.pointInPolygon(units[i]:getPosition().p, polyZone, max_alt) then\
            inZoneUnits[inZoneUnits + 1] = units[i]\
        end\
    end\
\
    return inZoneUnits\
end\
\
function mist.getUnitsInZones(unit_names, zone_names, zone_type)\
\
    zone_type = zone_type or 'cylinder'\
    if zone_type == 'c' or zone_type == 'cylindrical' or zone_type == 'C' then\
        zone_type = 'cylinder'\
    end\
    if zone_type == 's' or zone_type == 'spherical' or zone_type == 'S' then\
        zone_type = 'sphere'\
    end\
\
    assert(zone_type == 'cylinder' or zone_type == 'sphere', 'invalid zone_type: ' .. tostring(zone_type))\
\
    local units = {}\
    local zones = {}\
\
    for k = 1, #unit_names do\
        local unit = Unit.getByName(unit_names[k])\
        if unit then\
            units[#units + 1] = unit\
        end\
    end\
\
\
    for k = 1, #zone_names do\
        local zone = trigger.misc.getZone(zone_names[k])\
        if zone then\
            zones[#zones + 1] = {radius = zone.radius, x = zone.point.x, y = zone.point.y, z = zone.point.z}\
        end\
    end\
\
    local in_zone_units = {}\
\
    for units_ind = 1, #units do\
        for zones_ind = 1, #zones do\
            if zone_type == 'sphere' then    --add land height value for sphere zone type\
                local alt = land.getHeight({x = zones[zones_ind].x, y = zones[zones_ind].z})\
                if alt then\
                    zones[zones_ind].y = alt\
                end\
            end\
            local unit_pos = units[units_ind]:getPosition().p\
            if unit_pos and units[units_ind]:isActive() == true then\
                if zone_type == 'cylinder' and (((unit_pos.x - zones[zones_ind].x)^2 + (unit_pos.z - zones[zones_ind].z)^2)^0.5 <= zones[zones_ind].radius) then\
                    in_zone_units[#in_zone_units + 1] = units[units_ind]\
                    break\
                elseif zone_type == 'sphere' and (((unit_pos.x - zones[zones_ind].x)^2 + (unit_pos.y - zones[zones_ind].y)^2 + (unit_pos.z - zones[zones_ind].z)^2)^0.5 <= zones[zones_ind].radius) then\
                    in_zone_units[#in_zone_units + 1] = units[units_ind]\
                    break\
                end\
            end\
        end\
    end\
    return in_zone_units\
end\
\
function mist.getUnitsInMovingZones(unit_names, zone_unit_names, radius, zone_type)\
\
    zone_type = zone_type or 'cylinder'\
    if zone_type == 'c' or zone_type == 'cylindrical' or zone_type == 'C' then\
        zone_type = 'cylinder'\
    end\
    if zone_type == 's' or zone_type == 'spherical' or zone_type == 'S' then\
        zone_type = 'sphere'\
    end\
\
    assert(zone_type == 'cylinder' or zone_type == 'sphere', 'invalid zone_type: ' .. tostring(zone_type))\
\
    local units = {}\
    local zone_units = {}\
\
    for k = 1, #unit_names do\
        local unit = Unit.getByName(unit_names[k])\
        if unit then\
            units[#units + 1] = unit\
        end\
    end\
\
    for k = 1, #zone_unit_names do\
        local unit = Unit.getByName(zone_unit_names[k])\
        if unit then\
            zone_units[#zone_units + 1] = unit\
        end\
    end\
\
    local in_zone_units = {}\
\
    for units_ind = 1, #units do\
        for zone_units_ind = 1, #zone_units do\
            local unit_pos = units[units_ind]:getPosition().p\
            local zone_unit_pos = zone_units[zone_units_ind]:getPosition().p\
            if unit_pos and zone_unit_pos and units[units_ind]:isActive() == true then\
                if zone_type == 'cylinder' and (((unit_pos.x - zone_unit_pos.x)^2 + (unit_pos.z - zone_unit_pos.z)^2)^0.5 <= radius) then\
                    in_zone_units[#in_zone_units + 1] = units[units_ind]\
                    break\
                elseif zone_type == 'sphere' and (((unit_pos.x - zone_unit_pos.x)^2 + (unit_pos.y - zone_unit_pos.y)^2 + (unit_pos.z - zone_unit_pos.z)^2)^0.5 <= radius) then\
                    in_zone_units[#in_zone_units + 1] = units[units_ind]\
                    break\
                end\
            end\
        end\
    end\
    return in_zone_units\
end\
\
function mist.getUnitsLOS(unitset1, altoffset1, unitset2, altoffset2, radius)\
    log:info(\"$1, $2, $3, $4, $5\", unitset1, altoffset1, unitset2, altoffset2, radius)\
    radius = radius or math.huge\
    local unit_info1 = {}\
    local unit_info2 = {}\
\
    -- get the positions all in one step, saves execution time.\
    for unitset1_ind = 1, #unitset1 do\
        local unit1 = Unit.getByName(unitset1[unitset1_ind])\
        if unit1 and unit1:isActive() == true then\
            unit_info1[#unit_info1 + 1] = {}\
            unit_info1[#unit_info1].unit = unit1\
            unit_info1[#unit_info1].pos    = unit1:getPosition().p\
        end\
    end\
\
    for unitset2_ind = 1, #unitset2 do\
        local unit2 = Unit.getByName(unitset2[unitset2_ind])\
        if unit2 and unit2:isActive() == true then\
            unit_info2[#unit_info2 + 1] = {}\
            unit_info2[#unit_info2].unit = unit2\
            unit_info2[#unit_info2].pos    = unit2:getPosition().p\
        end\
    end\
\
    local LOS_data = {}\
    -- now compute los\
    for unit1_ind = 1, #unit_info1 do\
        local unit_added = false\
        for unit2_ind = 1, #unit_info2 do\
            if radius == math.huge or (mist.vec.mag(mist.vec.sub(unit_info1[unit1_ind].pos, unit_info2[unit2_ind].pos)) < radius) then -- inside radius\
                local point1 = { x = unit_info1[unit1_ind].pos.x, y = unit_info1[unit1_ind].pos.y + altoffset1, z = unit_info1[unit1_ind].pos.z}\
                local point2 = { x = unit_info2[unit2_ind].pos.x, y = unit_info2[unit2_ind].pos.y + altoffset2, z = unit_info2[unit2_ind].pos.z}\
                if land.isVisible(point1, point2) then\
                    if unit_added == false then\
                        unit_added = true\
                        LOS_data[#LOS_data + 1] = {}\
                        LOS_data[#LOS_data].unit = unit_info1[unit1_ind].unit\
                        LOS_data[#LOS_data].vis = {}\
                        LOS_data[#LOS_data].vis[#LOS_data[#LOS_data].vis + 1] = unit_info2[unit2_ind].unit\
                    else\
                        LOS_data[#LOS_data].vis[#LOS_data[#LOS_data].vis + 1] = unit_info2[unit2_ind].unit\
                    end\
                end\
            end\
        end\
    end\
\
    return LOS_data\
end\
\
function mist.getAvgPoint(points)\
    local avgX, avgY, avgZ, totNum = 0, 0, 0, 0\
    for i = 1, #points do\
        local nPoint = mist.utils.makeVec3(points[i])\
        if nPoint.z then\
            avgX = avgX + nPoint.x\
            avgY = avgY + nPoint.y\
            avgZ = avgZ + nPoint.z\
            totNum = totNum + 1\
        end\
    end\
    if totNum ~= 0 then\
        return {x = avgX/totNum, y = avgY/totNum, z = avgZ/totNum}\
    end\
end\
\
--Gets the average position of a group of units (by name)\
function mist.getAvgPos(unitNames)\
    local avgX, avgY, avgZ, totNum = 0, 0, 0, 0\
    for i = 1, #unitNames do\
        local unit\
        if Unit.getByName(unitNames[i]) then\
            unit = Unit.getByName(unitNames[i])\
        elseif StaticObject.getByName(unitNames[i]) then\
            unit = StaticObject.getByName(unitNames[i])\
        end\
        if unit then\
            local pos = unit:getPosition().p\
            if pos then -- you never know O.o\
                avgX = avgX + pos.x\
                avgY = avgY + pos.y\
                avgZ = avgZ + pos.z\
                totNum = totNum + 1\
            end\
        end\
    end\
    if totNum ~= 0 then\
        return {x = avgX/totNum, y = avgY/totNum, z = avgZ/totNum}\
    end\
end\
\
function mist.getAvgGroupPos(groupName)\
    if type(groupName) == 'string' and Group.getByName(groupName) and Group.getByName(groupName):isExist() == true then\
        groupName = Group.getByName(groupName)\
    end\
    local units = {}\
    for i = 1, #groupName:getSize() do\
        table.insert(units, groupName.getUnit(i):getName())\
    end\
\
    return mist.getAvgPos(units)\
\
end\
\
--[[ vars for mist.getMGRSString:\
vars.units - table of unit names (NOT unitNameTable- maybe this should change).\
vars.acc - integer between 0 and 5, inclusive\
]]\
function mist.getMGRSString(vars)\
    local units = vars.units\
    local acc = vars.acc or 5\
    local avgPos = mist.getAvgPos(units)\
    if avgPos then\
        return mist.tostringMGRS(coord.LLtoMGRS(coord.LOtoLL(avgPos)), acc)\
    end\
end\
\
--[[ vars for mist.getLLString\
vars.units - table of unit names (NOT unitNameTable- maybe this should change).\
vars.acc - integer, number of numbers after decimal place\
vars.DMS - if true, output in degrees, minutes, seconds.    Otherwise, output in degrees, minutes.\
]]\
function mist.getLLString(vars)\
    local units = vars.units\
    local acc = vars.acc or 3\
    local DMS = vars.DMS\
    local avgPos = mist.getAvgPos(units)\
    if avgPos then\
        local lat, lon = coord.LOtoLL(avgPos)\
        return mist.tostringLL(lat, lon, acc, DMS)\
    end\
end\
\
--[[\
vars.units- table of unit names (NOT unitNameTable- maybe this should change).\
vars.ref -    vec3 ref point, maybe overload for vec2 as well?\
vars.alt - boolean, if used, includes altitude in string\
vars.metric - boolean, gives distance in km instead of NM.\
]]\
function mist.getBRString(vars)\
    local units = vars.units\
    local ref = mist.utils.makeVec3(vars.ref, 0)    -- turn it into Vec3 if it is not already.\
    local alt = vars.alt\
    local metric = vars.metric\
    local avgPos = mist.getAvgPos(units)\
    if avgPos then\
        local vec = {x = avgPos.x - ref.x, y = avgPos.y - ref.y, z = avgPos.z - ref.z}\
        local dir = mist.utils.getDir(vec, ref)\
        local dist = mist.utils.get2DDist(avgPos, ref)\
        if alt then\
            alt = avgPos.y\
        end\
        return mist.tostringBR(dir, dist, alt, metric)\
    end\
end\
\
-- Returns the Vec3 coordinates of the average position of the concentration of units most in the heading direction.\
--[[ vars for mist.getLeadingPos:\
vars.units - table of unit names\
vars.heading - direction\
vars.radius - number\
vars.headingDegrees - boolean, switches heading to degrees\
]]\
function mist.getLeadingPos(vars)\
    local units = vars.units\
    local heading = vars.heading\
    local radius = vars.radius\
    if vars.headingDegrees then\
        heading = mist.utils.toRadian(vars.headingDegrees)\
    end\
\
    local unitPosTbl = {}\
    for i = 1, #units do\
        local unit = Unit.getByName(units[i])\
        if unit and unit:isExist() then\
            unitPosTbl[#unitPosTbl + 1] = unit:getPosition().p\
        end\
    end\
    if #unitPosTbl > 0 then    -- one more more units found.\
        -- first, find the unit most in the heading direction\
        local maxPos = -math.huge\
\
        local maxPosInd    -- maxPos - the furthest in direction defined by heading; maxPosInd =\
        for i = 1, #unitPosTbl do\
            local rotatedVec2 = mist.vec.rotateVec2(mist.utils.makeVec2(unitPosTbl[i]), heading)\
            if (not maxPos) or maxPos < rotatedVec2.x then\
                maxPos = rotatedVec2.x\
                maxPosInd = i\
            end\
        end\
\
        --now, get all the units around this unit...\
        local avgPos\
        if radius then\
            local maxUnitPos = unitPosTbl[maxPosInd]\
            local avgx, avgy, avgz, totNum = 0, 0, 0, 0\
            for i = 1, #unitPosTbl do\
                if mist.utils.get2DDist(maxUnitPos, unitPosTbl[i]) <= radius then\
                    avgx = avgx + unitPosTbl[i].x\
                    avgy = avgy + unitPosTbl[i].y\
                    avgz = avgz + unitPosTbl[i].z\
                    totNum = totNum + 1\
                end\
            end\
            avgPos = { x = avgx/totNum, y = avgy/totNum, z = avgz/totNum}\
        else\
            avgPos = unitPosTbl[maxPosInd]\
        end\
\
        return avgPos\
    end\
end\
\
--[[ vars for mist.getLeadingMGRSString:\
vars.units - table of unit names\
vars.heading - direction\
vars.radius - number\
vars.headingDegrees - boolean, switches heading to degrees\
vars.acc - number, 0 to 5.\
]]\
function mist.getLeadingMGRSString(vars)\
    local pos = mist.getLeadingPos(vars)\
    if pos then\
        local acc = vars.acc or 5\
        return mist.tostringMGRS(coord.LLtoMGRS(coord.LOtoLL(pos)), acc)\
    end\
end\
\
--[[ vars for mist.getLeadingLLString:\
vars.units - table of unit names\
vars.heading - direction, number\
vars.radius - number\
vars.headingDegrees - boolean, switches heading to degrees\
vars.acc - number of digits after decimal point (can be negative)\
vars.DMS -    boolean, true if you want DMS.\
]]\
function mist.getLeadingLLString(vars)\
    local pos = mist.getLeadingPos(vars)\
    if pos then\
        local acc = vars.acc or 3\
        local DMS = vars.DMS\
        local lat, lon = coord.LOtoLL(pos)\
        return mist.tostringLL(lat, lon, acc, DMS)\
    end\
end\
\
--[[ vars for mist.getLeadingBRString:\
vars.units - table of unit names\
vars.heading - direction, number\
vars.radius - number\
vars.headingDegrees - boolean, switches heading to degrees\
vars.metric - boolean, if true, use km instead of NM.\
vars.alt - boolean, if true, include altitude.\
vars.ref - vec3/vec2 reference point.\
]]\
function mist.getLeadingBRString(vars)\
    local pos = mist.getLeadingPos(vars)\
    if pos then\
        local ref = vars.ref\
        local alt = vars.alt\
        local metric = vars.metric\
\
        local vec = {x = pos.x - ref.x, y = pos.y - ref.y, z = pos.z - ref.z}\
        local dir = mist.utils.getDir(vec, ref)\
        local dist = mist.utils.get2DDist(pos, ref)\
        if alt then\
            alt = pos.y\
        end\
        return mist.tostringBR(dir, dist, alt, metric)\
    end\
end\
\
end\
\
--- Group functions.\
-- @section groups\
do -- group functions scope\
\
    --- Check table used for group creation.\
    -- @tparam table groupData table to check.\
    -- @treturn boolean true if a group can be spawned using\
    -- this table, false otherwise.\
    function mist.groupTableCheck(groupData)\
        -- return false if country, category\
        -- or units are missing\
        if not groupData.country or\
            not groupData.category or\
            not groupData.units then\
            return false\
        end\
        -- return false if unitData misses\
        -- x, y or type\
        for unitId, unitData in pairs(groupData.units) do\
            if not unitData.x or\
                not unitData.y or\
                not unitData.type then\
                    return false\
            end\
        end\
        -- everything we need is here return true\
        return true\
    end\
\
    --- Returns group data table of give group.\
    function mist.getCurrentGroupData(gpName)\
        local dbData = mist.getGroupData(gpName)\
\
        if Group.getByName(gpName) and Group.getByName(gpName):isExist() == true then\
            local newGroup = Group.getByName(gpName)\
            local newData = {}\
            newData.name = gpName\
            newData.groupId = tonumber(newGroup:getID())\
            newData.category = newGroup:getCategory()\
            newData.groupName = gpName\
            newData.hidden = dbData.hidden\
\
            if newData.category == 2 then\
                newData.category = 'vehicle'\
            elseif newData.category == 3 then\
                newData.category = 'ship'\
            end\
\
            newData.units = {}\
            local newUnits = newGroup:getUnits()\
            for unitNum, unitData in pairs(newGroup:getUnits()) do\
                newData.units[unitNum] = {}\
                local uName = unitData:getName()\
\
                if mist.DBs.unitsByName[uName] and unitData:getTypeName() ==  mist.DBs.unitsByName[uName].type and mist.DBs.unitsByName[uName].unitId == tonumber(unitData:getID()) then -- If old data matches most of new data\
                    newData.units[unitNum] = mist.utils.deepCopy(mist.DBs.unitsByName[uName])\
                else\
                    newData.units[unitNum].unitId = tonumber(unitData:getID())\
                    newData.units[unitNum].type = unitData:getTypeName()\
                    newData.units[unitNum].skill = mist.getUnitSkill(uName)\
                    newData.country = string.lower(country.name[unitData:getCountry()])\
                    newData.units[unitNum].callsign = unitData:getCallsign()\
                    newData.units[unitNum].unitName = uName\
                end\
\
                newData.units[unitNum].x = unitData:getPosition().p.x\
                newData.units[unitNum].y = unitData:getPosition().p.z\
                newData.units[unitNum].point = {x = newData.units[unitNum].x, y = newData.units[unitNum].y}\
                newData.units[unitNum].heading = mist.getHeading(unitData, true) -- added to DBs\
                newData.units[unitNum].alt = unitData:getPosition().p.y\
                newData.units[unitNum].speed = mist.vec.mag(unitData:getVelocity())\
               \
            end\
\
            return newData\
        elseif StaticObject.getByName(gpName) and StaticObject.getByName(gpName):isExist() == true then\
            local staticObj = StaticObject.getByName(gpName)\
            dbData.units[1].x = staticObj:getPosition().p.x\
            dbData.units[1].y = staticObj:getPosition().p.z\
            dbData.units[1].alt = staticObj:getPosition().p.y\
            dbData.units[1].heading = mist.getHeading(staticObj, true)\
\
            return dbData\
        end\
\
    end\
\
    function mist.getGroupData(gpName)\
        local found = false\
        local newData = {}\
        if mist.DBs.groupsByName[gpName] then\
            newData = mist.utils.deepCopy(mist.DBs.groupsByName[gpName])\
            found = true\
        end\
\
        if found == false then\
            for groupName, groupData in pairs(mist.DBs.groupsByName) do\
                if mist.stringMatch(groupName, gpName) == true then\
                    newData = mist.utils.deepCopy(groupData)\
                    newData.groupName = groupName\
                    found = true\
                    break\
                end\
            end\
        end\
\
        local payloads\
        if newData.category == 'plane' or newData.category == 'helicopter' then\
            payloads = mist.getGroupPayload(newData.groupName)\
        end\
        if found == true then\
            --newData.hidden = false -- maybe add this to DBs\
\
            for unitNum, unitData in pairs(newData.units) do\
                newData.units[unitNum] = {}\
\
                newData.units[unitNum].unitId = unitData.unitId\
                --newData.units[unitNum].point = unitData.point\
                newData.units[unitNum].x = unitData.point.x\
                newData.units[unitNum].y = unitData.point.y\
                newData.units[unitNum].alt = unitData.alt\
                newData.units[unitNum].alt_type = unitData.alt_type\
                newData.units[unitNum].speed = unitData.speed\
                newData.units[unitNum].type = unitData.type\
                newData.units[unitNum].skill = unitData.skill\
                newData.units[unitNum].unitName = unitData.unitName\
                newData.units[unitNum].heading = unitData.heading -- added to DBs\
                newData.units[unitNum].playerCanDrive = unitData.playerCanDrive -- added to DBs\
\
\
                if newData.category == 'plane' or newData.category == 'helicopter' then\
                    newData.units[unitNum].payload = payloads[unitNum]\
                    newData.units[unitNum].livery_id = unitData.livery_id\
                    newData.units[unitNum].onboard_num = unitData.onboard_num\
                    newData.units[unitNum].callsign = unitData.callsign\
                    newData.units[unitNum].AddPropAircraft = unitData.AddPropAircraft\
                end\
                if newData.category == 'static' then\
                    newData.units[unitNum].categoryStatic = unitData.categoryStatic\
                    newData.units[unitNum].mass = unitData.mass\
                    newData.units[unitNum].canCargo = unitData.canCargo\
                    newData.units[unitNum].shape_name = unitData.shape_name\
                end\
            end\
            --log:info(newData)\
            return newData\
        else\
            log:error('$1 not found in MIST database', gpName)\
            return\
        end\
    end\
\
    function mist.getPayload(unitIdent)\
        -- refactor to search by groupId and allow groupId and groupName as inputs\
        local unitId = unitIdent\
        if type(unitIdent) == 'string' and not tonumber(unitIdent) then\
            if mist.DBs.MEunitsByName[unitIdent] then\
                unitId = mist.DBs.MEunitsByName[unitIdent].unitId\
            else\
                log:error(\"Unit not found in mist.DBs.MEunitsByName: $1\", unitIdent)\
            end\
        end\
        local gpId = mist.DBs.MEunitsById[unitId].groupId\
\
        if gpId and unitId then\
            for coa_name, coa_data in pairs(env.mission.coalition) do\
                if (coa_name == 'red' or coa_name == 'blue') and type(coa_data) == 'table' then\
                    if coa_data.country then --there is a country table\
                        for cntry_id, cntry_data in pairs(coa_data.country) do\
                            for obj_type_name, obj_type_data in pairs(cntry_data) do\
                                if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" then    -- only these types have points\
                                    if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then    --there's a group!\
                                        for group_num, group_data in pairs(obj_type_data.group) do\
                                            if group_data and group_data.groupId == gpId then\
                                                for unitIndex, unitData in pairs(group_data.units) do --group index\
                                                    if unitData.unitId == unitId then\
                                                        return unitData.payload\
                                                    end\
                                                end\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        else\
            log:error('Need string or number. Got: $1', type(unitIdent))\
            return false\
        end\
        log:warn(\"Couldn't find payload for unit: $1\", unitIdent)\
        return\
    end\
\
    function mist.getGroupPayload(groupIdent)\
        local gpId = groupIdent\
        if type(groupIdent) == 'string' and not tonumber(groupIdent) then\
            if mist.DBs.MEgroupsByName[groupIdent] then\
                gpId = mist.DBs.MEgroupsByName[groupIdent].groupId\
            else\
                log:error('$1 not found in mist.DBs.MEgroupsByName', groupIdent)\
            end\
        end\
\
        if gpId then\
            for coa_name, coa_data in pairs(env.mission.coalition) do\
                if (coa_name == 'red' or coa_name == 'blue') and type(coa_data) == 'table' then\
                    if coa_data.country then --there is a country table\
                        for cntry_id, cntry_data in pairs(coa_data.country) do\
                            for obj_type_name, obj_type_data in pairs(cntry_data) do\
                                if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" then    -- only these types have points\
                                    if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then    --there's a group!\
                                        for group_num, group_data in pairs(obj_type_data.group) do\
                                            if group_data and group_data.groupId == gpId then\
                                                local payloads = {}\
                                                for unitIndex, unitData in pairs(group_data.units) do --group index\
                                                    payloads[unitIndex] = unitData.payload\
                                                end\
                                                return payloads\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        else\
            log:error('Need string or number. Got: $1', type(groupIdent))\
            return false\
        end\
        log:warn(\"Couldn't find payload for group: $1\", groupIdent)\
        return\
\
    end\
\
    function mist.teleportToPoint(vars) -- main teleport function that all of teleport/respawn functions call\
        local point = vars.point\
\
        local gpName\
        if vars.gpName then\
            gpName = vars.gpName\
        elseif vars.groupName then\
            gpName = vars.groupName\
        else\
            log:error('Missing field groupName or gpName in variable table')\
        end\
\
        local action = vars.action\
\
        local disperse = vars.disperse or false\
        local maxDisp = vars.maxDisp\
        if not vars.maxDisp then\
            maxDisp = 200\
        else\
            maxDisp = vars.maxDisp\
        end\
        local radius = vars.radius or 0\
        local innerRadius = vars.innerRadius\
\
        local route = vars.route\
        local dbData = false\
\
        local newGroupData\
        if gpName and not vars.groupData then\
            if string.lower(action) == 'teleport' or string.lower(action) == 'tele' then\
                newGroupData = mist.getCurrentGroupData(gpName)\
            elseif string.lower(action) == 'respawn' then\
                newGroupData = mist.getGroupData(gpName)\
                dbData = true\
            elseif string.lower(action) == 'clone' then\
                newGroupData = mist.getGroupData(gpName)\
                newGroupData.clone = 'order66'\
                dbData = true\
            else\
                action = 'tele'\
                newGroupData = mist.getCurrentGroupData(gpName)\
            end\
        else\
            action = 'tele'\
            newGroupData = vars.groupData\
        end\
        \
        --log:info('get Randomized Point')\
        local diff = {x = 0, y = 0}\
        local newCoord, origCoord\
        if point then\
            local valid = false\
\
            local validTerrain\
            if string.lower(newGroupData.category) == 'ship' then\
                validTerrain = {'SHALLOW_WATER' , 'WATER'}\
            elseif string.lower(newGroupData.category) == 'vehicle' then\
                validTerrain = {'LAND', 'ROAD'}\
            else\
                validTerrain = {'LAND', 'ROAD', 'SHALLOW_WATER', 'WATER', 'RUNWAY'}\
            end\
\
            for i = 1, 100    do\
                newCoord = mist.getRandPointInCircle(point, radius, innerRadius)\
                if mist.isTerrainValid(newCoord, validTerrain) then\
                    origCoord = mist.utils.deepCopy(newCoord)\
                    diff = {x = (newCoord.x - newGroupData.units[1].x), y = (newCoord.y - newGroupData.units[1].y)}\
                    valid = true\
                    break\
                end\
            end\
            if valid == false then\
                log:error('Point supplied in variable table is not a valid coordinate. Valid coords: $1', validTerrain)\
                return false\
            end\
        end\
        if not newGroupData.country and mist.DBs.groupsByName[newGroupData.groupName].country then\
            newGroupData.country = mist.DBs.groupsByName[newGroupData.groupName].country\
        end\
        if not newGroupData.category and mist.DBs.groupsByName[newGroupData.groupName].category then\
            newGroupData.category = mist.DBs.groupsByName[newGroupData.groupName].category\
        end\
\
        for unitNum, unitData in pairs(newGroupData.units) do\
            if disperse then\
                if maxDisp and type(maxDisp) == 'number' and unitNum ~= 1 then\
                    newCoord = mist.getRandPointInCircle(origCoord, maxDisp)\
                    --else\
                    --newCoord = mist.getRandPointInCircle(zone.point, zone.radius)\
                end\
\
                newGroupData.units[unitNum].x = newCoord.x\
                newGroupData.units[unitNum].y = newCoord.y\
            else\
                newGroupData.units[unitNum].x = unitData.x + diff.x\
                newGroupData.units[unitNum].y = unitData.y + diff.y\
            end\
            if point then\
                if (newGroupData.category == 'plane' or newGroupData.category == 'helicopter')    then\
                    if point.z and point.y > 0 and point.y > land.getHeight({newGroupData.units[unitNum].x, newGroupData.units[unitNum].y}) + 10 then\
                        newGroupData.units[unitNum].alt = point.y\
                    else\
                        if newGroupData.category == 'plane' then\
                            newGroupData.units[unitNum].alt = land.getHeight({newGroupData.units[unitNum].x, newGroupData.units[unitNum].y}) + math.random(300, 9000)\
                        else\
                            newGroupData.units[unitNum].alt = land.getHeight({newGroupData.units[unitNum].x, newGroupData.units[unitNum].y}) + math.random(200, 3000)\
                        end\
                    end\
                end\
            end\
        end\
\
        if newGroupData.start_time then\
            newGroupData.startTime = newGroupData.start_time\
        end\
\
        if newGroupData.startTime and newGroupData.startTime ~= 0 and dbData == true then\
            local timeDif = timer.getAbsTime() - timer.getTime0()\
            if timeDif > newGroupData.startTime then\
                newGroupData.startTime = 0\
            else\
                newGroupData.startTime = newGroupData.startTime - timeDif\
            end\
\
        end\
\
        if route then\
            newGroupData.route = route\
        end\
        --mist.debug.writeData(mist.utils.serialize,{'teleportToPoint', newGroupData}, 'newGroupData.lua')\
        if string.lower(newGroupData.category) == 'static' then\
            --log:info(newGroupData)\
            return mist.dynAddStatic(newGroupData)\
        end\
        return mist.dynAdd(newGroupData)\
\
    end\
\
    function mist.respawnInZone(gpName, zone, disperse, maxDisp)\
\
        if type(gpName) == 'table' and gpName:getName() then\
            gpName = gpName:getName()\
        elseif type(gpName) == 'table' and gpName[1]:getName() then\
            gpName = math.random(#gpName)\
        else\
            gpName = tostring(gpName)\
        end\
\
        if type(zone) == 'string' then\
            zone = trigger.misc.getZone(zone)\
        elseif type(zone) == 'table' and not zone.radius then\
            zone = trigger.misc.getZone(zone[math.random(1, #zone)])\
        end\
        local vars = {}\
        vars.gpName = gpName\
        vars.action = 'respawn'\
        vars.point = zone.point\
        vars.radius = zone.radius\
        vars.disperse = disperse\
        vars.maxDisp = maxDisp\
        return mist.teleportToPoint(vars)\
    end\
\
    function mist.cloneInZone(gpName, zone, disperse, maxDisp)\
        --log:info('cloneInZone')\
        if type(gpName) == 'table' then\
            gpName = gpName:getName()\
        else\
            gpName = tostring(gpName)\
        end\
\
        if type(zone) == 'string' then\
            zone = trigger.misc.getZone(zone)\
        elseif type(zone) == 'table' and not zone.radius then\
            zone = trigger.misc.getZone(zone[math.random(1, #zone)])\
        end\
        local vars = {}\
        vars.gpName = gpName\
        vars.action = 'clone'\
        vars.point = zone.point\
        vars.radius = zone.radius\
        vars.disperse = disperse\
        vars.maxDisp = maxDisp\
        --log:info('do teleport')\
        return mist.teleportToPoint(vars)\
    end\
\
    function mist.teleportInZone(gpName, zone, disperse, maxDisp) -- groupName, zoneName or table of Zone Names, keepForm is a boolean\
        if type(gpName) == 'table' and gpName:getName() then\
            gpName = gpName:getName()\
        else\
            gpName = tostring(gpName)\
        end\
\
        if type(zone) == 'string' then\
            zone = trigger.misc.getZone(zone)\
        elseif type(zone) == 'table' and not zone.radius then\
            zone = trigger.misc.getZone(zone[math.random(1, #zone)])\
        end\
\
        local vars = {}\
        vars.gpName = gpName\
        vars.action = 'tele'\
        vars.point = zone.point\
        vars.radius = zone.radius\
        vars.disperse = disperse\
        vars.maxDisp = maxDisp\
        return mist.teleportToPoint(vars)\
    end\
\
    function mist.respawnGroup(gpName, task)\
        local vars = {}\
        vars.gpName = gpName\
        vars.action = 'respawn'\
        if task and type(task) ~= 'number' then\
            vars.route = mist.getGroupRoute(gpName, 'task')\
        end\
        local newGroup = mist.teleportToPoint(vars)\
        if task and type(task) == 'number' then\
            local newRoute = mist.getGroupRoute(gpName, 'task')\
            mist.scheduleFunction(mist.goRoute, {newGroup, newRoute}, timer.getTime() + task)\
        end\
        return newGroup\
    end\
\
    function mist.cloneGroup(gpName, task)\
        local vars = {}\
        vars.gpName = gpName\
        vars.action = 'clone'\
        if task and type(task) ~= 'number' then\
            vars.route = mist.getGroupRoute(gpName, 'task')\
        end\
        local newGroup = mist.teleportToPoint(vars)\
        if task and type(task) == 'number' then\
            local newRoute = mist.getGroupRoute(gpName, 'task')\
            mist.scheduleFunction(mist.goRoute, {newGroup, newRoute}, timer.getTime() + task)\
        end\
        return newGroup\
    end\
\
    function mist.teleportGroup(gpName, task)\
        local vars = {}\
        vars.gpName = gpName\
        vars.action = 'teleport'\
        if task and type(task) ~= 'number' then\
            vars.route = mist.getGroupRoute(gpName, 'task')\
        end\
        local newGroup = mist.teleportToPoint(vars)\
        if task and type(task) == 'number' then\
            local newRoute = mist.getGroupRoute(gpName, 'task')\
            mist.scheduleFunction(mist.goRoute, {newGroup, newRoute}, timer.getTime() + task)\
        end\
        return newGroup\
    end\
\
    function mist.spawnRandomizedGroup(groupName, vars) -- need to debug\
        if Group.getByName(groupName) and Group.getByName(groupName):isExist() == true then\
            local gpData = mist.getGroupData(groupName)\
            gpData.units = mist.randomizeGroupOrder(gpData.units, vars)\
            gpData.route = mist.getGroupRoute(groupName, 'task')\
\
            mist.dynAdd(gpData)\
        end\
\
        return true\
    end\
\
    function mist.randomizeNumTable(vars)\
        local newTable = {}\
\
        local excludeIndex = {}\
        local randomTable = {}\
\
        if vars and vars.exclude and type(vars.exclude) == 'table' then\
            for index, data in pairs(vars.exclude) do\
                excludeIndex[data] = true\
            end\
        end\
\
        local low, hi, size\
\
        if vars.size then\
            size = vars.size\
        end\
\
        if vars and vars.lowerLimit and type(vars.lowerLimit) == 'number' then\
            low = mist.utils.round(vars.lowerLimit)\
        else\
            low = 1\
        end\
\
        if vars and vars.upperLimit and type(vars.upperLimit) == 'number' then\
            hi = mist.utils.round(vars.upperLimit)\
        else\
            hi = size\
        end\
\
        local choices = {}\
        -- add to exclude list and create list of what to randomize\
        for i = 1, size do\
            if not (i >= low and i <= hi) then\
\
                excludeIndex[i] = true\
            end\
            if not excludeIndex[i] then\
                table.insert(choices, i)\
            else\
                newTable[i] = i\
            end\
        end\
\
        for ind, num in pairs(choices) do\
            local found = false\
            local x = 0\
            while found == false do\
                x = mist.random(size) -- get random number from list\
                local addNew = true\
                for index, _ in pairs(excludeIndex) do\
                    if index == x then\
                        addNew = false\
                        break\
                    end\
                end\
                if addNew == true then\
                    excludeIndex[x] = true\
                    found = true\
                end\
                excludeIndex[x] = true\
\
            end\
            newTable[num] = x\
        end\
        --[[\
        for i = 1, #newTable do\
            log:info(newTable[i])\
        end\
        ]]\
        return newTable\
    end\
\
    function mist.randomizeGroupOrder(passedUnits, vars)\
        -- figure out what to exclude, and send data to other func\
        local units = passedUnits\
\
        if passedUnits.units then\
            units = passUnits.units\
        end\
\
        local exclude = {}\
        local excludeNum = {}\
        if vars and vars.excludeType and type(vars.excludeType) == 'table' then\
            exclude = vars.excludeType\
        end\
\
        if vars and vars.excludeNum and type(vars.excludeNum) == 'table' then\
            excludeNum = vars.excludeNum\
        end\
\
        local low, hi\
\
        if vars and vars.lowerLimit and type(vars.lowerLimit) == 'number' then\
            low = mist.utils.round(vars.lowerLimit)\
        else\
            low = 1\
        end\
\
        if vars and vars.upperLimit and type(vars.upperLimit) == 'number' then\
            hi = mist.utils.round(vars.upperLimit)\
        else\
            hi = #units\
        end\
\
\
        local excludeNum = {}\
        for unitIndex, unitData in pairs(units) do\
            if unitIndex >= low and unitIndex    <= hi then -- if within range\
                local found = false\
                if #exclude > 0 then\
                    for excludeType, index in pairs(exclude) do -- check if excluded\
                        if mist.stringMatch(excludeType, unitData.type) then -- if excluded\
                            excludeNum[unitIndex] = unitIndex\
                            found = true\
                        end\
                    end\
                end\
            else -- unitIndex is either to low, or to high: added to exclude list\
                excludeNum[unitIndex] = unitId\
            end\
        end\
\
        local newGroup = {}\
        local newOrder = mist.randomizeNumTable({exclude = excludeNum, size = #units})\
\
        for unitIndex, unitData in pairs(units) do\
            for i = 1, #newOrder do\
                if newOrder[i] == unitIndex then\
                    newGroup[i] = mist.utils.deepCopy(units[i]) -- gets all of the unit data\
                    newGroup[i].type = mist.utils.deepCopy(unitData.type)\
                    newGroup[i].skill = mist.utils.deepCopy(unitData.skill)\
                    newGroup[i].unitName = mist.utils.deepCopy(unitData.unitName)\
                    newGroup[i].unitIndex = mist.utils.deepCopy(unitData.unitIndex) -- replaces the units data with a new type\
                end\
            end\
        end\
        return newGroup\
    end\
\
    function mist.random(firstNum, secondNum) -- no support for decimals\
        local lowNum, highNum\
        if not secondNum then\
            highNum = firstNum\
            lowNum = 1\
        else\
            lowNum = firstNum\
            highNum = secondNum\
        end\
        local total = 1\
        if math.abs(highNum - lowNum + 1) < 50 then -- if total values is less than 50\
            total = math.modf(50/math.abs(highNum - lowNum + 1)) -- make x copies required to be above 50\
        end\
        local choices = {}\
        for i = 1, total do -- iterate required number of times\
            for x = lowNum, highNum do -- iterate between the range\
                choices[#choices +1] = x -- add each entry to a table\
            end\
        end\
        local rtnVal = math.random(#choices) -- will now do a math.random of at least 50 choices\
        for i = 1, 10 do\
            rtnVal = math.random(#choices) -- iterate a few times for giggles\
        end\
        return choices[rtnVal]\
    end\
\
    function mist.stringMatch(s1, s2, bool)\
        local exclude = {'%-', '%(', '%)', '%_', '%[', '%]', '%.', '%#', '% ', '%{', '%}', '%$', '%%', '%?', '%+', '%^'}\
        if type(s1) == 'string' and type(s2) == 'string' then\
            for i , str in pairs(exclude) do\
                s1 = string.gsub(s1, str, '')\
                s2 = string.gsub(s2, str, '')\
            end\
            if not bool then\
                s1 = string.lower(s1)\
                s2 = string.lower(s2)\
            end\
            log:info('Comparing: $1 and $2', s1, s2)\
            if s1 == s2 then\
                return true\
            else\
                return false\
            end\
        else\
            log:error('Either the first or second variable were not a string')\
            return false\
        end\
    end\
\
    mist.matchString = mist.stringMatch -- both commands work because order out type of I\
\
    --[[ scope:\
{\
    units = {...},    -- unit names.\
    coa = {...}, -- coa names\
    countries = {...}, -- country names\
    CA = {...}, -- looks just like coa.\
    unitTypes = { red = {}, blue = {}, all = {}, Russia = {},}\
}\
\
\
scope examples:\
\
{    units = { 'Hawg11', 'Hawg12' }, CA = {'blue'} }\
\
{ countries = {'Georgia'}, unitTypes = {blue = {'A-10C', 'A-10A'}}}\
\
{ coa = {'all'}}\
\
{unitTypes = { blue = {'A-10C'}}}\
]]\
end\
\
--- Utility functions.\
-- E.g. conversions between units etc.\
-- @section mist.utils\
do -- mist.util scope\
    mist.utils = {}\
\
    --- Converts angle in radians to degrees.\
    -- @param angle angle in radians\
    -- @return angle in degrees\
    function mist.utils.toDegree(angle)\
        return angle*180/math.pi\
    end\
\
    --- Converts angle in degrees to radians.\
    -- @param angle angle in degrees\
    -- @return angle in degrees\
    function mist.utils.toRadian(angle)\
        return angle*math.pi/180\
    end\
\
    --- Converts meters to nautical miles.\
    -- @param meters distance in meters\
    -- @return distance in nautical miles\
    function mist.utils.metersToNM(meters)\
        return meters/1852\
    end\
\
    --- Converts meters to feet.\
    -- @param meters distance in meters\
    -- @return distance in feet\
    function mist.utils.metersToFeet(meters)\
        return meters/0.3048\
    end\
\
    --- Converts nautical miles to meters.\
    -- @param nm distance in nautical miles\
    -- @return distance in meters\
    function mist.utils.NMToMeters(nm)\
        return nm*1852\
    end\
\
    --- Converts feet to meters.\
    -- @param feet distance in feet\
    -- @return distance in meters\
    function mist.utils.feetToMeters(feet)\
        return feet*0.3048\
    end\
\
    --- Converts meters per second to knots.\
    -- @param mps speed in m/s\
    -- @return speed in knots\
    function mist.utils.mpsToKnots(mps)\
        return mps*3600/1852\
    end\
\
    --- Converts meters per second to kilometers per hour.\
    -- @param mps speed in m/s\
    -- @return speed in km/h\
    function mist.utils.mpsToKmph(mps)\
        return mps*3.6\
    end\
\
    --- Converts knots to meters per second.\
    -- @param knots speed in knots\
    -- @return speed in m/s\
    function mist.utils.knotsToMps(knots)\
        return knots*1852/3600\
    end\
\
    --- Converts kilometers per hour to meters per second.\
    -- @param kmph speed in km/h\
    -- @return speed in m/s\
    function mist.utils.kmphToMps(kmph)\
        return kmph/3.6\
    end\
\
    --- Converts a Vec3 to a Vec2.\
    -- @tparam Vec3 vec the 3D vector\
    -- @return vector converted to Vec2\
    function mist.utils.makeVec2(vec)\
        if vec.z then\
            return {x = vec.x, y = vec.z}\
        else\
            return {x = vec.x, y = vec.y}    -- it was actually already vec2.\
        end\
    end\
\
    --- Converts a Vec2 to a Vec3.\
    -- @tparam Vec2 vec the 2D vector\
    -- @param y optional new y axis (altitude) value. If omitted it's 0.\
    function mist.utils.makeVec3(vec, y)\
        if not vec.z then\
            if vec.alt and not y then\
                y = vec.alt\
            elseif not y then\
                y = 0\
            end\
            return {x = vec.x, y = y, z = vec.y}\
        else\
            return {x = vec.x, y = vec.y, z = vec.z}    -- it was already Vec3, actually.\
        end\
    end\
\
    --- Converts a Vec2 to a Vec3 using ground level as altitude.\
    -- The ground level at the specific point is used as altitude (y-axis)\
    -- for the new vector. Optionally a offset can be specified.\
    -- @tparam Vec2 vec the 2D vector\
    -- @param[opt] offset offset to be applied to the ground level\
    -- @return new 3D vector\
    function mist.utils.makeVec3GL(vec, offset)\
        local adj = offset or 0\
\
        if not vec.z then\
            return {x = vec.x, y = (land.getHeight(vec) + adj), z = vec.y}\
        else\
            return {x = vec.x, y = (land.getHeight({x = vec.x, y = vec.z}) + adj), z = vec.z}\
        end\
    end\
\
    --- Returns the center of a zone as Vec3.\
    -- @tparam string|table zone trigger zone name or table\
    -- @treturn Vec3 center of the zone\
    function mist.utils.zoneToVec3(zone)\
        local new = {}\
        if type(zone) == 'table' then\
            if zone.point then\
                new.x = zone.point.x\
                new.y = zone.point.y\
                new.z = zone.point.z\
            elseif zone.x and zone.y and zone.z then\
                return zone\
            end\
            return new\
        elseif type(zone) == 'string' then\
            zone = trigger.misc.getZone(zone)\
            if zone then\
                new.x = zone.point.x\
                new.y = zone.point.y\
                new.z = zone.point.z\
                return new\
            end\
        end\
    end\
\
    --- Returns heading-error corrected direction.\
    -- True-north corrected direction from point along vector vec.\
    -- @tparam Vec3 vec\
    -- @tparam Vec2 point\
    -- @return heading-error corrected direction from point.\
    function mist.utils.getDir(vec, point)\
        local dir = math.atan2(vec.z, vec.x)\
        if point then\
            dir = dir + mist.getNorthCorrection(point)\
        end\
        if dir < 0 then\
            dir = dir + 2 * math.pi    -- put dir in range of 0 to 2*pi\
        end\
        return dir\
    end\
\
    --- Returns distance in meters between two points.\
    -- @tparam Vec2|Vec3 point1 first point\
    -- @tparam Vec2|Vec3 point2 second point\
    -- @treturn number distance between given points.\
    function mist.utils.get2DDist(point1, point2)\
        point1 = mist.utils.makeVec3(point1)\
        point2 = mist.utils.makeVec3(point2)\
        return mist.vec.mag({x = point1.x - point2.x, y = 0, z = point1.z - point2.z})\
    end\
\
    --- Returns distance in meters between two points in 3D space.\
    -- @tparam Vec3 point1 first point\
    -- @tparam Vec3 point2 second point\
    -- @treturn number distancen between given points in 3D space.\
    function mist.utils.get3DDist(point1, point2)\
        return mist.vec.mag({x = point1.x - point2.x, y = point1.y - point2.y, z = point1.z - point2.z})\
    end\
\
    --- Creates a waypoint from a vector.\
    -- @tparam Vec2|Vec3 vec position of the new waypoint\
    -- @treturn Waypoint a new waypoint to be used inside paths.\
    function mist.utils.vecToWP(vec)\
        local newWP = {}\
        newWP.x = vec.x\
        newWP.y = vec.y\
        if vec.z then\
            newWP.alt = vec.y\
            newWP.y = vec.z\
        else\
            newWP.alt = land.getHeight({x = vec.x, y = vec.y})\
        end\
        return newWP\
    end\
\
    --- Creates a waypoint from a unit.\
    -- This function also considers the units speed.\
    -- The alt_type of this waypoint is set to \"BARO\".\
    -- @tparam Unit pUnit Unit whose position and speed will be used.\
    -- @treturn Waypoint new waypoint.\
    function mist.utils.unitToWP(pUnit)\
        local unit = mist.utils.deepCopy(pUnit)\
        if type(unit) == 'string' then\
            if Unit.getByName(unit) then\
                unit = Unit.getByName(unit)\
            end\
        end\
        if unit:isExist() == true then\
            local new = mist.utils.vecToWP(unit:getPosition().p)\
            new.speed = mist.vec.mag(unit:getVelocity())\
            new.alt_type = \"BARO\"\
\
            return new\
        end\
        log:error(\"$1 not found or doesn't exist\", pUnit)\
        return false\
    end\
\
    --- Creates a deep copy of a object.\
    -- Usually this object is a table.\
    -- See also: from http://lua-users.org/wiki/CopyTable\
    -- @param object object to copy\
    -- @return copy of object\
    function mist.utils.deepCopy(object)\
        local lookup_table = {}\
        local function _copy(object)\
            if type(object) ~= \"table\" then\
                return object\
            elseif lookup_table[object] then\
                return lookup_table[object]\
            end\
            local new_table = {}\
            lookup_table[object] = new_table\
            for index, value in pairs(object) do\
                new_table[_copy(index)] = _copy(value)\
            end\
            return setmetatable(new_table, getmetatable(object))\
        end\
        return _copy(object)\
    end\
\
    --- Simple rounding function.\
    -- From http://lua-users.org/wiki/SimpleRound\
    -- use negative idp for rounding ahead of decimal place, positive for rounding after decimal place\
    -- @tparam number num number to round\
    -- @param idp\
    function mist.utils.round(num, idp)\
        local mult = 10^(idp or 0)\
        return math.floor(num * mult + 0.5) / mult\
    end\
\
    --- Rounds all numbers inside a table.\
    -- @tparam table tbl table in which to round numbers\
    -- @param idp\
    function mist.utils.roundTbl(tbl, idp)\
        for id, val in pairs(tbl) do\
            if type(val) == 'number' then\
                tbl[id] = mist.utils.round(val, idp)\
            end\
        end\
        return tbl\
    end\
\
    --- Executes the given string.\
    -- borrowed from Slmod\
    -- @tparam string s string containing LUA code.\
    -- @treturn boolean true if successfully executed, false otherwise\
    function mist.utils.dostring(s)\
        local f, err = loadstring(s)\
        if f then\
            return true, f()\
        else\
            return false, err\
        end\
    end\
\
    --- Checks a table's types.\
    -- This function checks a tables types against a specifically forged type table.\
    -- @param fname\
    -- @tparam table type_tbl\
    -- @tparam table var_tbl\
    -- @usage -- specifically forged type table\
    -- type_tbl = {\
    --                         {'table', 'number'},\
    --                         'string',\
    --                         'number',\
    --                         'number',\
    --                         {'string','nil'},\
    --                         {'number', 'nil'}\
    --                     }\
    -- -- my_tbl index 1 must be a table or a number;\
    -- -- index 2, a string; index 3, a number;\
    -- -- index 4, a number; index 5, either a string or nil;\
    -- -- and index 6, either a number or nil.\
    -- mist.utils.typeCheck(type_tbl, my_tb)\
    -- @return true if table passes the check, false otherwise.\
    function mist.utils.typeCheck(fname, type_tbl, var_tbl)\
        -- log:info('type check')\
        for type_key, type_val in pairs(type_tbl) do\
            -- log:info('type_key: $1 type_val: $2', type_key, type_val)\
\
            --type_key can be a table of accepted keys- so try to find one that is not nil\
            local type_key_str = ''\
            local act_key = type_key -- actual key within var_tbl - necessary to use for multiple possible key variables.    Initialize to type_key\
            if type(type_key) == 'table' then\
\
                for i = 1, #type_key do\
                    if i ~= 1 then\
                        type_key_str = type_key_str .. '/'\
                    end\
                    type_key_str = type_key_str .. tostring(type_key[i])\
                    if var_tbl[type_key[i]] ~= nil then\
                        act_key = type_key[i]    -- found a non-nil entry, make act_key now this val.\
                    end\
                end\
            else\
                type_key_str = tostring(type_key)\
            end\
\
            local err_msg = 'Error in function ' .. fname .. ', parameter \"' .. type_key_str .. '\", expected: '\
            local passed_check = false\
\
            if type(type_tbl[type_key]) == 'table' then\
                -- log:info('err_msg, before: $1', err_msg)\
                for j = 1, #type_tbl[type_key] do\
\
                    if j == 1 then\
                        err_msg = err_msg .. type_tbl[type_key][j]\
                    else\
                        err_msg = err_msg .. ' or ' .. type_tbl[type_key][j]\
                    end\
\
                    if type(var_tbl[act_key]) == type_tbl[type_key][j] then\
                        passed_check = true\
                    end\
                end\
                -- log:info('err_msg, after: $1', err_msg)\
            else\
                -- log:info('err_msg, before: $1', err_msg)\
                err_msg = err_msg .. type_tbl[type_key]\
                -- log:info('err_msg, after: $1', err_msg)\
                if type(var_tbl[act_key]) == type_tbl[type_key] then\
                    passed_check = true\
                end\
\
            end\
\
            if not passed_check then\
                err_msg = err_msg .. ', got ' .. type(var_tbl[act_key])\
                return false, err_msg\
            end\
        end\
        return true\
    end\
\
    --- Serializes the give variable to a string.\
    -- borrowed from slmod\
    -- @param var variable to serialize\
    -- @treturn string variable serialized to string\
    function mist.utils.basicSerialize(var)\
        if var == nil then\
            return \"\\\"\\\"\"\
        else\
            if ((type(var) == 'number') or\
                    (type(var) == 'boolean') or\
                    (type(var) == 'function') or\
                    (type(var) == 'table') or\
                    (type(var) == 'userdata') ) then\
            return tostring(var)\
        elseif type(var) == 'string' then\
            var = string.format('%q', var)\
            return var\
        end\
    end\
end\
\
--- Serialize value\
-- borrowed from slmod (serialize_slmod)\
-- @param name\
-- @param value value to serialize\
-- @param level\
function mist.utils.serialize(name, value, level)\
    --Based on ED's serialize_simple2\
    local function basicSerialize(o)\
        if type(o) == \"number\" then\
            return tostring(o)\
        elseif type(o) == \"boolean\" then\
            return tostring(o)\
        else -- assume it is a string\
            return mist.utils.basicSerialize(o)\
        end\
    end\
\
    local function serializeToTbl(name, value, level)\
        local var_str_tbl = {}\
        if level == nil then level = \"\" end\
        if level ~= \"\" then level = level..\"    \" end\
\
        table.insert(var_str_tbl, level .. name .. \" = \")\
\
        if type(value) == \"number\" or type(value) == \"string\" or type(value) == \"boolean\" then\
            table.insert(var_str_tbl, basicSerialize(value) ..    \",\\n\")\
        elseif type(value) == \"table\" then\
            table.insert(var_str_tbl, \"\\n\"..level..\"{\\n\")\
\
            for k,v in pairs(value) do -- serialize its fields\
                local key\
                if type(k) == \"number\" then\
                    key = string.format(\"[%s]\", k)\
                else\
                    key = string.format(\"[%q]\", k)\
                end\
\
                table.insert(var_str_tbl, mist.utils.serialize(key, v, level..\"    \"))\
\
            end\
            if level == \"\" then\
                table.insert(var_str_tbl, level..\"} -- end of \"..name..\"\\n\")\
\
            else\
                table.insert(var_str_tbl, level..\"}, -- end of \"..name..\"\\n\")\
\
            end\
        else\
            log:error('Cannot serialize a $1', type(value))\
        end\
        return var_str_tbl\
    end\
\
    local t_str = serializeToTbl(name, value, level)\
\
    return table.concat(t_str)\
end\
\
--- Serialize value supporting cycles.\
-- borrowed from slmod (serialize_wcycles)\
-- @param name\
-- @param value value to serialize\
-- @param saved\
function mist.utils.serializeWithCycles(name, value, saved)\
    --mostly straight out of Programming in Lua\
    local function basicSerialize(o)\
        if type(o) == \"number\" then\
            return tostring(o)\
        elseif type(o) == \"boolean\" then\
            return tostring(o)\
        else -- assume it is a string\
            return mist.utils.basicSerialize(o)\
        end\
    end\
\
    local t_str = {}\
    saved = saved or {}             -- initial value\
    if ((type(value) == 'string') or (type(value) == 'number') or (type(value) == 'table') or (type(value) == 'boolean')) then\
        table.insert(t_str, name .. \" = \")\
        if type(value) == \"number\" or type(value) == \"string\" or type(value) == \"boolean\" then\
            table.insert(t_str, basicSerialize(value) ..    \"\\n\")\
        else\
\
            if saved[value] then        -- value already saved?\
                table.insert(t_str, saved[value] .. \"\\n\")\
            else\
                saved[value] = name     -- save name for next time\
                table.insert(t_str, \"{}\\n\")\
                for k,v in pairs(value) do            -- save its fields\
                    local fieldname = string.format(\"%s[%s]\", name, basicSerialize(k))\
                    table.insert(t_str, mist.utils.serializeWithCycles(fieldname, v, saved))\
                end\
            end\
        end\
        return table.concat(t_str)\
    else\
        return \"\"\
    end\
end\
\
--- Serialize a table to a single line string.\
-- serialization of a table all on a single line, no comments, made to replace old get_table_string function\
-- borrowed from slmod\
-- @tparam table tbl table to serialize.\
-- @treturn string string containing serialized table\
function mist.utils.oneLineSerialize(tbl)\
    if type(tbl) == 'table' then --function only works for tables!\
\
        local tbl_str = {}\
\
        tbl_str[#tbl_str + 1] = '{ '\
\
        for ind,val in pairs(tbl) do -- serialize its fields\
            if type(ind) == \"number\" then\
                tbl_str[#tbl_str + 1] = '['\
                tbl_str[#tbl_str + 1] = tostring(ind)\
                tbl_str[#tbl_str + 1] = '] = '\
            else --must be a string\
                tbl_str[#tbl_str + 1] = '['\
                tbl_str[#tbl_str + 1] = mist.utils.basicSerialize(ind)\
                tbl_str[#tbl_str + 1] = '] = '\
            end\
\
            if ((type(val) == 'number') or (type(val) == 'boolean')) then\
                tbl_str[#tbl_str + 1] = tostring(val)\
                tbl_str[#tbl_str + 1] = ', '\
            elseif type(val) == 'string' then\
                tbl_str[#tbl_str + 1] = mist.utils.basicSerialize(val)\
                tbl_str[#tbl_str + 1] = ', '\
            elseif type(val) == 'nil' then -- won't ever happen, right?\
                tbl_str[#tbl_str + 1] = 'nil, '\
            elseif type(val) == 'table' then\
                tbl_str[#tbl_str + 1] = mist.utils.oneLineSerialize(val)\
                tbl_str[#tbl_str + 1] = ', '     --I think this is right, I just added it\
            else\
                log:war('Unable to serialize value type $1 at index $2', mist.utils.basicSerialize(type(val)), tostring(ind))\
            end\
\
        end\
        tbl_str[#tbl_str + 1] = '}'\
        return table.concat(tbl_str)\
    end\
end\
\
--- Returns table in a easy readable string representation.\
-- this function is not meant for serialization because it uses\
-- newlines for better readability.\
-- @param tbl table to show\
-- @param loc\
-- @param indent\
-- @param tableshow_tbls\
-- @return human readable string representation of given table\
function mist.utils.tableShow(tbl, loc, indent, tableshow_tbls) --based on serialize_slmod, this is a _G serialization\
    tableshow_tbls = tableshow_tbls or {} --create table of tables\
    loc = loc or \"\"\
    indent = indent or \"\"\
    if type(tbl) == 'table' then --function only works for tables!\
        tableshow_tbls[tbl] = loc\
\
        local tbl_str = {}\
\
        tbl_str[#tbl_str + 1] = indent .. '{\\n'\
\
        for ind,val in pairs(tbl) do -- serialize its fields\
            if type(ind) == \"number\" then\
                tbl_str[#tbl_str + 1] = indent\
                tbl_str[#tbl_str + 1] = loc .. '['\
                tbl_str[#tbl_str + 1] = tostring(ind)\
                tbl_str[#tbl_str + 1] = '] = '\
            else\
                tbl_str[#tbl_str + 1] = indent\
                tbl_str[#tbl_str + 1] = loc .. '['\
                tbl_str[#tbl_str + 1] = mist.utils.basicSerialize(ind)\
                tbl_str[#tbl_str + 1] = '] = '\
            end\
\
            if ((type(val) == 'number') or (type(val) == 'boolean')) then\
                tbl_str[#tbl_str + 1] = tostring(val)\
                tbl_str[#tbl_str + 1] = ',\\n'\
            elseif type(val) == 'string' then\
                tbl_str[#tbl_str + 1] = mist.utils.basicSerialize(val)\
                tbl_str[#tbl_str + 1] = ',\\n'\
            elseif type(val) == 'nil' then -- won't ever happen, right?\
                tbl_str[#tbl_str + 1] = 'nil,\\n'\
            elseif type(val) == 'table' then\
                if tableshow_tbls[val] then\
                    tbl_str[#tbl_str + 1] = tostring(val) .. ' already defined: ' .. tableshow_tbls[val] .. ',\\n'\
                else\
                    tableshow_tbls[val] = loc ..    '[' .. mist.utils.basicSerialize(ind) .. ']'\
                    tbl_str[#tbl_str + 1] = tostring(val) .. ' '\
                    tbl_str[#tbl_str + 1] = mist.utils.tableShow(val,    loc .. '[' .. mist.utils.basicSerialize(ind).. ']', indent .. '        ', tableshow_tbls)\
                    tbl_str[#tbl_str + 1] = ',\\n'\
                end\
            elseif type(val) == 'function' then\
                if debug and debug.getinfo then\
                    local fcnname = tostring(val)\
                    local info = debug.getinfo(val, \"S\")\
                    if info.what == \"C\" then\
                        tbl_str[#tbl_str + 1] = string.format('%q', fcnname .. ', C function') .. ',\\n'\
                    else\
                        if (string.sub(info.source, 1, 2) == [[./]]) then\
                            tbl_str[#tbl_str + 1] = string.format('%q', fcnname .. ', defined in (' .. info.linedefined .. '-' .. info.lastlinedefined .. ')' .. info.source) ..',\\n'\
                        else\
                            tbl_str[#tbl_str + 1] = string.format('%q', fcnname .. ', defined in (' .. info.linedefined .. '-' .. info.lastlinedefined .. ')') ..',\\n'\
                        end\
                    end\
\
                else\
                    tbl_str[#tbl_str + 1] = 'a function,\\n'\
                end\
            else\
                tbl_str[#tbl_str + 1] = 'unable to serialize value type ' .. mist.utils.basicSerialize(type(val)) .. ' at index ' .. tostring(ind)\
            end\
        end\
\
        tbl_str[#tbl_str + 1] = indent .. '}'\
        return table.concat(tbl_str)\
    end\
end\
end\
\
--- Debug functions\
-- @section mist.debug\
do -- mist.debug scope\
    mist.debug = {}\
\
    --- Dumps the global table _G.\
    -- This dumps the global table _G to a file in\
    -- the DCS\\Logs directory.\
    -- This function requires you to disable script sanitization\
    -- in $DCS_ROOT\\Scripts\\MissionScripting.lua to access lfs and io\
    -- libraries.\
    -- @param fname\
    function mist.debug.dump_G(fname)\
        if lfs and io then\
            local fdir = lfs.writedir() .. [[Logs\\]] .. fname\
            local f = io.open(fdir, 'w')\
            f:write(mist.utils.tableShow(_G))\
            f:close()\
            log:info('Wrote debug data to $1', fdir)\
            --trigger.action.outText(errmsg, 10)\
        else\
            log:alert('insufficient libraries to run mist.debug.dump_G, you must disable the sanitization of the io and lfs libraries in ./Scripts/MissionScripting.lua')\
            --trigger.action.outText(errmsg, 10)\
        end\
    end\
\
    --- Write debug data to file.\
    -- This function requires you to disable script sanitization\
    -- in $DCS_ROOT\\Scripts\\MissionScripting.lua to access lfs and io\
    -- libraries.\
    -- @param fcn\
    -- @param fcnVars\
    -- @param fname\
    function mist.debug.writeData(fcn, fcnVars, fname)\
        if lfs and io then\
            local fdir = lfs.writedir() .. [[Logs\\]] .. fname\
            local f = io.open(fdir, 'w')\
            f:write(fcn(unpack(fcnVars, 1, table.maxn(fcnVars))))\
            f:close()\
            log:info('Wrote debug data to $1', fdir)\
            local errmsg = 'mist.debug.writeData wrote data to ' .. fdir\
            trigger.action.outText(errmsg, 10)\
        else\
            local errmsg = 'Error: insufficient libraries to run mist.debug.writeData, you must disable the sanitization of the io and lfs libraries in ./Scripts/MissionScripting.lua'\
            log:alert(errmsg)\
            trigger.action.outText(errmsg, 10)\
        end\
    end\
\
    --- Write mist databases to file.\
    -- This function requires you to disable script sanitization\
    -- in $DCS_ROOT\\Scripts\\MissionScripting.lua to access lfs and io\
    -- libraries.\
    function mist.debug.dumpDBs()\
        for DBname, DB in pairs(mist.DBs) do\
            if type(DB) == 'table' and type(DBname) == 'string' then\
                mist.debug.writeData(mist.utils.serialize, {DBname, DB}, 'mist_DBs_' .. DBname .. '.lua')\
            end\
        end\
    end\
end\
\
--- 3D Vector functions\
-- @section mist.vec\
do -- mist.vec scope\
    mist.vec = {}\
\
    --- Vector addition.\
    -- @tparam Vec3 vec1 first vector\
    -- @tparam Vec3 vec2 second vector\
    -- @treturn Vec3 new vector, sum of vec1 and vec2.\
    function mist.vec.add(vec1, vec2)\
        return {x = vec1.x + vec2.x, y = vec1.y + vec2.y, z = vec1.z + vec2.z}\
    end\
\
    --- Vector substraction.\
    -- @tparam Vec3 vec1 first vector\
    -- @tparam Vec3 vec2 second vector\
    -- @treturn Vec3 new vector, vec2 substracted from vec1.\
    function mist.vec.sub(vec1, vec2)\
        return {x = vec1.x - vec2.x, y = vec1.y - vec2.y, z = vec1.z - vec2.z}\
    end\
\
    --- Vector scalar multiplication.\
    -- @tparam Vec3 vec vector to multiply\
    -- @tparam number mult scalar multiplicator\
    -- @treturn Vec3 new vector multiplied with the given scalar\
    function mist.vec.scalarMult(vec, mult)\
        return {x = vec.x*mult, y = vec.y*mult, z = vec.z*mult}\
    end\
\
    mist.vec.scalar_mult = mist.vec.scalarMult\
\
    --- Vector dot product.\
    -- @tparam Vec3 vec1 first vector\
    -- @tparam Vec3 vec2 second vector\
    -- @treturn number dot product of given vectors\
    function mist.vec.dp (vec1, vec2)\
        return vec1.x*vec2.x + vec1.y*vec2.y + vec1.z*vec2.z\
    end\
\
    --- Vector cross product.\
    -- @tparam Vec3 vec1 first vector\
    -- @tparam Vec3 vec2 second vector\
    -- @treturn Vec3 new vector, cross product of vec1 and vec2.\
    function mist.vec.cp(vec1, vec2)\
        return { x = vec1.y*vec2.z - vec1.z*vec2.y, y = vec1.z*vec2.x - vec1.x*vec2.z, z = vec1.x*vec2.y - vec1.y*vec2.x}\
    end\
\
    --- Vector magnitude\
    -- @tparam Vec3 vec vector\
    -- @treturn number magnitude of vector vec\
    function mist.vec.mag(vec)\
        return (vec.x^2 + vec.y^2 + vec.z^2)^0.5\
    end\
\
    --- Unit vector\
    -- @tparam Vec3 vec\
    -- @treturn Vec3 unit vector of vec\
    function mist.vec.getUnitVec(vec)\
        local mag = mist.vec.mag(vec)\
        return { x = vec.x/mag, y = vec.y/mag, z = vec.z/mag }\
    end\
\
    --- Rotate vector.\
    -- @tparam Vec2 vec2 to rotoate\
    -- @tparam number theta\
    -- @return Vec2 rotated vector.\
    function mist.vec.rotateVec2(vec2, theta)\
        return { x = vec2.x*math.cos(theta) - vec2.y*math.sin(theta), y = vec2.x*math.sin(theta) + vec2.y*math.cos(theta)}\
    end\
end\
\
--- Flag functions.\
-- The mist \"Flag functions\" are functions that are similar to Slmod functions\
-- that detect a game condition and set a flag when that game condition is met.\
--\
-- They are intended to be used by persons with little or no experience in Lua\
-- programming, but with a good knowledge of the DCS mission editor.\
-- @section mist.flagFunc\
do -- mist.flagFunc scope\
    mist.flagFunc = {}\
\
    --- Sets a flag if map objects are destroyed inside a zone.\
    -- Once this function is run, it will start a continuously evaluated process\
    -- that will set a flag true if map objects (such as bridges, buildings in\
    -- town, etc.) die (or have died) in a mission editor zone (or set of zones).\
    -- This will only happen once; once the flag is set true, the process ends.\
    -- @usage\
    -- -- Example vars table\
    -- vars = {\
    --     zones = { \"zone1\", \"zone2\" }, -- can also be a single string\
    --     flag = 3, -- number of the flag\
    --     stopflag = 4, -- optional number of the stop flag\
    --     req_num = 10, -- optional minimum amount of map objects needed to die\
    -- }\
    -- mist.flagFuncs.mapobjs_dead_zones(vars)\
    -- @tparam table vars table containing parameters.\
    function mist.flagFunc.mapobjs_dead_zones(vars)\
        --[[vars needs to be:\
zones = table or string,\
flag = number,\
stopflag = number or nil,\
req_num = number or nil\
\
AND used by function,\
initial_number\
\
]]\
        -- type_tbl\
        local type_tbl = {\
            [{'zones', 'zone'}] = {'table', 'string'},\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            [{'req_num', 'reqnum'}] = {'number', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.mapobjs_dead_zones', type_tbl, vars)\
        assert(err, errmsg)\
        local zones = vars.zones or vars.zone\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local req_num = vars.req_num or vars.reqnum or 1\
        local initial_number = vars.initial_number\
\
        if type(zones) == 'string' then\
            zones = {zones}\
        end\
\
        if not initial_number then\
            initial_number = #mist.getDeadMapObjsInZones(zones)\
        end\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            if (#mist.getDeadMapObjsInZones(zones) - initial_number) >= req_num and trigger.misc.getUserFlag(flag) == 0 then\
                trigger.action.setUserFlag(flag, true)\
                return\
            else\
                mist.scheduleFunction(mist.flagFunc.mapobjs_dead_zones, {{zones = zones, flag = flag, stopflag = stopflag, req_num = req_num, initial_number = initial_number}}, timer.getTime() + 1)\
            end\
        end\
    end\
\
    --- Sets a flag if map objects are destroyed inside a polygon.\
    -- Once this function is run, it will start a continuously evaluated process\
    -- that will set a flag true if map objects (such as bridges, buildings in\
    -- town, etc.) die (or have died) in a polygon.\
    -- This will only happen once; once the flag is set true, the process ends.\
    -- @usage\
    -- -- Example vars table\
    -- vars = {\
    --     zone = {\
    --         [1] = mist.DBs.unitsByName['NE corner'].point,\
    --         [2] = mist.DBs.unitsByName['SE corner'].point,\
    --         [3] = mist.DBs.unitsByName['SW corner'].point,\
    --         [4] = mist.DBs.unitsByName['NW corner'].point\
    --     }\
    --     flag = 3, -- number of the flag\
    --     stopflag = 4, -- optional number of the stop flag\
    --     req_num = 10, -- optional minimum amount of map objects needed to die\
    -- }\
    -- mist.flagFuncs.mapobjs_dead_zones(vars)\
    -- @tparam table vars table containing parameters.\
    function mist.flagFunc.mapobjs_dead_polygon(vars)\
        --[[vars needs to be:\
zone = table,\
flag = number,\
stopflag = number or nil,\
req_num = number or nil\
\
AND used by function,\
initial_number\
\
]]\
        -- type_tbl\
        local type_tbl = {\
            [{'zone', 'polyzone'}] = 'table',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            [{'req_num', 'reqnum'}] = {'number', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.mapobjs_dead_polygon', type_tbl, vars)\
        assert(err, errmsg)\
        local zone = vars.zone or vars.polyzone\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local req_num = vars.req_num or vars.reqnum or 1\
        local initial_number = vars.initial_number\
\
        if not initial_number then\
            initial_number = #mist.getDeadMapObjsInPolygonZone(zone)\
        end\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            if (#mist.getDeadMapObjsInPolygonZone(zone) - initial_number) >= req_num and trigger.misc.getUserFlag(flag) == 0 then\
                trigger.action.setUserFlag(flag, true)\
                return\
            else\
                mist.scheduleFunction(mist.flagFunc.mapobjs_dead_polygon, {{zone = zone, flag = flag, stopflag = stopflag, req_num = req_num, initial_number = initial_number}}, timer.getTime() + 1)\
            end\
        end\
    end\
\
    --- Sets a flag if unit(s) is/are inside a polygon.\
    -- @tparam table vars @{unitsInPolygonVars}\
    -- @usage -- set flag 11 to true as soon as any blue vehicles\
    -- -- are inside the polygon shape created off of the waypoints\
    -- -- of the group forest1\
    -- mist.flagFunc.units_in_polygon {\
    --        units = {'[blue][vehicle]'},\
    --        zone = mist.getGroupPoints('forest1'),\
    --        flag = 11\
    -- }\
    function mist.flagFunc.units_in_polygon(vars)\
        --[[vars needs to be:\
units = table,\
zone = table,\
flag = number,\
stopflag = number or nil,\
maxalt = number or nil,\
interval    = number or nil,\
req_num = number or nil\
toggle = boolean or nil\
unitTableDef = table or nil\
]]\
        -- type_tbl\
        local type_tbl = {\
            [{'units', 'unit'}] = 'table',\
            [{'zone', 'polyzone'}] = 'table',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            [{'maxalt', 'alt'}] = {'number', 'nil'},\
            interval = {'number', 'nil'},\
            [{'req_num', 'reqnum'}] = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
            unitTableDef = {'table', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.units_in_polygon', type_tbl, vars)\
        assert(err, errmsg)\
        local units = vars.units or vars.unit\
        local zone = vars.zone or vars.polyzone\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local interval = vars.interval or 1\
        local maxalt = vars.maxalt or vars.alt\
        local req_num = vars.req_num or vars.reqnum or 1\
        local toggle = vars.toggle or nil\
        local unitTableDef = vars.unitTableDef\
\
        if not units.processed then\
            unitTableDef = mist.utils.deepCopy(units)\
        end\
\
        if (units.processed and units.processed < mist.getLastDBUpdateTime()) or not units.processed then -- run unit table short cuts\
            if unitTableDef then\
                units = mist.makeUnitTable(unitTableDef)\
            end\
        end\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == 0) then\
            local num_in_zone = 0\
            for i = 1, #units do\
                local unit = Unit.getByName(units[i])\
                if unit then\
                    local pos = unit:getPosition().p\
                    if mist.pointInPolygon(pos, zone, maxalt) then\
                        num_in_zone = num_in_zone + 1\
                        if num_in_zone >= req_num and trigger.misc.getUserFlag(flag) == 0 then\
                            trigger.action.setUserFlag(flag, true)\
                            break\
                        end\
                    end\
                end\
            end\
            if toggle and (num_in_zone < req_num) and trigger.misc.getUserFlag(flag) > 0 then\
                trigger.action.setUserFlag(flag, false)\
            end\
            -- do another check in case stopflag was set true by this function\
            if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == 0) then\
                mist.scheduleFunction(mist.flagFunc.units_in_polygon, {{units = units, zone = zone, flag = flag, stopflag = stopflag, interval = interval, req_num = req_num, maxalt = maxalt, toggle = toggle, unitTableDef = unitTableDef}}, timer.getTime() + interval)\
            end\
        end\
\
    end\
\
    --- Sets a flag if unit(s) is/are inside a trigger zone.\
    -- @todo document\
    function mist.flagFunc.units_in_zones(vars)\
        --[[vars needs to be:\
    units = table,\
    zones = table,\
    flag = number,\
    stopflag = number or nil,\
    zone_type = string or nil,\
    req_num = number or nil,\
    interval    = number or nil\
    toggle = boolean or nil\
    ]]\
        -- type_tbl\
        local type_tbl = {\
            units = 'table',\
            zones = 'table',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            [{'zone_type', 'zonetype'}] = {'string', 'nil'},\
            [{'req_num', 'reqnum'}] = {'number', 'nil'},\
            interval = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
            unitTableDef = {'table', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.units_in_zones', type_tbl, vars)\
        assert(err, errmsg)\
        local units = vars.units\
        local zones = vars.zones\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local zone_type = vars.zone_type or vars.zonetype or 'cylinder'\
        local req_num = vars.req_num or vars.reqnum or 1\
        local interval = vars.interval or 1\
        local toggle = vars.toggle or nil\
        local unitTableDef = vars.unitTableDef\
\
        if not units.processed then\
            unitTableDef = mist.utils.deepCopy(units)\
        end\
        \
        if (units.processed and units.processed < mist.getLastDBUpdateTime()) or not units.processed then -- run unit table short cuts\
            if unitTableDef then\
                units = mist.makeUnitTable(unitTableDef)\
            end\
        end\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
\
            local in_zone_units = mist.getUnitsInZones(units, zones, zone_type)\
\
            if #in_zone_units >= req_num and trigger.misc.getUserFlag(flag) == 0 then\
                trigger.action.setUserFlag(flag, true)\
            elseif #in_zone_units < req_num and toggle then\
                trigger.action.setUserFlag(flag, false)\
            end\
            -- do another check in case stopflag was set true by this function\
            if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
                mist.scheduleFunction(mist.flagFunc.units_in_zones, {{units = units, zones = zones, flag = flag, stopflag = stopflag, zone_type = zone_type, req_num = req_num, interval = interval, toggle = toggle, unitTableDef = unitTableDef}}, timer.getTime() + interval)\
            end\
        end\
\
    end\
\
    --- Sets a flag if unit(s) is/are inside a moving zone.\
    -- @todo document\
    function mist.flagFunc.units_in_moving_zones(vars)\
        --[[vars needs to be:\
    units = table,\
    zone_units = table,\
    radius = number,\
    flag = number,\
    stopflag = number or nil,\
    zone_type = string or nil,\
    req_num = number or nil,\
    interval    = number or nil\
    toggle = boolean or nil\
    ]]\
        -- type_tbl\
        local type_tbl = {\
            units = 'table',\
            [{'zone_units', 'zoneunits'}]    = 'table',\
            radius = 'number',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            [{'zone_type', 'zonetype'}] = {'string', 'nil'},\
            [{'req_num', 'reqnum'}] = {'number', 'nil'},\
            interval = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
            unitTableDef = {'table', 'nil'},\
            zUnitTableDef = {'table', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.units_in_moving_zones', type_tbl, vars)\
        assert(err, errmsg)\
        local units = vars.units\
        local zone_units = vars.zone_units or vars.zoneunits\
        local radius = vars.radius\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local zone_type = vars.zone_type or vars.zonetype or 'cylinder'\
        local req_num = vars.req_num or vars.reqnum or 1\
        local interval = vars.interval or 1\
        local toggle = vars.toggle or nil\
        local unitTableDef = vars.unitTableDef\
        local zUnitTableDef = vars.zUnitTableDef\
\
        if not units.processed then\
            unitTableDef = mist.utils.deepCopy(units)\
        end\
\
        if not zone_units.processed then\
            zUnitTableDef = mist.utils.deepCopy(zone_units)\
        end\
\
        if (units.processed and units.processed < mist.getLastDBUpdateTime()) or not units.processed then -- run unit table short cuts\
            if unitTableDef then\
                units = mist.makeUnitTable(unitTableDef)\
            end\
        end\
\
        if (zone_units.processed and zone_units.processed < mist.getLastDBUpdateTime()) or not zone_units.processed then -- run unit table short cuts\
            if zUnitTableDef then\
                zone_units = mist.makeUnitTable(zUnitTableDef)\
            end\
            \
        end\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
\
            local in_zone_units = mist.getUnitsInMovingZones(units, zone_units, radius, zone_type)\
\
            if #in_zone_units >= req_num and trigger.misc.getUserFlag(flag) == 0 then\
                trigger.action.setUserFlag(flag, true)\
            elseif #in_zone_units < req_num and toggle then\
                trigger.action.setUserFlag(flag, false)\
            end\
            -- do another check in case stopflag was set true by this function\
            if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
                mist.scheduleFunction(mist.flagFunc.units_in_moving_zones, {{units = units, zone_units = zone_units, radius = radius, flag = flag, stopflag = stopflag, zone_type = zone_type, req_num = req_num, interval = interval, toggle = toggle, unitTableDef = unitTableDef, zUnitTableDef = zUnitTableDef}}, timer.getTime() + interval)\
            end\
        end\
\
    end\
\
    --- Sets a flag if units have line of sight to each other.\
    -- @todo document\
    function mist.flagFunc.units_LOS(vars)\
        --[[vars needs to be:\
unitset1 = table,\
altoffset1 = number,\
unitset2 = table,\
altoffset2 = number,\
flag = number,\
stopflag = number or nil,\
radius = number or nil,\
interval    = number or nil,\
req_num = number or nil\
toggle = boolean or nil\
]]\
        -- type_tbl\
        local type_tbl = {\
            [{'unitset1', 'units1'}] = 'table',\
            [{'altoffset1', 'alt1'}] = 'number',\
            [{'unitset2', 'units2'}] = 'table',\
            [{'altoffset2', 'alt2'}] = 'number',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            [{'req_num', 'reqnum'}] = {'number', 'nil'},\
            interval = {'number', 'nil'},\
            radius = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
            unitTableDef1 = {'table', 'nil'},\
            unitTableDef2 = {'table', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.units_LOS', type_tbl, vars)\
        assert(err, errmsg)\
        local unitset1 = vars.unitset1 or vars.units1\
        local altoffset1 = vars.altoffset1 or vars.alt1\
        local unitset2 = vars.unitset2 or vars.units2\
        local altoffset2 = vars.altoffset2 or vars.alt2\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local interval = vars.interval or 1\
        local radius = vars.radius or math.huge\
        local req_num = vars.req_num or vars.reqnum or 1\
        local toggle = vars.toggle or nil\
        local unitTableDef1 = vars.unitTableDef1\
        local unitTableDef2 = vars.unitTableDef2\
\
        if not unitset1.processed then\
            unitTableDef1 = mist.utils.deepCopy(unitset1)\
        end\
\
        if not unitset2.processed then\
            unitTableDef2 = mist.utils.deepCopy(unitset2)\
        end\
\
        if (unitset1.processed and unitset1.processed < mist.getLastDBUpdateTime()) or not unitset1.processed then -- run unit table short cuts\
            if unitTableDef1 then\
                unitset1 = mist.makeUnitTable(unitTableDef1)\
            end\
        end\
\
        if (unitset2.processed and unitset2.processed < mist.getLastDBUpdateTime()) or not unitset2.processed then -- run unit table short cuts\
            if unitTableDef2 then\
                unitset2 = mist.makeUnitTable(unitTableDef2)\
            end\
        end\
\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
\
            local unitLOSdata = mist.getUnitsLOS(unitset1, altoffset1, unitset2, altoffset2, radius)\
\
            if #unitLOSdata >= req_num and trigger.misc.getUserFlag(flag) == 0 then\
                trigger.action.setUserFlag(flag, true)\
            elseif #unitLOSdata < req_num and toggle then\
                trigger.action.setUserFlag(flag, false)\
            end\
            -- do another check in case stopflag was set true by this function\
            if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
                mist.scheduleFunction(mist.flagFunc.units_LOS, {{unitset1 = unitset1, altoffset1 = altoffset1, unitset2 = unitset2, altoffset2 = altoffset2, flag = flag, stopflag = stopflag, radius = radius, req_num = req_num, interval = interval, toggle = toggle, unitTableDef1 = unitTableDef1, unitTableDef2 = unitTableDef2}}, timer.getTime() + interval)\
            end\
        end\
    end\
\
    --- Sets a flag if group is alive.\
    -- @todo document\
    function mist.flagFunc.group_alive(vars)\
        --[[vars\
groupName\
flag\
toggle\
interval\
stopFlag\
\
]]\
        local type_tbl = {\
            [{'group', 'groupname', 'gp', 'groupName'}] = 'string',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            interval = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.group_alive', type_tbl, vars)\
        assert(err, errmsg)\
\
        local groupName = vars.groupName or vars.group or vars.gp or vars.Groupname\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local interval = vars.interval or 1\
        local toggle = vars.toggle or nil\
\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            if Group.getByName(groupName) and Group.getByName(groupName):isExist() == true and #Group.getByName(groupName):getUnits() > 0 then\
                if trigger.misc.getUserFlag(flag) == 0 then\
                    trigger.action.setUserFlag(flag, true)\
                end\
            else\
                if toggle then\
                    trigger.action.setUserFlag(flag, false)\
                end\
            end\
        end\
\
        if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            mist.scheduleFunction(mist.flagFunc.group_alive, {{groupName = groupName, flag = flag, stopflag = stopflag, interval = interval, toggle = toggle}}, timer.getTime() + interval)\
        end\
\
    end\
\
    --- Sets a flag if group is dead.\
    -- @todo document\
    function mist.flagFunc.group_dead(vars)\
        local type_tbl = {\
            [{'group', 'groupname', 'gp', 'groupName'}] = 'string',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            interval = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.group_dead', type_tbl, vars)\
        assert(err, errmsg)\
\
        local groupName = vars.groupName or vars.group or vars.gp or vars.Groupname\
        local flag = vars.flag\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local interval = vars.interval or 1\
        local toggle = vars.toggle or nil\
\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            if (Group.getByName(groupName) and Group.getByName(groupName):isExist() == false) or (Group.getByName(groupName) and #Group.getByName(groupName):getUnits() < 1) or not Group.getByName(groupName) then\
                if trigger.misc.getUserFlag(flag) == 0 then\
                    trigger.action.setUserFlag(flag, true)\
                end\
            else\
                if toggle then\
                    trigger.action.setUserFlag(flag, false)\
                end\
            end\
        end\
\
        if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            mist.scheduleFunction(mist.flagFunc.group_dead, {{groupName = groupName, flag = flag, stopflag = stopflag, interval = interval, toggle = toggle}}, timer.getTime() + interval)\
        end\
    end\
\
    --- Sets a flag if less than given percent of group is alive.\
    -- @todo document\
    function mist.flagFunc.group_alive_less_than(vars)\
        local type_tbl = {\
            [{'group', 'groupname', 'gp', 'groupName'}] = 'string',\
            percent = 'number',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            interval = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.group_alive_less_than', type_tbl, vars)\
        assert(err, errmsg)\
\
        local groupName = vars.groupName or vars.group or vars.gp or vars.Groupname\
        local flag = vars.flag\
        local percent = vars.percent\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local interval = vars.interval or 1\
        local toggle = vars.toggle or nil\
\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            if Group.getByName(groupName) and Group.getByName(groupName):isExist() == true then\
                if Group.getByName(groupName):getSize()/Group.getByName(groupName):getInitialSize() < percent/100 then\
                    if trigger.misc.getUserFlag(flag) == 0 then\
                        trigger.action.setUserFlag(flag, true)\
                    end\
                else\
                    if toggle then\
                        trigger.action.setUserFlag(flag, false)\
                    end\
                end\
            else\
                if trigger.misc.getUserFlag(flag) == 0 then\
                    trigger.action.setUserFlag(flag, true)\
                end\
            end\
        end\
\
        if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            mist.scheduleFunction(mist.flagFunc.group_alive_less_than, {{groupName = groupName, flag = flag, stopflag = stopflag, interval = interval, toggle = toggle, percent = percent}}, timer.getTime() + interval)\
        end\
    end\
\
    --- Sets a flag if more than given percent of group is alive.\
    -- @todo document\
    function mist.flagFunc.group_alive_more_than(vars)\
        local type_tbl = {\
            [{'group', 'groupname', 'gp', 'groupName'}] = 'string',\
            percent = 'number',\
            flag = {'number', 'string'},\
            [{'stopflag', 'stopFlag'}] = {'number', 'string', 'nil'},\
            interval = {'number', 'nil'},\
            toggle = {'boolean', 'nil'},\
        }\
\
        local err, errmsg = mist.utils.typeCheck('mist.flagFunc.group_alive_more_than', type_tbl, vars)\
        assert(err, errmsg)\
\
        local groupName = vars.groupName or vars.group or vars.gp or vars.Groupname\
        local flag = vars.flag\
        local percent = vars.percent\
        local stopflag = vars.stopflag or vars.stopFlag or -1\
        local interval = vars.interval or 1\
        local toggle = vars.toggle or nil\
\
\
        if stopflag == -1 or (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            if Group.getByName(groupName) and Group.getByName(groupName):isExist() == true then\
                if Group.getByName(groupName):getSize()/Group.getByName(groupName):getInitialSize() > percent/100 then\
                    if trigger.misc.getUserFlag(flag) == 0 then\
                        trigger.action.setUserFlag(flag, true)\
                    end\
                else\
                    if toggle and trigger.misc.getUserFlag(flag) == 1 then\
                        trigger.action.setUserFlag(flag, false)\
                    end\
                end\
            else --- just in case\
                if toggle and trigger.misc.getUserFlag(flag) == 1 then\
                    trigger.action.setUserFlag(flag, false)\
                end\
            end\
        end\
\
        if (type(trigger.misc.getUserFlag(stopflag)) == 'number' and trigger.misc.getUserFlag(stopflag) == 0) or (type(trigger.misc.getUserFlag(stopflag)) == 'boolean' and trigger.misc.getUserFlag(stopflag) == false) then\
            mist.scheduleFunction(mist.flagFunc.group_alive_more_than, {{groupName = groupName, flag = flag, stopflag = stopflag, interval = interval, toggle = toggle, percent = percent}}, timer.getTime() + interval)\
        end\
    end\
\
    mist.flagFunc.mapobjsDeadPolygon = mist.flagFunc.mapobjs_dead_polygon\
    mist.flagFunc.mapobjsDeadZones = mist.flagFunc.Mapobjs_dead_zones\
    mist.flagFunc.unitsInZones = mist.flagFunc.units_in_zones\
    mist.flagFunc.unitsInMovingZones = mist.flagFunc.units_in_moving_zones\
    mist.flagFunc.unitsInPolygon = mist.flagFunc.units_in_polygon\
    mist.flagFunc.unitsLOS = mist.flagFunc.units_LOS\
    mist.flagFunc.groupAlive = mist.flagFunc.group_alive\
    mist.flagFunc.groupDead = mist.flagFunc.group_dead\
    mist.flagFunc.groupAliveMoreThan = mist.flagFunc.group_alive_more_than\
    mist.flagFunc.groupAliveLessThan = mist.flagFunc.group_alive_less_than\
\
end\
\
--- Message functions.\
-- Messaging system\
-- @section mist.msg\
do -- mist.msg scope\
    local messageList = {}\
    -- this defines the max refresh rate of the message box it honestly only needs to\
    -- go faster than this for precision timing stuff (which could be its own function)\
    local messageDisplayRate = 0.1\
    local messageID = 0\
    local displayActive = false\
    local displayFuncId = 0\
\
    local caSlots = false\
    local caMSGtoGroup = false\
\
    if env.mission.groundControl then -- just to be sure?\
        for index, value in pairs(env.mission.groundControl) do\
            if type(value) == 'table' then\
                for roleName, roleVal in pairs(value) do\
                    for rIndex, rVal in pairs(roleVal) do\
                        if rIndex == 'red' or rIndex == 'blue' then\
                            if env.mission.groundControl[index][roleName][rIndex] > 0 then\
                                caSlots = true\
                                break\
                            end\
                        end\
                    end\
                end\
            elseif type(value) == 'boolean' and value == true then\
                caSlots = true\
                break\
            end\
        end\
    end\
\
    local function mistdisplayV5()\
        --[[thoughts to improve upon\
        event handler based activeClients table.\
        display messages only when there is an update\
        possibly co-routine it.\
        ]]\
    end\
\
    local function mistdisplayV4()\
        local activeClients = {}\
\
        for clientId, clientData in pairs(mist.DBs.humansById) do\
            if Unit.getByName(clientData.unitName) and Unit.getByName(clientData.unitName):isExist() == true then\
                activeClients[clientData.groupId] = clientData.groupName\
            end\
        end\
\
        --[[if caSlots == true and caMSGtoGroup == true then\
\
        end]]\
\
\
        if #messageList > 0 then\
            if displayActive == false then\
                displayActive = true\
            end\
            --mist.debug.writeData(mist.utils.serialize,{'msg', messageList}, 'messageList.lua')\
            local msgTableText = {}\
            local msgTableSound = {}\
\
            for messageId, messageData in pairs(messageList) do\
                if messageData.displayedFor > messageData.displayTime then\
                    messageData:remove()    -- now using the remove/destroy function.\
                else\
                    if messageData.displayedFor then\
                        messageData.displayedFor = messageData.displayedFor + messageDisplayRate\
                    end\
                    local nextSound = 1000\
                    local soundIndex = 0\
\
                    if messageData.multSound and #messageData.multSound > 0 then\
                        for index, sData in pairs(messageData.multSound) do\
                            if sData.time <= messageData.displayedFor and sData.played == false and sData.time < nextSound then -- find index of the next sound to be played\
                                nextSound = sData.time\
                                soundIndex = index\
                            end\
                        end\
                        if soundIndex ~= 0 then\
                            messageData.multSound[soundIndex].played = true\
                        end\
                    end\
\
                    for recIndex, recData in pairs(messageData.msgFor) do -- iterate recipiants\
                        if recData == 'RED' or recData == 'BLUE' or activeClients[recData] then -- rec exists\
                            if messageData.text then -- text\
                                if not msgTableText[recData] then -- create table entry for text\
                                    msgTableText[recData] = {}\
                                    msgTableText[recData].text = {}\
                                    if recData == 'RED' or recData == 'BLUE' then\
                                        msgTableText[recData].text[1] = '-------Combined Arms Message-------- \\n'\
                                    end\
                                    msgTableText[recData].text[#msgTableText[recData].text + 1] = messageData.text\
                                    msgTableText[recData].displayTime = messageData.displayTime - messageData.displayedFor\
                                else -- add to table entry and adjust display time if needed\
                                    if recData == 'RED' or recData == 'BLUE' then\
                                        msgTableText[recData].text[#msgTableText[recData].text + 1] = '\\n ---------------- Combined Arms Message: \\n'\
                                    else\
                                        msgTableText[recData].text[#msgTableText[recData].text + 1] = '\\n ---------------- \\n'\
                                    end\
                                    msgTableText[recData].text[#msgTableText[recData].text + 1] = messageData.text\
                                    if msgTableText[recData].displayTime < messageData.displayTime - messageData.displayedFor then\
                                        msgTableText[recData].displayTime = messageData.displayTime - messageData.displayedFor\
                                    else\
                                        msgTableText[recData].displayTime = 1\
                                    end\
                                end\
                            end\
                            if soundIndex ~= 0 then\
                                msgTableSound[recData] = messageData.multSound[soundIndex].file\
                            end\
                        end\
                    end\
\
\
                end\
            end\
            ------- new display\
\
            if caSlots == true and caMSGtoGroup == false then\
                if msgTableText.RED then\
                    trigger.action.outTextForCoalition(coalition.side.RED, table.concat(msgTableText.RED.text), msgTableText.RED.displayTime, true)\
\
                end\
                if msgTableText.BLUE then\
                    trigger.action.outTextForCoalition(coalition.side.BLUE, table.concat(msgTableText.BLUE.text), msgTableText.BLUE.displayTime, true)\
                end\
            end\
\
            for index, msgData in pairs(msgTableText) do\
                if type(index) == 'number' then -- its a groupNumber\
                    trigger.action.outTextForGroup(index, table.concat(msgData.text), msgData.displayTime, true)\
                end\
            end\
            --- new audio\
            if msgTableSound.RED then\
                trigger.action.outSoundForCoalition(coalition.side.RED, msgTableSound.RED)\
            end\
            if msgTableSound.BLUE then\
                trigger.action.outSoundForCoalition(coalition.side.BLUE, msgTableSound.BLUE)\
            end\
\
\
            for index, file in pairs(msgTableSound) do\
                if type(index) == 'number' then -- its a groupNumber\
                    trigger.action.outSoundForGroup(index, file)\
                end\
            end\
        else\
            mist.removeFunction(displayFuncId)\
            displayActive = false\
        end\
\
    end\
\
    local typeBase = {\
        ['Mi-8MT'] = {'Mi-8MTV2', 'Mi-8MTV', 'Mi-8'},\
        ['MiG-21Bis'] = {'Mig-21'},\
        ['MiG-15bis'] = {'Mig-15'},\
        ['FW-190D9'] = {'FW-190'},\
        ['Bf-109K-4'] = {'Bf-109'},\
    }\
\
    --[[function mist.setCAGroupMSG(val)\
    if type(val) == 'boolean' then\
        caMSGtoGroup = val\
        return true\
    end\
    return false\
end]]\
\
    mist.message = {\
\
        add = function(vars)\
            local function msgSpamFilter(recList, spamBlockOn)\
                for id, name in pairs(recList) do\
                    if name == spamBlockOn then\
                        --    log:info('already on recList')\
                        return recList\
                    end\
                end\
                --log:info('add to recList')\
                table.insert(recList, spamBlockOn)\
                return recList\
            end\
\
            --[[\
            local vars = {}\
            vars.text = 'Hello World'\
            vars.displayTime = 20\
            vars.msgFor = {coa = {'red'}, countries = {'Ukraine', 'Georgia'}, unitTypes = {'A-10C'}}\
            mist.message.add(vars)\
\
            Displays the message for all red coalition players. Players belonging to Ukraine and Georgia, and all A-10Cs on the map\
\
            ]]\
\
\
            local new = {}\
            new.text = vars.text -- The actual message\
            new.displayTime = vars.displayTime -- How long will the message appear for\
            new.displayedFor = 0 -- how long the message has been displayed so far\
            new.name = vars.name     -- ID to overwrite the older message (if it exists) Basically it replaces a message that is displayed with new text.\
            new.addedAt = timer.getTime()\
            new.update = true\
\
            if vars.multSound and vars.multSound[1] then\
                new.multSound = vars.multSound\
            else\
                new.multSound = {}\
            end\
\
            if vars.sound or vars.fileName then -- converts old sound file system into new multSound format\
                local sound = vars.sound\
                if vars.fileName then\
                    sound = vars.fileName\
                end\
                new.multSound[#new.multSound+1] = {time = 0.1, file = sound}\
            end\
\
            if #new.multSound > 0 then\
                for i, data in pairs(new.multSound) do\
                    data.played = false\
                end\
            end\
\
            local newMsgFor = {} -- list of all groups message displays for\
            for forIndex, forData in pairs(vars.msgFor) do\
                for list, listData in pairs(forData) do\
                    for clientId, clientData in pairs(mist.DBs.humansById) do\
                        forIndex = string.lower(forIndex)\
                        if type(listData) == 'string' then\
                            listData = string.lower(listData)\
                        end\
                        if (forIndex == 'coa' and (listData == string.lower(clientData.coalition) or listData == 'all')) or (forIndex == 'countries' and string.lower(clientData.country) == listData) or (forIndex == 'units' and string.lower(clientData.unitName) == listData) then --\
                            newMsgFor = msgSpamFilter(newMsgFor, clientData.groupId) -- so units dont get the same message twice if complex rules are given\
                            --table.insert(newMsgFor, clientId)\
                        elseif forIndex == 'unittypes' then\
                            for typeId, typeData in pairs(listData) do\
                                local found = false\
                                for clientDataEntry, clientDataVal in pairs(clientData) do\
                                    if type(clientDataVal) == 'string' then\
                                        if mist.matchString(list, clientDataVal) == true or list == 'all' then\
                                            local sString = typeData\
                                            for rName, pTbl in pairs(typeBase) do -- just a quick check to see if the user may have meant something and got the specific type of the unit wrong\
                                                for pIndex, pName in pairs(pTbl) do\
                                                    if mist.stringMatch(sString, pName) then\
                                                        sString = rName\
                                                    end\
                                                end\
                                            end\
                                            if sString == clientData.type then\
                                                found = true\
                                                newMsgFor = msgSpamFilter(newMsgFor, clientData.groupId) -- sends info oto other function to see if client is already recieving the current message.\
                                                --table.insert(newMsgFor, clientId)\
                                            end\
                                        end\
                                    end\
                                    if found == true then    -- shouldn't this be elsewhere too?\
                                        break\
                                    end\
                                end\
                            end\
\
                        end\
                    end\
                    for coaData, coaId in pairs(coalition.side) do\
                        if string.lower(forIndex) == 'coa' or string.lower(forIndex) == 'ca' then\
                            if listData == string.lower(coaData) or listData == 'all' then\
                                newMsgFor = msgSpamFilter(newMsgFor, coaData)\
                            end\
                        end\
                    end\
                end\
            end\
\
            if #newMsgFor > 0 then\
                new.msgFor = newMsgFor -- I swear its not confusing\
\
            else\
                return false\
            end\
\
\
            if vars.name and type(vars.name) == 'string' then\
                for i = 1, #messageList do\
                    if messageList[i].name then\
                        if messageList[i].name == vars.name then\
                            --log:info('updateMessage')\
                            messageList[i].displayedFor = 0\
                            messageList[i].addedAt = timer.getTime()\
                            messageList[i].sound = new.sound\
                            messageList[i].text = new.text\
                            messageList[i].msgFor = new.msgFor\
                            messageList[i].multSound = new.multSound\
                            messageList[i].update = true\
                            return messageList[i].messageID\
                        end\
                    end\
                end\
            end\
\
            messageID = messageID + 1\
            new.messageID = messageID\
\
            --mist.debug.writeData(mist.utils.serialize,{'msg', new}, 'newMsg.lua')\
\
\
            messageList[#messageList + 1] = new\
\
            local mt = { __index =    mist.message}\
            setmetatable(new, mt)\
\
            if displayActive == false then\
                displayActive = true\
                displayFuncId = mist.scheduleFunction(mistdisplayV4, {}, timer.getTime() + messageDisplayRate, messageDisplayRate)\
            end\
\
            return messageID\
\
        end,\
\
        remove = function(self)    -- Now a self variable; the former functionality taken up by mist.message.removeById.\
            for i, msgData in pairs(messageList) do\
                if messageList[i] == self then\
                    table.remove(messageList, i)\
                    return true --removal successful\
                end\
            end\
            return false -- removal not successful this script fails at life!\
        end,\
\
        removeById = function(id)    -- This function is NOT passed a self variable; it is the remove by id function.\
            for i, msgData in pairs(messageList) do\
                if messageList[i].messageID == id then\
                    table.remove(messageList, i)\
                    return true --removal successful\
                end\
            end\
            return false -- removal not successful this script fails at life!\
        end,\
    }\
\
    --[[ vars for mist.msgMGRS\
vars.units - table of unit names (NOT unitNameTable- maybe this should change).\
vars.acc - integer between 0 and 5, inclusive\
vars.text - text in the message\
vars.displayTime - self explanatory\
vars.msgFor - scope\
]]\
    function mist.msgMGRS(vars)\
        local units = vars.units\
        local acc = vars.acc\
        local text = vars.text\
        local displayTime = vars.displayTime\
        local msgFor = vars.msgFor\
\
        local s = mist.getMGRSString{units = units, acc = acc}\
        local newText\
        if text then\
            if string.find(text, '%%s') then    -- look for %s\
                newText = string.format(text, s)    -- insert the coordinates into the message\
            else\
                -- just append to the end.\
                newText = text .. s\
            end\
        else\
            newText = s\
        end\
        mist.message.add{\
            text = newText,\
            displayTime = displayTime,\
            msgFor = msgFor\
        }\
    end\
\
    --[[ vars for mist.msgLL\
vars.units - table of unit names (NOT unitNameTable- maybe this should change) (Yes).\
vars.acc - integer, number of numbers after decimal place\
vars.DMS - if true, output in degrees, minutes, seconds.    Otherwise, output in degrees, minutes.\
vars.text - text in the message\
vars.displayTime - self explanatory\
vars.msgFor - scope\
]]\
    function mist.msgLL(vars)\
        local units = vars.units    -- technically, I don't really need to do this, but it helps readability.\
        local acc = vars.acc\
        local DMS = vars.DMS\
        local text = vars.text\
        local displayTime = vars.displayTime\
        local msgFor = vars.msgFor\
\
        local s = mist.getLLString{units = units, acc = acc, DMS = DMS}\
        local newText\
        if text then\
            if string.find(text, '%%s') then    -- look for %s\
                newText = string.format(text, s)    -- insert the coordinates into the message\
            else\
                -- just append to the end.\
                newText = text .. s\
            end\
        else\
            newText = s\
        end\
\
        mist.message.add{\
            text = newText,\
            displayTime = displayTime,\
            msgFor = msgFor\
        }\
\
    end\
\
    --[[\
vars.units- table of unit names (NOT unitNameTable- maybe this should change).\
vars.ref -    vec3 ref point, maybe overload for vec2 as well?\
vars.alt - boolean, if used, includes altitude in string\
vars.metric - boolean, gives distance in km instead of NM.\
vars.text - text of the message\
vars.displayTime\
vars.msgFor - scope\
]]\
    function mist.msgBR(vars)\
        local units = vars.units    -- technically, I don't really need to do this, but it helps readability.\
        local ref = vars.ref -- vec2/vec3 will be handled in mist.getBRString\
        local alt = vars.alt\
        local metric = vars.metric\
        local text = vars.text\
        local displayTime = vars.displayTime\
        local msgFor = vars.msgFor\
\
        local s = mist.getBRString{units = units, ref = ref, alt = alt, metric = metric}\
        local newText\
        if text then\
            if string.find(text, '%%s') then    -- look for %s\
                newText = string.format(text, s)    -- insert the coordinates into the message\
            else\
                -- just append to the end.\
                newText = text .. s\
            end\
        else\
            newText = s\
        end\
\
        mist.message.add{\
            text = newText,\
            displayTime = displayTime,\
            msgFor = msgFor\
        }\
\
    end\
\
    -- basically, just sub-types of mist.msgBR... saves folks the work of getting the ref point.\
    --[[\
vars.units- table of unit names (NOT unitNameTable- maybe this should change).\
vars.ref -    string red, blue\
vars.alt - boolean, if used, includes altitude in string\
vars.metric - boolean, gives distance in km instead of NM.\
vars.text - text of the message\
vars.displayTime\
vars.msgFor - scope\
]]\
    function mist.msgBullseye(vars)\
        if string.lower(vars.ref) == 'red' then\
            vars.ref = mist.DBs.missionData.bullseye.red\
            mist.msgBR(vars)\
        elseif string.lower(vars.ref) == 'blue' then\
            vars.ref = mist.DBs.missionData.bullseye.blue\
            mist.msgBR(vars)\
        end\
    end\
\
    --[[\
vars.units- table of unit names (NOT unitNameTable- maybe this should change).\
vars.ref -    unit name of reference point\
vars.alt - boolean, if used, includes altitude in string\
vars.metric - boolean, gives distance in km instead of NM.\
vars.text - text of the message\
vars.displayTime\
vars.msgFor - scope\
]]\
    function mist.msgBRA(vars)\
        if Unit.getByName(vars.ref) and Unit.getByName(vars.ref):isExist() == true then\
            vars.ref = Unit.getByName(vars.ref):getPosition().p\
            if not vars.alt then\
                vars.alt = true\
            end\
            mist.msgBR(vars)\
        end\
    end\
\
    --[[ vars for mist.msgLeadingMGRS:\
vars.units - table of unit names\
vars.heading - direction\
vars.radius - number\
vars.headingDegrees - boolean, switches heading to degrees (optional)\
vars.acc - number, 0 to 5.\
vars.text - text of the message\
vars.displayTime\
vars.msgFor - scope\
]]\
    function mist.msgLeadingMGRS(vars)\
        local units = vars.units    -- technically, I don't really need to do this, but it helps readability.\
        local heading = vars.heading\
        local radius = vars.radius\
        local headingDegrees = vars.headingDegrees\
        local acc = vars.acc\
        local text = vars.text\
        local displayTime = vars.displayTime\
        local msgFor = vars.msgFor\
\
        local s = mist.getLeadingMGRSString{units = units, heading = heading, radius = radius, headingDegrees = headingDegrees, acc = acc}\
        local newText\
        if text then\
            if string.find(text, '%%s') then    -- look for %s\
                newText = string.format(text, s)    -- insert the coordinates into the message\
            else\
                -- just append to the end.\
                newText = text .. s\
            end\
        else\
            newText = s\
        end\
\
        mist.message.add{\
            text = newText,\
            displayTime = displayTime,\
            msgFor = msgFor\
        }\
\
\
    end\
\
    --[[ vars for mist.msgLeadingLL:\
vars.units - table of unit names\
vars.heading - direction, number\
vars.radius - number\
vars.headingDegrees - boolean, switches heading to degrees (optional)\
vars.acc - number of digits after decimal point (can be negative)\
vars.DMS -    boolean, true if you want DMS. (optional)\
vars.text - text of the message\
vars.displayTime\
vars.msgFor - scope\
]]\
    function mist.msgLeadingLL(vars)\
        local units = vars.units    -- technically, I don't really need to do this, but it helps readability.\
        local heading = vars.heading\
        local radius = vars.radius\
        local headingDegrees = vars.headingDegrees\
        local acc = vars.acc\
        local DMS = vars.DMS\
        local text = vars.text\
        local displayTime = vars.displayTime\
        local msgFor = vars.msgFor\
\
        local s = mist.getLeadingLLString{units = units, heading = heading, radius = radius, headingDegrees = headingDegrees, acc = acc, DMS = DMS}\
        local newText\
\
        if text then\
            if string.find(text, '%%s') then    -- look for %s\
                newText = string.format(text, s)    -- insert the coordinates into the message\
            else\
                -- just append to the end.\
                newText = text .. s\
            end\
        else\
            newText = s\
        end\
\
        mist.message.add{\
            text = newText,\
            displayTime = displayTime,\
            msgFor = msgFor\
        }\
\
    end\
\
    --[[\
vars.units - table of unit names\
vars.heading - direction, number\
vars.radius - number\
vars.headingDegrees - boolean, switches heading to degrees    (optional)\
vars.metric - boolean, if true, use km instead of NM. (optional)\
vars.alt - boolean, if true, include altitude. (optional)\
vars.ref - vec3/vec2 reference point.\
vars.text - text of the message\
vars.displayTime\
vars.msgFor - scope\
]]\
    function mist.msgLeadingBR(vars)\
        local units = vars.units    -- technically, I don't really need to do this, but it helps readability.\
        local heading = vars.heading\
        local radius = vars.radius\
        local headingDegrees = vars.headingDegrees\
        local metric = vars.metric\
        local alt = vars.alt\
        local ref = vars.ref -- vec2/vec3 will be handled in mist.getBRString\
        local text = vars.text\
        local displayTime = vars.displayTime\
        local msgFor = vars.msgFor\
\
        local s = mist.getLeadingBRString{units = units, heading = heading, radius = radius, headingDegrees = headingDegrees, metric = metric, alt = alt, ref = ref}\
        local newText\
\
        if text then\
            if string.find(text, '%%s') then    -- look for %s\
                newText = string.format(text, s)    -- insert the coordinates into the message\
            else\
                -- just append to the end.\
                newText = text .. s\
            end\
        else\
            newText = s\
        end\
\
        mist.message.add{\
            text = newText,\
            displayTime = displayTime,\
            msgFor = msgFor\
        }\
    end\
end\
\
--- Demo functions.\
-- @section mist.demos\
do -- mist.demos scope\
    mist.demos = {}\
\
    function mist.demos.printFlightData(unit)\
        if unit:isExist() then\
            local function printData(unit, prevVel, prevE, prevTime)\
                local angles = mist.getAttitude(unit)\
                if angles then\
                    local Heading = angles.Heading\
                    local Pitch = angles.Pitch\
                    local Roll = angles.Roll\
                    local Yaw = angles.Yaw\
                    local AoA = angles.AoA\
                    local ClimbAngle = angles.ClimbAngle\
\
                    if not Heading then\
                        Heading = 'NA'\
                    else\
                        Heading = string.format('%12.2f', mist.utils.toDegree(Heading))\
                    end\
\
                    if not Pitch then\
                        Pitch = 'NA'\
                    else\
                        Pitch = string.format('%12.2f', mist.utils.toDegree(Pitch))\
                    end\
\
                    if not Roll then\
                        Roll = 'NA'\
                    else\
                        Roll = string.format('%12.2f', mist.utils.toDegree(Roll))\
                    end\
\
                    local AoAplusYaw = 'NA'\
                    if AoA and Yaw then\
                        AoAplusYaw = string.format('%12.2f', mist.utils.toDegree((AoA^2 + Yaw^2)^0.5))\
                    end\
\
                    if not Yaw then\
                        Yaw = 'NA'\
                    else\
                        Yaw = string.format('%12.2f', mist.utils.toDegree(Yaw))\
                    end\
\
                    if not AoA then\
                        AoA = 'NA'\
                    else\
                        AoA = string.format('%12.2f', mist.utils.toDegree(AoA))\
                    end\
\
                    if not ClimbAngle then\
                        ClimbAngle = 'NA'\
                    else\
                        ClimbAngle = string.format('%12.2f', mist.utils.toDegree(ClimbAngle))\
                    end\
                    local unitPos = unit:getPosition()\
                    local unitVel = unit:getVelocity()\
                    local curTime = timer.getTime()\
                    local absVel = string.format('%12.2f', mist.vec.mag(unitVel))\
\
\
                    local unitAcc = 'NA'\
                    local Gs = 'NA'\
                    local axialGs = 'NA'\
                    local transGs = 'NA'\
                    if prevVel and prevTime then\
                        local xAcc = (unitVel.x - prevVel.x)/(curTime - prevTime)\
                        local yAcc = (unitVel.y - prevVel.y)/(curTime - prevTime)\
                        local zAcc = (unitVel.z - prevVel.z)/(curTime - prevTime)\
\
                        unitAcc = string.format('%12.2f', mist.vec.mag({x = xAcc, y = yAcc, z = zAcc}))\
                        Gs = string.format('%12.2f', mist.vec.mag({x = xAcc, y = yAcc + 9.81, z = zAcc})/9.81)\
                        axialGs = string.format('%12.2f', mist.vec.dp({x = xAcc, y = yAcc + 9.81, z = zAcc}, unitPos.x)/9.81)\
                        transGs = string.format('%12.2f', mist.vec.mag(mist.vec.cp({x = xAcc, y = yAcc + 9.81, z = zAcc}, unitPos.x))/9.81)\
                    end\
\
                    local E = 0.5*mist.vec.mag(unitVel)^2 + 9.81*unitPos.p.y\
\
                    local energy = string.format('%12.2e', E)\
\
                    local dEdt = 'NA'\
                    if prevE and prevTime then\
                        dEdt = string.format('%12.2e', (E - prevE)/(curTime - prevTime))\
                    end\
\
                    trigger.action.outText(string.format('%-25s', 'Heading: ') .. Heading .. ' degrees\\n' .. string.format('%-25s', 'Roll: ') .. Roll .. ' degrees\\n' .. string.format('%-25s', 'Pitch: ') .. Pitch\
                            .. ' degrees\\n' .. string.format('%-25s', 'Yaw: ') .. Yaw .. ' degrees\\n' .. string.format('%-25s', 'AoA: ') .. AoA .. ' degrees\\n' .. string.format('%-25s', 'AoA plus Yaw: ') .. AoAplusYaw .. ' degrees\\n' .. string.format('%-25s', 'Climb Angle: ') ..\
                            ClimbAngle .. ' degrees\\n' .. string.format('%-25s', 'Absolute Velocity: ') .. absVel .. ' m/s\\n' .. string.format('%-25s', 'Absolute Acceleration: ') .. unitAcc ..' m/s^2\\n'\
                            .. string.format('%-25s', 'Axial G loading: ') .. axialGs .. ' g\\n' .. string.format('%-25s', 'Transverse G loading: ') .. transGs .. ' g\\n' .. string.format('%-25s', 'Absolute G loading: ') .. Gs .. ' g\\n' .. string.format('%-25s', 'Energy: ') .. energy .. ' J/kg\\n' .. string.format('%-25s', 'dE/dt: ') .. dEdt ..' J/(kg*s)', 1)\
                    return unitVel, E, curTime\
                end\
            end\
\
            local function frameFinder(unit, prevVel, prevE, prevTime)\
                if unit:isExist() then\
                    local currVel = unit:getVelocity()\
                    if prevVel and (prevVel.x ~= currVel.x or prevVel.y ~= currVel.y or prevVel.z ~= currVel.z) or (prevTime and (timer.getTime() - prevTime) > 0.25) then\
                        prevVel, prevE, prevTime = printData(unit, prevVel, prevE, prevTime)\
                    end\
                    mist.scheduleFunction(frameFinder, {unit, prevVel, prevE, prevTime}, timer.getTime() + 0.005)    -- it can't go this fast, limited to the 100 times a sec check right now.\
                end\
            end\
\
\
            local curVel = unit:getVelocity()\
            local curTime = timer.getTime()\
            local curE = 0.5*mist.vec.mag(curVel)^2 + 9.81*unit:getPosition().p.y\
            frameFinder(unit, curVel, curE, curTime)\
\
        end\
\
    end\
\
end\
\
--- Time conversion functions.\
-- @section mist.time\
do -- mist.time scope\
    mist.time = {}\
    -- returns a string for specified military time\
    -- theTime is optional\
    -- if present current time in mil time is returned\
    -- if number or table the time is converted into mil tim\
    function mist.time.convertToSec(timeTable)\
\
        timeInSec = 0\
        if timeTable and type(timeTable) == 'number' then\
            timeInSec = timeTable\
        elseif timeTable and type(timeTable) == 'table' and (timeTable.d or timeTable.h or timeTable.m or timeTable.s) then\
            if timeTable.d and type(timeTable.d) == 'number' then\
                timeInSec = timeInSec + (timeTable.d*86400)\
            end\
            if timeTable.h and type(timeTable.h) == 'number' then\
                timeInSec = timeInSec + (timeTable.h*3600)\
            end\
            if timeTable.m and type(timeTable.m) == 'number' then\
                timeInSec = timeInSec + (timeTable.m*60)\
            end\
            if timeTable.s and type(timeTable.s) == 'number' then\
                timeInSec = timeInSec + timeTable.s\
            end\
\
        end\
        return timeInSec\
    end\
\
    function mist.time.getDHMS(timeInSec)\
        if timeInSec and type(timeInSec) == 'number' then\
            local tbl = {d = 0, h = 0, m = 0, s = 0}\
            if timeInSec > 86400 then\
                while timeInSec > 86400 do\
                    tbl.d = tbl.d + 1\
                    timeInSec = timeInSec - 86400\
                end\
            end\
            if timeInSec > 3600 then\
                while timeInSec > 3600 do\
                    tbl.h = tbl.h + 1\
                    timeInSec = timeInSec - 3600\
                end\
            end\
            if timeInSec > 60 then\
                while timeInSec > 60 do\
                    tbl.m = tbl.m + 1\
                    timeInSec = timeInSec - 60\
                end\
            end\
            tbl.s = timeInSec\
            return tbl\
        else\
            log:error(\"Didn't recieve number\")\
            return\
        end\
    end\
\
    function mist.getMilString(theTime)\
        local timeInSec = 0\
        if theTime then\
            timeInSec = mist.time.convertToSec(theTime)\
        else\
            timeInSec = mist.utils.round(timer.getAbsTime(), 0)\
        end\
\
        local DHMS = mist.time.getDHMS(timeInSec)\
\
        return tostring(string.format('%02d', DHMS.h) .. string.format('%02d',DHMS.m))\
    end\
\
    function mist.getClockString(theTime, hour)\
        local timeInSec = 0\
        if theTime then\
            timeInSec = mist.time.convertToSec(theTime)\
        else\
            timeInSec = mist.utils.round(timer.getAbsTime(), 0)\
        end\
        local DHMS = mist.time.getDHMS(timeInSec)\
        if hour then\
            if DHMS.h > 12 then\
                DHMS.h = DHMS.h - 12\
                return tostring(string.format('%02d', DHMS.h) .. ':' .. string.format('%02d',DHMS.m)    .. ':' .. string.format('%02d',DHMS.s) .. ' PM')\
            else\
                return tostring(string.format('%02d', DHMS.h) .. ':' .. string.format('%02d',DHMS.m)    .. ':' .. string.format('%02d',DHMS.s) .. ' AM')\
            end\
        else\
            return tostring(string.format('%02d', DHMS.h) .. ':' .. string.format('%02d',DHMS.m)    .. ':' .. string.format('%02d',DHMS.s))\
        end\
    end\
\
    -- returns the date in string format\
    -- both variables optional\
    -- first val returns with the month as a string\
    -- 2nd val defins if it should be written the American way or the wrong way.\
    function mist.time.getDate(convert)\
        local cal = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} -- \
        local date = {}\
        \
        if not env.mission.date then -- Not likely to happen. Resaving mission auto updates this to remove it.\
            date.d = 0\
            date.m = 6\
            date.y = 2011\
        else \
            date.d = env.mission.date.Day\
            date.m = env.mission.date.Month\
            date.y = env.mission.date.Year\
        end\
        local start = 86400\
        local timeInSec = mist.utils.round(timer.getAbsTime())\
        if convert and type(convert) == 'number' then\
            timeInSec = convert\
        end\
        if timeInSec > 86400 then\
            while start < timeInSec do\
                if date.d >= cal[date.m] then\
                    if date.m == 2 and date.d == 28 then -- HOLY COW we can edit years now. Gotta re-add this!\
                        if date.y % 4 == 0 and date.y % 100 == 0 and date.y % 400 ~= 0 or date.y % 4 > 0 then\
                            date.m = date.m + 1\
                            date.d = 0\
                        end\
                        --date.d = 29\
                    else\
                        date.m = date.m + 1\
                        date.d = 0\
                    end\
                end\
                if date.m == 13 then\
                    date.m = 1\
                    date.y = date.y + 1\
                end\
                date.d = date.d + 1\
                start = start + 86400\
                \
            end\
        end\
        return date\
    end\
\
    function mist.time.relativeToStart(time)\
        if type(time) == 'number' then\
            return time - timer.getTime0()\
        end\
    end\
\
    function mist.getDateString(rtnType, murica, oTime) -- returns date based on time\
        local word = {'January', 'Feburary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' } -- 'etc\
        local curTime = 0\
        if oTime then\
            curTime = oTime\
        else\
            curTime = mist.utils.round(timer.getAbsTime())\
        end\
        local tbl = mist.time.getDate(curTime)\
\
        if rtnType then\
            if murica then\
                return tostring(word[tbl.m] .. ' ' .. tbl.d .. ' ' .. tbl.y)\
            else\
                return tostring(tbl.d .. ' ' .. word[tbl.m] .. ' ' .. tbl.y)\
            end\
        else\
            if murica then\
                return tostring(tbl.m .. '.' .. tbl.d .. '.' .. tbl.y)\
            else\
                return tostring(tbl.d .. '.' .. tbl.m .. '.' .. tbl.y)\
            end\
        end\
    end\
    --WIP\
    function mist.time.milToGame(milString, rtnType) --converts a military time. By default returns the abosolute time that event would occur. With optional value it returns how many seconds from time of call till that time.\
        local curTime = mist.utils.round(timer.getAbsTime())\
        local milTimeInSec = 0\
\
        if milString and type(milString) == 'string' and string.len(milString) >= 4 then\
            local hr = tonumber(string.sub(milString, 1, 2))\
            local mi = tonumber(string.sub(milString, 3))\
            milTimeInSec = milTimeInSec + (mi*60) + (hr*3600)\
        elseif milString and type(milString) == 'table' and (milString.d or milString.h or milString.m or milString.s) then\
            milTimeInSec = mist.time.convertToSec(milString)\
        end\
\
        local startTime = timer.getTime0()\
        local daysOffset = 0\
        if startTime > 86400 then\
            daysOffset = mist.utils.round(startTime/86400)\
            if daysOffset > 0 then\
                milTimeInSec = milTimeInSec *daysOffset\
            end\
        end\
\
        if curTime > milTimeInSec then\
            milTimeInSec = milTimeInSec + 86400\
        end\
        if rtnType then\
            milTimeInSec = milTimeInSec - startTime\
        end\
        return milTimeInSec\
    end\
\
\
end\
\
--- Group task functions.\
-- @section tasks\
do -- group tasks scope\
    mist.ground = {}\
    mist.fixedWing = {}\
    mist.heli = {}\
    mist.air = {}\
    mist.air.fixedWing = {}\
    mist.air.heli = {}\
\
    --- Tasks group to follow a route.\
    -- This sets the mission task for the given group.\
    -- Any wrapped actions inside the path (like enroute\
    -- tasks) will be executed.\
    -- @tparam Group group group to task.\
    -- @tparam table path containing\
    -- points defining a route.\
    function mist.goRoute(group, path)\
        local misTask = {\
            id = 'Mission',\
            params = {\
                route = {\
                    points = mist.utils.deepCopy(path),\
                },\
            },\
        }\
        if type(group) == 'string' then\
            group = Group.getByName(group)\
        end\
        if group then\
            local groupCon = group:getController()\
            if groupCon then\
                groupCon:setTask(misTask)\
                return true\
            end\
        end\
        return false\
    end\
\
    -- same as getGroupPoints but returns speed and formation type along with vec2 of point}\
    function mist.getGroupRoute(groupIdent, task)\
        -- refactor to search by groupId and allow groupId and groupName as inputs\
        local gpId = groupIdent\
            if mist.DBs.MEgroupsByName[groupIdent] then\
                gpId = mist.DBs.MEgroupsByName[groupIdent].groupId\
            else\
                log:error('$1 not found in mist.DBs.MEgroupsByName', groupIdent)\
            end\
\
        for coa_name, coa_data in pairs(env.mission.coalition) do\
            if (coa_name == 'red' or coa_name == 'blue') and type(coa_data) == 'table' then\
                if coa_data.country then --there is a country table\
                    for cntry_id, cntry_data in pairs(coa_data.country) do\
                        for obj_type_name, obj_type_data in pairs(cntry_data) do\
                            if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" then    -- only these types have points\
                                if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then    --there's a group!\
                                    for group_num, group_data in pairs(obj_type_data.group) do\
                                        if group_data and group_data.groupId == gpId    then -- this is the group we are looking for\
                                            if group_data.route and group_data.route.points and #group_data.route.points > 0 then\
                                                local points = {}\
\
                                                for point_num, point in pairs(group_data.route.points) do\
                                                    local routeData = {}\
                                                    if not point.point then\
                                                        routeData.x = point.x\
                                                        routeData.y = point.y\
                                                    else\
                                                        routeData.point = point.point    --it's possible that the ME could move to the point = Vec2 notation.\
                                                    end\
                                                    routeData.form = point.action\
                                                    routeData.speed = point.speed\
                                                    routeData.alt = point.alt\
                                                    routeData.alt_type = point.alt_type\
                                                    routeData.airdromeId = point.airdromeId\
                                                    routeData.helipadId = point.helipadId\
                                                    routeData.type = point.type\
                                                    routeData.action = point.action\
                                                    if task then\
                                                        routeData.task = point.task\
                                                    end\
                                                    points[point_num] = routeData\
                                                end\
\
                                                return points\
                                            end\
                                            log:error('Group route not defined in mission editor for groupId: $1', gpId)\
                                            return\
                                        end    --if group_data and group_data.name and group_data.name == 'groupname'\
                                    end --for group_num, group_data in pairs(obj_type_data.group) do\
                                end --if ((type(obj_type_data) == 'table') and obj_type_data.group and (type(obj_type_data.group) == 'table') and (#obj_type_data.group > 0)) then\
                            end --if obj_type_name == \"helicopter\" or obj_type_name == \"ship\" or obj_type_name == \"plane\" or obj_type_name == \"vehicle\" or obj_type_name == \"static\" then\
                        end --for obj_type_name, obj_type_data in pairs(cntry_data) do\
                    end --for cntry_id, cntry_data in pairs(coa_data.country) do\
                end --if coa_data.country then --there is a country table\
            end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then\
        end --for coa_name, coa_data in pairs(mission.coalition) do\
    end\
\
    -- function mist.ground.buildPath() end -- ????\
\
    function mist.ground.patrolRoute(vars)\
        log:info('patrol')\
        local tempRoute = {}\
        local useRoute = {}\
        local gpData = vars.gpData\
        if type(gpData) == 'string' then\
            gpData = Group.getByName(gpData)\
        end\
\
        local useGroupRoute\
        if not vars.useGroupRoute then\
            useGroupRoute = vars.gpData\
        else\
            useGroupRoute = vars.useGroupRoute\
        end\
        local routeProvided = false\
        if not vars.route then\
            if useGroupRoute then\
                tempRoute = mist.getGroupRoute(useGroupRoute)\
            end\
        else\
            useRoute = vars.route\
            local posStart = mist.getLeadPos(gpData)\
            useRoute[1] = mist.ground.buildWP(posStart, useRoute[1].action, useRoute[1].speed)\
            routeProvided = true\
        end\
\
\
        local overRideSpeed = vars.speed or 'default'\
        local pType = vars.pType\
        local offRoadForm = vars.offRoadForm or 'default'\
        local onRoadForm = vars.onRoadForm or 'default'\
\
        if routeProvided == false and #tempRoute > 0 then\
            local posStart = mist.getLeadPos(gpData)\
\
\
            useRoute[#useRoute + 1] = mist.ground.buildWP(posStart, offRoadForm, overRideSpeed)\
            for i = 1, #tempRoute do\
                local tempForm = tempRoute[i].action\
                local tempSpeed = tempRoute[i].speed\
\
                if offRoadForm == 'default' then\
                    tempForm = tempRoute[i].action\
                end\
                if onRoadForm == 'default' then\
                    onRoadForm = 'On Road'\
                end\
                if (string.lower(tempRoute[i].action) == 'on road' or    string.lower(tempRoute[i].action) == 'onroad' or string.lower(tempRoute[i].action) == 'on_road') then\
                    tempForm = onRoadForm\
                else\
                    tempForm = offRoadForm\
                end\
\
                if type(overRideSpeed) == 'number' then\
                    tempSpeed = overRideSpeed\
                end\
\
\
                useRoute[#useRoute + 1] = mist.ground.buildWP(tempRoute[i], tempForm, tempSpeed)\
            end\
\
            if pType and string.lower(pType) == 'doubleback' then\
                local curRoute = mist.utils.deepCopy(useRoute)\
                for i = #curRoute, 2, -1 do\
                    useRoute[#useRoute + 1] = mist.ground.buildWP(curRoute[i], curRoute[i].action, curRoute[i].speed)\
                end\
            end\
\
            useRoute[1].action = useRoute[#useRoute].action -- make it so the first WP matches the last WP\
        end\
\
        local cTask3 = {}\
        local newPatrol = {}\
        newPatrol.route = useRoute\
        newPatrol.gpData = gpData:getName()\
        cTask3[#cTask3 + 1] = 'mist.ground.patrolRoute('\
        cTask3[#cTask3 + 1] = mist.utils.oneLineSerialize(newPatrol)\
        cTask3[#cTask3 + 1] = ')'\
        cTask3 = table.concat(cTask3)\
        local tempTask = {\
            id = 'WrappedAction',\
            params = {\
                action = {\
                    id = 'Script',\
                    params = {\
                        command = cTask3,\
\
                    },\
                },\
            },\
        }\
        \
        useRoute[#useRoute].task = tempTask\
        log:info(useRoute)\
        mist.goRoute(gpData, useRoute)\
\
        return\
    end\
\
    function mist.ground.patrol(gpData, pType, form, speed)\
        local vars = {}\
\
        if type(gpData) == 'table' and gpData:getName() then\
            gpData = gpData:getName()\
        end\
\
        vars.useGroupRoute = gpData\
        vars.gpData = gpData\
        vars.pType = pType\
        vars.offRoadForm = form\
        vars.speed = speed\
\
        mist.ground.patrolRoute(vars)\
\
        return\
    end\
\
    -- No longer accepts path\
    function mist.ground.buildWP(point, overRideForm, overRideSpeed)\
\
        local wp = {}\
        wp.x = point.x\
\
        if point.z then\
            wp.y = point.z\
        else\
            wp.y = point.y\
        end\
        local form, speed\
\
        if point.speed and not overRideSpeed then\
            wp.speed = point.speed\
        elseif type(overRideSpeed) == 'number' then\
            wp.speed = overRideSpeed\
        else\
            wp.speed = mist.utils.kmphToMps(20)\
        end\
\
        if point.form and not overRideForm then\
            form = point.form\
        else\
            form = overRideForm\
        end\
\
        if not form then\
            wp.action = 'Cone'\
        else\
            form = string.lower(form)\
            if form == 'off_road' or form == 'off road' then\
                wp.action = 'Off Road'\
            elseif form == 'on_road' or form == 'on road' then\
                wp.action = 'On Road'\
            elseif form == 'rank' or form == 'line_abrest' or form == 'line abrest' or form == 'lineabrest'then\
                wp.action = 'Rank'\
            elseif form == 'cone' then\
                wp.action = 'Cone'\
            elseif form == 'diamond' then\
                wp.action = 'Diamond'\
            elseif form == 'vee' then\
                wp.action = 'Vee'\
            elseif form == 'echelon_left' or form == 'echelon left' or form == 'echelonl' then\
                wp.action = 'EchelonL'\
            elseif form == 'echelon_right' or form == 'echelon right' or form == 'echelonr' then\
                wp.action = 'EchelonR'\
            else\
                wp.action = 'Cone' -- if nothing matched\
            end\
        end\
\
        wp.type = 'Turning Point'\
\
        return wp\
\
    end\
\
    function mist.fixedWing.buildWP(point, WPtype, speed, alt, altType)\
\
        local wp = {}\
        wp.x = point.x\
\
        if point.z then\
            wp.y = point.z\
        else\
            wp.y = point.y\
        end\
\
        if alt and type(alt) == 'number' then\
            wp.alt = alt\
        else\
            wp.alt = 2000\
        end\
\
        if altType then\
            altType = string.lower(altType)\
            if altType == 'radio' or altType == 'agl' then\
                wp.alt_type = 'RADIO'\
            elseif altType == 'baro' or altType == 'asl' then\
                wp.alt_type = 'BARO'\
            end\
        else\
            wp.alt_type = 'RADIO'\
        end\
\
        if point.speed then\
            speed = point.speed\
        end\
\
        if point.type then\
            WPtype = point.type\
        end\
\
        if not speed then\
            wp.speed = mist.utils.kmphToMps(500)\
        else\
            wp.speed = speed\
        end\
\
        if not WPtype then\
            wp.action =    'Turning Point'\
        else\
            WPtype = string.lower(WPtype)\
            if WPtype == 'flyover' or WPtype == 'fly over' or WPtype == 'fly_over' then\
                wp.action =    'Fly Over Point'\
            elseif WPtype == 'turningpoint' or WPtype == 'turning point' or WPtype == 'turning_point' then\
                wp.action =    'Turning Point'\
            else\
                wp.action = 'Turning Point'\
            end\
        end\
\
        wp.type = 'Turning Point'\
        return wp\
    end\
\
    function mist.heli.buildWP(point, WPtype, speed, alt, altType)\
\
        local wp = {}\
        wp.x = point.x\
\
        if point.z then\
            wp.y = point.z\
        else\
            wp.y = point.y\
        end\
\
        if alt and type(alt) == 'number' then\
            wp.alt = alt\
        else\
            wp.alt = 500\
        end\
\
        if altType then\
            altType = string.lower(altType)\
            if altType == 'radio' or altType == 'agl' then\
                wp.alt_type = 'RADIO'\
            elseif altType == 'baro' or altType == 'asl' then\
                wp.alt_type = 'BARO'\
            end\
        else\
            wp.alt_type = 'RADIO'\
        end\
\
        if point.speed then\
            speed = point.speed\
        end\
\
        if point.type then\
            WPtype = point.type\
        end\
\
        if not speed then\
            wp.speed = mist.utils.kmphToMps(200)\
        else\
            wp.speed = speed\
        end\
\
        if not WPtype then\
            wp.action =    'Turning Point'\
        else\
            WPtype = string.lower(WPtype)\
            if WPtype == 'flyover' or WPtype == 'fly over' or WPtype == 'fly_over' then\
                wp.action =    'Fly Over Point'\
            elseif WPtype == 'turningpoint' or WPtype == 'turning point' or WPtype == 'turning_point' then\
                wp.action = 'Turning Point'\
            else\
                wp.action =    'Turning Point'\
            end\
        end\
\
        wp.type = 'Turning Point'\
        return wp\
    end\
\
    -- need to return a Vec3 or Vec2?\
    function mist.getRandPointInCircle(point, radius, innerRadius)\
        local theta = 2*math.pi*math.random()\
        local rad = math.random() + math.random()\
        if rad > 1 then\
            rad = 2 - rad\
        end\
\
        local radMult\
        if innerRadius and innerRadius <= radius then\
            radMult = (radius - innerRadius)*rad + innerRadius\
        else\
            radMult = radius*rad\
        end\
\
        if not point.z then --might as well work with vec2/3\
            point.z = point.y\
        end\
\
        local rndCoord\
        if radius > 0 then\
            rndCoord = {x = math.cos(theta)*radMult + point.x, y = math.sin(theta)*radMult + point.z}\
        else\
            rndCoord = {x = point.x, y = point.z}\
        end\
        return rndCoord\
    end\
\
    function mist.getRandomPointInZone(zoneName, innerRadius)\
        if type(zoneName) == 'string' and type(trigger.misc.getZone(zoneName)) == 'table' then\
            return mist.getRandPointInCircle(trigger.misc.getZone(zoneName).point, trigger.misc.getZone(zoneName).radius, innerRadius)\
        end\
        return false\
    end\
\
    function mist.groupToRandomPoint(vars)\
        local group = vars.group --Required\
        local point = vars.point --required\
        local radius = vars.radius or 0\
        local innerRadius = vars.innerRadius\
        local form = vars.form or 'Cone'\
        local heading = vars.heading or math.random()*2*math.pi\
        local headingDegrees = vars.headingDegrees\
        local speed = vars.speed or mist.utils.kmphToMps(20)\
\
\
        local useRoads\
        if not vars.disableRoads then\
            useRoads = true\
        else\
            useRoads = false\
        end\
\
        local path = {}\
\
        if headingDegrees then\
            heading = headingDegrees*math.pi/180\
        end\
\
        if heading >= 2*math.pi then\
            heading = heading - 2*math.pi\
        end\
\
        local rndCoord = mist.getRandPointInCircle(point, radius, innerRadius)\
\
        local offset = {}\
        local posStart = mist.getLeadPos(group)\
\
        offset.x = mist.utils.round(math.sin(heading - (math.pi/2)) * 50 + rndCoord.x, 3)\
        offset.z = mist.utils.round(math.cos(heading + (math.pi/2)) * 50 + rndCoord.y, 3)\
        path[#path + 1] = mist.ground.buildWP(posStart, form, speed)\
\
\
        if useRoads == true and ((point.x - posStart.x)^2 + (point.z - posStart.z)^2)^0.5 > radius * 1.3 then\
            path[#path + 1] = mist.ground.buildWP({x = posStart.x + 11, z = posStart.z + 11}, 'off_road', speed)\
            path[#path + 1] = mist.ground.buildWP(posStart, 'on_road', speed)\
            path[#path + 1] = mist.ground.buildWP(offset, 'on_road', speed)\
        else\
            path[#path + 1] = mist.ground.buildWP({x = posStart.x + 25, z = posStart.z + 25}, form, speed)\
        end\
\
        path[#path + 1] = mist.ground.buildWP(offset, form, speed)\
        path[#path + 1] = mist.ground.buildWP(rndCoord, form, speed)\
\
        mist.goRoute(group, path)\
\
        return\
    end\
\
    function mist.groupRandomDistSelf(gpData, dist, form, heading, speed)\
        local pos = mist.getLeadPos(gpData)\
        local fakeZone = {}\
        fakeZone.radius = dist or math.random(300, 1000)\
        fakeZone.point = {x = pos.x, y = pos.y, z = pos.z}\
        mist.groupToRandomZone(gpData, fakeZone, form, heading, speed)\
\
        return\
    end\
\
    function mist.groupToRandomZone(gpData, zone, form, heading, speed)\
        if type(gpData) == 'string' then\
            gpData = Group.getByName(gpData)\
        end\
\
        if type(zone) == 'string' then\
            zone = trigger.misc.getZone(zone)\
        elseif type(zone) == 'table' and not zone.radius then\
            zone = trigger.misc.getZone(zone[math.random(1, #zone)])\
        end\
\
        if speed then\
            speed = mist.utils.kmphToMps(speed)\
        end\
\
        local vars = {}\
        vars.group = gpData\
        vars.radius = zone.radius\
        vars.form = form\
        vars.headingDegrees = heading\
        vars.speed = speed\
        vars.point = mist.utils.zoneToVec3(zone)\
\
        mist.groupToRandomPoint(vars)\
\
        return\
    end\
\
    function mist.isTerrainValid(coord, terrainTypes) -- vec2/3 and enum or table of acceptable terrain types\
        if coord.z then\
            coord.y = coord.z\
        end\
        local typeConverted = {}\
\
        if type(terrainTypes) == 'string' then -- if its a string it does this check\
            for constId, constData in pairs(land.SurfaceType) do\
                if string.lower(constId) == string.lower(terrainTypes) or string.lower(constData) == string.lower(terrainTypes) then\
                    table.insert(typeConverted, constId)\
                end\
            end\
        elseif type(terrainTypes) == 'table' then -- if its a table it does this check\
            for typeId, typeData in pairs(terrainTypes) do\
                for constId, constData in pairs(land.SurfaceType) do\
                    if string.lower(constId) == string.lower(typeData) or string.lower(constData) == string.lower(typeId) then\
                        table.insert(typeConverted, constId)\
                    end\
                end\
            end\
        end\
        for validIndex, validData in pairs(typeConverted) do\
            if land.getSurfaceType(coord) == land.SurfaceType[validData] then\
                return true\
            end\
        end\
        return false\
    end\
\
    function mist.terrainHeightDiff(coord, searchSize)\
        local samples = {}\
        local searchRadius = 5\
        if searchSize then\
            searchRadius = searchSize\
        end\
        if type(coord) == 'string' then\
            coord = mist.utils.zoneToVec3(coord)\
        end\
\
        coord = mist.utils.makeVec2(coord)\
\
        samples[#samples + 1] = land.getHeight(coord)\
        for i = 0, 360, 30 do\
            samples[#samples + 1] = land.getHeight({x = (coord.x + (math.sin(math.rad(i))*searchRadius)), y = (coord.y + (math.cos(math.rad(i))*searchRadius))})\
            if searchRadius >= 20 then -- if search radius is sorta large, take a sample halfway between center and outer edge\
                samples[#samples + 1] = land.getHeight({x = (coord.x + (math.sin(math.rad(i))*(searchRadius/2))), y = (coord.y + (math.cos(math.rad(i))*(searchRadius/2)))})\
            end\
        end\
        local tMax, tMin = 0, 1000000\
        for index, height in pairs(samples) do\
            if height > tMax then\
                tMax = height\
            end\
            if height < tMin then\
                tMin = height\
            end\
        end\
        return mist.utils.round(tMax - tMin, 2)\
    end\
\
    function mist.groupToPoint(gpData, point, form, heading, speed, useRoads)\
        if type(point) == 'string' then\
            point = trigger.misc.getZone(point)\
        end\
        if speed then\
            speed = mist.utils.kmphToMps(speed)\
        end\
\
        local vars = {}\
        vars.group = gpData\
        vars.form = form\
        vars.headingDegrees = heading\
        vars.speed = speed\
        vars.disableRoads = useRoads\
        vars.point = mist.utils.zoneToVec3(point)\
        mist.groupToRandomPoint(vars)\
\
        return\
    end\
\
    function mist.getLeadPos(group)\
        if type(group) == 'string' then -- group name\
            group = Group.getByName(group)\
        end\
\
        local units = group:getUnits()\
\
        local leader = units[1]\
        if not Unit.isExist(leader) then    -- SHOULD be good, but if there is a bug, this code future-proofs it then.\
            local lowestInd = math.huge\
            for ind, unit in pairs(units) do\
                if Unit.isExist(unit) and ind < lowestInd then\
                    lowestInd = ind\
                    return unit:getPosition().p\
                end\
            end\
        end\
        if leader and Unit.isExist(leader) then    -- maybe a little too paranoid now...\
            return leader:getPosition().p\
        end\
    end\
\
end\
\
--- Database tables.\
-- @section mist.DBs\
\
--- Mission data\
-- @table mist.DBs.missionData\
-- @field startTime mission start time\
-- @field theatre mission theatre/map e.g. Caucasus\
-- @field version mission version\
-- @field files mission resources\
\
--- Tables used as parameters.\
-- @section varTables\
\
--- mist.flagFunc.units_in_polygon parameter table.\
-- @table unitsInPolygonVars\
-- @tfield table unit name table @{UnitNameTable}.\
-- @tfield table zone table defining a polygon.\
-- @tfield number|string flag flag to set to true.\
-- @tfield[opt] number|string stopflag if set to true the function\
-- will stop evaluating.\
-- @tfield[opt] number maxalt maximum altitude (MSL) for the\
-- polygon.\
-- @tfield[opt] number req_num minimum number of units that have\
-- to be in the polygon.\
-- @tfield[opt] number interval sets the interval for\
-- checking if units are inside of the polygon in seconds. Default: 1.\
-- @tfield[opt] boolean toggle switch the flag to false if required\
-- conditions are not met. Default: false.\
-- @tfield[opt] table unitTableDef\
\
--- Logger class.\
-- @type mist.Logger\
do -- mist.Logger scope\
    mist.Logger = {}\
\
    --- parses text and substitutes keywords with values from given array.\
    -- @param text string containing keywords to substitute with values\
    -- or a variable.\
    -- @param ... variables to use for substitution in string.\
    -- @treturn string new string with keywords substituted or\
    -- value of variable as string.\
    local function formatText(text, ...)\
        if type(text) ~= 'string' then\
            if type(text) == 'table' then\
                text = mist.utils.oneLineSerialize(text)\
            else\
                text = tostring(text)\
            end\
        else\
            for index,value in ipairs(arg) do\
                -- TODO: check for getmetatabel(value).__tostring\
                if type(value) == 'table' then\
                    value = mist.utils.oneLineSerialize(value)\
                else\
                    value = tostring(value)\
                end\
                text = text:gsub('$' .. index, value)\
            end\
        end\
    local fName = nil\
    local cLine = nil\
        if debug then\
            local dInfo = debug.getinfo(3)\
            fName = dInfo.name\
            cLine = dInfo.currentline\
            -- local fsrc = dinfo.short_src\
            --local fLine = dInfo.linedefined\
        end\
        if fName and cLine then\
            return fName .. '|' .. cLine .. ': ' .. text\
        elseif cLine then\
            return cLine .. ': ' .. text\
        else\
            return ' ' .. text\
        end\
    end\
\
    local function splitText(text)\
        local tbl = {}\
        while text:len() > 4000 do\
            local sub = text:sub(1, 4000)\
            text = text:sub(4001)\
            table.insert(tbl, sub)\
        end\
        table.insert(tbl, text)\
        return tbl\
    end\
\
    --- Creates a new logger.\
    -- Each logger has it's own tag and log level.\
    -- @tparam string tag tag which appears at the start of\
    -- every log line produced by this logger.\
    -- @tparam[opt] number|string level the log level defines which messages\
    -- will be logged and which will be omitted. Log level 3 beeing the most verbose\
    -- and 0 disabling all output. This can also be a string. Allowed strings are:\
    -- \"none\" (0), \"error\" (1), \"warning\" (2) and \"info\" (3).\
    -- @usage myLogger = mist.Logger:new(\"MyScript\")\
    -- @usage myLogger = mist.Logger:new(\"MyScript\", 2)\
    -- @usage myLogger = mist.Logger:new(\"MyScript\", \"info\")\
    -- @treturn mist.Logger\
    function mist.Logger:new(tag, level)\
        local l = {}\
        l.tag = tag\
        setmetatable(l, self)\
        self.__index = self\
        self:setLevel(level)\
        return l\
    end\
\
    --- Sets the level of verbosity for this logger.\
    -- @tparam[opt] number|string level the log level defines which messages\
    -- will be logged and which will be omitted. Log level 3 beeing the most verbose\
    -- and 0 disabling all output. This can also be a string. Allowed strings are:\
    -- \"none\" (0), \"error\" (1), \"warning\" (2) and \"info\" (3).\
    -- @usage myLogger:setLevel(\"info\")\
    -- @usage -- log everything\
    --myLogger:setLevel(3)\
    function mist.Logger:setLevel(level)\
        if not level then\
            self.level = 2\
        else\
            if type(level) == 'string' then\
                if level == 'none' or level == 'off' then\
                    self.level = 0\
                elseif level == 'error' then\
                    self.level = 1\
                elseif level == 'warning' or level == 'warn' then\
                    self.level = 2\
                elseif level == 'info' then\
                    self.level = 3\
                end\
            elseif type(level) == 'number' then\
                self.level = level\
            else\
                self.level = 2\
            end\
        end\
    end\
\
    --- Logs error and shows alert window.\
    -- This logs an error to the dcs.log and shows a popup window,\
    -- pausing the simulation. This works always even if logging is\
    -- disabled by setting a log level of \"none\" or 0.\
    -- @tparam string text the text with keywords to substitute.\
    -- @param ... variables to be used for substitution.\
    -- @usage myLogger:alert(\"Shit just hit the fan! WEEEE!!!11\")\
    function mist.Logger:alert(text, ...)\
        text = formatText(text, unpack(arg))\
        if text:len() > 4000 then\
            local texts = splitText(text)\
            for i = 1, #texts do\
                if i == 1 then\
                    env.error(self.tag .. '|' .. texts[i], true)\
                else\
                    env.error(texts[i])\
                end\
            end\
        else\
            env.error(self.tag .. '|' .. text, true)\
        end\
    end\
\
    --- Logs a message, disregarding the log level.\
    -- @tparam string text the text with keywords to substitute.\
    -- @param ... variables to be used for substitution.\
    -- @usage myLogger:msg(\"Always logged!\")\
    function mist.Logger:msg(text, ...)\
        text = formatText(text, unpack(arg))\
        if text:len() > 4000 then\
            local texts = splitText(text)\
            for i = 1, #texts do\
                if i == 1 then\
                    env.info(self.tag .. '|' .. texts[i])\
                else\
                    env.info(texts[i])\
                end\
            end\
        else\
            env.info(self.tag .. '|' .. text)\
        end\
    end\
\
    --- Logs an error.\
    -- logs a message prefixed with this loggers tag to dcs.log as\
    -- long as at least the \"error\" log level (1) is set.\
    -- @tparam string text the text with keywords to substitute.\
    -- @param ... variables to be used for substitution.\
    -- @usage myLogger:error(\"Just an error!\")\
    -- @usage myLogger:error(\"Foo is $1 instead of $2\", foo, \"bar\")\
    function mist.Logger:error(text, ...)\
        if self.level >= 1 then\
            text = formatText(text, unpack(arg))\
            if text:len() > 4000 then\
                local texts = splitText(text)\
                for i = 1, #texts do\
                    if i == 1 then\
                        env.error(self.tag .. '|' .. texts[i])\
                    else\
                        env.error(texts[i])\
                    end\
                end\
            else\
                env.error(self.tag .. '|' .. text)\
            end\
        end\
    end\
\
    --- Logs a warning.\
    -- logs a message prefixed with this loggers tag to dcs.log as\
    -- long as at least the \"warning\" log level (2) is set.\
    -- @tparam string text the text with keywords to substitute.\
    -- @param ... variables to be used for substitution.\
    -- @usage myLogger:warn(\"Mother warned you! Those $1 from the interwebs are $2\", {\"geeks\", 1337})\
    function mist.Logger:warn(text, ...)\
        if self.level >= 2 then\
            text = formatText(text, unpack(arg))\
            if text:len() > 4000 then\
                local texts = splitText(text)\
                for i = 1, #texts do\
                    if i == 1 then\
                        env.warning(self.tag .. '|' .. texts[i])\
                    else\
                        env.warning(texts[i])\
                    end\
                end\
            else\
                env.warning(self.tag .. '|' .. text)\
            end\
        end\
    end\
\
    --- Logs a info.\
    -- logs a message prefixed with this loggers tag to dcs.log as\
    -- long as the highest log level (3) \"info\" is set.\
    -- @tparam string text the text with keywords to substitute.\
    -- @param ... variables to be used for substitution.\
    -- @see warn\
    function mist.Logger:info(text, ...)\
        if self.level >= 3 then\
            text = formatText(text, unpack(arg))\
            if text:len() > 4000 then\
                local texts = splitText(text)\
                for i = 1, #texts do\
                    if i == 1 then\
                        env.info(self.tag .. '|' .. texts[i])\
                    else\
                        env.info(texts[i])\
                    end\
                end\
            else\
                env.info(self.tag .. '|' .. text)\
            end\
        end\
    end\
\
end\
\
-- initialize mist\
mist.init()\
env.info(('Mist version ' .. mist.majorVersion .. '.' .. mist.minorVersion .. '.' .. mist.build .. ' loaded.'))\
\
-- vim: noet:ts=2:sw=2",
    ["DictKey_ActionText_3946"] = "mist.respawnGroup('Overlord', true)",
    ["DictKey_WptName_1574"] = "",
    ["DictKey_UnitName_114"] = "Unit #072",
    ["DictKey_UnitName_3609"] = "Tanque de combustible #032",
    ["DictKey_GroupName_1341"] = "Bandar Abbas HAWK #005",
    ["DictKey_WptName_3508"] = "",
    ["DictKey_WptName_4324"] = "",
    ["DictKey_WptName_2595"] = "",
    ["DictKey_WptName_1916"] = "",
    ["DictKey_GroupName_811"] = " #068",
    ["DictKey_WptName_3571"] = "",
    ["DictKey_UnitName_2014"] = "Plant #005",
    ["DictKey_GroupName_3455"] = "Refinery #079",
    ["DictKey_UnitName_4678"] = "Unit #151",
    ["DictKey_GroupName_1944"] = "Nuevo grupo de barcos",
    ["DictKey_WptName_1610"] = "",
    ["DictKey_UnitName_243"] = "Unit #037",
    ["DictKey_UnitName_366"] = "Arco",
    ["DictKey_WptName_5252"] = "",
    ["DictKey_GroupName_882"] = "Bandar Abbas SA-6 Site",
    ["DictKey_GroupName_4637"] = "moved Qum HAWK #002",
    ["DictKey_UnitName_4856"] = "",
    ["DictKey_UnitName_1481"] = "Unit #098",
    ["DictKey_UnitName_1276"] = "Unit #021",
    ["DictKey_WptName_5160"] = "AA TGT",
    ["DictKey_WptName_3867"] = "",
    ["DictKey_UnitName_3648"] = "Munición",
    ["DictKey_UnitName_4310"] = "F-16 Al Dhafra AB #002",
    ["DictKey_UnitName_4482"] = "Pilot #027",
    ["DictKey_WptName_3959"] = "",
    ["DictKey_UnitName_1339"] = "Unit #067",
    ["DictKey_UnitName_3156"] = "Piloto #013",
    ["DictKey_GroupName_2191"] = "Plant #050",
    ["DictKey_UnitName_1357"] = "Unit #088",
    ["DictKey_GroupName_3263"] = "Refinery #089",
    ["DictKey_UnitName_4999"] = "Unit #304",
    ["DictKey_GroupName_2461"] = "Refinery #076",
    ["DictKey_UnitName_1075"] = "Unit #055",
    ["DictKey_GroupName_1683"] = "Refinery #006",
    ["DictKey_GroupName_2833"] = "Oil tower #062",
    ["DictKey_UnitName_1633"] = "Refinery #005",
    ["DictKey_WptName_2634"] = "",
    ["DictKey_UnitName_1148"] = "Unit #052",
    ["DictKey_WptName_3217"] = "",
    ["DictKey_GroupName_1656"] = "Refinery #026",
    ["DictKey_UnitName_541"] = "Unit #161",
    ["DictKey_GroupName_1902"] = "Oil tower #026",
    ["DictKey_WptName_2487"] = "",
    ["DictKey_UnitName_46"] = "Unit #031",
    ["DictKey_UnitName_559"] = "Unit #169",
    ["DictKey_WptName_652"] = "",
    ["DictKey_WptName_2418"] = "",
    ["DictKey_WptName_2993"] = "",
    ["DictKey_WptName_3529"] = "",
    ["DictKey_UnitName_5266"] = "Enfield 2-1",
    ["DictKey_GroupName_1414"] = "New Airplane Group #008",
    ["DictKey_UnitName_1346"] = "Unit #078",
    ["DictKey_UnitName_4735"] = "Unit #279",
    ["DictKey_UnitName_4431"] = "",
    ["DictKey_WptName_3821"] = "",
    ["DictKey_WptName_2670"] = "",
    ["DictKey_UnitName_2276"] = "Refinery",
    ["DictKey_GroupName_4379"] = "",
    ["DictKey_WptName_134"] = "",
    ["DictKey_UnitName_2684"] = "Plant #071",
    ["DictKey_WptName_4890"] = "",
    ["DictKey_GroupName_1581"] = "Refinery #015",
    ["DictKey_UnitName_1275"] = "Unit #020",
    ["DictKey_WptName_719"] = "",
    ["DictKey_UnitName_1318"] = "Unit #040",
    ["DictKey_UnitName_4905"] = "",
    ["DictKey_UnitName_3958"] = "JTAC1",
    ["DictKey_WptName_5171"] = "AG RANGE",
    ["DictKey_GroupName_1641"] = "Refinery #021",
    ["DictKey_GroupName_4080"] = "Weapons Storage #001",
    ["DictKey_UnitName_4302"] = "F-16 Al Dhafra AB #007",
    ["DictKey_UnitName_4251"] = "",
    ["DictKey_ActionText_4084"] = "mist.respawnGroup('Shell', true)",
    ["DictKey_UnitName_160"] = "Unit #102",
    ["DictKey_WptName_1532"] = "",
    ["DictKey_GroupName_3281"] = "Tanque de combustible #002",
    ["DictKey_WptName_3737"] = "",
    ["DictKey_UnitName_969"] = "Unit #234",
    ["DictKey_GroupName_3374"] = "Tanque de combustible #007",
    ["DictKey_WptName_1568"] = "",
    ["DictKey_WptName_925"] = "",
    ["DictKey_WptName_4416"] = "",
    ["DictKey_GroupName_1812"] = "Oil tower",
    ["DictKey_WptName_3351"] = "",
    ["DictKey_UnitName_1521"] = "",
    ["DictKey_descriptionBlueTask_3"] = "",
    ["DictKey_WptName_1000"] = "",
    ["DictKey_UnitName_3453"] = "Tanque de combustible #001",
    ["DictKey_WptName_5254"] = "",
    ["DictKey_WptName_4511"] = "",
    ["DictKey_WptName_3421"] = "",
    ["DictKey_WptName_2208"] = "",
    ["DictKey_WptName_1289"] = "",
    ["DictKey_UnitName_5267"] = "Enfield 2-2 ",
    ["DictKey_UnitName_4925"] = "",
    ["DictKey_WptName_3547"] = "",
    ["DictKey_UnitName_1458"] = "Unit #051",
    ["DictKey_UnitName_4254"] = "",
    ["DictKey_WptName_5317"] = "",
    ["DictKey_WptName_2142"] = "",
    ["DictKey_WptName_691"] = "",
    ["DictKey_WptName_2754"] = "",
    ["DictKey_GroupName_507"] = "New Static Object #005",
    ["DictKey_WptName_4163"] = "",
    ["DictKey_UnitName_757"] = " #019",
    ["DictKey_GroupName_1038"] = "Bandar Lengeh HAWK Site",
    ["DictKey_WptName_2769"] = "",
    ["DictKey_WptName_3095"] = "",
    ["DictKey_WptName_4515"] = "",
    ["DictKey_WptName_5456"] = "",
    ["DictKey_GroupName_2443"] = "Refinery #070",
    ["DictKey_WptName_4093"] = "",
    ["DictKey_WptName_467"] = "",
    ["DictKey_UnitName_1113"] = "Unit #139",
    ["DictKey_UnitName_609"] = "Unit #194",
    ["DictKey_UnitName_755"] = "New Static Object #005",
    ["DictKey_UnitName_251"] = "",
    ["DictKey_GroupName_1644"] = "Refinery #022",
    ["DictKey_WptName_2826"] = "",
    ["DictKey_UnitName_39"] = "Unit #024",
    ["DictKey_UnitName_157"] = "Normandy",
    ["DictKey_UnitName_1433"] = "Unit #018",
    ["DictKey_UnitName_1570"] = "Refinery #005",
    ["DictKey_WptName_4554"] = "",
    ["DictKey_GroupName_563"] = "New Ship Group #010",
    ["DictKey_WptName_2655"] = "",
    ["DictKey_UnitName_334"] = "Unit #045",
    ["DictKey_WptName_5371"] = "",
    ["DictKey_GroupName_113"] = "SAM site 01 #015",
    ["DictKey_UnitName_1768"] = "Refinery #006",
    ["DictKey_WptName_4438"] = "",
    ["DictKey_UnitName_1711"] = "Refinery #003",
    ["DictKey_WptName_2999"] = "",
    ["DictKey_UnitName_965"] = "Unit #024",
    ["DictKey_GroupName_2046"] = "Plant #028",
    ["DictKey_UnitName_4283"] = "",
    ["DictKey_WptName_4406"] = "",
    ["DictKey_WptName_1856"] = "",
    ["DictKey_UnitName_1732"] = "Refinery #003",
    ["DictKey_UnitName_213"] = "",
    ["DictKey_WptName_707"] = "",
    ["DictKey_UnitName_1130"] = "",
    ["DictKey_UnitName_76"] = "Unit #050",
    ["DictKey_WptName_4462"] = "",
    ["DictKey_WptName_4561"] = "",
    ["DictKey_ActionRadioText_4613"] = "Spawn Target practice drone",
    ["DictKey_UnitName_4771"] = "",
    ["DictKey_GroupName_3308"] = "Tanque de combustible #004",
    ["DictKey_UnitName_543"] = "Unit #162",
    ["DictKey_WptName_4990"] = "",
    ["DictKey_UnitName_1870"] = "Oil tower #004",
    ["DictKey_ActionText_3943"] = "if Group.getByName('Texaco') == nil then\
return true\
else\
return false\
end",
    ["DictKey_GroupName_242"] = "SAM site 01 #002",
    ["DictKey_GroupName_3251"] = "Refinery #079",
    ["DictKey_WptName_2799"] = "",
    ["DictKey_ActionText_5424"] = "mist.respawnGroup('rescue', true)",
    ["DictKey_UnitName_3285"] = "Tanque de combustible",
    ["DictKey_UnitName_5059"] = "Unit #354",
    ["DictKey_UnitName_1534"] = "Oil platform",
    ["DictKey_UnitName_959"] = "Unit #236",
    ["DictKey_WptName_519"] = "",
    ["DictKey_UnitName_1738"] = "Refinery #005",
    ["DictKey_WptName_1775"] = "",
    ["DictKey_UnitName_1277"] = "Unit #022",
    ["DictKey_GroupName_2278"] = "Refinery #001",
    ["DictKey_GroupName_5138"] = "Combat Training F14B  Trainee",
    ["DictKey_WptName_2454"] = "",
    ["DictKey_WptName_5154"] = "AA TGT",
    ["DictKey_GroupName_637"] = "SAM site 01 #031",
    ["DictKey_UnitName_4781"] = "",
    ["DictKey_GroupName_5478"] = "M-2000 Tunb Kochak Island CAP #003",
    ["DictKey_UnitName_2699"] = "Plant #065",
    ["DictKey_WptName_4305"] = "",
    ["DictKey_WptName_1745"] = "",
    ["DictKey_GroupName_2332"] = "Refinery #005",
    ["DictKey_WptName_2223"] = "",
    ["DictKey_UnitName_2098"] = "Plant #002",
    ["DictKey_UnitName_717"] = " #018",
    ["DictKey_UnitName_2324"] = "Refinery #002",
    ["DictKey_UnitName_4828"] = "",
    ["DictKey_WptName_2202"] = "",
    ["DictKey_UnitName_4423"] = "Colt 1-1 #005",
    ["DictKey_WptName_2911"] = "",
    ["DictKey_UnitName_412"] = "Unit #141",
    ["DictKey_WptName_2577"] = "",
    ["DictKey_UnitName_758"] = "New Static Object #005",
    ["DictKey_WptName_995"] = "",
    ["DictKey_WptName_698"] = "",
    ["DictKey_UnitName_1615"] = "Refinery #002",
    ["DictKey_GroupName_4456"] = "f-5 Havadarya Island CAP #004",
    ["DictKey_UnitName_2822"] = "Oil tower #003",
    ["DictKey_UnitName_2441"] = "Refinery #006",
    ["DictKey_WptName_1919"] = "",
    ["DictKey_WptName_4461"] = "",
    ["DictKey_GroupName_3224"] = "Refinery #077",
    ["DictKey_GroupName_3738"] = "Munición #020",
    ["DictKey_UnitName_2886"] = "",
    ["DictKey_GroupName_1851"] = "Oil tower #015",
    ["DictKey_UnitName_1135"] = "Unit #182",
    ["DictKey_GroupName_2948"] = "Rudan Conversion #009",
    ["DictKey_UnitName_4652"] = "Unit #086",
    ["DictKey_WptName_2172"] = "",
    ["DictKey_UnitName_2660"] = "Plant #068",
    ["DictKey_UnitName_1975"] = "Plant #002",
    ["DictKey_UnitName_4269"] = "",
    ["DictKey_WptName_1017"] = "",
    ["DictKey_GroupName_2966"] = "Rudan Conversion #015",
    ["DictKey_WptName_3376"] = "",
    ["DictKey_UnitName_577"] = "Unit #176",
    ["DictKey_GroupName_3868"] = "Refinery #115",
    ["DictKey_UnitName_4718"] = "Unit #215",
    ["DictKey_UnitName_349"] = "",
    ["DictKey_WptName_418"] = "",
    ["DictKey_UnitName_4004"] = "",
    ["DictKey_WptName_3998"] = "",
    ["DictKey_UnitName_2219"] = "Plant",
    ["DictKey_WptName_5008"] = "",
    ["DictKey_UnitName_408"] = "Unit #137",
    ["DictKey_UnitName_1226"] = "Unit #261",
    ["DictKey_UnitName_263"] = "Unit #042",
    ["DictKey_UnitName_3775"] = "",
    ["DictKey_UnitName_3912"] = "Piloto #025",
    ["DictKey_WptName_3208"] = "",
    ["DictKey_WptName_4153"] = "",
    ["DictKey_WptName_5155"] = "",
    ["DictKey_UnitName_487"] = "",
    ["DictKey_UnitName_323"] = "",
    ["DictKey_GroupName_4756"] = "",
    ["DictKey_GroupName_3768"] = "Munición #003",
    ["DictKey_GroupName_4350"] = "WEST TEST",
    ["DictKey_WptName_2850"] = "",
    ["DictKey_UnitName_4675"] = "Unit #147",
    ["DictKey_WptName_4055"] = "",
    ["DictKey_UnitName_3381"] = "Tanque de combustible",
    ["DictKey_WptName_4389"] = "",
    ["DictKey_UnitName_1043"] = "Unit #152",
    ["DictKey_WptName_588"] = "",
    ["DictKey_UnitName_919"] = "Pilot #020",
    ["DictKey_GroupName_545"] = " #015",
    ["DictKey_UnitName_1200"] = "Unit #012",
    ["DictKey_GroupName_2299"] = "Refinery #001",
    ["DictKey_WptName_5241"] = "",
    ["DictKey_UnitName_4398"] = "Pilot #018",
    ["DictKey_WptName_738"] = "",
    ["DictKey_WptName_2664"] = "",
    ["DictKey_UnitName_4382"] = "West Test Wingman",
    ["DictKey_WptName_4542"] = "",
    ["DictKey_UnitName_2180"] = "Plant #010",
    ["DictKey_UnitName_1282"] = "Unit #027",
    ["DictKey_UnitName_1191"] = "Unit #232",
    ["DictKey_WptName_5020"] = "",
    ["DictKey_WptName_660"] = "",
    ["DictKey_UnitName_4464"] = "",
    ["DictKey_GroupName_231"] = "",
    ["DictKey_UnitName_4889"] = "Unit #293",
    ["DictKey_GroupName_984"] = "SAM site 01 #012",
    ["DictKey_GroupName_3741"] = "Munición #021",
    ["DictKey_WptName_5237"] = "",
    ["DictKey_WptName_1937"] = "",
    ["DictKey_UnitName_4914"] = "",
    ["DictKey_UnitName_1109"] = "Unit #136",
    ["DictKey_UnitName_1786"] = "Refinery",
    ["DictKey_WptName_4122"] = "",
    ["DictKey_UnitName_1792"] = "Refinery #004",
    ["DictKey_WptName_4304"] = "",
    ["DictKey_UnitName_5017"] = "Unit #320",
    ["DictKey_UnitName_246"] = "Unit #038",
    ["DictKey_GroupName_2458"] = "Refinery #075",
    ["DictKey_WptName_5185"] = "",
    ["DictKey_GroupName_2052"] = "Plant #030",
    ["DictKey_UnitName_1313"] = "Unit #006",
    ["DictKey_UnitName_1488"] = "Unit #105",
    ["DictKey_WptName_3226"] = "",
    ["DictKey_UnitName_54"] = "Unit #036",
    ["DictKey_UnitName_3420"] = "Tanque de combustible #002",
    ["DictKey_UnitName_4704"] = "Unit #192",
    ["DictKey_UnitName_2765"] = "Oil tower #001",
    ["DictKey_UnitName_2432"] = "Refinery #003",
    ["DictKey_GroupName_3194"] = "Refinery #078",
    ["DictKey_WptName_3388"] = "",
    ["DictKey_UnitName_1499"] = "Unit #114",
    ["DictKey_UnitName_5012"] = "Unit #315",
    ["DictKey_WptName_3382"] = "",
    ["DictKey_WptName_82"] = "",
    ["DictKey_UnitName_4175"] = "",
    ["DictKey_UnitName_4785"] = "",
    ["DictKey_WptName_5149"] = "",
    ["DictKey_WptName_4847"] = "",
    ["DictKey_UnitName_1023"] = "Pilot #032",
    ["DictKey_GroupName_2001"] = "Plant #013",
    ["DictKey_GroupName_1710"] = "Refinery #003",
    ["DictKey_WptName_3334"] = "",
    ["DictKey_UnitName_2309"] = "Refinery #004",
    ["DictKey_WptName_5172"] = "AA TGT",
    ["DictKey_GroupName_3708"] = "Munición #001",
    ["DictKey_GroupName_765"] = "FARP Varsovia",
    ["DictKey_UnitName_5028"] = "Unit #329",
    ["DictKey_WptName_4060"] = "",
    ["DictKey_UnitName_4210"] = "",
    ["DictKey_WptName_4547"] = "",
    ["DictKey_WptName_1122"] = "",
    ["DictKey_GroupName_3608"] = "Tanque de combustible #051",
    ["DictKey_GroupName_1857"] = "Oil tower #017",
    ["DictKey_UnitName_4261"] = "",
    ["DictKey_UnitName_597"] = "Unit #185",
    ["DictKey_UnitName_714"] = " #018",
    ["DictKey_WptName_3731"] = "",
    ["DictKey_WptName_809"] = "",
    ["DictKey_UnitName_3357"] = "Tanque de combustible #003",
    ["DictKey_WptName_2403"] = "",
    ["DictKey_WptName_4447"] = "",
    ["DictKey_WptName_4909"] = "",
    ["DictKey_UnitName_5005"] = "Unit #310",
    ["DictKey_GroupName_2983"] = "Oil ship #003",
    ["DictKey_WptName_2439"] = "",
    ["DictKey_WptName_580"] = "",
    ["DictKey_WptName_5188"] = "",
    ["DictKey_UnitName_3054"] = "Plant #021",
    ["DictKey_UnitName_4645"] = "Unit #055",
    ["DictKey_GroupName_3032"] = "Plant #020",
    ["DictKey_UnitName_918"] = "Pilot #009",
    ["DictKey_GroupName_3969"] = "JTAC4",
    ["DictKey_WptName_1838"] = "",
    ["DictKey_WptName_998"] = "",
    ["DictKey_UnitName_3663"] = "Piloto #014",
    ["DictKey_UnitName_70"] = "Unit #046",
    ["DictKey_GroupName_927"] = "",
    ["DictKey_UnitName_2717"] = "Plant #064",
    ["DictKey_WptName_3664"] = "",
    ["DictKey_WptName_3674"] = "",
    ["DictKey_UnitName_1100"] = "Unit #114",
    ["DictKey_WptName_4931"] = "",
    ["DictKey_UnitName_1966"] = "Plant",
    ["DictKey_WptName_2415"] = "",
    ["DictKey_GroupName_2599"] = "Plant #085",
    ["DictKey_WptName_1988"] = "",
    ["DictKey_WptName_1958"] = "",
    ["DictKey_GroupName_2239"] = "Refinery #015",
    ["DictKey_GroupName_739"] = " #018",
    ["DictKey_UnitName_3766"] = "Munición #020",
    ["DictKey_WptName_4045"] = "",
    ["DictKey_GroupName_3182"] = "Refinery #078",
    ["DictKey_UnitName_409"] = "Uzi 1-1",
    ["DictKey_WptName_2962"] = "",
    ["DictKey_UnitName_880"] = "Unit #115",
    ["DictKey_GroupName_1758"] = "Refinery #005",
    ["DictKey_UnitName_2895"] = "Nuevo objeto estático #001",
    ["DictKey_WptName_632"] = "",
    ["DictKey_UnitName_1222"] = "Unit #257",
    ["DictKey_WptName_693"] = "",
    ["DictKey_UnitName_1164"] = "Unit #216",
    ["DictKey_UnitName_4244"] = "",
    ["DictKey_UnitName_4882"] = "Unit #286",
    ["DictKey_UnitName_1494"] = "Unit #109",
    ["DictKey_WptName_2394"] = "",
    ["DictKey_GroupName_1011"] = "New Airplane Group #009",
    ["DictKey_UnitName_85"] = "Unit #055",
    ["DictKey_WptName_5452"] = "",
    ["DictKey_WptName_4605"] = "",
    ["DictKey_UnitName_1876"] = "Oil tower #002",
    ["DictKey_WptName_3352"] = "",
    ["DictKey_WptName_1435"] = "",
    ["DictKey_UnitName_4295"] = "Pilot #003",
    ["DictKey_UnitName_1183"] = "Unit #013",
    ["DictKey_GroupName_814"] = " #001",
    ["DictKey_UnitName_2639"] = "",
    ["DictKey_WptName_3550"] = "",
    ["DictKey_WptName_3719"] = "",
    ["DictKey_WptName_1019"] = "",
    ["DictKey_UnitName_4943"] = "",
    ["DictKey_UnitName_3101"] = "Piloto #008",
    ["DictKey_UnitName_4642"] = "Unit #052",
    ["DictKey_UnitName_1486"] = "Unit #103",
    ["DictKey_GroupName_903"] = "Abu Musa SA-10 Site",
    ["DictKey_UnitName_4213"] = "",
    ["DictKey_GroupName_2007"] = "Plant #015",
    ["DictKey_descriptionText_1"] = "\
Welcome to Pigeon's Ulra Realism Mission. This mission is situated around 2010 in the Persian Gulf. \
You are playing as Nato forces.\
\
Be aware: Iranian military aircraft are not allowed to enter the UAE.\
But they will attack when you come too close too Iranian assets.\
\
Carrier Fleet:\
127.50 AM  TCN 64X  BRG 352  ILS 11 - Tarawa\
127.50 AM  TCN 74X  BRG 352  ILS 12 - CVN-74\
\
\
Tankers:\
255.00 AM  TCN 41Y  KC-130  - Texaco\
256.00 AM  TCN 43Y  KC-135  - Shell\
257.00 AM  TCN 45Y  KC-135  - Arco\
\
AI AWACS\
133.00 AM  CH 18    - Overlord (UAE)\
134.00 AM                 - Magic 1-1 (Carrier)\
\
JTAC Drones:\
\
JTAC4 Siri Island                    -Laser Code: 1660\
JTAC5 Abu Musa Island        -Laser Code: 1670\
JTAC6 Player Conrolled       -Laser Code:  1680\
JTAC 7 Training Range        - Lasercode: 1655\
\
TOPGUN Music on 127.00 AM !!!\
\
\
\
",
    ["DictKey_UnitName_4392"] = "Colt 1-2",
    ["DictKey_GroupName_710"] = " #031",
    ["DictKey_WptName_4290"] = "",
    ["DictKey_WptName_407"] = "Abu Musa",
    ["DictKey_GroupName_3047"] = "Plant #023",
    ["DictKey_WptName_2805"] = "",
    ["DictKey_UnitName_3441"] = "Tanque de combustible",
    ["DictKey_UnitName_953"] = "Unit #023",
    ["DictKey_WptName_3415"] = "",
    ["DictKey_WptName_2959"] = "",
    ["DictKey_ActionText_3951"] = "if Group.getByName('AWACS 302') == nil then\
return true\
else\
return false\
end",
    ["DictKey_GroupName_2545"] = "Plant #037",
    ["DictKey_UnitName_3159"] = "Piloto #012",
    ["DictKey_WptName_1395"] = "",
    ["DictKey_UnitName_874"] = "Unit #109",
    ["DictKey_UnitName_2273"] = "Refinery #019",
    ["DictKey_UnitName_701"] = " #016",
    ["DictKey_UnitName_347"] = "AWACS 303",
    ["DictKey_UnitName_911"] = "Unit #224",
    ["DictKey_WptName_5234"] = "",
    ["DictKey_UnitName_5056"] = "Unit #351",
    ["DictKey_WptName_298"] = "",
    ["DictKey_GroupName_2698"] = "Plant #101",
    ["DictKey_WptName_2361"] = "",
    ["DictKey_WptName_808"] = "",
    ["DictKey_UnitName_4725"] = "Unit #234",
    ["DictKey_UnitName_2702"] = "Plant #067",
    ["DictKey_UnitName_464"] = " #050",
    ["DictKey_WptName_4092"] = "",
    ["DictKey_UnitName_3083"] = "Piloto #003",
    ["DictKey_WptName_1904"] = "",
    ["DictKey_WptName_87"] = "",
    ["DictKey_UnitName_3786"] = "",
    ["DictKey_GroupName_5471"] = "M-2000 Tunb Kochak Island CAP #002",
    ["DictKey_GroupName_365"] = "Arco",
    ["DictKey_UnitName_971"] = "Unit #236",
    ["DictKey_UnitName_1723"] = "Refinery",
    ["DictKey_UnitName_5040"] = "Unit #339",
    ["DictKey_GroupName_2437"] = "Refinery #005",
    ["DictKey_WptName_1477"] = "",
    ["DictKey_WptName_3904"] = "",
    ["DictKey_UnitName_4952"] = "",
    ["DictKey_WptName_584"] = "",
    ["DictKey_GroupName_2476"] = "Plant #038",
    ["DictKey_GroupName_2611"] = "Plant #089",
    ["DictKey_WptName_5368"] = "",
    ["DictKey_UnitName_2333"] = "Refinery #005",
    ["DictKey_UnitName_2561"] = "Plant #070",
    ["DictKey_WptName_453"] = "",
    ["DictKey_WptName_2712"] = "",
    ["DictKey_WptName_3009"] = "",
    ["DictKey_UnitName_186"] = "Unit #114",
    ["DictKey_WptName_8"] = "",
    ["DictKey_UnitName_2747"] = "Oil tower #001",
    ["DictKey_UnitName_1540"] = "Oil platform #001",
    ["DictKey_UnitName_1912"] = "Oil tower #002",
    ["DictKey_UnitName_183"] = "Unit #111",
    ["DictKey_UnitName_2121"] = "Unidad #015",
    ["DictKey_UnitName_5472"] = "11 #003",
    ["DictKey_UnitName_833"] = "",
    ["DictKey_UnitName_376"] = " #054",
    ["DictKey_GroupName_3569"] = "Tanque de combustible #042",
    ["DictKey_UnitName_346"] = "",
    ["DictKey_UnitName_2390"] = "Refinery #003",
    ["DictKey_GroupName_2957"] = "Rudan Conversion #012",
    ["DictKey_UnitName_433"] = "Unit #064",
    ["DictKey_UnitName_905"] = "Unit #218",
    ["DictKey_WptName_544"] = "",
    ["DictKey_UnitName_1077"] = "Unit #057",
    ["DictKey_WptName_2652"] = "",
    ["DictKey_UnitName_1483"] = "Unit #100",
    ["DictKey_WptName_244"] = "",
    ["DictKey_GroupName_2028"] = "Plant #022",
    ["DictKey_UnitName_2987"] = "Oil ship",
    ["DictKey_WptName_3412"] = "",
    ["DictKey_WptName_981"] = "",
    ["DictKey_WptName_371"] = "",
    ["DictKey_UnitName_2504"] = "Plant #039",
    ["DictKey_GroupName_2641"] = "Plant #070",
    ["DictKey_UnitName_4293"] = "",
    ["DictKey_WptName_5263"] = "",
    ["DictKey_UnitName_2101"] = "Plant #003",
    ["DictKey_GroupName_1755"] = "Refinery #001",
    ["DictKey_ActionText_4048"] = "if Group.getByName('Magic') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_2781"] = "",
    ["DictKey_WptName_431"] = "",
    ["DictKey_WptName_140"] = "",
    ["DictKey_ActionText_5089"] = "An variety of air to ground targets have been placed at the target range.\
(don't worry they are unarmed)\
POS: N23.11.91 E55.15.121\
ELEV: 344ft \
\
Good luck rookie!\
",
    ["DictKey_WptName_5470"] = "",
    ["DictKey_UnitName_985"] = "Unit #087",
    ["DictKey_GroupName_2209"] = "Plant #056",
    ["DictKey_GroupName_3065"] = "Plant #022",
    ["DictKey_UnitName_1163"] = "Unit #227",
    ["DictKey_UnitName_3063"] = "Plant #020",
    ["DictKey_WptName_696"] = "",
    ["DictKey_UnitName_1753"] = "Refinery #003",
    ["DictKey_ActionText_3955"] = "if Group.getByName('IRN Shell') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_4551"] = "",
    ["DictKey_UnitName_2735"] = "Oil tower",
    ["DictKey_UnitName_3408"] = "Tanque de combustible #001",
    ["DictKey_UnitName_902"] = "Pilot #022",
    ["DictKey_WptName_3022"] = "",
    ["DictKey_UnitName_1121"] = "Unit #178",
    ["DictKey_GroupName_4003"] = "",
    ["DictKey_UnitName_1331"] = "Unit #059",
    ["DictKey_WptName_4097"] = "",
    ["DictKey_WptName_1997"] = "",
    ["DictKey_UnitName_4168"] = "",
    ["DictKey_UnitName_2303"] = "Refinery #002",
    ["DictKey_UnitName_3300"] = "Tanque de combustible #005",
    ["DictKey_UnitName_359"] = "Unit #082",
    ["DictKey_WptName_1907"] = "",
    ["DictKey_UnitName_703"] = "Pilot #006",
    ["DictKey_GroupName_2707"] = "Plant #108",
    ["DictKey_UnitName_3110"] = "",
    ["DictKey_GroupName_1463"] = "SAM site 01 #004",
    ["DictKey_WptName_3586"] = "",
    ["DictKey_WptName_5372"] = "",
    ["DictKey_GroupName_3440"] = "Tanque de combustible",
    ["DictKey_GroupName_2665"] = "Plant #098",
    ["DictKey_UnitName_3399"] = "Tanque de combustible",
    ["DictKey_GroupName_762"] = " #036",
    ["DictKey_UnitName_4198"] = "",
    ["DictKey_UnitName_4359"] = "East TEST Wingman",
    ["DictKey_UnitName_994"] = "Pilot #009",
    ["DictKey_GroupName_462"] = "New Static Object #002",
    ["DictKey_UnitName_1816"] = "Oil tower",
    ["DictKey_GroupName_1935"] = "Oil platform #002",
    ["DictKey_UnitName_253"] = "",
    ["DictKey_WptName_4618"] = "Quesm",
    ["DictKey_UnitName_440"] = "Unit #153",
    ["DictKey_UnitName_1029"] = "Enfield",
    ["DictKey_UnitName_1279"] = "Unit #024",
    ["DictKey_WptName_5433"] = "",
    ["DictKey_WptName_4566"] = "",
    ["DictKey_WptName_3295"] = "",
    ["DictKey_GroupName_2686"] = "Plant #066",
    ["DictKey_WptName_3448"] = "",
    ["DictKey_WptName_5204"] = "",
    ["DictKey_UnitName_261"] = "Unit #040",
    ["DictKey_UnitName_4782"] = "",
    ["DictKey_GroupName_1083"] = "New Airplane Group #001",
    ["DictKey_UnitName_770"] = "New Static Object #009",
    ["DictKey_UnitName_2849"] = "Oil tower #066",
    ["DictKey_UnitName_1049"] = "Unit #176",
    ["DictKey_GroupName_2515"] = "Plant #065",
    ["DictKey_GroupName_1995"] = "Plant #011",
    ["DictKey_UnitName_1179"] = "Unit #009",
    ["DictKey_UnitName_584"] = " #042",
    ["DictKey_GroupName_2094"] = "Plant #044",
    ["DictKey_UnitName_1437"] = "",
    ["DictKey_WptName_5475"] = "",
    ["DictKey_WptName_1039"] = "",
    ["DictKey_WptName_1070"] = "",
    ["DictKey_WptName_1085"] = "",
    ["DictKey_GroupName_1608"] = "Refinery #001",
    ["DictKey_GroupName_2596"] = "Plant #084",
    ["DictKey_WptName_5147"] = "AG RANGE",
    ["DictKey_UnitName_1160"] = "Unit #224",
    ["DictKey_UnitName_239"] = "",
    ["DictKey_UnitName_3222"] = "Refinery #080",
    ["DictKey_UnitName_4220"] = "",
    ["DictKey_WptName_2178"] = "",
    ["DictKey_UnitName_1256"] = "",
    ["DictKey_UnitName_4838"] = "",
    ["DictKey_UnitName_4696"] = "Unit #183",
    ["DictKey_GroupName_3377"] = "Tanque de combustible #008",
    ["DictKey_UnitName_2258"] = "Refinery #014",
    ["DictKey_GroupName_751"] = "New Static Object #001",
    ["DictKey_UnitName_4976"] = "",
    ["DictKey_UnitName_33"] = "Unit #019",
    ["DictKey_ActionText_3990"] = "ctld.JTACAutoLase('JTAC1', 1688, true, \"vehicle\");\
ctld.JTACAutoLase('JTAC2', 1688, true, \"vehicle\");\
ctld.JTACAutoLase('JTAC3', 1688, true, \"vehicle\");\
ctld.JTACAutoLase('JTAC4', 1660, true, \"vehicle\");\
ctld.JTACAutoLase('JTAC5', 1670, true, \"vehicle\");\
ctld.JTACAutoLase('JTAC6', 1680, true, \"vehicle\");\
ctld.JTACAutoLase('JTAC7', 1655, true, \"vehicle\");",
    ["DictKey_UnitName_4741"] = "",
    ["DictKey_WptName_667"] = "",
    ["DictKey_UnitName_1840"] = "Oil tower #002",
    ["DictKey_UnitName_908"] = "Unit #221",
    ["DictKey_WptName_5293"] = "",
    ["DictKey_WptName_4126"] = "",
    ["DictKey_WptName_2700"] = "",
    ["DictKey_WptName_5376"] = "AG RANGE",
    ["DictKey_UnitName_3537"] = "Tanque de combustible #033",
    ["DictKey_UnitName_4150"] = "Piloto #035",
    ["DictKey_GroupName_4103"] = "Enfield #004",
    ["DictKey_WptName_349"] = "",
    ["DictKey_UnitName_3715"] = "Munición #007",
    ["DictKey_WptName_842"] = "",
    ["DictKey_WptName_5219"] = "",
    ["DictKey_GroupName_2362"] = "Refinery #001",
    ["DictKey_UnitName_5480"] = "12 #004",
    ["DictKey_ActionRadioText_4630"] = "Request JTAC: Abu Musa Island",
    ["DictKey_GroupName_2906"] = "Weapons storage #006",
    ["DictKey_WptName_1386"] = "",
    ["DictKey_WptName_3898"] = "",
    ["DictKey_WptName_5105"] = "AG RANGE",
    ["DictKey_WptName_460"] = "",
    ["DictKey_WptName_3064"] = "",
    ["DictKey_UnitName_1846"] = "Oil tower",
    ["DictKey_GroupName_2013"] = "Plant #017",
    ["DictKey_WptName_4439"] = "",
    ["DictKey_GroupName_2770"] = "Oil tower #047",
    ["DictKey_UnitName_4467"] = "",
    ["DictKey_UnitName_2109"] = "Unidad #007",
    ["DictKey_UnitName_888"] = "Unit #217",
    ["DictKey_WptName_4007"] = "",
    ["DictKey_UnitName_1867"] = "Oil tower #003",
    ["DictKey_UnitName_968"] = "Unit #233",
    ["DictKey_WptName_4755"] = "",
    ["DictKey_WptName_436"] = "",
    ["DictKey_UnitName_3411"] = "Tanque de combustible #003",
    ["DictKey_WptName_2469"] = "",
    ["DictKey_WptName_1808"] = "",
    ["DictKey_UnitName_3540"] = "Tanque de combustible #028",
    ["DictKey_ActionRadioText_5406"] = "",
    ["DictKey_UnitName_463"] = "",
    ["DictKey_GroupName_2566"] = "Plant #074",
    ["DictKey_UnitName_1822"] = "Oil tower",
    ["DictKey_WptName_2283"] = "",
    ["DictKey_GroupName_3404"] = "Tanque de combustible #004",
    ["DictKey_UnitName_4702"] = "Unit #189",
    ["DictKey_UnitName_725"] = " #020",
    ["DictKey_UnitName_1861"] = "Oil tower #001",
    ["DictKey_UnitName_709"] = "Pilot #008",
    ["DictKey_WptName_5281"] = "",
    ["DictKey_UnitName_1385"] = "Pilot #009",
    ["DictKey_UnitName_620"] = " #062",
    ["DictKey_WptName_4567"] = "",
    ["DictKey_UnitName_4906"] = "",
    ["DictKey_UnitName_4320"] = "Unit #041",
    ["DictKey_UnitName_229"] = "",
    ["DictKey_UnitName_2600"] = "Plant #069",
    ["DictKey_WptName_557"] = "",
    ["DictKey_WptName_5142"] = "AA TGT",
    ["DictKey_WptName_4824"] = "",
    ["DictKey_WptName_4143"] = "",
    ["DictKey_WptName_1392"] = "",
    ["DictKey_WptName_219"] = "",
    ["DictKey_WptName_3965"] = "",
    ["DictKey_WptName_3244"] = "",
    ["DictKey_UnitName_948"] = " #067",
    ["DictKey_WptName_412"] = "",
    ["DictKey_WptName_4346"] = "",
    ["DictKey_WptName_3175"] = "",
    ["DictKey_GroupName_889"] = "New Airplane Group #001",
    ["DictKey_WptName_1583"] = "",
    ["DictKey_WptName_3864"] = "",
    ["DictKey_UnitName_1327"] = "Unit #057",
    ["DictKey_GroupName_3236"] = "Refinery #084",
    ["DictKey_UnitName_422"] = "Chevy 1-3",
    ["DictKey_GroupName_1309"] = "SAM site 01 #002",
    ["DictKey_GroupName_498"] = "New Static Object #004",
    ["DictKey_UnitName_4733"] = "Unit #277",
    ["DictKey_WptName_4334"] = "",
    ["DictKey_UnitName_2327"] = "Refinery #003",
    ["DictKey_UnitName_3127"] = "Nuevo objeto estático",
    ["DictKey_GroupName_586"] = "SAM site 01 #019",
    ["DictKey_WptName_4360"] = "",
    ["DictKey_GroupName_3188"] = "Refinery #077",
    ["DictKey_WptName_4800"] = "",
    ["DictKey_WptName_4020"] = "",
    ["DictKey_WptName_2370"] = "",
    ["DictKey_GroupName_2167"] = "Plant #034",
    ["DictKey_GroupName_1605"] = "Refinery #003",
    ["DictKey_UnitName_3414"] = "Tanque de combustible #005",
    ["DictKey_UnitName_2270"] = "Refinery #018",
    ["DictKey_GroupName_2674"] = "Plant #065",
    ["DictKey_GroupName_2287"] = "Refinery #004",
    ["DictKey_UnitName_4768"] = "",
    ["DictKey_WptName_2832"] = "",
    ["DictKey_WptName_5328"] = "",
    ["DictKey_UnitName_1181"] = "Unit #011",
    ["DictKey_WptName_1607"] = "",
    ["DictKey_GroupName_1514"] = "",
    ["DictKey_WptName_4312"] = "",
    ["DictKey_UnitName_2666"] = "Plant #105",
    ["DictKey_UnitName_2116"] = "Unidad #013",
    ["DictKey_UnitName_5202"] = "Pilot #027",
    ["DictKey_UnitName_4947"] = "",
    ["DictKey_WptName_482"] = "",
    ["DictKey_UnitName_4401"] = "Stennis-F-14",
    ["DictKey_UnitName_5003"] = "Unit #308",
    ["DictKey_UnitName_3447"] = "Tanque de combustible #005",
    ["DictKey_UnitName_3097"] = "AWACS 302",
    ["DictKey_WptName_3034"] = "",
    ["DictKey_GroupName_3566"] = "Tanque de combustible #041",
    ["DictKey_UnitName_2201"] = "Plant #009",
    ["DictKey_WptName_3146"] = "",
    ["DictKey_GroupName_1869"] = "Oil tower #009",
    ["DictKey_GroupName_4789"] = "",
    ["DictKey_WptName_5468"] = "",
    ["DictKey_UnitName_611"] = " #060",
    ["DictKey_UnitName_4898"] = "",
    ["DictKey_WptName_5477"] = "",
    ["DictKey_UnitName_4674"] = "Unit #146",
    ["DictKey_UnitName_28"] = "",
    ["DictKey_GroupName_4286"] = "",
    ["DictKey_GroupName_2224"] = "Plant #061",
    ["DictKey_UnitName_2723"] = "Oil tower",
    ["DictKey_WptName_813"] = "",
    ["DictKey_UnitName_1291"] = "Unit #028",
    ["DictKey_UnitName_2456"] = "Refinery #004",
    ["DictKey_WptName_1431"] = "",
    ["DictKey_GroupName_2245"] = "Refinery #017",
    ["DictKey_GroupName_2314"] = "Refinery #006",
    ["DictKey_UnitName_2919"] = "Nuevo objeto estático #009",
    ["DictKey_UnitName_1151"] = "Unit #084",
    ["DictKey_UnitName_1273"] = "Unit #018",
    ["DictKey_GroupName_2563"] = "Plant #073",
    ["DictKey_GroupName_1875"] = "Oil tower #011",
    ["DictKey_GroupName_1662"] = "Refinery #028",
    ["DictKey_WptName_2445"] = "",
    ["DictKey_WptName_1541"] = "",
    ["DictKey_ActionText_3987"] = "mist.respawnGroup('JTAC5', true)",
    ["DictKey_WptName_2054"] = "",
    ["DictKey_WptName_726"] = "",
    ["DictKey_GroupName_2581"] = "Plant #079",
    ["DictKey_WptName_699"] = "",
    ["DictKey_WptName_2559"] = "",
    ["DictKey_WptName_5178"] = "AA TGT",
    ["DictKey_GroupName_5285"] = "F18 Carrier Spawn CAT",
    ["DictKey_GroupName_3678"] = "Munición #001",
    ["DictKey_UnitName_5208"] = "Enfield 2-3 ",
    ["DictKey_WptName_1850"] = "",
    ["DictKey_GroupName_2473"] = "Plant #037",
    ["DictKey_WptName_4473"] = "",
    ["DictKey_GroupName_103"] = "Kuznetsov",
    ["DictKey_WptName_1308"] = "",
    ["DictKey_WptName_3631"] = "",
    ["DictKey_UnitName_1224"] = "Unit #259",
    ["DictKey_UnitName_3525"] = "Refinery #080",
    ["DictKey_UnitName_326"] = "",
    ["DictKey_WptName_3229"] = "",
    ["DictKey_WptName_4014"] = "",
    ["DictKey_GroupName_1189"] = "SAM site 01 #011",
    ["DictKey_WptName_1316"] = "",
    ["DictKey_WptName_4985"] = "",
    ["DictKey_WptName_173"] = "",
    ["DictKey_WptName_5131"] = "",
    ["DictKey_UnitName_4280"] = "",
    ["DictKey_WptName_447"] = "",
    ["DictKey_UnitName_2510"] = "Plant #032",
    ["DictKey_UnitName_1747"] = "Refinery #006",
    ["DictKey_UnitName_860"] = "",
    ["DictKey_GroupName_3729"] = "Munición #017",
    ["DictKey_UnitName_3088"] = "Piloto #006",
    ["DictKey_GroupName_4959"] = "",
    ["DictKey_WptName_4518"] = "",
    ["DictKey_UnitName_2017"] = "Plant #006",
    ["DictKey_UnitName_3582"] = "Refinery #099",
    ["DictKey_UnitName_2690"] = "Plant #068",
    ["DictKey_GroupName_4505"] = "",
    ["DictKey_UnitName_634"] = "Unit #203",
    ["DictKey_UnitName_4757"] = "",
    ["DictKey_UnitName_1035"] = "Unit #009",
    ["DictKey_UnitName_4062"] = "Unidad #061",
    ["DictKey_UnitName_3060"] = "Plant #018",
    ["DictKey_UnitName_962"] = "Unit #237",
    ["DictKey_WptName_2352"] = "",
    ["DictKey_UnitName_2978"] = "Oil ship",
    ["DictKey_GroupName_458"] = "Colt #002",
    ["DictKey_WptName_2772"] = "",
    ["DictKey_UnitName_4011"] = " #058",
    ["DictKey_GroupName_83"] = "SAM site 01 #009",
    ["DictKey_WptName_5459"] = "",
    ["DictKey_UnitName_106"] = "Molniya",
    ["DictKey_UnitName_3555"] = "Refinery #096",
    ["DictKey_WptName_135"] = "",
    ["DictKey_UnitName_2798"] = "Oil tower #004",
    ["DictKey_WptName_5183"] = "AG RANGE",
    ["DictKey_UnitName_509"] = " #009",
    ["DictKey_WptName_5259"] = "",
    ["DictKey_WptName_2847"] = "",
    ["DictKey_ActionText_3933"] = "--[[\
    Combat Troop and Logistics Drop\
\
    Allows Huey, Mi-8 and C130 to transport troops internally and Helicopters to transport Logistic / Vehicle units to the field via sling-loads\
    without requiring external mods.\
\
    Supports all of the original CTTS functionality such as AI auto troop load and unload as well as group spawning and preloading of troops into units.\
\
    Supports deployment of Auto Lasing JTAC to the field\
\
    See https://github.com/ciribob/DCS-CTLD for a user manual and the latest version\
\
    Contributors:\
        - Steggles - https://github.com/Bob7heBuilder\
        - mvee - https://github.com/mvee\
        - jmontleon - https://github.com/jmontleon\
        - emilianomolina - https://github.com/emilianomolina\
\
    Version: 1.73 - 15/04/2018\
      - Allow minimum distance from friendly logistics to be set\
 ]]\
\
ctld = {} -- DONT REMOVE!\
\
-- ************************************************************************\
-- *********************  USER CONFIGURATION ******************************\
-- ************************************************************************\
\
ctld.staticBugWorkaround = false --  DCS had a bug where destroying statics would cause a crash. If this happens again, set this to TRUE\
\
ctld.disableAllSmoke = false -- if true, all smoke is diabled at pickup and drop off zones regardless of settings below. Leave false to respect settings below\
\
ctld.hoverPickup = true --  if set to false you can load crates with the F10 menu instead of hovering... Only if not using real crates!\
\
ctld.enableCrates = true -- if false, Helis will not be able to spawn or unpack crates so will be normal CTTS\
ctld.slingLoad = false -- if false, crates can be used WITHOUT slingloading, by hovering above the crate, simulating slingloading but not the weight...\
-- There are some bug with Sling-loading that can cause crashes, if these occur set slingLoad to false\
-- to use the other method.\
-- Set staticBugFix  to FALSE if use set ctld.slingLoad to TRUE\
\
ctld.enableSmokeDrop = true -- if false, helis and c-130 will not be able to drop smoke\
\
ctld.maxExtractDistance = 125 -- max distance from vehicle to troops to allow a group extraction\
ctld.maximumDistanceLogistic = 200 -- max distance from vehicle to logistics to allow a loading or spawning operation\
ctld.maximumSearchDistance = 4000 -- max distance for troops to search for enemy\
ctld.maximumMoveDistance = 2000 -- max distance for troops to move from drop point if no enemy is nearby\
\
ctld.minimumDeployDistance = 1000 -- minimum distance from a friendly pickup zone where you can deploy a crate\
\
ctld.numberOfTroops = 10 -- default number of troops to load on a transport heli or C-130 \
                            -- also works as maximum size of group that'll fit into a helicopter unless overridden\
ctld.enableFastRopeInsertion = true -- allows you to drop troops by fast rope\
ctld.fastRopeMaximumHeight = 18.28 -- in meters which is 60 ft max fast rope (not rappell) safe height\
\
ctld.vehiclesForTransportRED = { \"BRDM-2\", \"BTR_D\" } -- vehicles to load onto Il-76 - Alternatives {\"Strela-1 9P31\",\"BMP-1\"}\
ctld.vehiclesForTransportBLUE = { \"M1045 HMMWV TOW\", \"M1043 HMMWV Armament\" } -- vehicles to load onto c130 - Alternatives {\"M1128 Stryker MGS\",\"M1097 Avenger\"}\
\
ctld.aaLaunchers = 3 -- controls how many launchers to add to the kub/buk when its spawned.\
ctld.hawkLaunchers = 5 -- controls how many launchers to add to the hawk when its spawned.\
\
ctld.spawnRPGWithCoalition = true --spawns a friendly RPG unit with Coalition forces\
ctld.spawnStinger = false -- spawns a stinger / igla soldier with a group of 6 or more soldiers!\
\
ctld.enabledFOBBuilding = true -- if true, you can load a crate INTO a C-130 than when unpacked creates a Forward Operating Base (FOB) which is a new place to spawn (crates) and carry crates from\
-- In future i'd like it to be a FARP but so far that seems impossible...\
-- You can also enable troop Pickup at FOBS\
\
ctld.cratesRequiredForFOB = 3 -- The amount of crates required to build a FOB. Once built, helis can spawn crates at this outpost to be carried and deployed in another area.\
-- The large crates can only be loaded and dropped by large aircraft, like the C-130 and listed in ctld.vehicleTransportEnabled\
-- Small FOB crates can be moved by helicopter. The FOB will require ctld.cratesRequiredForFOB larges crates and small crates are 1/3 of a large fob crate\
-- To build the FOB entirely out of small crates you will need ctld.cratesRequiredForFOB * 3\
\
ctld.troopPickupAtFOB = true -- if true, troops can also be picked up at a created FOB\
\
ctld.buildTimeFOB = 120 --time in seconds for the FOB to be built\
\
ctld.crateWaitTime = 120 -- time in seconds to wait before you can spawn another crate\
\
ctld.forceCrateToBeMoved = true -- a crate must be picked up at least once and moved before it can be unpacked. Helps to reduce crate spam\
\
ctld.radioSound = \"beacon.ogg\" -- the name of the sound file to use for the FOB radio beacons. If this isnt added to the mission BEACONS WONT WORK!\
ctld.radioSoundFC3 = \"beaconsilent.ogg\" -- name of the second silent radio file, used so FC3 aircraft dont hear ALL the beacon noises... :)\
\
ctld.deployedBeaconBattery = 30 -- the battery on deployed beacons will last for this number minutes before needing to be re-deployed\
\
ctld.enabledRadioBeaconDrop = true -- if its set to false then beacons cannot be dropped by units\
\
ctld.allowRandomAiTeamPickups = false -- Allows the AI to randomize the loading of infantry teams (specified below) at pickup zones\
\
-- Simulated Sling load configuration\
\
ctld.minimumHoverHeight = 7.5 -- Lowest allowable height for crate hover\
ctld.maximumHoverHeight = 12.0 -- Highest allowable height for crate hover\
ctld.maxDistanceFromCrate = 5.5 -- Maximum distance from from crate for hover\
ctld.hoverTime = 10 -- Time to hold hover above a crate for loading in seconds\
\
-- end of Simulated Sling load configuration\
\
-- AA SYSTEM CONFIG --\
-- Sets a limit on the number of active AA systems that can be built for RED.\
-- A system is counted as Active if its fully functional and has all parts\
-- If a system is partially destroyed, it no longer counts towards the total\
-- When this limit is hit, a player will still be able to get crates for an AA system, just unable\
-- to unpack them\
\
ctld.AASystemLimitRED = 20 -- Red side limit\
\
ctld.AASystemLimitBLUE = 20 -- Blue side limit\
\
--END AA SYSTEM CONFIG --\
\
-- ***************** JTAC CONFIGURATION *****************\
\
ctld.JTAC_LIMIT_RED = 10 -- max number of JTAC Crates for the RED Side\
ctld.JTAC_LIMIT_BLUE = 10 -- max number of JTAC Crates for the BLUE Side\
\
ctld.JTAC_dropEnabled = true -- allow JTAC Crate spawn from F10 menu\
\
ctld.JTAC_maxDistance = 10000 -- How far a JTAC can \"see\" in meters (with Line of Sight)\
\
ctld.JTAC_smokeOn_RED = true -- enables marking of target with smoke for RED forces\
ctld.JTAC_smokeOn_BLUE = true -- enables marking of target with smoke for BLUE forces\
\
ctld.JTAC_smokeColour_RED = 4 -- RED side smoke colour -- Green = 0 , Red = 1, White = 2, Orange = 3, Blue = 4\
ctld.JTAC_smokeColour_BLUE = 1 -- BLUE side smoke colour -- Green = 0 , Red = 1, White = 2, Orange = 3, Blue = 4\
\
ctld.JTAC_jtacStatusF10 = true -- enables F10 JTAC Status menu\
\
ctld.JTAC_location = true -- shows location of target in JTAC message\
\
ctld.JTAC_lock = \"all\" -- \"vehicle\" OR \"troop\" OR \"all\" forces JTAC to only lock vehicles or troops or all ground units\
\
-- ***************** Pickup, dropoff and waypoint zones *****************\
\
-- Available colors (anything else like \"none\" disables smoke): \"green\", \"red\", \"white\", \"orange\", \"blue\", \"none\",\
\
-- Use any of the predefined names or set your own ones\
\
-- You can add number as a third option to limit the number of soldier or vehicle groups that can be loaded from a zone.\
-- Dropping back a group at a limited zone will add one more to the limit\
\
-- If a zone isn't ACTIVE then you can't pickup from that zone until the zone is activated by ctld.activatePickupZone\
-- using the Mission editor\
\
-- You can pickup from a SHIP by adding the SHIP UNIT NAME instead of a zone name\
\
-- Side - Controls which side can load/unload troops at the zone\
\
-- Flag Number - Optional last field. If set the current number of groups remaining can be obtained from the flag value\
\
--pickupZones = { \"Zone name or Ship Unit Name\", \"smoke color\", \"limit (-1 unlimited)\", \"ACTIVE (yes/no)\", \"side (0 = Both sides / 1 = Red / 2 = Blue )\", flag number (optional) }\
ctld.pickupZones = {\
    { \"pickzone1\", \"blue\", -1, \"yes\", 0 },\
    { \"pickzone2\", \"red\", -1, \"yes\", 0 },\
    { \"pickzone3\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone4\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone5\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone6\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone7\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone8\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone9\", \"none\", 5, \"yes\", 1 }, -- limits pickup zone 9 to 5 groups of soldiers or vehicles, only red can pick up\
    { \"pickzone10\", \"none\", 10, \"yes\", 2 },  -- limits pickup zone 10 to 10 groups of soldiers or vehicles, only blue can pick up\
\
    { \"pickzone11\", \"blue\", 20, \"no\", 2 },  -- limits pickup zone 11 to 20 groups of soldiers or vehicles, only blue can pick up. Zone starts inactive!\
    { \"pickzone12\", \"red\", 20, \"no\", 1 },  -- limits pickup zone 11 to 20 groups of soldiers or vehicles, only blue can pick up. Zone starts inactive!\
    { \"pickzone13\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone14\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone15\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone16\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone17\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone18\", \"none\", -1, \"yes\", 0 },\
    { \"pickzone19\", \"none\", 5, \"yes\", 0 },\
    { \"pickzone20\", \"none\", 10, \"yes\", 0, 1000 }, -- optional extra flag number to store the current number of groups available in\
\
    { \"USA Carrier\", \"blue\", 10, \"yes\", 0, 1001 }, -- instead of a Zone Name you can also use the UNIT NAME of a ship\
}\
\
\
-- dropOffZones = {\"name\",\"smoke colour\",0,side 1 = Red or 2 = Blue or 0 = Both sides}\
ctld.dropOffZones = {\
    { \"dropzone1\", \"green\", 2 },\
    { \"dropzone2\", \"blue\", 2 },\
    { \"dropzone3\", \"orange\", 2 },\
    { \"dropzone4\", \"none\", 2 },\
    { \"dropzone5\", \"none\", 1 },\
    { \"dropzone6\", \"none\", 1 },\
    { \"dropzone7\", \"none\", 1 },\
    { \"dropzone8\", \"none\", 1 },\
    { \"dropzone9\", \"none\", 1 },\
    { \"dropzone10\", \"none\", 1 },\
}\
\
\
--wpZones = { \"Zone name\", \"smoke color\",  \"ACTIVE (yes/no)\", \"side (0 = Both sides / 1 = Red / 2 = Blue )\", }\
ctld.wpZones = {\
    { \"wpzone1\", \"green\",\"yes\", 2 },\
    { \"wpzone2\", \"blue\",\"yes\", 2 },\
    { \"wpzone3\", \"orange\",\"yes\", 2 },\
    { \"wpzone4\", \"none\",\"yes\", 2 },\
    { \"wpzone5\", \"none\",\"yes\", 2 },\
    { \"wpzone6\", \"none\",\"yes\", 1 },\
    { \"wpzone7\", \"none\",\"yes\", 1 },\
    { \"wpzone8\", \"none\",\"yes\", 1 },\
    { \"wpzone9\", \"none\",\"yes\", 1 },\
    { \"wpzone10\", \"none\",\"no\", 0 }, -- Both sides as its set to 0\
}\
\
\
-- ******************** Transports names **********************\
\
-- Use any of the predefined names or set your own ones\
ctld.transportPilotNames = {\
    \"helicargo1\",\
    \"helicargo2\",\
    \"helicargo3\",\
    \"helicargo4\",\
    \"helicargo5\",\
    \"helicargo6\",\
    \"helicargo7\",\
    \"helicargo8\",\
    \"helicargo9\",\
    \"helicargo10\",\
\
    \"helicargo11\",\
    \"helicargo12\",\
    \"helicargo13\",\
    \"helicargo14\",\
    \"helicargo15\",\
    \"helicargo16\",\
    \"helicargo17\",\
    \"helicargo18\",\
    \"helicargo19\",\
    \"helicargo20\",\
\
    \"helicargo21\",\
    \"helicargo22\",\
    \"helicargo23\",\
    \"helicargo24\",\
    \"helicargo25\",\
\
    \"MEDEVAC #1\",\
    \"MEDEVAC #2\",\
    \"MEDEVAC #3\",\
    \"MEDEVAC #4\",\
    \"MEDEVAC #5\",\
    \"MEDEVAC #6\",\
    \"MEDEVAC #7\",\
    \"MEDEVAC #8\",\
    \"MEDEVAC #9\",\
    \"MEDEVAC #10\",\
    \"MEDEVAC #11\",\
    \"MEDEVAC #12\",\
    \"MEDEVAC #13\",\
    \"MEDEVAC #14\",\
    \"MEDEVAC #15\",\
    \"MEDEVAC #16\",\
\
    \"MEDEVAC RED #1\",\
    \"MEDEVAC RED #2\",\
    \"MEDEVAC RED #3\",\
    \"MEDEVAC RED #4\",\
    \"MEDEVAC RED #5\",\
    \"MEDEVAC RED #6\",\
    \"MEDEVAC RED #7\",\
    \"MEDEVAC RED #8\",\
    \"MEDEVAC RED #9\",\
    \"MEDEVAC RED #10\",\
    \"MEDEVAC RED #11\",\
    \"MEDEVAC RED #12\",\
    \"MEDEVAC RED #13\",\
    \"MEDEVAC RED #14\",\
    \"MEDEVAC RED #15\",\
    \"MEDEVAC RED #16\",\
    \"MEDEVAC RED #17\",\
    \"MEDEVAC RED #18\",\
    \"MEDEVAC RED #19\",\
    \"MEDEVAC RED #20\",\
    \"MEDEVAC RED #21\",\
\
    \"MEDEVAC BLUE #1\",\
    \"MEDEVAC BLUE #2\",\
    \"MEDEVAC BLUE #3\",\
    \"MEDEVAC BLUE #4\",\
    \"MEDEVAC BLUE #5\",\
    \"MEDEVAC BLUE #6\",\
    \"MEDEVAC BLUE #7\",\
    \"MEDEVAC BLUE #8\",\
    \"MEDEVAC BLUE #9\",\
    \"MEDEVAC BLUE #10\",\
    \"MEDEVAC BLUE #11\",\
    \"MEDEVAC BLUE #12\",\
    \"MEDEVAC BLUE #13\",\
    \"MEDEVAC BLUE #14\",\
    \"MEDEVAC BLUE #15\",\
    \"MEDEVAC BLUE #16\",\
    \"MEDEVAC BLUE #17\",\
    \"MEDEVAC BLUE #18\",\
    \"MEDEVAC BLUE #19\",\
    \"MEDEVAC BLUE #20\",\
    \"MEDEVAC BLUE #21\",\
\
    -- *** AI transports names (different names only to ease identification in mission) ***\
\
    -- Use any of the predefined names or set your own ones\
\
    \"transport1\",\
    \"transport2\",\
    \"transport3\",\
    \"transport4\",\
    \"transport5\",\
    \"transport6\",\
    \"transport7\",\
    \"transport8\",\
    \"transport9\",\
    \"transport10\",\
\
    \"transport11\",\
    \"transport12\",\
    \"transport13\",\
    \"transport14\",\
    \"transport15\",\
    \"transport16\",\
    \"transport17\",\
    \"transport18\",\
    \"transport19\",\
    \"transport20\",\
\
    \"transport21\",\
    \"transport22\",\
    \"transport23\",\
    \"transport24\",\
    \"transport25\",\
}\
\
-- *************** Optional Extractable GROUPS *****************\
\
-- Use any of the predefined names or set your own ones\
\
ctld.extractableGroups = {\
    \"extract1\",\
    \"extract2\",\
    \"extract3\",\
    \"extract4\",\
    \"extract5\",\
    \"extract6\",\
    \"extract7\",\
    \"extract8\",\
    \"extract9\",\
    \"extract10\",\
\
    \"extract11\",\
    \"extract12\",\
    \"extract13\",\
    \"extract14\",\
    \"extract15\",\
    \"extract16\",\
    \"extract17\",\
    \"extract18\",\
    \"extract19\",\
    \"extract20\",\
\
    \"extract21\",\
    \"extract22\",\
    \"extract23\",\
    \"extract24\",\
    \"extract25\",\
}\
\
-- ************** Logistics UNITS FOR CRATE SPAWNING ******************\
\
-- Use any of the predefined names or set your own ones\
-- When a logistic unit is destroyed, you will no longer be able to spawn crates\
\
ctld.logisticUnits = {\
    \"logistic1\",\
    \"logistic2\",\
    \"logistic3\",\
    \"logistic4\",\
    \"logistic5\",\
    \"logistic6\",\
    \"logistic7\",\
    \"logistic8\",\
    \"logistic9\",\
    \"logistic10\",\
}\
\
-- ************** UNITS ABLE TO TRANSPORT VEHICLES ******************\
-- Add the model name of the unit that you want to be able to transport and deploy vehicles\
-- units db has all the names or you can extract a mission.miz file by making it a zip and looking\
-- in the contained mission file\
ctld.vehicleTransportEnabled = {\
    \"76MD\", -- the il-76 mod doesnt use a normal - sign so il-76md wont match... !!!! GRR\
    \"C-130\",\
}\
\
\
-- ************** Maximum Units SETUP for UNITS ******************\
\
-- Put the name of the Unit you want to limit group sizes too\
-- i.e\
-- [\"UH-1H\"] = 10,\
--\
-- Will limit UH1 to only transport groups with a size 10 or less\
-- Make sure the unit name is exactly right or it wont work\
\
ctld.unitLoadLimits = {\
\
    -- Remove the -- below to turn on options\
    -- [\"SA342Mistral\"] = 4,\
    -- [\"SA342L\"] = 4,\
    -- [\"SA342M\"] = 4,\
\
}\
\
\
-- ************** Allowable actions for UNIT TYPES ******************\
\
-- Put the name of the Unit you want to limit actions for\
-- NOTE - the unit must've been listed in the transportPilotNames list above\
-- This can be used in conjunction with the options above for group sizes\
-- By default you can load both crates and troops unless overriden below\
-- i.e\
-- [\"UH-1H\"] = {crates=true, troops=false},\
--\
-- Will limit UH1 to only transport CRATES but NOT TROOPS\
--\
-- [\"SA342Mistral\"] = {crates=fales, troops=true},\
-- Will allow Mistral Gazelle to only transport crates, not troops\
\
ctld.unitActions = {\
\
    -- Remove the -- below to turn on options\
    -- [\"SA342Mistral\"] = {crates=true, troops=true},\
    -- [\"SA342L\"] = {crates=false, troops=true},\
    -- [\"SA342M\"] = {crates=false, troops=true},\
\
}\
\
-- ************** INFANTRY GROUPS FOR PICKUP ******************\
-- Unit Types\
-- inf is normal infantry\
-- mg is M249\
-- at is RPG-16\
-- aa is Stinger or Igla\
-- mortar is a 2B11 mortar unit\
-- You must add a name to the group for it to work\
-- You can also add an optional coalition side to limit the group to one side\
-- for the side - 2 is BLUE and 1 is RED\
ctld.loadableGroups = {\
    {name = \"Standard Group\", inf = 6, mg = 2, at = 2 }, -- will make a loadable group with 5 infantry, 2 MGs and 2 anti-tank for both coalitions\
    {name = \"Anti Air\", inf = 2, aa = 3  },\
    {name = \"Anti Tank\", inf = 2, at = 6  },\
    {name = \"Mortar Squad\", mortar = 6 },\
    -- {name = \"Mortar Squad Red\", inf = 2, mortar = 5, side =1 }, --would make a group loadable by RED only\
}\
\
-- ************** SPAWNABLE CRATES ******************\
-- Weights must be unique as we use the weight to change the cargo to the correct unit\
-- when we unpack\
--\
ctld.spawnableCrates = {\
    -- name of the sub menu on F10 for spawning crates\
    [\"Ground Forces\"] = {\
        --crates you can spawn\
        -- weight in KG\
        -- Desc is the description on the F10 MENU\
        -- unit is the model name of the unit to spawn\
        -- cratesRequired - if set requires that many crates of the same type within 100m of each other in order build the unit\
        -- side is optional but 2 is BLUE and 1 is RED\
        -- dont use that option with the HAWK Crates\
        { weight = 500, desc = \"HMMWV - TOW\", unit = \"M1045 HMMWV TOW\", side = 2 },\
        { weight = 505, desc = \"HMMWV - MG\", unit = \"M1043 HMMWV Armament\", side = 2 },\
\
        { weight = 510, desc = \"BTR-D\", unit = \"BTR_D\", side = 1 },\
        { weight = 515, desc = \"BRDM-2\", unit = \"BRDM-2\", side = 1 },\
\
        { weight = 520, desc = \"HMMWV - JTAC\", unit = \"Hummer\", side = 2, }, -- used as jtac and unarmed, not on the crate list if JTAC is disabled\
        { weight = 525, desc = \"SKP-11 - JTAC\", unit = \"SKP-11\", side = 1, }, -- used as jtac and unarmed, not on the crate list if JTAC is disabled\
\
        { weight = 100, desc = \"2B11 Mortar\", unit = \"2B11 mortar\" },\
\
        { weight = 250, desc = \"SPH 2S19 Msta\", unit = \"SAU Msta\", side = 1, cratesRequired = 3 },\
        { weight = 255, desc = \"M-109\", unit = \"M-109\", side = 2, cratesRequired = 3 },\
\
        { weight = 252, desc = \"Ural-375 Ammo Truck\", unit = \"Ural-375\", side = 1, cratesRequired = 2 },\
        { weight = 253, desc = \"M-818 Ammo Truck\", unit = \"M 818\", side = 2, cratesRequired = 2 },\
\
        { weight = 800, desc = \"FOB Crate - Small\", unit = \"FOB-SMALL\" }, -- Builds a FOB! - requires 3 * ctld.cratesRequiredForFOB\
    },\
    [\"AA Crates\"] = {\
        { weight = 50, desc = \"Stinger\", unit = \"Stinger manpad\", side = 2 },\
        { weight = 55, desc = \"Igla\", unit = \"SA-18 Igla manpad\", side = 1 },\
\
        -- HAWK System\
        { weight = 540, desc = \"HAWK Launcher\", unit = \"Hawk ln\", side = 2},\
        { weight = 545, desc = \"HAWK Search Radar\", unit = \"Hawk sr\", side = 2 },\
        { weight = 550, desc = \"HAWK Track Radar\", unit = \"Hawk tr\", side = 2 },\
        { weight = 551, desc = \"HAWK PCP\", unit = \"Hawk pcp\" , side = 2 }, -- Remove this if on 1.2\
        { weight = 552, desc = \"HAWK Repair\", unit = \"HAWK Repair\" , side = 2 },\
        -- End of HAWK\
\
        -- KUB SYSTEM\
        { weight = 560, desc = \"KUB Launcher\", unit = \"Kub 2P25 ln\", side = 1},\
        { weight = 565, desc = \"KUB Radar\", unit = \"Kub 1S91 str\", side = 1 },\
        { weight = 570, desc = \"KUB Repair\", unit = \"KUB Repair\", side = 1},\
        -- End of KUB\
\
        -- BUK System\
        --        { weight = 575, desc = \"BUK Launcher\", unit = \"SA-11 Buk LN 9A310M1\"},\
        --        { weight = 580, desc = \"BUK Search Radar\", unit = \"SA-11 Buk SR 9S18M1\"},\
        --        { weight = 585, desc = \"BUK CC Radar\", unit = \"SA-11 Buk CC 9S470M1\"},\
        --        { weight = 590, desc = \"BUK Repair\", unit = \"BUK Repair\"},\
        -- END of BUK\
\
        { weight = 595, desc = \"Early Warning Radar\", unit = \"1L13 EWR\", side = 1 }, -- cant be used by BLUE coalition\
\
        { weight = 405, desc = \"Strela-1 9P31\", unit = \"Strela-1 9P31\", side = 1, cratesRequired = 3 },\
        { weight = 400, desc = \"M1097 Avenger\", unit = \"M1097 Avenger\", side = 2, cratesRequired = 3 },\
\
    },\
}\
\
-- if the unit is on this list, it will be made into a JTAC when deployed\
ctld.jtacUnitTypes = {\
    \"SKP\", \"Hummer\" -- there are some wierd encoding issues so if you write SKP-11 it wont match as the - sign is encoded differently...\
}\
\
\
ctld.nextUnitId = 1;\
ctld.getNextUnitId = function()\
    ctld.nextUnitId = ctld.nextUnitId + 1\
\
    return ctld.nextUnitId\
end\
\
ctld.nextGroupId = 1;\
\
ctld.getNextGroupId = function()\
    ctld.nextGroupId = ctld.nextGroupId + 1\
\
    return ctld.nextGroupId\
end\
\
-- ***************************************************************\
-- **************** Mission Editor Functions *********************\
-- ***************************************************************\
\
\
-----------------------------------------------------------------\
-- Spawn group at a trigger and set them as extractable. Usage:\
-- ctld.spawnGroupAtTrigger(\"groupside\", number, \"triggerName\", radius)\
-- Variables:\
-- \"groupSide\" = \"red\" for Russia \"blue\" for USA\
-- _number = number of groups to spawn OR Group description\
-- \"triggerName\" = trigger name in mission editor between commas\
-- _searchRadius = random distance for units to move from spawn zone (0 will leave troops at the spawn position - no search for enemy)\
--\
-- Example: ctld.spawnGroupAtTrigger(\"red\", 2, \"spawn1\", 1000)\
--\
-- This example will spawn 2 groups of russians at the specified point\
-- and they will search for enemy or move randomly withing 1000m\
-- OR\
--\
-- ctld.spawnGroupAtTrigger(\"blue\", {mg=1,at=2,aa=3,inf=4,mortar=5},\"spawn2\", 2000)\
-- Spawns 1 machine gun, 2 anti tank, 3 anti air, 4 standard soldiers and 5 mortars\
--\
function ctld.spawnGroupAtTrigger(_groupSide, _number, _triggerName, _searchRadius)\
    local _spawnTrigger = trigger.misc.getZone(_triggerName) -- trigger to use as reference position\
\
    if _spawnTrigger == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find trigger called \" .. _triggerName, 10)\
        return\
    end\
\
    local _country\
    if _groupSide == \"red\" then\
        _groupSide = 1\
        _country = 0\
    else\
        _groupSide = 2\
        _country = 2\
    end\
\
    if _searchRadius < 0 then\
        _searchRadius = 0\
    end\
\
    local _pos2 = { x = _spawnTrigger.point.x, y = _spawnTrigger.point.z }\
    local _alt = land.getHeight(_pos2)\
    local _pos3 = { x = _pos2.x, y = _alt, z = _pos2.y }\
\
    local _groupDetails = ctld.generateTroopTypes(_groupSide, _number, _country)\
\
    local _droppedTroops = ctld.spawnDroppedGroup(_pos3, _groupDetails, false, _searchRadius);\
\
    if _groupSide == 1 then\
        table.insert(ctld.droppedTroopsRED, _droppedTroops:getName())\
    else\
        table.insert(ctld.droppedTroopsBLUE, _droppedTroops:getName())\
    end\
end\
\
\
-----------------------------------------------------------------\
-- Spawn group at a Vec3 Point and set them as extractable. Usage:\
-- ctld.spawnGroupAtPoint(\"groupside\", number,Vec3 Point, radius)\
-- Variables:\
-- \"groupSide\" = \"red\" for Russia \"blue\" for USA\
-- _number = number of groups to spawn OR Group Description\
-- Vec3 Point = A vec3 point like {x=1,y=2,z=3}. Can be obtained from a unit like so: Unit.getName(\"Unit1\"):getPoint()\
-- _searchRadius = random distance for units to move from spawn zone (0 will leave troops at the spawn position - no search for enemy)\
--\
-- Example: ctld.spawnGroupAtPoint(\"red\", 2, {x=1,y=2,z=3}, 1000)\
--\
-- This example will spawn 2 groups of russians at the specified point\
-- and they will search for enemy or move randomly withing 1000m\
-- OR\
--\
-- ctld.spawnGroupAtPoint(\"blue\", {mg=1,at=2,aa=3,inf=4,mortar=5}, {x=1,y=2,z=3}, 2000)\
-- Spawns 1 machine gun, 2 anti tank, 3 anti air, 4 standard soldiers and 5 mortars\
function ctld.spawnGroupAtPoint(_groupSide, _number, _point, _searchRadius)\
\
    local _country\
    if _groupSide == \"red\" then\
        _groupSide = 1\
        _country = 0\
    else\
        _groupSide = 2\
        _country = 2\
    end\
\
    if _searchRadius < 0 then\
        _searchRadius = 0\
    end\
\
    local _groupDetails = ctld.generateTroopTypes(_groupSide, _number, _country)\
\
    local _droppedTroops = ctld.spawnDroppedGroup(_point, _groupDetails, false, _searchRadius);\
\
    if _groupSide == 1 then\
        table.insert(ctld.droppedTroopsRED, _droppedTroops:getName())\
    else\
        table.insert(ctld.droppedTroopsBLUE, _droppedTroops:getName())\
    end\
end\
\
\
-- Preloads a transport with troops or vehicles\
-- replaces any troops currently on board\
function ctld.preLoadTransport(_unitName, _number, _troops)\
\
    local _unit = ctld.getTransportUnit(_unitName)\
\
    if _unit ~= nil then\
\
        -- will replace any units currently on board\
        --        if not ctld.troopsOnboard(_unit,_troops)  then\
        ctld.loadTroops(_unit, _troops, _number)\
        --        end\
    end\
end\
\
\
-- Continuously counts the number of crates in a zone and sets the value of the passed in flag\
-- to the count amount\
-- This means you can trigger actions based on the count and also trigger messages before the count is reached\
-- Just pass in the zone name and flag number like so as a single (NOT Continuous) Trigger\
-- This will now work for Mission Editor and Spawned Crates\
-- e.g. ctld.cratesInZone(\"DropZone1\", 5)\
function ctld.cratesInZone(_zone, _flagNumber)\
    local _triggerZone = trigger.misc.getZone(_zone) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zone, 10)\
        return\
    end\
\
    local _zonePos = mist.utils.zoneToVec3(_zone)\
\
    --ignore side, if crate has been used its discounted from the count\
    local _crateTables = { ctld.spawnedCratesRED, ctld.spawnedCratesBLUE, ctld.missionEditorCargoCrates }\
\
    local _crateCount = 0\
\
    for _, _crates in pairs(_crateTables) do\
\
        for _crateName, _dontUse in pairs(_crates) do\
\
            --get crate\
            local _crate = ctld.getCrateObject(_crateName)\
\
            --in air seems buggy with crates so if in air is true, get the height above ground and the speed magnitude\
            if _crate ~= nil and _crate:getLife() > 0\
                    and (ctld.inAir(_crate) == false) then\
\
                local _dist = ctld.getDistance(_crate:getPoint(), _zonePos)\
\
                if _dist <= _triggerZone.radius then\
                    _crateCount = _crateCount + 1\
                end\
            end\
        end\
    end\
\
    --set flag stuff\
    trigger.action.setUserFlag(_flagNumber, _crateCount)\
\
    -- env.info(\"FLAG \".._flagNumber..\" crates \".._crateCount)\
\
    --retrigger in 5 seconds\
    timer.scheduleFunction(function(_args)\
\
        ctld.cratesInZone(_args[1], _args[2])\
    end, { _zone, _flagNumber }, timer.getTime() + 5)\
end\
\
-- Creates an extraction zone\
-- any Soldiers (not vehicles) dropped at this zone by a helicopter will disappear\
-- and be added to a running total of soldiers for a set flag number\
-- The idea is you can then drop say 20 troops in a zone and trigger an action using the mission editor triggers\
-- and the flag value\
--\
-- The ctld.createExtractZone function needs to be called once in a trigger action do script.\
-- if you dont want smoke, pass -1 to the function.\
--Green = 0 , Red = 1, White = 2, Orange = 3, Blue = 4, NO SMOKE = -1\
--\
-- e.g. ctld.createExtractZone(\"extractzone1\", 2, -1) will create an extraction zone at trigger zone \"extractzone1\", store the number of troops dropped at\
-- the zone in flag 2 and not have smoke\
--\
--\
--\
function ctld.createExtractZone(_zone, _flagNumber, _smoke)\
    local _triggerZone = trigger.misc.getZone(_zone) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zone, 10)\
        return\
    end\
\
    local _pos2 = { x = _triggerZone.point.x, y = _triggerZone.point.z }\
    local _alt = land.getHeight(_pos2)\
    local _pos3 = { x = _pos2.x, y = _alt, z = _pos2.y }\
\
    trigger.action.setUserFlag(_flagNumber, 0) --start at 0\
\
    local _details = { point = _pos3, name = _zone, smoke = _smoke, flag = _flagNumber, radius = _triggerZone.radius}\
\
    ctld.extractZones[_zone..\"-\".._flagNumber] =  _details\
\
    if _smoke ~= nil and _smoke > -1 then\
\
        local _smokeFunction\
\
        _smokeFunction = function(_args)\
\
            local _extractDetails = ctld.extractZones[_zone..\"-\".._flagNumber]\
            -- check zone is still active\
            if _extractDetails == nil then\
                -- stop refreshing smoke, zone is done\
                return\
            end\
\
\
            trigger.action.smoke(_args.point, _args.smoke)\
            --refresh in 5 minutes\
            timer.scheduleFunction(_smokeFunction, _args, timer.getTime() + 300)\
        end\
\
        --run local function\
        _smokeFunction(_details)\
    end\
end\
\
\
-- Removes an extraction zone\
--\
-- The smoke will take up to 5 minutes to disappear depending on the last time the smoke was activated\
--\
-- The ctld.removeExtractZone function needs to be called once in a trigger action do script.\
--\
-- e.g. ctld.removeExtractZone(\"extractzone1\", 2) will remove an extraction zone at trigger zone \"extractzone1\"\
-- that was setup with flag 2\
--\
--\
--\
function ctld.removeExtractZone(_zone,_flagNumber)\
\
    local _extractDetails = ctld.extractZones[_zone..\"-\".._flagNumber]\
\
    if _extractDetails ~= nil then\
        --remove zone\
        ctld.extractZones[_zone..\"-\".._flagNumber] = nil\
\
    end\
end\
\
-- CONTINUOUS TRIGGER FUNCTION\
-- This function will count the current number of extractable RED and BLUE\
-- GROUPS in a zone and store the values in two flags\
-- A group is only counted as being in a zone when the leader of that group\
-- is in the zone\
-- Use: ctld.countDroppedGroupsInZone(\"Zone Name\", flagBlue, flagRed)\
function ctld.countDroppedGroupsInZone(_zone, _blueFlag, _redFlag)\
\
    local _triggerZone = trigger.misc.getZone(_zone) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zone, 10)\
        return\
    end\
\
    local _zonePos = mist.utils.zoneToVec3(_zone)\
\
    local _redCount = 0;\
    local _blueCount = 0;\
\
    local _allGroups = {ctld.droppedTroopsRED,ctld.droppedTroopsBLUE,ctld.droppedVehiclesRED,ctld.droppedVehiclesBLUE}\
    for _, _extractGroups in pairs(_allGroups) do\
        for _,_groupName  in pairs(_extractGroups) do\
            local _groupUnits = ctld.getGroup(_groupName)\
\
            if #_groupUnits > 0 then\
                local _zonePos = mist.utils.zoneToVec3(_zone)\
                local _dist = ctld.getDistance(_groupUnits[1]:getPoint(), _zonePos)\
\
                if _dist <= _triggerZone.radius then\
\
                    if (_groupUnits[1]:getCoalition() == 1) then\
                        _redCount = _redCount + 1;\
                    else\
                        _blueCount = _blueCount + 1;\
                    end\
                end\
            end\
        end\
    end\
    --set flag stuff\
    trigger.action.setUserFlag(_blueFlag, _blueCount)\
    trigger.action.setUserFlag(_redFlag, _redCount)\
\
    --  env.info(\"Groups in zone \".._blueCount..\" \".._redCount)\
\
end\
\
-- CONTINUOUS TRIGGER FUNCTION\
-- This function will count the current number of extractable RED and BLUE\
-- UNITS in a zone and store the values in two flags\
\
-- Use: ctld.countDroppedUnitsInZone(\"Zone Name\", flagBlue, flagRed)\
function ctld.countDroppedUnitsInZone(_zone, _blueFlag, _redFlag)\
\
    local _triggerZone = trigger.misc.getZone(_zone) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zone, 10)\
        return\
    end\
\
    local _zonePos = mist.utils.zoneToVec3(_zone)\
\
    local _redCount = 0;\
    local _blueCount = 0;\
\
    local _allGroups = {ctld.droppedTroopsRED,ctld.droppedTroopsBLUE,ctld.droppedVehiclesRED,ctld.droppedVehiclesBLUE}\
\
    for _, _extractGroups in pairs(_allGroups) do\
        for _,_groupName  in pairs(_extractGroups) do\
            local _groupUnits = ctld.getGroup(_groupName)\
\
            if #_groupUnits > 0 then\
\
                local _zonePos = mist.utils.zoneToVec3(_zone)\
                for _,_unit in pairs(_groupUnits) do\
                    local _dist = ctld.getDistance(_unit:getPoint(), _zonePos)\
\
                    if _dist <= _triggerZone.radius then\
\
                        if (_unit:getCoalition() == 1) then\
                            _redCount = _redCount + 1;\
                        else\
                            _blueCount = _blueCount + 1;\
                        end\
                    end\
                end\
            end\
        end\
    end\
\
\
    --set flag stuff\
    trigger.action.setUserFlag(_blueFlag, _blueCount)\
    trigger.action.setUserFlag(_redFlag, _redCount)\
\
    --  env.info(\"Units in zone \".._blueCount..\" \".._redCount)\
end\
\
\
-- Creates a radio beacon on a random UHF - VHF and HF/FM frequency for homing\
-- This WILL NOT WORK if you dont add beacon.ogg and beaconsilent.ogg to the mission!!!\
-- e.g. ctld.createRadioBeaconAtZone(\"beaconZone\",\"red\", 1440,\"Waypoint 1\") will create a beacon at trigger zone \"beaconZone\" for the Red side\
-- that will last 1440 minutes (24 hours ) and named \"Waypoint 1\" in the list of radio beacons\
--\
-- e.g. ctld.createRadioBeaconAtZone(\"beaconZoneBlue\",\"blue\", 20) will create a beacon at trigger zone \"beaconZoneBlue\" for the Blue side\
-- that will last 20 minutes\
function ctld.createRadioBeaconAtZone(_zone, _coalition, _batteryLife, _name)\
    local _triggerZone = trigger.misc.getZone(_zone) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zone, 10)\
        return\
    end\
\
    local _zonePos = mist.utils.zoneToVec3(_zone)\
\
    ctld.beaconCount = ctld.beaconCount + 1\
\
    if _name == nil or _name == \"\" then\
        _name = \"Beacon #\" .. ctld.beaconCount\
    end\
\
    if _coalition == \"red\" then\
        ctld.createRadioBeacon(_zonePos, 1, 0, _name, _batteryLife) --1440\
    else\
        ctld.createRadioBeacon(_zonePos, 2, 2, _name, _batteryLife) --1440\
    end\
end\
\
\
-- Activates a pickup zone\
-- Activates a pickup zone when called from a trigger\
-- EG: ctld.activatePickupZone(\"pickzone3\")\
-- This is enable pickzone3 to be used as a pickup zone for the team set\
function ctld.activatePickupZone(_zoneName)\
    local _triggerZone = trigger.misc.getZone(_zoneName) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        local _ship = ctld.getTransportUnit(_triggerZone)\
\
        if _ship then\
            local _point = _ship:getPoint()\
            _triggerZone = {}\
            _triggerZone.point = _point\
        end\
\
    end\
\
    if _triggerZone == nil  then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone or ship called \" .. _zoneName, 10)\
\
    end\
\
    for _, _zoneDetails in pairs(ctld.pickupZones) do\
\
        if _zoneName == _zoneDetails[1] then\
\
            --smoke could get messy if designer keeps calling this on an active zone, check its not active first\
            if _zoneDetails[4] == 1 then\
                -- they might have a continuous trigger so i've hidden the warning\
                --trigger.action.outText(\"CTLD.lua ERROR: Pickup Zone already active: \" .. _zoneName, 10)\
                return\
            end\
\
            _zoneDetails[4] = 1 --activate zone\
\
            if ctld.disableAllSmoke == true then --smoke disabled\
            return\
            end\
\
            if _zoneDetails[2] >= 0 then\
\
                -- Trigger smoke marker\
                -- This will cause an overlapping smoke marker on next refreshsmoke call\
                -- but will only happen once\
                local _pos2 = { x = _triggerZone.point.x, y = _triggerZone.point.z }\
                local _alt = land.getHeight(_pos2)\
                local _pos3 = { x = _pos2.x, y = _alt, z = _pos2.y }\
\
                trigger.action.smoke(_pos3, _zoneDetails[2])\
            end\
        end\
    end\
end\
\
\
-- Deactivates a pickup zone\
-- Deactivates a pickup zone when called from a trigger\
-- EG: ctld.deactivatePickupZone(\"pickzone3\")\
-- This is disables pickzone3 and can no longer be used to as a pickup zone\
-- These functions can be called by triggers, like if a set of buildings is used, you can trigger the zone to be 'not operational'\
-- once they are destroyed\
function ctld.deactivatePickupZone(_zoneName)\
\
    local _triggerZone = trigger.misc.getZone(_zoneName) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        local _ship = ctld.getTransportUnit(_triggerZone)\
\
        if _ship then\
            local _point = _ship:getPoint()\
            _triggerZone = {}\
            _triggerZone.point = _point\
        end\
\
    end\
\
    if _triggerZone == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zoneName, 10)\
        return\
    end\
\
    for _, _zoneDetails in pairs(ctld.pickupZones) do\
\
        if _zoneName == _zoneDetails[1] then\
\
            -- i'd just ignore it if its already been deactivated\
            --            if _zoneDetails[4] == 0 then --this really needed??\
            --            trigger.action.outText(\"CTLD.lua ERROR: Pickup Zone already deactiveated: \" .. _zoneName, 10)\
            --            return\
            --            end\
\
            _zoneDetails[4] = 0 --deactivate zone\
        end\
    end\
end\
\
-- Change the remaining groups currently available for pickup at a zone\
-- e.g. ctld.changeRemainingGroupsForPickupZone(\"pickup1\", 5) -- adds 5 groups\
-- ctld.changeRemainingGroupsForPickupZone(\"pickup1\", -3) -- remove 3 groups\
function ctld.changeRemainingGroupsForPickupZone(_zoneName, _amount)\
    local _triggerZone = trigger.misc.getZone(_zoneName) -- trigger to use as reference position\
\
    if _triggerZone == nil then\
        local _ship = ctld.getTransportUnit(_triggerZone)\
\
        if _ship then\
            local _point = _ship:getPoint()\
            _triggerZone = {}\
            _triggerZone.point = _point\
        end\
\
    end\
\
    if _triggerZone == nil  then\
        trigger.action.outText(\"CTLD.lua ctld.changeRemainingGroupsForPickupZone ERROR: Cant find zone called \" .. _zoneName, 10)\
        return\
    end\
\
    for _, _zoneDetails in pairs(ctld.pickupZones) do\
\
        if _zoneName == _zoneDetails[1] then\
            ctld.updateZoneCounter(_zoneName, _amount)\
        end\
    end\
\
\
end\
\
-- Activates a Waypoint zone\
-- Activates a Waypoint zone when called from a trigger\
-- EG: ctld.activateWaypointZone(\"pickzone3\")\
-- This means that troops dropped within the radius of the zone will head to the center\
-- of the zone instead of searching for troops\
function ctld.activateWaypointZone(_zoneName)\
    local _triggerZone = trigger.misc.getZone(_zoneName) -- trigger to use as reference position\
\
\
    if _triggerZone == nil  then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone  called \" .. _zoneName, 10)\
\
        return\
    end\
\
    for _, _zoneDetails in pairs(ctld.wpZones) do\
\
        if _zoneName == _zoneDetails[1] then\
\
            --smoke could get messy if designer keeps calling this on an active zone, check its not active first\
            if _zoneDetails[3] == 1 then\
                -- they might have a continuous trigger so i've hidden the warning\
                --trigger.action.outText(\"CTLD.lua ERROR: Pickup Zone already active: \" .. _zoneName, 10)\
                return\
            end\
\
            _zoneDetails[3] = 1 --activate zone\
\
            if ctld.disableAllSmoke == true then --smoke disabled\
            return\
            end\
\
            if _zoneDetails[2] >= 0 then\
\
                -- Trigger smoke marker\
                -- This will cause an overlapping smoke marker on next refreshsmoke call\
                -- but will only happen once\
                local _pos2 = { x = _triggerZone.point.x, y = _triggerZone.point.z }\
                local _alt = land.getHeight(_pos2)\
                local _pos3 = { x = _pos2.x, y = _alt, z = _pos2.y }\
\
                trigger.action.smoke(_pos3, _zoneDetails[2])\
            end\
        end\
    end\
end\
\
\
-- Deactivates a Waypoint zone\
-- Deactivates a Waypoint zone when called from a trigger\
-- EG: ctld.deactivateWaypointZone(\"wpzone3\")\
-- This  disables wpzone3 so that troops dropped in this zone will search for troops as normal\
-- These functions can be called by triggers\
function ctld.deactivateWaypointZone(_zoneName)\
\
    local _triggerZone = trigger.misc.getZone(_zoneName)\
\
    if _triggerZone == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zoneName, 10)\
        return\
    end\
\
    for _, _zoneDetails in pairs(ctld.pickupZones) do\
\
        if _zoneName == _zoneDetails[1] then\
\
            _zoneDetails[3] = 0 --deactivate zone\
        end\
    end\
end\
\
-- Continuous Trigger Function\
-- Causes an AI unit with the specified name to unload troops / vehicles when\
-- an enemy is detected within a specified distance\
-- The enemy must have Line or Sight to the unit to be detected\
function ctld.unloadInProximityToEnemy(_unitName,_distance)\
\
    local _unit = ctld.getTransportUnit(_unitName)\
\
    if _unit ~= nil and _unit:getPlayerName() == nil then\
\
        -- no player name means AI!\
        -- the findNearest visible enemy you'd want to modify as it'll find enemies quite far away\
        -- limited by  ctld.JTAC_maxDistance\
        local _nearestEnemy = ctld.findNearestVisibleEnemy(_unit,\"all\",_distance)\
\
        if _nearestEnemy ~= nil then\
\
            if ctld.troopsOnboard(_unit, true) then\
                ctld.deployTroops(_unit, true)\
                return true\
            end\
\
            if ctld.unitCanCarryVehicles(_unit) and ctld.troopsOnboard(_unit, false) then\
                ctld.deployTroops(_unit, false)\
                return true\
            end\
        end\
    end\
\
    return false\
\
end\
\
\
\
-- Unit will unload any units onboard if the unit is on the ground\
-- when this function is called\
function ctld.unloadTransport(_unitName)\
\
    local _unit = ctld.getTransportUnit(_unitName)\
\
    if _unit ~= nil  then\
\
        if ctld.troopsOnboard(_unit, true) then\
            ctld.unloadTroops({_unitName,true})\
        end\
\
        if ctld.unitCanCarryVehicles(_unit) and ctld.troopsOnboard(_unit, false) then\
            ctld.unloadTroops({_unitName,false})\
        end\
    end\
\
end\
\
-- Loads Troops and Vehicles from a zone or picks up nearby troops or vehicles\
function ctld.loadTransport(_unitName)\
\
    local _unit = ctld.getTransportUnit(_unitName)\
\
    if _unit ~= nil  then\
\
        ctld.loadTroopsFromZone({ _unitName, true,\"\",true })\
\
        if ctld.unitCanCarryVehicles(_unit)  then\
            ctld.loadTroopsFromZone({ _unitName, false,\"\",true })\
        end\
\
    end\
\
end\
\
-- adds a callback that will be called for many actions ingame\
function ctld.addCallback(_callback)\
\
    table.insert(ctld.callbacks,_callback)\
\
end\
\
-- Spawns a sling loadable crate at a Trigger Zone\
--\
-- Weights can be found in the ctld.spawnableCrates list\
-- e.g. ctld.spawnCrateAtZone(\"red\", 500,\"triggerzone1\") -- spawn a humvee at triggerzone 1 for red side\
-- e.g. ctld.spawnCrateAtZone(\"blue\", 505,\"triggerzone1\") -- spawn a tow humvee at triggerzone1 for blue side\
--\
function ctld.spawnCrateAtZone(_side, _weight,_zone)\
    local _spawnTrigger = trigger.misc.getZone(_zone) -- trigger to use as reference position\
\
    if _spawnTrigger == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find zone called \" .. _zone, 10)\
        return\
    end\
\
    local _crateType = ctld.crateLookupTable[tostring(_weight)]\
\
    if _crateType == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find crate with weight \" .. _weight, 10)\
        return\
    end\
\
    local _country\
    if _side == \"red\" then\
        _side = 1\
        _country = 0\
    else\
        _side = 2\
        _country = 2\
    end\
\
    local _pos2 = { x = _spawnTrigger.point.x, y = _spawnTrigger.point.z }\
    local _alt = land.getHeight(_pos2)\
    local _point = { x = _pos2.x, y = _alt, z = _pos2.y }\
\
    local _unitId = ctld.getNextUnitId()\
\
    local _name = string.format(\"%s #%i\", _crateType.desc, _unitId)\
\
    local _spawnedCrate = ctld.spawnCrateStatic(_country, _unitId, _point, _name, _crateType.weight,_side)\
\
end\
\
-- Spawns a sling loadable crate at a Point\
--\
-- Weights can be found in the ctld.spawnableCrates list\
-- Points can be made by hand or obtained from a Unit position by Unit.getByName(\"PilotName\"):getPoint()\
-- e.g. ctld.spawnCrateAtZone(\"red\", 500,{x=1,y=2,z=3}) -- spawn a humvee at triggerzone 1 for red side at a specified point\
-- e.g. ctld.spawnCrateAtZone(\"blue\", 505,{x=1,y=2,z=3}) -- spawn a tow humvee at triggerzone1 for blue side at a specified point\
--\
--\
function ctld.spawnCrateAtPoint(_side, _weight,_point)\
\
\
    local _crateType = ctld.crateLookupTable[tostring(_weight)]\
\
    if _crateType == nil then\
        trigger.action.outText(\"CTLD.lua ERROR: Cant find crate with weight \" .. _weight, 10)\
        return\
    end\
\
    local _country\
    if _side == \"red\" then\
        _side = 1\
        _country = 0\
    else\
        _side = 2\
        _country = 2\
    end\
\
    local _unitId = ctld.getNextUnitId()\
\
    local _name = string.format(\"%s #%i\", _crateType.desc, _unitId)\
\
    local _spawnedCrate = ctld.spawnCrateStatic(_country, _unitId, _point, _name, _crateType.weight,_side)\
\
end\
\
-- ***************************************************************\
-- **************** BE CAREFUL BELOW HERE ************************\
-- ***************************************************************\
\
--- Tells CTLD What multipart AA Systems there are and what parts they need\
-- A New system added here also needs the launcher added\
ctld.AASystemTemplate = {\
\
    {\
        name = \"HAWK AA System\",\
        count = 4,\
        parts = {\
            {name = \"Hawk ln\", desc = \"HAWK Launcher\", launcher = true},\
            {name = \"Hawk tr\", desc = \"HAWK Track Radar\"},\
            {name = \"Hawk sr\", desc = \"HAWK Search Radar\"},\
            {name = \"Hawk pcp\", desc = \"HAWK PCP\"},\
        },\
        repair = \"HAWK Repair\",\
    },\
    {\
        name = \"BUK AA System\",\
        count = 3,\
        parts = {\
            {name = \"SA-11 Buk LN 9A310M1\", desc = \"BUK Launcher\" , launcher = true},\
            {name = \"SA-11 Buk CC 9S470M1\", desc = \"BUK CC Radar\"},\
            {name = \"SA-11 Buk SR 9S18M1\", desc = \"BUK Search Radar\"},\
        },\
        repair = \"BUK Repair\",\
    },\
    {\
        name = \"KUB AA System\",\
        count = 2,\
        parts = {\
            {name = \"Kub 2P25 ln\", desc = \"KUB Launcher\", launcher = true},\
            {name = \"Kub 1S91 str\", desc = \"KUB Radar\"},\
        },\
        repair = \"KUB Repair\",\
    },\
}\
\
\
ctld.crateWait = {}\
ctld.crateMove = {}\
\
---------------- INTERNAL FUNCTIONS ----------------\
function ctld.getTransportUnit(_unitName)\
\
    if _unitName == nil then\
        return nil\
    end\
\
    local _heli = Unit.getByName(_unitName)\
\
    if _heli ~= nil and _heli:isActive() and _heli:getLife() > 0 then\
\
        return _heli\
    end\
\
    return nil\
end\
\
function ctld.spawnCrateStatic(_country, _unitId, _point, _name, _weight,_side)\
\
    local _crate\
    local _spawnedCrate\
\
    if ctld.staticBugWorkaround and ctld.slingLoad == false then\
        local _groupId = ctld.getNextGroupId()\
        local _groupName = \"Crate Group #\".._groupId\
\
        local _group = {\
            [\"visible\"] = false,\
           -- [\"groupId\"] = _groupId,\
            [\"hidden\"] = false,\
            [\"units\"] = {},\
            --        [\"y\"] = _positions[1].z,\
            --        [\"x\"] = _positions[1].x,\
            [\"name\"] = _groupName,\
            [\"task\"] = {},\
        }\
\
        _group.units[1] = ctld.createUnit(_point.x , _point.z , 0, {type=\"UAZ-469\",name=_name,unitId=_unitId})\
\
        --switch to MIST\
        _group.category = Group.Category.GROUND;\
        _group.country = _country;\
\
        local _spawnedGroup = Group.getByName(mist.dynAdd(_group).name)\
\
        -- Turn off AI\
        trigger.action.setGroupAIOff(_spawnedGroup)\
\
        _spawnedCrate = Unit.getByName(_name)\
    else\
\
        if ctld.slingLoad then\
            _crate = {\
                [\"category\"] = \"Cargos\", --now plurar\
                [\"shape_name\"] = \"bw_container_cargo\", --new slingloadable container\
                [\"type\"] = \"container_cargo\", --new type\
               -- [\"unitId\"] = _unitId,\
                [\"y\"] = _point.z,\
                [\"x\"] = _point.x,\
                [\"mass\"] = _weight,\
                [\"name\"] = _name,\
                [\"canCargo\"] = true,\
                [\"heading\"] = 0,\
                --            [\"displayName\"] = \"name 2\", -- getCargoDisplayName function exists but no way to set the variable\
                --            [\"DisplayName\"] = \"name 2\",\
                --            [\"cargoDisplayName\"] = \"cargo123\",\
                --            [\"CargoDisplayName\"] = \"cargo123\",\
            }\
        \
--[[ Placeholder for different type of cargo containers. Let's say pipes and trunks, fuel for FOB building\
                        [\"shape_name\"] = \"ab-212_cargo\",\
            [\"type\"] = \"uh1h_cargo\" --new type for the container previously used\
            \
            [\"shape_name\"] = \"ammo_box_cargo\",\
                        [\"type\"] = \"ammo_cargo\",\
            \
            [\"shape_name\"] = \"barrels_cargo\",\
                        [\"type\"] = \"barrels_cargo\",\
\
                        [\"shape_name\"] = \"bw_container_cargo\",\
                        [\"type\"] = \"container_cargo\",\
            \
                        [\"shape_name\"] = \"f_bar_cargo\",\
                        [\"type\"] = \"f_bar_cargo\",\
            \
            [\"shape_name\"] = \"fueltank_cargo\",\
                        [\"type\"] = \"fueltank_cargo\",\
            \
            [\"shape_name\"] = \"iso_container_cargo\",\
            [\"type\"] = \"iso_container\",\
            \
            [\"shape_name\"] = \"iso_container_small_cargo\",\
            [\"type\"] = \"iso_container_small\",\
            \
            [\"shape_name\"] = \"oiltank_cargo\",\
                        [\"type\"] = \"oiltank_cargo\",\
                        \
            [\"shape_name\"] = \"pipes_big_cargo\",\
                        [\"type\"] = \"pipes_big_cargo\",            \
            \
            [\"shape_name\"] = \"pipes_small_cargo\",\
            [\"type\"] = \"pipes_small_cargo\",\
            \
            [\"shape_name\"] = \"tetrapod_cargo\",\
            [\"type\"] = \"tetrapod_cargo\",\
            \
            [\"shape_name\"] = \"trunks_long_cargo\",\
            [\"type\"] = \"trunks_long_cargo\",\
            \
            [\"shape_name\"] = \"trunks_small_cargo\",\
            [\"type\"] = \"trunks_small_cargo\",\
]]--\
    else    \
            _crate = {\
                [\"shape_name\"] = \"GeneratorF\",\
                [\"type\"] = \"GeneratorF\",\
             --   [\"unitId\"] = _unitId,\
                [\"y\"] = _point.z,\
                [\"x\"] = _point.x,\
                [\"name\"] = _name,\
                [\"category\"] = \"Fortifications\",\
                [\"canCargo\"] = false,\
                [\"heading\"] = 0,\
            }\
        end\
\
        _crate[\"country\"] = _country\
        mist.dynAddStatic(_crate)\
\
        _spawnedCrate = StaticObject.getByName(_crate[\"name\"])\
    end\
\
\
    local _crateType = ctld.crateLookupTable[tostring(_weight)]\
\
    if _side == 1 then\
        ctld.spawnedCratesRED[_name] =_crateType\
    else\
        ctld.spawnedCratesBLUE[_name] = _crateType\
    end\
\
    return _spawnedCrate\
end\
\
function ctld.spawnFOBCrateStatic(_country, _unitId, _point, _name)\
\
    local _crate = {\
        [\"category\"] = \"Fortifications\",\
        [\"shape_name\"] = \"konteiner_red1\",\
        [\"type\"] = \"Container red 1\",\
     --   [\"unitId\"] = _unitId,\
        [\"y\"] = _point.z,\
        [\"x\"] = _point.x,\
        [\"name\"] = _name,\
        [\"canCargo\"] = false,\
        [\"heading\"] = 0,\
    }\
\
    _crate[\"country\"] = _country\
\
    mist.dynAddStatic(_crate)\
\
    local _spawnedCrate = StaticObject.getByName(_crate[\"name\"])\
    --local _spawnedCrate = coalition.addStaticObject(_country, _crate)\
\
    return _spawnedCrate\
end\
\
\
function ctld.spawnFOB(_country, _unitId, _point, _name)\
\
    local _crate = {\
        [\"category\"] = \"Fortifications\",\
        [\"type\"] = \"outpost\",\
      --  [\"unitId\"] = _unitId,\
        [\"y\"] = _point.z,\
        [\"x\"] = _point.x,\
        [\"name\"] = _name,\
        [\"canCargo\"] = false,\
        [\"heading\"] = 0,\
    }\
\
    _crate[\"country\"] = _country\
    mist.dynAddStatic(_crate)\
    local _spawnedCrate = StaticObject.getByName(_crate[\"name\"])\
    --local _spawnedCrate = coalition.addStaticObject(_country, _crate)\
\
    local _id = ctld.getNextUnitId()\
    local _tower = {\
        [\"type\"] = \"house2arm\",\
     --   [\"unitId\"] = _id,\
        [\"rate\"] = 100,\
        [\"y\"] = _point.z + -36.57142857,\
        [\"x\"] = _point.x + 14.85714286,\
        [\"name\"] = \"FOB Watchtower #\" .. _id,\
        [\"category\"] = \"Fortifications\",\
        [\"canCargo\"] = false,\
        [\"heading\"] = 0,\
    }\
    --coalition.addStaticObject(_country, _tower)\
    _tower[\"country\"] = _country\
\
    mist.dynAddStatic(_tower)\
\
    return _spawnedCrate\
end\
\
\
function ctld.spawnCrate(_arguments)\
\
    local _status, _err = pcall(function(_args)\
\
        -- use the cargo weight to guess the type of unit as no way to add description :(\
\
        local _crateType = ctld.crateLookupTable[tostring(_args[2])]\
        local _heli = ctld.getTransportUnit(_args[1])\
\
        if _crateType ~= nil and _heli ~= nil and ctld.inAir(_heli) == false then\
\
            if ctld.inLogisticsZone(_heli) == false then\
\
                ctld.displayMessageToGroup(_heli, \"You are not close enough to friendly logistics to get a crate!\", 10)\
\
                return\
            end\
\
            if ctld.isJTACUnitType(_crateType.unit) then\
\
                local _limitHit = false\
\
                if _heli:getCoalition() == 1 then\
\
                    if ctld.JTAC_LIMIT_RED == 0 then\
                        _limitHit = true\
                    else\
                        ctld.JTAC_LIMIT_RED = ctld.JTAC_LIMIT_RED - 1\
                    end\
                else\
                    if ctld.JTAC_LIMIT_BLUE == 0 then\
                        _limitHit = true\
                    else\
                        ctld.JTAC_LIMIT_BLUE = ctld.JTAC_LIMIT_BLUE - 1\
                    end\
                end\
\
                if _limitHit then\
                    ctld.displayMessageToGroup(_heli, \"No more JTAC Crates Left!\", 10)\
                    return\
                end\
            end\
\
            local _position = _heli:getPosition()\
\
            -- check crate spam\
            if _heli:getPlayerName() ~= nil and ctld.crateWait[_heli:getPlayerName()] and  ctld.crateWait[_heli:getPlayerName()] > timer.getTime() then\
\
                ctld.displayMessageToGroup(_heli,\"Sorry you must wait \"..(ctld.crateWait[_heli:getPlayerName()]  - timer.getTime()).. \" seconds before you can get another crate\", 20)\
                return\
            end\
\
            if _heli:getPlayerName() ~= nil then\
                ctld.crateWait[_heli:getPlayerName()] = timer.getTime() + ctld.crateWaitTime\
            end\
                --   trigger.action.outText(\"Spawn Crate\".._args[1]..\" \".._args[2],10)\
\
            local _heli = ctld.getTransportUnit(_args[1])\
\
            local _point = ctld.getPointAt12Oclock(_heli, 30)\
\
            local _unitId = ctld.getNextUnitId()\
\
            local _side = _heli:getCoalition()\
\
            local _name = string.format(\"%s #%i\", _crateType.desc, _unitId)\
\
            local _spawnedCrate = ctld.spawnCrateStatic(_heli:getCountry(), _unitId, _point, _name, _crateType.weight,_side)\
\
            -- add to move table\
            ctld.crateMove[_name] = _name\
\
            ctld.displayMessageToGroup(_heli, string.format(\"A %s crate weighing %s kg has been brought out and is at your 12 o'clock \", _crateType.desc, _crateType.weight), 20)\
\
        else\
            env.info(\"Couldn't find crate item to spawn\")\
        end\
    end, _arguments)\
\
    if (not _status) then\
        env.error(string.format(\"CTLD ERROR: %s\", _err))\
    end\
end\
\
function ctld.getPointAt12Oclock(_unit, _offset)\
\
    local _position = _unit:getPosition()\
    local _angle = math.atan2(_position.x.z, _position.x.x)\
    local _xOffset = math.cos(_angle) * _offset\
    local _yOffset = math.sin(_angle) * _offset\
\
    local _point = _unit:getPoint()\
    return { x = _point.x + _xOffset, z = _point.z + _yOffset, y = _point.y }\
end\
\
function ctld.troopsOnboard(_heli, _troops)\
\
    if ctld.inTransitTroops[_heli:getName()] ~= nil then\
\
        local _onboard = ctld.inTransitTroops[_heli:getName()]\
\
        if _troops then\
\
            if _onboard.troops ~= nil and _onboard.troops.units ~= nil and #_onboard.troops.units > 0 then\
                return true\
            else\
                return false\
            end\
        else\
\
            if _onboard.vehicles ~= nil and _onboard.vehicles.units ~= nil and #_onboard.vehicles.units > 0 then\
                return true\
            else\
                return false\
            end\
        end\
\
    else\
        return false\
    end\
end\
\
-- if its dropped by AI then there is no player name so return the type of unit\
function ctld.getPlayerNameOrType(_heli)\
\
    if _heli:getPlayerName() == nil then\
\
        return _heli:getTypeName()\
    else\
        return _heli:getPlayerName()\
    end\
end\
\
function ctld.inExtractZone(_heli)\
\
    local _heliPoint = _heli:getPoint()\
\
    for _, _zoneDetails in pairs(ctld.extractZones) do\
\
        --get distance to center\
        local _dist = ctld.getDistance(_heliPoint, _zoneDetails.point)\
\
        if _dist <= _zoneDetails.radius then\
            return _zoneDetails\
        end\
    end\
\
    return false\
end\
\
-- safe to fast rope if speed is less than 0.5 Meters per second\
function ctld.safeToFastRope(_heli)\
\
    if ctld.enableFastRopeInsertion == false then\
        return false\
    end\
\
    --landed or speed is less than 8 km/h and height is less than fast rope height\
    if (ctld.inAir(_heli) == false or (ctld.heightDiff(_heli) <= ctld.fastRopeMaximumHeight + 3.0 and mist.vec.mag(_heli:getVelocity()) < 2.2)) then\
        return true\
    end\
end\
\
function ctld.metersToFeet(_meters)\
\
    local _feet = _meters * 3.2808399\
\
    return mist.utils.round(_feet)\
end\
\
function ctld.inAir(_heli)\
\
    if _heli:inAir() == false then\
        return false\
    end\
\
    -- less than 5 cm/s a second so landed\
    -- BUT AI can hold a perfect hover so ignore AI\
    if mist.vec.mag(_heli:getVelocity()) < 0.05 and _heli:getPlayerName() ~= nil then\
        return false\
    end\
    return true\
end\
\
function ctld.deployTroops(_heli, _troops)\
\
    local _onboard = ctld.inTransitTroops[_heli:getName()]\
\
    -- deloy troops\
    if _troops then\
        if _onboard.troops ~= nil and #_onboard.troops.units > 0 then\
            if ctld.inAir(_heli) == false or ctld.safeToFastRope(_heli) then\
\
                -- check we're not in extract zone\
                local _extractZone = ctld.inExtractZone(_heli)\
\
                if _extractZone == false then\
\
                    local _droppedTroops = ctld.spawnDroppedGroup(_heli:getPoint(), _onboard.troops, false)\
\
                    if _heli:getCoalition() == 1 then\
\
                        table.insert(ctld.droppedTroopsRED, _droppedTroops:getName())\
                    else\
\
                        table.insert(ctld.droppedTroopsBLUE, _droppedTroops:getName())\
                    end\
\
                    ctld.inTransitTroops[_heli:getName()].troops = nil\
\
                    if ctld.inAir(_heli) then\
                        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" troops fast-ropped from \" .. _heli:getTypeName() .. \" into combat\", 10)\
                    else\
                        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" troops dropped from \" .. _heli:getTypeName() .. \" into combat\", 10)\
                    end\
\
                    ctld.processCallback({unit = _heli, unloaded = _droppedTroops, action = \"dropped_troops\"})\
\
\
                else\
                    --extract zone!\
                    local _droppedCount = trigger.misc.getUserFlag(_extractZone.flag)\
\
                    _droppedCount = (#_onboard.troops.units) + _droppedCount\
\
                    trigger.action.setUserFlag(_extractZone.flag, _droppedCount)\
\
                    ctld.inTransitTroops[_heli:getName()].troops = nil\
\
\
                    if ctld.inAir(_heli) then\
                        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" troops fast-ropped from \" .. _heli:getTypeName() .. \" into \" .. _extractZone.name, 10)\
                    else\
                        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" troops dropped from \" .. _heli:getTypeName() .. \" into \" .. _extractZone.name, 10)\
                    end\
                end\
            else\
                ctld.displayMessageToGroup(_heli, \"Too high or too fast to drop troops into combat! Hover below \" .. ctld.metersToFeet(ctld.fastRopeMaximumHeight) .. \" feet or land.\", 10)\
            end\
        end\
\
    else\
        if ctld.inAir(_heli) == false then\
            if _onboard.vehicles ~= nil and #_onboard.vehicles.units > 0 then\
\
                local _droppedVehicles = ctld.spawnDroppedGroup(_heli:getPoint(), _onboard.vehicles, true)\
\
                if _heli:getCoalition() == 1 then\
\
                    table.insert(ctld.droppedVehiclesRED, _droppedVehicles:getName())\
                else\
\
                    table.insert(ctld.droppedVehiclesBLUE, _droppedVehicles:getName())\
                end\
\
                ctld.inTransitTroops[_heli:getName()].vehicles = nil\
\
                ctld.processCallback({unit = _heli, unloaded = _droppedVehicles, action = \"dropped_vehicles\"})\
\
                trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" dropped vehicles from \" .. _heli:getTypeName() .. \" into combat\", 10)\
            end\
        end\
    end\
end\
\
function ctld.insertIntoTroopsArray(_troopType,_count,_troopArray)\
\
    for _i = 1, _count do\
        local _unitId = ctld.getNextUnitId()\
        table.insert(_troopArray, { type = _troopType, unitId = _unitId, name = string.format(\"Dropped %s #%i\", _troopType, _unitId) })\
    end\
\
    return _troopArray\
\
end\
\
\
function ctld.generateTroopTypes(_side, _countOrTemplate, _country)\
\
    local _troops = {}\
\
    if type(_countOrTemplate) == \"table\" then\
\
        if _countOrTemplate.aa then\
            if _side == 2 then\
                _troops = ctld.insertIntoTroopsArray(\"Stinger manpad\",_countOrTemplate.aa,_troops)\
            else\
                _troops = ctld.insertIntoTroopsArray(\"SA-18 Igla manpad\",_countOrTemplate.aa,_troops)\
            end\
        end\
\
        if _countOrTemplate.inf then\
            if _side == 2 then\
                _troops = ctld.insertIntoTroopsArray(\"Soldier M4\",_countOrTemplate.inf,_troops)\
            else\
                _troops = ctld.insertIntoTroopsArray(\"Soldier AK\",_countOrTemplate.inf,_troops)\
            end\
        end\
\
        if _countOrTemplate.mg then\
            _troops = ctld.insertIntoTroopsArray(\"Soldier M249\",_countOrTemplate.mg,_troops)\
        end\
\
        if _countOrTemplate.at then\
            _troops = ctld.insertIntoTroopsArray(\"Paratrooper RPG-16\",_countOrTemplate.at,_troops)\
        end\
\
        if _countOrTemplate.mortar then\
            _troops = ctld.insertIntoTroopsArray(\"2B11 mortar\",_countOrTemplate.mortar,_troops)\
        end\
\
    else\
        for _i = 1, _countOrTemplate do\
\
            local _unitType = \"Soldier AK\"\
\
            if _side == 2 then\
                _unitType = \"Soldier M4\"\
\
                if _i <= 5 and ctld.spawnStinger then\
                    _unitType = \"Stinger manpad\"\
                end\
                if _i <= 4 and ctld.spawnRPGWithCoalition then\
                    _unitType = \"Paratrooper RPG-16\"\
                end\
                if _i <= 2 then\
                    _unitType = \"Soldier M249\"\
                end\
            else\
                _unitType = \"Infantry AK\"\
                if _i <= 5 and ctld.spawnStinger then\
                    _unitType = \"SA-18 Igla manpad\"\
                end\
                if _i <= 4 then\
                    _unitType = \"Paratrooper RPG-16\"\
                end\
                if _i <= 2 then\
                    _unitType = \"Paratrooper AKS-74\"\
                end\
            end\
\
            local _unitId = ctld.getNextUnitId()\
\
            _troops[_i] = { type = _unitType, unitId = _unitId, name = string.format(\"Dropped %s #%i\", _unitType, _unitId) }\
        end\
    end\
\
    local _groupId = ctld.getNextGroupId()\
    local _details = { units = _troops, groupId = _groupId, groupName = string.format(\"Dropped Group %i\", _groupId), side = _side, country = _country }\
\
    return _details\
end\
\
--Special F10 function for players for troops\
function ctld.unloadExtractTroops(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
\
    if _heli == nil then\
        return false\
    end\
\
\
    local _extract = nil\
    if not ctld.inAir(_heli) then\
        if _heli:getCoalition() == 1 then\
            _extract = ctld.findNearestGroup(_heli, ctld.droppedTroopsRED)\
        else\
            _extract = ctld.findNearestGroup(_heli, ctld.droppedTroopsBLUE)\
        end\
\
    end\
\
    if _extract ~= nil and not ctld.troopsOnboard(_heli, true) then\
        -- search for nearest troops to pickup\
        return ctld.extractTroops({_heli:getName(), true})\
    else\
        return ctld.unloadTroops({_heli:getName(),true,true})\
    end\
\
\
end\
\
-- load troops onto vehicle\
function ctld.loadTroops(_heli, _troops, _numberOrTemplate)\
\
    -- load troops + vehicles if c130 or herc\
    -- \"M1045 HMMWV TOW\"\
    -- \"M1043 HMMWV Armament\"\
    local _onboard = ctld.inTransitTroops[_heli:getName()]\
\
    --number doesnt apply to vehicles\
    if _numberOrTemplate == nil  or (type(_numberOrTemplate) ~= \"table\" and type(_numberOrTemplate) ~= \"number\")  then\
        _numberOrTemplate = ctld.numberOfTroops\
    end\
\
    if _onboard == nil then\
        _onboard = { troops = {}, vehicles = {} }\
    end\
\
    local _list\
    if _heli:getCoalition() == 1 then\
        _list = ctld.vehiclesForTransportRED\
    else\
        _list = ctld.vehiclesForTransportBLUE\
    end\
\
    if _troops then\
\
        _onboard.troops = ctld.generateTroopTypes(_heli:getCoalition(), _numberOrTemplate, _heli:getCountry())\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" loaded troops into \" .. _heli:getTypeName(), 10)\
\
        ctld.processCallback({unit = _heli, onboard = _onboard.troops, action = \"load_troops\"})\
    else\
\
        _onboard.vehicles = ctld.generateVehiclesForTransport(_heli:getCoalition(), _heli:getCountry())\
\
        local _count = #_list\
\
        ctld.processCallback({unit = _heli, onboard = _onboard.vehicles, action = \"load_vehicles\"})\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" loaded \" .. _count .. \" vehicles into \" .. _heli:getTypeName(), 10)\
    end\
\
    ctld.inTransitTroops[_heli:getName()] = _onboard\
end\
\
function ctld.generateVehiclesForTransport(_side, _country)\
\
    local _vehicles = {}\
    local _list\
    if _side == 1 then\
        _list = ctld.vehiclesForTransportRED\
    else\
        _list = ctld.vehiclesForTransportBLUE\
    end\
\
\
    for _i, _type in ipairs(_list) do\
\
        local _unitId = ctld.getNextUnitId()\
\
        _vehicles[_i] = { type = _type, unitId = _unitId, name = string.format(\"Dropped %s #%i\", _type, _unitId) }\
    end\
\
\
    local _groupId = ctld.getNextGroupId()\
    local _details = { units = _vehicles, groupId = _groupId, groupName = string.format(\"Dropped Group %i\", _groupId), side = _side, country = _country }\
\
    return _details\
end\
\
function ctld.loadUnloadFOBCrate(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
    local _troops = _args[2]\
\
    if _heli == nil then\
        return\
    end\
\
    if ctld.inAir(_heli) == true then\
        return\
    end\
\
\
    local _side = _heli:getCoalition()\
\
    local _inZone = ctld.inLogisticsZone(_heli)\
    local _crateOnboard = ctld.inTransitFOBCrates[_heli:getName()] ~= nil\
\
    if _inZone == false and _crateOnboard == true then\
\
        ctld.inTransitFOBCrates[_heli:getName()] = nil\
\
        local _position = _heli:getPosition()\
\
        --try to spawn at 6 oclock to us\
        local _angle = math.atan2(_position.x.z, _position.x.x)\
        local _xOffset = math.cos(_angle) * -60\
        local _yOffset = math.sin(_angle) * -60\
\
        local _point = _heli:getPoint()\
\
        local _side = _heli:getCoalition()\
\
        local _unitId = ctld.getNextUnitId()\
\
        local _name = string.format(\"FOB Crate #%i\", _unitId)\
\
        local _spawnedCrate = ctld.spawnFOBCrateStatic(_heli:getCountry(), ctld.getNextUnitId(), { x = _point.x + _xOffset, z = _point.z + _yOffset }, _name)\
\
        if _side == 1 then\
            ctld.droppedFOBCratesRED[_name] = _name\
        else\
            ctld.droppedFOBCratesBLUE[_name] = _name\
        end\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" delivered a FOB Crate\", 10)\
\
        ctld.displayMessageToGroup(_heli, \"Delivered FOB Crate 60m at 6'oclock to you\", 10)\
\
    elseif _inZone == true and _crateOnboard == true then\
\
        ctld.displayMessageToGroup(_heli, \"FOB Crate dropped back to base\", 10)\
\
        ctld.inTransitFOBCrates[_heli:getName()] = nil\
\
    elseif _inZone == true and _crateOnboard == false then\
        ctld.displayMessageToGroup(_heli, \"FOB Crate Loaded\", 10)\
\
        ctld.inTransitFOBCrates[_heli:getName()] = true\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" loaded a FOB Crate ready for delivery!\", 10)\
\
    else\
\
        -- nearest Crate\
        local _crates = ctld.getCratesAndDistance(_heli)\
        local _nearestCrate = ctld.getClosestCrate(_heli, _crates, \"FOB\")\
\
        if _nearestCrate ~= nil and _nearestCrate.dist < 150 then\
\
            ctld.displayMessageToGroup(_heli, \"FOB Crate Loaded\", 10)\
            ctld.inTransitFOBCrates[_heli:getName()] = true\
\
            trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" loaded a FOB Crate ready for delivery!\", 10)\
\
            if _side == 1 then\
                ctld.droppedFOBCratesRED[_nearestCrate.crateUnit:getName()] = nil\
            else\
                ctld.droppedFOBCratesBLUE[_nearestCrate.crateUnit:getName()] = nil\
            end\
\
            --remove\
            _nearestCrate.crateUnit:destroy()\
\
        else\
            ctld.displayMessageToGroup(_heli, \"There are no friendly logistic units nearby to load a FOB crate from!\", 10)\
        end\
    end\
end\
\
function ctld.loadTroopsFromZone(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
    local _troops = _args[2]\
    local _groupTemplate = _args[3] or \"\"\
    local _allowExtract = _args[4]\
\
    if _heli == nil then\
        return false\
    end\
\
    local _zone = ctld.inPickupZone(_heli)\
\
    if ctld.troopsOnboard(_heli, _troops) then\
\
        if _troops then\
            ctld.displayMessageToGroup(_heli, \"You already have troops onboard.\", 10)\
        else\
            ctld.displayMessageToGroup(_heli, \"You already have vehicles onboard.\", 10)\
        end\
\
        return false\
    end\
\
    local _extract\
\
    if _allowExtract then\
        -- first check for extractable troops regardless of if we're in a zone or not\
        if _troops then\
            if _heli:getCoalition() == 1 then\
                _extract = ctld.findNearestGroup(_heli, ctld.droppedTroopsRED)\
            else\
                _extract = ctld.findNearestGroup(_heli, ctld.droppedTroopsBLUE)\
            end\
        else\
\
            if _heli:getCoalition() == 1 then\
                _extract = ctld.findNearestGroup(_heli, ctld.droppedVehiclesRED)\
            else\
                _extract = ctld.findNearestGroup(_heli, ctld.droppedVehiclesBLUE)\
            end\
        end\
    end\
\
    if _extract ~= nil then\
        -- search for nearest troops to pickup\
        return ctld.extractTroops({_heli:getName(), _troops})\
    elseif _zone.inZone == true then\
\
        if _zone.limit - 1 >= 0 then\
            -- decrease zone counter by 1\
            ctld.updateZoneCounter(_zone.index, -1)\
\
            ctld.loadTroops(_heli, _troops,_groupTemplate)\
\
            return true\
        else\
            ctld.displayMessageToGroup(_heli, \"This area has no more reinforcements available!\", 20)\
\
            return false\
        end\
\
    else\
        if _allowExtract then\
            ctld.displayMessageToGroup(_heli, \"You are not in a pickup zone and no one is nearby to extract\", 10)\
        else\
            ctld.displayMessageToGroup(_heli, \"You are not in a pickup zone\", 10)\
        end\
\
        return false\
    end\
end\
\
\
\
function ctld.unloadTroops(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
    local _troops = _args[2]\
\
    if _heli == nil then\
        return false\
    end\
\
    local _zone = ctld.inPickupZone(_heli)\
    if not ctld.troopsOnboard(_heli, _troops)  then\
\
        ctld.displayMessageToGroup(_heli, \"No one to unload\", 10)\
\
        return false\
    else\
\
        -- troops must be onboard to get here\
        if _zone.inZone == true  then\
\
            if _troops then\
                ctld.displayMessageToGroup(_heli, \"Dropped troops back to base\", 20)\
\
                ctld.processCallback({unit = _heli, unloaded = ctld.inTransitTroops[_heli:getName()].troops, action = \"unload_troops_zone\"})\
\
                ctld.inTransitTroops[_heli:getName()].troops = nil\
\
            else\
                ctld.displayMessageToGroup(_heli, \"Dropped vehicles back to base\", 20)\
\
                ctld.processCallback({unit = _heli, unloaded = ctld.inTransitTroops[_heli:getName()].vehicles, action = \"unload_vehicles_zone\"})\
\
                ctld.inTransitTroops[_heli:getName()].vehicles = nil\
            end\
\
            -- increase zone counter by 1\
            ctld.updateZoneCounter(_zone.index, 1)\
\
            return true\
\
        elseif _zone.inZone == false and ctld.troopsOnboard(_heli, _troops)  then\
\
            return ctld.deployTroops(_heli, _troops)\
        end\
    end\
\
end\
\
function ctld.extractTroops(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
    local _troops = _args[2]\
\
    if _heli == nil then\
        return false\
    end\
\
    if ctld.inAir(_heli) then\
        return false\
    end\
\
    if  ctld.troopsOnboard(_heli, _troops)  then\
        if _troops then\
            ctld.displayMessageToGroup(_heli, \"You already have troops onboard.\", 10)\
        else\
            ctld.displayMessageToGroup(_heli, \"You already have vehicles onboard.\", 10)\
        end\
\
        return false\
    end\
\
    local _onboard = ctld.inTransitTroops[_heli:getName()]\
\
    if _onboard == nil then\
        _onboard = { troops = nil, vehicles = nil }\
    end\
\
    local _extracted = false\
\
    if _troops then\
\
        local _extractTroops\
\
        if _heli:getCoalition() == 1 then\
            _extractTroops = ctld.findNearestGroup(_heli, ctld.droppedTroopsRED)\
        else\
            _extractTroops = ctld.findNearestGroup(_heli, ctld.droppedTroopsBLUE)\
        end\
\
\
        if _extractTroops ~= nil then\
\
            local _limit = ctld.getTransportLimit(_heli:getTypeName())\
\
            local _size =  #_extractTroops.group:getUnits()\
\
            if _limit < #_extractTroops.group:getUnits() then\
\
                ctld.displayMessageToGroup(_heli, \"Sorry - The group of \".._size..\" is too large to fit. \\n\\nLimit is \".._limit..\" for \".._heli:getTypeName(), 20)\
\
                return\
            end\
\
\
            _onboard.troops = _extractTroops.details\
\
            trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" extracted troops in \" .. _heli:getTypeName() .. \" from combat\", 10)\
\
            if _heli:getCoalition() == 1 then\
                ctld.droppedTroopsRED[_extractTroops.group:getName()] = nil\
            else\
                ctld.droppedTroopsBLUE[_extractTroops.group:getName()] = nil\
            end\
\
            ctld.processCallback({unit = _heli, extracted = _extractTroops, action = \"extract_troops\"})\
\
            --remove\
            _extractTroops.group:destroy()\
\
            _extracted = true\
        else\
            _onboard.troops = nil\
            ctld.displayMessageToGroup(_heli, \"No extractable troops nearby!\", 20)\
        end\
\
    else\
\
        local _extractVehicles\
\
\
        if _heli:getCoalition() == 1 then\
\
            _extractVehicles = ctld.findNearestGroup(_heli, ctld.droppedVehiclesRED)\
        else\
\
            _extractVehicles = ctld.findNearestGroup(_heli, ctld.droppedVehiclesBLUE)\
        end\
\
        if _extractVehicles ~= nil then\
            _onboard.vehicles = _extractVehicles.details\
\
            if _heli:getCoalition() == 1 then\
\
                ctld.droppedVehiclesRED[_extractVehicles.group:getName()] = nil\
            else\
\
                ctld.droppedVehiclesBLUE[_extractVehicles.group:getName()] = nil\
            end\
\
            trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" extracted vehicles in \" .. _heli:getTypeName() .. \" from combat\", 10)\
\
            ctld.processCallback({unit = _heli, extracted = _extractVehicles, action = \"extract_vehicles\"})\
            --remove\
            _extractVehicles.group:destroy()\
            _extracted = true\
\
        else\
            _onboard.vehicles = nil\
            ctld.displayMessageToGroup(_heli, \"No extractable vehicles nearby!\", 20)\
        end\
    end\
\
    ctld.inTransitTroops[_heli:getName()] = _onboard\
\
    return _extracted\
end\
\
\
function ctld.checkTroopStatus(_args)\
\
    --list onboard troops, if c130\
    local _heli = ctld.getTransportUnit(_args[1])\
\
    if _heli == nil then\
        return\
    end\
\
    local _onboard = ctld.inTransitTroops[_heli:getName()]\
\
    if _onboard == nil then\
\
        if ctld.inTransitFOBCrates[_heli:getName()] == true then\
            ctld.displayMessageToGroup(_heli, \"1 FOB Crate Onboard\", 10)\
        else\
            ctld.displayMessageToGroup(_heli, \"No troops onboard\", 10)\
        end\
\
\
    else\
        local _troops = _onboard.troops\
        local _vehicles = _onboard.vehicles\
\
        local _txt = \"\"\
\
        if _troops ~= nil and _troops.units ~= nil and #_troops.units > 0 then\
            _txt = _txt .. \" \" .. #_troops.units .. \" troops onboard\\n\"\
        end\
\
        if _vehicles ~= nil and _vehicles.units ~= nil and #_vehicles.units > 0 then\
            _txt = _txt .. \" \" .. #_vehicles.units .. \" vehicles onboard\\n\"\
        end\
\
        if ctld.inTransitFOBCrates[_heli:getName()] == true then\
            _txt = _txt .. \" 1 FOB Crate oboard\\n\"\
        end\
\
        if _txt ~= \"\" then\
            ctld.displayMessageToGroup(_heli, _txt, 10)\
        else\
            if ctld.inTransitFOBCrates[_heli:getName()] == true then\
                ctld.displayMessageToGroup(_heli, \"1 FOB Crate Onboard\", 10)\
            else\
                ctld.displayMessageToGroup(_heli, \"No troops onboard\", 10)\
            end\
        end\
    end\
end\
\
-- Removes troops from transport when it dies\
function ctld.checkTransportStatus()\
\
    timer.scheduleFunction(ctld.checkTransportStatus, nil, timer.getTime() + 3)\
\
    for _, _name in ipairs(ctld.transportPilotNames) do\
\
        local _transUnit = ctld.getTransportUnit(_name)\
\
        if _transUnit == nil then\
            --env.info(\"CTLD Transport Unit Dead event\")\
            ctld.inTransitTroops[_name] = nil\
            ctld.inTransitFOBCrates[_name] = nil\
            ctld.inTransitSlingLoadCrates[_name] = nil\
        end\
    end\
end\
\
function ctld.checkHoverStatus()\
    -- env.info(\"checkHoverStatus\")\
    timer.scheduleFunction(ctld.checkHoverStatus, nil, timer.getTime() + 1.0)\
\
    local _status, _result = pcall(function()\
\
        for _, _name in ipairs(ctld.transportPilotNames) do\
\
            local _reset = true\
            local _transUnit = ctld.getTransportUnit(_name)\
\
            --only check transports that are hovering and not planes\
            if _transUnit ~= nil and ctld.inTransitSlingLoadCrates[_name] == nil and ctld.inAir(_transUnit) and ctld.unitCanCarryVehicles(_transUnit) == false then\
\
                local _crates = ctld.getCratesAndDistance(_transUnit)\
\
                for _, _crate in pairs(_crates) do\
                    --   env.info(\"CRATE: \".._crate.crateUnit:getName().. \" \".._crate.dist)\
                    if _crate.dist < ctld.maxDistanceFromCrate and _crate.details.unit ~= \"FOB\" then\
\
                        --check height!\
                        local _height = _transUnit:getPoint().y - _crate.crateUnit:getPoint().y\
                        --env.info(\"HEIGHT \" .. _name .. \" \" .. _height .. \" \" .. _transUnit:getPoint().y .. \" \" .. _crate.crateUnit:getPoint().y)\
                        --  ctld.heightDiff(_transUnit)\
                        --env.info(\"HEIGHT ABOVE GROUD \".._name..\" \".._height..\" \".._transUnit:getPoint().y..\" \".._crate.crateUnit:getPoint().y)\
\
                        if _height > ctld.minimumHoverHeight and _height <= ctld.maximumHoverHeight then\
\
                            local _time = ctld.hoverStatus[_transUnit:getName()]\
\
                            if _time == nil then\
                                ctld.hoverStatus[_transUnit:getName()] = ctld.hoverTime\
                                _time = ctld.hoverTime\
                            else\
                                _time = ctld.hoverStatus[_transUnit:getName()] - 1\
                                ctld.hoverStatus[_transUnit:getName()] = _time\
                            end\
\
                            if _time > 0 then\
                                ctld.displayMessageToGroup(_transUnit, \"Hovering above \" .. _crate.details.desc .. \" crate. \\n\\nHold hover for \" .. _time .. \" seconds! \\n\\nIf the countdown stops you're too far away!\", 10,true)\
                            else\
                                ctld.hoverStatus[_transUnit:getName()] = nil\
                                ctld.displayMessageToGroup(_transUnit, \"Loaded  \" .. _crate.details.desc .. \" crate!\", 10,true)\
\
                                --crates been moved once!\
                                ctld.crateMove[_crate.crateUnit:getName()] = nil\
\
                                if _transUnit:getCoalition() == 1 then\
                                    ctld.spawnedCratesRED[_crate.crateUnit:getName()] = nil\
                                else\
                                    ctld.spawnedCratesBLUE[_crate.crateUnit:getName()] = nil\
                                end\
\
                                _crate.crateUnit:destroy()\
\
                                ctld.inTransitSlingLoadCrates[_name] = _crate.details\
                            end\
\
                            _reset = false\
\
                            break\
                        elseif _height <= ctld.minimumHoverHeight then\
                            ctld.displayMessageToGroup(_transUnit, \"Too low to hook \" .. _crate.details.desc .. \" crate.\\n\\nHold hover for \" .. ctld.hoverTime .. \" seconds\", 5,true)\
                            break\
                        else\
                            ctld.displayMessageToGroup(_transUnit, \"Too high to hook \" .. _crate.details.desc .. \" crate.\\n\\nHold hover for \" .. ctld.hoverTime .. \" seconds\", 5, true)\
                            break\
                        end\
                    end\
                end\
            end\
\
            if _reset then\
                ctld.hoverStatus[_name] = nil\
            end\
        end\
    end)\
\
    if (not _status) then\
        env.error(string.format(\"CTLD ERROR: %s\", _result))\
    end\
end\
\
function ctld.loadNearbyCrate(_name)\
    local _transUnit = ctld.getTransportUnit(_name)\
\
    if _transUnit ~= nil  then\
\
        if ctld.inAir(_transUnit) then\
            ctld.displayMessageToGroup(_transUnit, \"You must land before you can load a crate!\", 10,true)\
            return\
        end\
\
        if ctld.inTransitSlingLoadCrates[_name] == nil then\
            local _crates = ctld.getCratesAndDistance(_transUnit)\
\
            for _, _crate in pairs(_crates) do\
\
                if _crate.dist < 50.0 then\
                    ctld.displayMessageToGroup(_transUnit, \"Loaded  \" .. _crate.details.desc .. \" crate!\", 10,true)\
\
                    if _transUnit:getCoalition() == 1 then\
                        ctld.spawnedCratesRED[_crate.crateUnit:getName()] = nil\
                    else\
                        ctld.spawnedCratesBLUE[_crate.crateUnit:getName()] = nil\
                    end\
\
                    ctld.crateMove[_crate.crateUnit:getName()] = nil\
\
                    _crate.crateUnit:destroy()\
\
                    local _copiedCrate = mist.utils.deepCopy(_crate.details)\
\
                    ctld.inTransitSlingLoadCrates[_name] = _copiedCrate\
                    return\
                end\
            end\
\
            ctld.displayMessageToGroup(_transUnit, \"No Crates within 50m to load!\", 10,true)\
\
        else\
            -- crate onboard\
\
            local _currentCrate =  mist.utils.deepCopy(ctld.inTransitSlingLoadCrates[_name])\
\
            ctld.displayMessageToGroup(_transUnit, \"You already have a \".._currentCrate.desc..\" crate onboard!\", 10,true)\
        end\
    end\
\
\
end\
\
--recreates beacons to make sure they work!\
function ctld.refreshRadioBeacons()\
\
    timer.scheduleFunction(ctld.refreshRadioBeacons, nil, timer.getTime() + 30)\
\
\
    for _index, _beaconDetails in ipairs(ctld.deployedRadioBeacons) do\
\
        --trigger.action.outTextForCoalition(_beaconDetails.coalition,_beaconDetails.text,10)\
        if ctld.updateRadioBeacon(_beaconDetails) == false then\
\
            --search used frequencies + remove, add back to unused\
\
            for _i, _freq in ipairs(ctld.usedUHFFrequencies) do\
                if _freq == _beaconDetails.uhf then\
\
                    table.insert(ctld.freeUHFFrequencies, _freq)\
                    table.remove(ctld.usedUHFFrequencies, _i)\
                end\
            end\
\
            for _i, _freq in ipairs(ctld.usedVHFFrequencies) do\
                if _freq == _beaconDetails.vhf then\
\
                    table.insert(ctld.freeVHFFrequencies, _freq)\
                    table.remove(ctld.usedVHFFrequencies, _i)\
                end\
            end\
\
            for _i, _freq in ipairs(ctld.usedFMFrequencies) do\
                if _freq == _beaconDetails.fm then\
\
                    table.insert(ctld.freeFMFrequencies, _freq)\
                    table.remove(ctld.usedFMFrequencies, _i)\
                end\
            end\
\
            --clean up beacon table\
            table.remove(ctld.deployedRadioBeacons, _index)\
        end\
    end\
end\
\
function ctld.getClockDirection(_heli, _crate)\
\
    -- Source: Helicopter Script - Thanks!\
\
    local _position = _crate:getPosition().p -- get position of crate\
    local _playerPosition = _heli:getPosition().p -- get position of helicopter\
    local _relativePosition = mist.vec.sub(_position, _playerPosition)\
\
    local _playerHeading = mist.getHeading(_heli) -- the rest of the code determines the 'o'clock' bearing of the missile relative to the helicopter\
\
    local _headingVector = { x = math.cos(_playerHeading), y = 0, z = math.sin(_playerHeading) }\
\
    local _headingVectorPerpendicular = { x = math.cos(_playerHeading + math.pi / 2), y = 0, z = math.sin(_playerHeading + math.pi / 2) }\
\
    local _forwardDistance = mist.vec.dp(_relativePosition, _headingVector)\
\
    local _rightDistance = mist.vec.dp(_relativePosition, _headingVectorPerpendicular)\
\
    local _angle = math.atan2(_rightDistance, _forwardDistance) * 180 / math.pi\
\
    if _angle < 0 then\
        _angle = 360 + _angle\
    end\
    _angle = math.floor(_angle * 12 / 360 + 0.5)\
    if _angle == 0 then\
        _angle = 12\
    end\
\
    return _angle\
end\
\
\
function ctld.getCompassBearing(_ref, _unitPos)\
\
    _ref = mist.utils.makeVec3(_ref, 0) -- turn it into Vec3 if it is not already.\
    _unitPos = mist.utils.makeVec3(_unitPos, 0) -- turn it into Vec3 if it is not already.\
\
    local _vec = { x = _unitPos.x - _ref.x, y = _unitPos.y - _ref.y, z = _unitPos.z - _ref.z }\
\
    local _dir = mist.utils.getDir(_vec, _ref)\
\
    local _bearing = mist.utils.round(mist.utils.toDegree(_dir), 0)\
\
    return _bearing\
end\
\
function ctld.listNearbyCrates(_args)\
\
    local _message = \"\"\
\
    local _heli = ctld.getTransportUnit(_args[1])\
\
    if _heli == nil then\
\
        return -- no heli!\
    end\
\
    local _crates = ctld.getCratesAndDistance(_heli)\
\
    --sort\
    local _sort = function( a,b ) return a.dist < b.dist end\
    table.sort(_crates,_sort)\
\
    for _, _crate in pairs(_crates) do\
\
        if _crate.dist < 1000 and _crate.details.unit ~= \"FOB\" then\
            _message = string.format(\"%s\\n%s crate - kg %i - %i m - %d o'clock\", _message, _crate.details.desc, _crate.details.weight, _crate.dist, ctld.getClockDirection(_heli, _crate.crateUnit))\
        end\
    end\
\
\
    local _fobMsg = \"\"\
    for _, _fobCrate in pairs(_crates) do\
\
        if _fobCrate.dist < 1000 and _fobCrate.details.unit == \"FOB\" then\
            _fobMsg = _fobMsg .. string.format(\"FOB Crate - %d m - %d o'clock\\n\", _fobCrate.dist, ctld.getClockDirection(_heli, _fobCrate.crateUnit))\
        end\
    end\
\
    if _message ~= \"\" or _fobMsg ~= \"\" then\
\
        local _txt = \"\"\
\
        if _message ~= \"\" then\
            _txt = \"Nearby Crates:\\n\" .. _message\
        end\
\
        if _fobMsg ~= \"\" then\
\
            if _message ~= \"\" then\
                _txt = _txt .. \"\\n\\n\"\
            end\
\
            _txt = _txt .. \"Nearby FOB Crates (Not Slingloadable):\\n\" .. _fobMsg\
        end\
\
        ctld.displayMessageToGroup(_heli, _txt, 20)\
\
    else\
        --no crates nearby\
\
        local _txt = \"No Nearby Crates\"\
\
        ctld.displayMessageToGroup(_heli, _txt, 20)\
    end\
end\
\
\
function ctld.listFOBS(_args)\
\
    local _msg = \"FOB Positions:\"\
\
    local _heli = ctld.getTransportUnit(_args[1])\
\
    if _heli == nil then\
\
        return -- no heli!\
    end\
\
    -- get fob positions\
\
    local _fobs = ctld.getSpawnedFobs(_heli)\
\
    -- now check spawned fobs\
    for _, _fob in ipairs(_fobs) do\
        _msg = string.format(\"%s\\nFOB @ %s\", _msg, ctld.getFOBPositionString(_fob))\
    end\
\
    if _msg == \"FOB Positions:\" then\
        ctld.displayMessageToGroup(_heli, \"Sorry, there are no active FOBs!\", 20)\
    else\
        ctld.displayMessageToGroup(_heli, _msg, 20)\
    end\
end\
\
function ctld.getFOBPositionString(_fob)\
\
    local _lat, _lon = coord.LOtoLL(_fob:getPosition().p)\
\
    local _latLngStr = mist.tostringLL(_lat, _lon, 3, false)\
\
    --   local _mgrsString = mist.tostringMGRS(coord.LLtoMGRS(coord.LOtoLL(_fob:getPosition().p)), 5)\
\
    local _message = _latLngStr\
\
    local _beaconInfo = ctld.fobBeacons[_fob:getName()]\
\
    if _beaconInfo ~= nil then\
        _message = string.format(\"%s - %.2f KHz \", _message, _beaconInfo.vhf / 1000)\
        _message = string.format(\"%s - %.2f MHz \", _message, _beaconInfo.uhf / 1000000)\
        _message = string.format(\"%s - %.2f MHz \", _message, _beaconInfo.fm / 1000000)\
    end\
\
    return _message\
end\
\
\
function ctld.displayMessageToGroup(_unit, _text, _time,_clear)\
\
    local _groupId = ctld.getGroupId(_unit)\
    if _groupId then\
        if _clear == true then\
            trigger.action.outTextForGroup(_groupId, _text, _time,_clear)\
        else\
            trigger.action.outTextForGroup(_groupId, _text, _time)\
        end\
    end\
end\
\
function ctld.heightDiff(_unit)\
\
    local _point = _unit:getPoint()\
\
    -- env.info(\"heightunit \" .. _point.y)\
    --env.info(\"heightland \" .. land.getHeight({ x = _point.x, y = _point.z }))\
\
    return _point.y - land.getHeight({ x = _point.x, y = _point.z })\
end\
\
--includes fob crates!\
function ctld.getCratesAndDistance(_heli)\
\
    local _crates = {}\
\
    local _allCrates\
    if _heli:getCoalition() == 1 then\
        _allCrates = ctld.spawnedCratesRED\
    else\
        _allCrates = ctld.spawnedCratesBLUE\
    end\
\
    for _crateName, _details in pairs(_allCrates) do\
\
        --get crate\
        local _crate = ctld.getCrateObject(_crateName)\
\
        --in air seems buggy with crates so if in air is true, get the height above ground and the speed magnitude\
        if _crate ~= nil and _crate:getLife() > 0\
                and (ctld.inAir(_crate) == false) then\
\
            local _dist = ctld.getDistance(_crate:getPoint(), _heli:getPoint())\
\
            local _crateDetails = { crateUnit = _crate, dist = _dist, details = _details }\
\
            table.insert(_crates, _crateDetails)\
        end\
    end\
\
    local _fobCrates\
    if _heli:getCoalition() == 1 then\
        _fobCrates = ctld.droppedFOBCratesRED\
    else\
        _fobCrates = ctld.droppedFOBCratesBLUE\
    end\
\
    for _crateName, _details in pairs(_fobCrates) do\
\
        --get crate\
        local _crate = ctld.getCrateObject(_crateName)\
\
        if _crate ~= nil and _crate:getLife() > 0 then\
\
            local _dist = ctld.getDistance(_crate:getPoint(), _heli:getPoint())\
\
            local _crateDetails = { crateUnit = _crate, dist = _dist, details = { unit = \"FOB\" }, }\
\
            table.insert(_crates, _crateDetails)\
        end\
    end\
\
    return _crates\
end\
\
\
function ctld.getClosestCrate(_heli, _crates, _type)\
\
    local _closetCrate = nil\
    local _shortestDistance = -1\
    local _distance = 0\
\
    for _, _crate in pairs(_crates) do\
\
        if (_crate.details.unit == _type or _type == nil) then\
            _distance = _crate.dist\
\
            if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then\
                _shortestDistance = _distance\
                _closetCrate = _crate\
            end\
        end\
    end\
\
    return _closetCrate\
end\
\
function ctld.findNearestAASystem(_heli,_aaSystem)\
\
    local _closestHawkGroup = nil\
    local _shortestDistance = -1\
    local _distance = 0\
\
    for _groupName, _hawkDetails in pairs(ctld.completeAASystems) do\
\
        local _hawkGroup = Group.getByName(_groupName)\
\
        --  env.info(_groupName..\": \"..mist.utils.tableShow(_hawkDetails))\
        if _hawkGroup ~= nil and _hawkGroup:getCoalition() == _heli:getCoalition() and _hawkDetails[1].system.name == _aaSystem.name then\
\
            local _units = _hawkGroup:getUnits()\
\
            for _, _leader in pairs(_units) do\
\
                if _leader ~= nil and _leader:getLife() > 0 then\
\
                    _distance = ctld.getDistance(_leader:getPoint(), _heli:getPoint())\
\
                    if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then\
                        _shortestDistance = _distance\
                        _closestHawkGroup = _hawkGroup\
                    end\
\
                    break\
                end\
            end\
        end\
    end\
\
    if _closestHawkGroup ~= nil then\
\
        return { group = _closestHawkGroup, dist = _shortestDistance }\
    end\
    return nil\
end\
\
function ctld.getCrateObject(_name)\
    local _crate\
\
    if ctld.staticBugWorkaround then\
        _crate  = Unit.getByName(_name)\
    else\
        _crate = StaticObject.getByName(_name)\
    end\
    return _crate\
end\
\
\
\
function ctld.unpackCrates(_arguments)\
\
    local _status, _err = pcall(function(_args)\
\
        -- trigger.action.outText(\"Unpack Crates\".._args[1],10)\
\
        local _heli = ctld.getTransportUnit(_args[1])\
\
        if _heli ~= nil and ctld.inAir(_heli) == false then\
\
            local _crates = ctld.getCratesAndDistance(_heli)\
            local _crate = ctld.getClosestCrate(_heli, _crates)\
\
\
            if ctld.inLogisticsZone(_heli) == true  or  ctld.farEnoughFromLogisticZone(_heli) == false then\
\
                ctld.displayMessageToGroup(_heli, \"You can't unpack that here! Take it to where it's needed!\", 20)\
\
                return\
            end\
\
\
\
            if _crate ~= nil and _crate.dist < 750\
                    and (_crate.details.unit == \"FOB\" or _crate.details.unit == \"FOB-SMALL\") then\
\
                ctld.unpackFOBCrates(_crates, _heli)\
\
                return\
\
            elseif _crate ~= nil and _crate.dist < 200 then\
\
                if ctld.forceCrateToBeMoved and ctld.crateMove[_crate.crateUnit:getName()] then\
                    ctld.displayMessageToGroup(_heli,\"Sorry you must move this crate before you unpack it!\", 20)\
                    return\
                end\
\
\
                local _aaTemplate = ctld.getAATemplate(_crate.details.unit)\
\
                if _aaTemplate then\
\
                    if _crate.details.unit == _aaTemplate.repair then\
                        ctld.repairAASystem(_heli, _crate,_aaTemplate)\
                    else\
                        ctld.unpackAASystem(_heli, _crate, _crates,_aaTemplate)\
                    end\
\
                    return -- stop processing\
                    -- is multi crate?\
                elseif _crate.details.cratesRequired ~= nil and _crate.details.cratesRequired > 1 then\
                    -- multicrate\
\
                    ctld.unpackMultiCrate(_heli, _crate, _crates)\
\
                    return\
\
                else\
                    -- single crate\
                    local _cratePoint = _crate.crateUnit:getPoint()\
                    local _crateName = _crate.crateUnit:getName()\
\
                    -- ctld.spawnCrateStatic( _heli:getCoalition(),ctld.getNextUnitId(),{x=100,z=100},_crateName,100)\
\
                    --remove crate\
                  --  if ctld.slingLoad == false then\
                        _crate.crateUnit:destroy()\
                   -- end\
\
                    local _spawnedGroups = ctld.spawnCrateGroup(_heli, { _cratePoint }, { _crate.details.unit })\
\
                    if _heli:getCoalition() == 1 then\
                        ctld.spawnedCratesRED[_crateName] = nil\
                    else\
                        ctld.spawnedCratesBLUE[_crateName] = nil\
                    end\
\
                    ctld.processCallback({unit = _heli, crate = _crate , spawnedGroup = _spawnedGroups, action = \"unpack\"})\
\
                    if _crate.details.unit == \"1L13 EWR\" then\
                        ctld.addEWRTask(_spawnedGroups)\
\
                        --       env.info(\"Added EWR\")\
                    end\
\
\
                    trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" successfully deployed \" .. _crate.details.desc .. \" to the field\", 10)\
\
                    if ctld.isJTACUnitType(_crate.details.unit) and ctld.JTAC_dropEnabled then\
\
                        local _code = table.remove(ctld.jtacGeneratedLaserCodes, 1)\
                        --put to the end\
                        table.insert(ctld.jtacGeneratedLaserCodes, _code)\
\
                        ctld.JTACAutoLase(_spawnedGroups:getName(), _code) --(_jtacGroupName, _laserCode, _smoke, _lock, _colour)\
                    end\
                end\
\
            else\
\
                ctld.displayMessageToGroup(_heli, \"No friendly crates close enough to unpack\", 20)\
            end\
        end\
    end, _arguments)\
\
    if (not _status) then\
        env.error(string.format(\"CTLD ERROR: %s\", _err))\
    end\
end\
\
\
-- builds a fob!\
function ctld.unpackFOBCrates(_crates, _heli)\
\
    if ctld.inLogisticsZone(_heli) == true then\
\
        ctld.displayMessageToGroup(_heli, \"You can't unpack that here! Take it to where it's needed!\", 20)\
\
        return\
    end\
\
    -- unpack multi crate\
    local _nearbyMultiCrates = {}\
\
    local _bigFobCrates = 0\
    local _smallFobCrates = 0\
    local _totalCrates = 0\
\
    for _, _nearbyCrate in pairs(_crates) do\
\
        if _nearbyCrate.dist < 750  then\
\
            if  _nearbyCrate.details.unit == \"FOB\" then\
                _bigFobCrates = _bigFobCrates + 1\
                table.insert(_nearbyMultiCrates, _nearbyCrate)\
            elseif _nearbyCrate.details.unit == \"FOB-SMALL\" then\
                _smallFobCrates = _smallFobCrates + 1\
                table.insert(_nearbyMultiCrates, _nearbyCrate)\
            end\
\
            --catch divide by 0\
            if _smallFobCrates > 0 then\
                _totalCrates = _bigFobCrates + (_smallFobCrates/3.0)\
            else\
                _totalCrates = _bigFobCrates\
            end\
\
            if _totalCrates >= ctld.cratesRequiredForFOB then\
                break\
            end\
        end\
    end\
\
    --- check crate count\
    if _totalCrates >= ctld.cratesRequiredForFOB then\
\
        -- destroy crates\
\
        local _points = {}\
\
        for _, _crate in pairs(_nearbyMultiCrates) do\
\
            if _heli:getCoalition() == 1 then\
                ctld.droppedFOBCratesRED[_crate.crateUnit:getName()] = nil\
                ctld.spawnedCratesRED[_crate.crateUnit:getName()] = nil\
            else\
                ctld.droppedFOBCratesBLUE[_crate.crateUnit:getName()] = nil\
                ctld.spawnedCratesBLUE[_crate.crateUnit:getName()] = nil\
            end\
\
            table.insert(_points, _crate.crateUnit:getPoint())\
\
            --destroy\
            _crate.crateUnit:destroy()\
        end\
\
        local _centroid = ctld.getCentroid(_points)\
\
        timer.scheduleFunction(function(_args)\
\
            local _unitId = ctld.getNextUnitId()\
            local _name = \"Deployed FOB #\" .. _unitId\
\
            local _fob = ctld.spawnFOB(_args[2], _unitId, _args[1], _name)\
\
            --make it able to deploy crates\
            table.insert(ctld.logisticUnits, _fob:getName())\
\
            ctld.beaconCount = ctld.beaconCount + 1\
\
            local _radioBeaconName = \"FOB Beacon #\" .. ctld.beaconCount\
\
            local _radioBeaconDetails = ctld.createRadioBeacon(_args[1], _args[3], _args[2], _radioBeaconName, nil, true)\
\
            ctld.fobBeacons[_name] = { vhf = _radioBeaconDetails.vhf, uhf = _radioBeaconDetails.uhf, fm = _radioBeaconDetails.fm }\
\
            if ctld.troopPickupAtFOB == true then\
                table.insert(ctld.builtFOBS, _fob:getName())\
\
                trigger.action.outTextForCoalition(_args[3], \"Finished building FOB! Crates and Troops can now be picked up.\", 10)\
            else\
                trigger.action.outTextForCoalition(_args[3], \"Finished building FOB! Crates can now be picked up.\", 10)\
            end\
        end, { _centroid, _heli:getCountry(), _heli:getCoalition() }, timer.getTime() + ctld.buildTimeFOB)\
\
        local _txt = string.format(\"%s started building FOB using %d FOB crates, it will be finished in %d seconds.\\nPosition marked with smoke.\", ctld.getPlayerNameOrType(_heli), _totalCrates, ctld.buildTimeFOB)\
\
        ctld.processCallback({unit = _heli, position = _centroid, action = \"fob\"})\
\
        trigger.action.smoke(_centroid, trigger.smokeColor.Green)\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), _txt, 10)\
    else\
        local _txt = string.format(\"Cannot build FOB!\\n\\nIt requires %d Large FOB crates ( 3 small FOB crates equal 1 large FOB Crate) and there are the equivalent of %d large FOB crates nearby\\n\\nOr the crates are not within 750m of each other\", ctld.cratesRequiredForFOB, _totalCrates)\
        ctld.displayMessageToGroup(_heli, _txt, 20)\
    end\
end\
\
--unloads the sling crate when the helicopter is on the ground or between 4.5 - 10 meters\
function ctld.dropSlingCrate(_args)\
    local _heli = ctld.getTransportUnit(_args[1])\
\
    if _heli == nil then\
        return -- no heli!\
    end\
\
    local _currentCrate = ctld.inTransitSlingLoadCrates[_heli:getName()]\
\
    if _currentCrate == nil then\
        if ctld.hoverPickup then\
            ctld.displayMessageToGroup(_heli, \"You are not currently transporting any crates. \\n\\nTo Pickup a crate, hover for \"..ctld.hoverTime..\" seconds above the crate\", 10)\
        else\
            ctld.displayMessageToGroup(_heli, \"You are not currently transporting any crates. \\n\\nTo Pickup a crate - land and use F10 Crate Commands to load one.\", 10)\
        end\
    else\
\
        local _heli = ctld.getTransportUnit(_args[1])\
\
        local _point = _heli:getPoint()\
\
        local _unitId = ctld.getNextUnitId()\
\
        local _side = _heli:getCoalition()\
\
        local _name = string.format(\"%s #%i\", _currentCrate.desc, _unitId)\
\
\
        local _heightDiff = ctld.heightDiff(_heli)\
\
        if ctld.inAir(_heli) == false or _heightDiff <= 7.5 then\
            ctld.displayMessageToGroup(_heli, _currentCrate.desc .. \" crate has been safely unhooked and is at your 12 o'clock\", 10)\
            _point = ctld.getPointAt12Oclock(_heli, 30)\
            --        elseif _heightDiff > 40.0 then\
            --            ctld.inTransitSlingLoadCrates[_heli:getName()] = nil\
            --            ctld.displayMessageToGroup(_heli, \"You were too high! The crate has been destroyed\", 10)\
            --            return\
        elseif _heightDiff > 7.5 and _heightDiff <= 40.0 then\
            ctld.displayMessageToGroup(_heli, _currentCrate.desc .. \" crate has been safely dropped below you\", 10)\
        else -- _heightDiff > 40.0\
        ctld.inTransitSlingLoadCrates[_heli:getName()] = nil\
        ctld.displayMessageToGroup(_heli, \"You were too high! The crate has been destroyed\", 10)\
        return\
        end\
\
\
        --remove crate from cargo\
        ctld.inTransitSlingLoadCrates[_heli:getName()] = nil\
\
        local _spawnedCrate = ctld.spawnCrateStatic(_heli:getCountry(), _unitId, _point, _name, _currentCrate.weight,_side)\
    end\
end\
\
-- shows the status of the current simulated cargo status\
function ctld.slingCargoStatus(_args)\
    local _heli = ctld.getTransportUnit(_args[1])\
\
    if _heli == nil then\
        return -- no heli!\
    end\
\
    local _currentCrate = ctld.inTransitSlingLoadCrates[_heli:getName()]\
\
    if _currentCrate == nil then\
        ctld.displayMessageToGroup(_heli, \"You are not currently transporting any crates. \\n\\nTo Pickup a crate, hover for 10 seconds above the crate\", 10)\
    else\
        ctld.displayMessageToGroup(_heli, \"Currently Transporting: \" .. _currentCrate.desc .. \" \\n\\nTo Pickup a crate, hover for 10 seconds above the crate\", 10)\
    end\
end\
\
--spawns a radio beacon made up of two units,\
-- one for VHF and one for UHF\
-- The units are set to to NOT engage\
function ctld.createRadioBeacon(_point, _coalition, _country, _name, _batteryTime, _isFOB)\
\
    local _uhfGroup = ctld.spawnRadioBeaconUnit(_point, _country, \"UHF\")\
    local _vhfGroup = ctld.spawnRadioBeaconUnit(_point, _country, \"VHF\")\
    local _fmGroup = ctld.spawnRadioBeaconUnit(_point, _country, \"FM\")\
\
    local _freq = ctld.generateADFFrequencies()\
\
    --create timeout\
    local _battery\
\
    if _batteryTime == nil then\
        _battery = timer.getTime() + (ctld.deployedBeaconBattery * 60)\
    else\
        _battery = timer.getTime() + (_batteryTime * 60)\
    end\
\
    local _lat, _lon = coord.LOtoLL(_point)\
\
    local _latLngStr = mist.tostringLL(_lat, _lon, 3, false)\
\
    --local _mgrsString = mist.tostringMGRS(coord.LLtoMGRS(coord.LOtoLL(_point)), 5)\
\
    local _message = _name\
\
    if _isFOB then\
        --  _message = \"FOB \" .. _message\
        _battery = -1 --never run out of power!\
    end\
\
    _message = _message .. \" - \" .. _latLngStr\
\
    --  env.info(\"GEN UHF: \".. _freq.uhf)\
    --  env.info(\"GEN VHF: \".. _freq.vhf)\
\
    _message = string.format(\"%s - %.2f KHz\", _message, _freq.vhf / 1000)\
\
    _message = string.format(\"%s - %.2f MHz\", _message, _freq.uhf / 1000000)\
\
    _message = string.format(\"%s - %.2f MHz \", _message, _freq.fm / 1000000)\
\
\
\
    local _beaconDetails = {\
        vhf = _freq.vhf,\
        vhfGroup = _vhfGroup:getName(),\
        uhf = _freq.uhf,\
        uhfGroup = _uhfGroup:getName(),\
        fm = _freq.fm,\
        fmGroup = _fmGroup:getName(),\
        text = _message,\
        battery = _battery,\
        coalition = _coalition,\
    }\
    ctld.updateRadioBeacon(_beaconDetails)\
\
    table.insert(ctld.deployedRadioBeacons, _beaconDetails)\
\
    return _beaconDetails\
end\
\
function ctld.generateADFFrequencies()\
\
    if #ctld.freeUHFFrequencies <= 3 then\
        ctld.freeUHFFrequencies = ctld.usedUHFFrequencies\
        ctld.usedUHFFrequencies = {}\
    end\
\
    --remove frequency at RANDOM\
    local _uhf = table.remove(ctld.freeUHFFrequencies, math.random(#ctld.freeUHFFrequencies))\
    table.insert(ctld.usedUHFFrequencies, _uhf)\
\
\
    if #ctld.freeVHFFrequencies <= 3 then\
        ctld.freeVHFFrequencies = ctld.usedVHFFrequencies\
        ctld.usedVHFFrequencies = {}\
    end\
\
    local _vhf = table.remove(ctld.freeVHFFrequencies, math.random(#ctld.freeVHFFrequencies))\
    table.insert(ctld.usedVHFFrequencies, _vhf)\
\
    if #ctld.freeFMFrequencies <= 3 then\
        ctld.freeFMFrequencies = ctld.usedFMFrequencies\
        ctld.usedFMFrequencies = {}\
    end\
\
    local _fm = table.remove(ctld.freeFMFrequencies, math.random(#ctld.freeFMFrequencies))\
    table.insert(ctld.usedFMFrequencies, _fm)\
\
    return { uhf = _uhf, vhf = _vhf, fm = _fm }\
    --- return {uhf=_uhf,vhf=_vhf}\
end\
\
\
\
function ctld.spawnRadioBeaconUnit(_point, _country, _type)\
\
    local _groupId = ctld.getNextGroupId()\
\
    local _unitId = ctld.getNextUnitId()\
\
    local _radioGroup = {\
        [\"visible\"] = false,\
       -- [\"groupId\"] = _groupId,\
        [\"hidden\"] = false,\
        [\"units\"] = {\
            [1] = {\
                [\"y\"] = _point.z,\
                [\"type\"] = \"2B11 mortar\",\
                [\"name\"] = _type .. \" Radio Beacon Unit #\" .. _unitId,\
             --   [\"unitId\"] = _unitId,\
                [\"heading\"] = 0,\
                [\"playerCanDrive\"] = true,\
                [\"skill\"] = \"Excellent\",\
                [\"x\"] = _point.x,\
            }\
        },\
        --        [\"y\"] = _positions[1].z,\
        --        [\"x\"] = _positions[1].x,\
        [\"name\"] = _type .. \" Radio Beacon Group #\" .. _groupId,\
        [\"task\"] = {},\
        --added two fields below for MIST\
        [\"category\"] = Group.Category.GROUND,\
        [\"country\"] = _country\
    }\
\
    -- return coalition.addGroup(_country, Group.Category.GROUND, _radioGroup)\
    return Group.getByName(mist.dynAdd(_radioGroup).name)\
end\
\
function ctld.updateRadioBeacon(_beaconDetails)\
\
    local _vhfGroup = Group.getByName(_beaconDetails.vhfGroup)\
\
    local _uhfGroup = Group.getByName(_beaconDetails.uhfGroup)\
\
    local _fmGroup = Group.getByName(_beaconDetails.fmGroup)\
\
    local _radioLoop = {}\
\
    if _vhfGroup ~= nil and _vhfGroup:getUnits() ~= nil and #_vhfGroup:getUnits() == 1 then\
        table.insert(_radioLoop, { group = _vhfGroup, freq = _beaconDetails.vhf, silent = false, mode = 0 })\
    end\
\
    if _uhfGroup ~= nil and _uhfGroup:getUnits() ~= nil and #_uhfGroup:getUnits() == 1 then\
        table.insert(_radioLoop, { group = _uhfGroup, freq = _beaconDetails.uhf, silent = true, mode = 0 })\
    end\
\
    if _fmGroup ~= nil and _fmGroup:getUnits() ~= nil and #_fmGroup:getUnits() == 1 then\
        table.insert(_radioLoop, { group = _fmGroup, freq = _beaconDetails.fm, silent = false, mode = 1 })\
    end\
\
    local _batLife = _beaconDetails.battery - timer.getTime()\
\
    if (_batLife <= 0 and _beaconDetails.battery ~= -1) or #_radioLoop ~= 3 then\
        -- ran out of batteries\
\
        if _vhfGroup ~= nil then\
            _vhfGroup:destroy()\
        end\
        if _uhfGroup ~= nil then\
            _uhfGroup:destroy()\
        end\
        if _fmGroup ~= nil then\
            _fmGroup:destroy()\
        end\
\
        return false\
    end\
\
    --fobs have unlimited battery life\
    --    if _battery ~= -1 then\
    --        _text = _text..\" \"..mist.utils.round(_batLife)..\" seconds of battery\"\
    --    end\
\
    for _, _radio in pairs(_radioLoop) do\
\
        local _groupController = _radio.group:getController()\
\
        local _sound = ctld.radioSound\
        if _radio.silent then\
            _sound = ctld.radioSoundFC3\
        end\
\
        _sound = \"l10n/DEFAULT/\".._sound\
\
        _groupController:setOption(AI.Option.Ground.id.ROE, AI.Option.Ground.val.ROE.WEAPON_HOLD)\
\
        trigger.action.radioTransmission(_sound, _radio.group:getUnit(1):getPoint(), _radio.mode, false, _radio.freq, 1000)\
        --This function doesnt actually stop transmitting when then sound is false. My hope is it will stop if a new beacon is created on the same\
        -- frequency... OR they fix the bug where it wont stop.\
        --        end\
\
        --\
    end\
\
    return true\
\
    --  trigger.action.radioTransmission(ctld.radioSound, _point, 1, true, _frequency, 1000)\
end\
\
function ctld.listRadioBeacons(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
    local _message = \"\"\
\
    if _heli ~= nil then\
\
        for _x, _details in pairs(ctld.deployedRadioBeacons) do\
\
            if _details.coalition == _heli:getCoalition() then\
                _message = _message .. _details.text .. \"\\n\"\
            end\
        end\
\
        if _message ~= \"\" then\
            ctld.displayMessageToGroup(_heli, \"Radio Beacons:\\n\" .. _message, 20)\
        else\
            ctld.displayMessageToGroup(_heli, \"No Active Radio Beacons\", 20)\
        end\
    end\
end\
\
function ctld.dropRadioBeacon(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
    local _message = \"\"\
\
    if _heli ~= nil and ctld.inAir(_heli) == false then\
\
        --deploy 50 m infront\
        --try to spawn at 12 oclock to us\
        local _point = ctld.getPointAt12Oclock(_heli, 50)\
\
        ctld.beaconCount = ctld.beaconCount + 1\
        local _name = \"Beacon #\" .. ctld.beaconCount\
\
        local _radioBeaconDetails = ctld.createRadioBeacon(_point, _heli:getCoalition(), _heli:getCountry(), _name, nil, false)\
\
        -- mark with flare?\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" deployed a Radio Beacon.\\n\\n\" .. _radioBeaconDetails.text, 20)\
\
    else\
        ctld.displayMessageToGroup(_heli, \"You need to land before you can deploy a Radio Beacon!\", 20)\
    end\
end\
\
--remove closet radio beacon\
function ctld.removeRadioBeacon(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
    local _message = \"\"\
\
    if _heli ~= nil and ctld.inAir(_heli) == false then\
\
        -- mark with flare?\
\
        local _closetBeacon = nil\
        local _shortestDistance = -1\
        local _distance = 0\
\
        for _x, _details in pairs(ctld.deployedRadioBeacons) do\
\
            if _details.coalition == _heli:getCoalition() then\
\
                local _group = Group.getByName(_details.vhfGroup)\
\
                if _group ~= nil and #_group:getUnits() == 1 then\
\
                    _distance = ctld.getDistance(_heli:getPoint(), _group:getUnit(1):getPoint())\
                    if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then\
                        _shortestDistance = _distance\
                        _closetBeacon = _details\
                    end\
                end\
            end\
        end\
\
        if _closetBeacon ~= nil and _shortestDistance then\
            local _vhfGroup = Group.getByName(_closetBeacon.vhfGroup)\
\
            local _uhfGroup = Group.getByName(_closetBeacon.uhfGroup)\
\
            local _fmGroup = Group.getByName(_closetBeacon.fmGroup)\
\
            if _vhfGroup ~= nil then\
                _vhfGroup:destroy()\
            end\
            if _uhfGroup ~= nil then\
                _uhfGroup:destroy()\
            end\
            if _fmGroup ~= nil then\
                _fmGroup:destroy()\
            end\
\
            trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" removed a Radio Beacon.\\n\\n\" .. _closetBeacon.text, 20)\
        else\
            ctld.displayMessageToGroup(_heli, \"No Radio Beacons within 500m.\", 20)\
        end\
\
    else\
        ctld.displayMessageToGroup(_heli, \"You need to land before remove a Radio Beacon\", 20)\
    end\
end\
\
-- gets the center of a bunch of points!\
-- return proper DCS point with height\
function ctld.getCentroid(_points)\
    local _tx, _ty = 0, 0\
    for _index, _point in ipairs(_points) do\
        _tx = _tx + _point.x\
        _ty = _ty + _point.z\
    end\
\
    local _npoints = #_points\
\
    local _point = { x = _tx / _npoints, z = _ty / _npoints }\
\
    _point.y = land.getHeight({ _point.x, _point.z })\
\
    return _point\
end\
\
function ctld.getAATemplate(_unitName)\
\
    for _,_system in pairs(ctld.AASystemTemplate) do\
\
        if _system.repair == _unitName then\
            return _system\
        end\
\
        for _,_part in pairs(_system.parts) do\
\
            if _unitName == _part.name  then\
                return _system\
            end\
        end\
    end\
\
    return nil\
\
end\
\
function ctld.getLauncherUnitFromAATemplate(_aaTemplate)\
    for _,_part in pairs(_aaTemplate.parts) do\
\
        if _part.launcher then\
            return _part.name\
        end\
    end\
\
    return nil\
end\
\
function ctld.rearmAASystem(_heli, _nearestCrate, _nearbyCrates, _aaSystemTemplate)\
\
    -- are we adding to existing aa system?\
    -- check to see if the crate is a launcher\
    if ctld.getLauncherUnitFromAATemplate(_aaSystemTemplate) == _nearestCrate.details.unit then\
\
        -- find nearest COMPLETE AA system\
        local _nearestSystem = ctld.findNearestAASystem(_heli, _aaSystemTemplate)\
\
        if _nearestSystem ~= nil and _nearestSystem.dist < 300 then\
\
            local _uniqueTypes = {} -- stores each unique part of system\
            local _types = {}\
            local _points = {}\
\
            local _units = _nearestSystem.group:getUnits()\
\
            if _units ~= nil and #_units > 0 then\
\
                for x = 1, #_units do\
                    if _units[x]:getLife() > 0 then\
\
                        --this allows us to count each type once\
                        _uniqueTypes[_units[x]:getTypeName()] = _units[x]:getTypeName()\
\
                        table.insert(_points, _units[x]:getPoint())\
                        table.insert(_types, _units[x]:getTypeName())\
                    end\
                end\
            end\
\
            -- do we have the correct number of unique pieces and do we have enough points for all the pieces\
            if ctld.countTableEntries(_uniqueTypes) == _aaSystemTemplate.count and #_points >= _aaSystemTemplate.count then\
\
                -- rearm aa system\
                -- destroy old group\
                ctld.completeAASystems[_nearestSystem.group:getName()] = nil\
\
                _nearestSystem.group:destroy()\
\
                local _spawnedGroup = ctld.spawnCrateGroup(_heli, _points, _types)\
\
                ctld.completeAASystems[_spawnedGroup:getName()] = ctld.getAASystemDetails(_spawnedGroup, _aaSystemTemplate)\
\
                ctld.processCallback({unit = _heli, crate =  _nearestCrate , spawnedGroup = _spawnedGroup, action = \"rearm\"})\
\
                trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" successfully rearmed a full \".._aaSystemTemplate.name..\" in the field\", 10)\
\
                if _heli:getCoalition() == 1 then\
                    ctld.spawnedCratesRED[_nearestCrate.crateUnit:getName()] = nil\
                else\
                    ctld.spawnedCratesBLUE[_nearestCrate.crateUnit:getName()] = nil\
                end\
\
                -- remove crate\
           --     if ctld.slingLoad == false then\
                    _nearestCrate.crateUnit:destroy()\
              --  end\
\
                return true -- all done so quit\
            end\
        end\
    end\
\
    return false\
end\
\
function ctld.getAASystemDetails(_hawkGroup,_aaSystemTemplate)\
\
    local _units = _hawkGroup:getUnits()\
\
    local _hawkDetails = {}\
\
    for _, _unit in pairs(_units) do\
        table.insert(_hawkDetails, { point = _unit:getPoint(), unit = _unit:getTypeName(), name = _unit:getName(), system =_aaSystemTemplate})\
    end\
\
    return _hawkDetails\
end\
\
function ctld.countTableEntries(_table)\
\
    if _table == nil then\
        return 0\
    end\
\
\
    local _count = 0\
\
    for _key, _value in pairs(_table) do\
\
        _count = _count + 1\
    end\
\
    return _count\
end\
\
function ctld.unpackAASystem(_heli, _nearestCrate, _nearbyCrates,_aaSystemTemplate)\
\
    if ctld.rearmAASystem(_heli, _nearestCrate, _nearbyCrates,_aaSystemTemplate) then\
        -- rearmed hawk\
        return\
    end\
\
    -- are there all the pieces close enough together\
    local _systemParts = {}\
\
    --initialise list of parts\
    for _,_part in pairs(_aaSystemTemplate.parts) do\
        _systemParts[_part.name] = {name = _part.name,desc = _part.desc,found = false}\
    end\
\
    -- find all nearest crates and add them to the list if they're part of the AA System\
    for _, _nearbyCrate in pairs(_nearbyCrates) do\
\
        if _nearbyCrate.dist < 500 then\
\
            if _systemParts[_nearbyCrate.details.unit] ~= nil and _systemParts[_nearbyCrate.details.unit].found == false  then\
                local _foundPart = _systemParts[_nearbyCrate.details.unit]\
\
                _foundPart.found = true\
                _foundPart.crate = _nearbyCrate\
\
                _systemParts[_nearbyCrate.details.unit] = _foundPart\
            end\
        end\
    end\
\
    local _count = 0\
    local _txt = \"\"\
\
    local _posArray = {}\
    local _typeArray = {}\
    for _name, _systemPart in pairs(_systemParts) do\
\
        if _systemPart.found == false then\
            _txt = _txt..\"Missing \".._systemPart.desc..\"\\n\"\
        else\
\
            local _launcherPart = ctld.getLauncherUnitFromAATemplate(_aaSystemTemplate)\
\
            --handle multiple launchers from one crate\
            if (_name == \"Hawk ln\" and ctld.hawkLaunchers > 1)\
                    or (_launcherPart == _name and ctld.aaLaunchers  > 1) then\
\
                --add multiple launcher\
                local _launchers = ctld.aaLaunchers\
\
                if _name == \"Hawk ln\" then\
                    _launchers = ctld.hawkLaunchers\
                end\
\
                for _i = 1, _launchers do\
\
                    -- spawn in a circle around the crate\
                    local _angle = math.pi * 2 * (_i - 1) / _launchers\
                    local _xOffset = math.cos(_angle) * 12\
                    local _yOffset = math.sin(_angle) * 12\
\
                    local _point = _systemPart.crate.crateUnit:getPoint()\
\
                    _point = { x = _point.x + _xOffset, y = _point.y, z = _point.z + _yOffset }\
\
                    table.insert(_posArray, _point)\
                    table.insert(_typeArray, _name)\
                end\
            else\
                table.insert(_posArray, _systemPart.crate.crateUnit:getPoint())\
                table.insert(_typeArray, _name)\
            end\
        end\
    end\
\
    local _activeLaunchers = ctld.countCompleteAASystems(_heli)\
\
    local _allowed = ctld.getAllowedAASystems(_heli)\
\
    env.info(\"Active: \".._activeLaunchers..\" Allowed: \".._allowed)\
\
    if _activeLaunchers + 1 > _allowed then\
        trigger.action.outTextForCoalition(_heli:getCoalition(), \"Out of parts for AA Systems. Current limit is \".._allowed..\" \\n\", 10)\
        return\
    end\
\
    if _txt ~= \"\"  then\
        ctld.displayMessageToGroup(_heli, \"Cannot build \".._aaSystemTemplate.name..\"\\n\" .. _txt .. \"\\n\\nOr the crates are not close enough together\", 20)\
        return\
    else\
\
        -- destroy crates\
        for _name, _systemPart in pairs(_systemParts) do\
\
            if _heli:getCoalition() == 1 then\
                ctld.spawnedCratesRED[_systemPart.crate.crateUnit:getName()] = nil\
            else\
                ctld.spawnedCratesBLUE[_systemPart.crate.crateUnit:getName()] = nil\
            end\
\
            --destroy\
           -- if ctld.slingLoad == false then\
                _systemPart.crate.crateUnit:destroy()\
            --end\
        end\
\
        -- HAWK / BUK READY!\
        local _spawnedGroup = ctld.spawnCrateGroup(_heli, _posArray, _typeArray)\
\
        ctld.completeAASystems[_spawnedGroup:getName()] = ctld.getAASystemDetails(_spawnedGroup,_aaSystemTemplate)\
\
        ctld.processCallback({unit = _heli, crate = _nearestCrate , spawnedGroup = _spawnedGroup, action = \"unpack\"})\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" successfully deployed a full \".._aaSystemTemplate.name..\" to the field. \\n\\nAA Active System limit is: \".._allowed..\"\\nActive: \"..(_activeLaunchers+1), 10)\
\
    end\
end\
\
--count the number of captured cities, sets the amount of allowed AA Systems\
function ctld.getAllowedAASystems(_heli)\
\
    if _heli:getCoalition() == 1 then\
        return ctld.AASystemLimitBLUE\
    else\
        return ctld.AASystemLimitRED\
    end\
\
\
end\
\
\
function ctld.countCompleteAASystems(_heli)\
\
    local _count = 0\
\
    for _groupName, _hawkDetails in pairs(ctld.completeAASystems) do\
\
        local _hawkGroup = Group.getByName(_groupName)\
\
        --  env.info(_groupName..\": \"..mist.utils.tableShow(_hawkDetails))\
        if _hawkGroup ~= nil and _hawkGroup:getCoalition() == _heli:getCoalition() then\
\
            local _units = _hawkGroup:getUnits()\
\
            if _units ~=nil and #_units > 0 then\
                --get the system template\
                local _aaSystemTemplate = _hawkDetails[1].system\
\
                local _uniqueTypes = {} -- stores each unique part of system\
                local _types = {}\
                local _points = {}\
\
                if _units ~= nil and #_units > 0 then\
\
                    for x = 1, #_units do\
                        if _units[x]:getLife() > 0 then\
\
                            --this allows us to count each type once\
                            _uniqueTypes[_units[x]:getTypeName()] = _units[x]:getTypeName()\
\
                            table.insert(_points, _units[x]:getPoint())\
                            table.insert(_types, _units[x]:getTypeName())\
                        end\
                    end\
                end\
\
                -- do we have the correct number of unique pieces and do we have enough points for all the pieces\
                if ctld.countTableEntries(_uniqueTypes) == _aaSystemTemplate.count and #_points >= _aaSystemTemplate.count then\
                    _count = _count +1\
                end\
            end\
        end\
    end\
\
    return _count\
end\
\
\
function ctld.repairAASystem(_heli, _nearestCrate,_aaSystem)\
\
    -- find nearest COMPLETE AA system\
    local _nearestHawk = ctld.findNearestAASystem(_heli,_aaSystem)\
\
\
\
    if _nearestHawk ~= nil and _nearestHawk.dist < 300 then\
\
        local _oldHawk = ctld.completeAASystems[_nearestHawk.group:getName()]\
\
        --spawn new one\
\
        local _types = {}\
        local _points = {}\
\
        for _, _part in pairs(_oldHawk) do\
            table.insert(_points, _part.point)\
            table.insert(_types, _part.unit)\
        end\
\
        --remove old system\
        ctld.completeAASystems[_nearestHawk.group:getName()] = nil\
        _nearestHawk.group:destroy()\
\
        local _spawnedGroup = ctld.spawnCrateGroup(_heli, _points, _types)\
\
        ctld.completeAASystems[_spawnedGroup:getName()] = ctld.getAASystemDetails(_spawnedGroup,_aaSystem)\
\
        ctld.processCallback({unit = _heli, crate = _nearestCrate , spawnedGroup = _spawnedGroup, action = \"repair\"})\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" successfully repaired a full \".._aaSystem.name..\" in the field\", 10)\
\
        if _heli:getCoalition() == 1 then\
            ctld.spawnedCratesRED[_nearestCrate.crateUnit:getName()] = nil\
        else\
            ctld.spawnedCratesBLUE[_nearestCrate.crateUnit:getName()] = nil\
        end\
\
        -- remove crate\
       -- if ctld.slingLoad == false then\
            _nearestCrate.crateUnit:destroy()\
       -- end\
\
    else\
        ctld.displayMessageToGroup(_heli, \"Cannot repair  \".._aaSystem.name..\". No damaged \".._aaSystem.name..\" within 300m\", 10)\
    end\
end\
\
function ctld.unpackMultiCrate(_heli, _nearestCrate, _nearbyCrates)\
\
    -- unpack multi crate\
    local _nearbyMultiCrates = {}\
\
    for _, _nearbyCrate in pairs(_nearbyCrates) do\
\
        if _nearbyCrate.dist < 300 then\
\
            if _nearbyCrate.details.unit == _nearestCrate.details.unit then\
\
                table.insert(_nearbyMultiCrates, _nearbyCrate)\
\
                if #_nearbyMultiCrates == _nearestCrate.details.cratesRequired then\
                    break\
                end\
            end\
        end\
    end\
\
    --- check crate count\
    if #_nearbyMultiCrates == _nearestCrate.details.cratesRequired then\
\
        local _point = _nearestCrate.crateUnit:getPoint()\
\
        -- destroy crates\
        for _, _crate in pairs(_nearbyMultiCrates) do\
\
            if _point == nil then\
                _point = _crate.crateUnit:getPoint()\
            end\
\
            if _heli:getCoalition() == 1 then\
                ctld.spawnedCratesRED[_crate.crateUnit:getName()] = nil\
            else\
                ctld.spawnedCratesBLUE[_crate.crateUnit:getName()] = nil\
            end\
\
            --destroy\
         --   if ctld.slingLoad == false then\
                _crate.crateUnit:destroy()\
         --   end\
        end\
\
\
        local _spawnedGroup = ctld.spawnCrateGroup(_heli, { _point }, { _nearestCrate.details.unit })\
\
        ctld.processCallback({unit = _heli, crate =  _nearestCrate , spawnedGroup = _spawnedGroup, action = \"unpack\"})\
\
        local _txt = string.format(\"%s successfully deployed %s to the field using %d crates\", ctld.getPlayerNameOrType(_heli), _nearestCrate.details.desc, #_nearbyMultiCrates)\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), _txt, 10)\
\
    else\
\
        local _txt = string.format(\"Cannot build %s!\\n\\nIt requires %d crates and there are %d \\n\\nOr the crates are not within 300m of each other\", _nearestCrate.details.desc, _nearestCrate.details.cratesRequired, #_nearbyMultiCrates)\
\
        ctld.displayMessageToGroup(_heli, _txt, 20)\
    end\
end\
\
\
function ctld.spawnCrateGroup(_heli, _positions, _types)\
\
    local _id = ctld.getNextGroupId()\
\
    local _groupName = _types[1] .. \"  #\" .. _id\
\
    local _side = _heli:getCoalition()\
\
    local _group = {\
        [\"visible\"] = false,\
       -- [\"groupId\"] = _id,\
        [\"hidden\"] = false,\
        [\"units\"] = {},\
        --        [\"y\"] = _positions[1].z,\
        --        [\"x\"] = _positions[1].x,\
        [\"name\"] = _groupName,\
        [\"task\"] = {},\
    }\
\
    if #_positions == 1 then\
\
        local _unitId = ctld.getNextUnitId()\
        local _details = { type = _types[1], unitId = _unitId, name = string.format(\"Unpacked %s #%i\", _types[1], _unitId) }\
\
        _group.units[1] = ctld.createUnit(_positions[1].x + 5, _positions[1].z + 5, 120, _details)\
\
    else\
\
        for _i, _pos in ipairs(_positions) do\
\
            local _unitId = ctld.getNextUnitId()\
            local _details = { type = _types[_i], unitId = _unitId, name = string.format(\"Unpacked %s #%i\", _types[_i], _unitId) }\
\
            _group.units[_i] = ctld.createUnit(_pos.x + 5, _pos.z + 5, 120, _details)\
        end\
    end\
\
    --mist function\
    _group.category = Group.Category.GROUND\
    _group.country = _heli:getCountry()\
\
    local _spawnedGroup = Group.getByName(mist.dynAdd(_group).name)\
\
    --local _spawnedGroup = coalition.addGroup(_heli:getCountry(), Group.Category.GROUND, _group)\
\
    --activate by moving and so we can set ROE and Alarm state\
\
    local _dest = _spawnedGroup:getUnit(1):getPoint()\
    _dest = { x = _dest.x + 0.5, _y = _dest.y + 0.5, z = _dest.z + 0.5 }\
\
    ctld.orderGroupToMoveToPoint(_spawnedGroup:getUnit(1), _dest)\
\
    return _spawnedGroup\
end\
\
\
\
-- spawn normal group\
function ctld.spawnDroppedGroup(_point, _details, _spawnBehind, _maxSearch)\
\
    local _groupName = _details.groupName\
\
    local _group = {\
        [\"visible\"] = false,\
      --  [\"groupId\"] = _details.groupId,\
        [\"hidden\"] = false,\
        [\"units\"] = {},\
        --        [\"y\"] = _positions[1].z,\
        --        [\"x\"] = _positions[1].x,\
        [\"name\"] = _groupName,\
        [\"task\"] = {},\
    }\
\
\
    if _spawnBehind == false then\
\
        -- spawn in circle around heli\
\
        local _pos = _point\
\
        for _i, _detail in ipairs(_details.units) do\
\
            local _angle = math.pi * 2 * (_i - 1) / #_details.units\
            local _xOffset = math.cos(_angle) * 30\
            local _yOffset = math.sin(_angle) * 30\
\
            _group.units[_i] = ctld.createUnit(_pos.x + _xOffset, _pos.z + _yOffset, _angle, _detail)\
        end\
\
    else\
\
        local _pos = _point\
\
        --try to spawn at 6 oclock to us\
        local _angle = math.atan2(_pos.z, _pos.x)\
        local _xOffset = math.cos(_angle) * -30\
        local _yOffset = math.sin(_angle) * -30\
\
\
        for _i, _detail in ipairs(_details.units) do\
            _group.units[_i] = ctld.createUnit(_pos.x + (_xOffset + 10 * _i), _pos.z + (_yOffset + 10 * _i), _angle, _detail)\
        end\
    end\
\
    --switch to MIST\
    _group.category = Group.Category.GROUND;\
    _group.country = _details.country;\
\
    local _spawnedGroup = Group.getByName(mist.dynAdd(_group).name)\
\
    --local _spawnedGroup = coalition.addGroup(_details.country, Group.Category.GROUND, _group)\
\
\
    -- find nearest enemy and head there\
    if _maxSearch == nil then\
        _maxSearch = ctld.maximumSearchDistance\
    end\
\
    local _wpZone = ctld.inWaypointZone(_point,_spawnedGroup:getCoalition())\
\
    if _wpZone.inZone then\
        ctld.orderGroupToMoveToPoint(_spawnedGroup:getUnit(1), _wpZone.point)\
        env.info(\"Heading to waypoint - In Zone \".._wpZone.name)\
    else\
        local _enemyPos = ctld.findNearestEnemy(_details.side, _point, _maxSearch)\
\
        ctld.orderGroupToMoveToPoint(_spawnedGroup:getUnit(1), _enemyPos)\
    end\
\
    return _spawnedGroup\
end\
\
function ctld.findNearestEnemy(_side, _point, _searchDistance)\
\
    local _closestEnemy = nil\
\
    local _groups\
\
    local _closestEnemyDist = _searchDistance\
\
    local _heliPoint = _point\
\
    if _side == 2 then\
        _groups = coalition.getGroups(1, Group.Category.GROUND)\
    else\
        _groups = coalition.getGroups(2, Group.Category.GROUND)\
    end\
\
    for _, _group in pairs(_groups) do\
\
        if _group ~= nil then\
            local _units = _group:getUnits()\
\
            if _units ~= nil and #_units > 0 then\
\
                local _leader = nil\
\
                -- find alive leader\
                for x = 1, #_units do\
                    if _units[x]:getLife() > 0 then\
                        _leader = _units[x]\
                        break\
                    end\
                end\
\
                if _leader ~= nil then\
                    local _leaderPos = _leader:getPoint()\
                    local _dist = ctld.getDistance(_heliPoint, _leaderPos)\
                    if _dist < _closestEnemyDist then\
                        _closestEnemyDist = _dist\
                        _closestEnemy = _leaderPos\
                    end\
                end\
            end\
        end\
    end\
\
\
    -- no enemy - move to random point\
    if _closestEnemy ~= nil then\
\
        -- env.info(\"found enemy\")\
        return _closestEnemy\
    else\
\
        local _x = _heliPoint.x + math.random(0, ctld.maximumMoveDistance) - math.random(0, ctld.maximumMoveDistance)\
        local _z = _heliPoint.z + math.random(0, ctld.maximumMoveDistance) - math.random(0, ctld.maximumMoveDistance)\
        local _y = _heliPoint.y + math.random(0, ctld.maximumMoveDistance) - math.random(0, ctld.maximumMoveDistance)\
\
        return { x = _x, z = _z,y=_y }\
    end\
end\
\
function ctld.findNearestGroup(_heli, _groups)\
\
    local _closestGroupDetails = {}\
    local _closestGroup = nil\
\
    local _closestGroupDist = ctld.maxExtractDistance\
\
    local _heliPoint = _heli:getPoint()\
\
    for _, _groupName in pairs(_groups) do\
\
        local _group = Group.getByName(_groupName)\
\
        if _group ~= nil then\
            local _units = _group:getUnits()\
\
            if _units ~= nil and #_units > 0 then\
\
                local _leader = nil\
\
                local _groupDetails = { groupId = _group:getID(), groupName = _group:getName(), side = _group:getCoalition(), units = {} }\
\
                -- find alive leader\
                for x = 1, #_units do\
                    if _units[x]:getLife() > 0 then\
\
                        if _leader == nil then\
                            _leader = _units[x]\
                            -- set country based on leader\
                            _groupDetails.country = _leader:getCountry()\
                        end\
\
                        local _unitDetails = { type = _units[x]:getTypeName(), unitId = _units[x]:getID(), name = _units[x]:getName() }\
\
                        table.insert(_groupDetails.units, _unitDetails)\
                    end\
                end\
\
                if _leader ~= nil then\
                    local _leaderPos = _leader:getPoint()\
                    local _dist = ctld.getDistance(_heliPoint, _leaderPos)\
                    if _dist < _closestGroupDist then\
                        _closestGroupDist = _dist\
                        _closestGroupDetails = _groupDetails\
                        _closestGroup = _group\
                    end\
                end\
            end\
        end\
    end\
\
\
    if _closestGroup ~= nil then\
\
        return { group = _closestGroup, details = _closestGroupDetails }\
    else\
\
        return nil\
    end\
end\
\
\
function ctld.createUnit(_x, _y, _angle, _details)\
\
    local _newUnit = {\
        [\"y\"] = _y,\
        [\"type\"] = _details.type,\
        [\"name\"] = _details.name,\
      --  [\"unitId\"] = _details.unitId,\
        [\"heading\"] = _angle,\
        [\"playerCanDrive\"] = true,\
        [\"skill\"] = \"Excellent\",\
        [\"x\"] = _x,\
    }\
\
    return _newUnit\
end\
\
function ctld.addEWRTask(_group)\
\
    -- delayed 2 second to work around bug\
    timer.scheduleFunction(function(_ewrGroup)\
        local _grp = ctld.getAliveGroup(_ewrGroup)\
\
        if _grp ~= nil then\
            local _controller = _grp:getController();\
            local _EWR = {\
                id = 'EWR',\
                auto = true,\
                params = {\
                }\
            }\
            _controller:setTask(_EWR)\
        end\
    end\
        , _group:getName(), timer.getTime() + 2)\
\
end\
\
function ctld.orderGroupToMoveToPoint(_leader, _destination)\
\
    local _group = _leader:getGroup()\
\
    local _path = {}\
    table.insert(_path, mist.ground.buildWP(_leader:getPoint(), 'Off Road', 50))\
    table.insert(_path, mist.ground.buildWP(_destination, 'Off Road', 50))\
\
    local _mission = {\
        id = 'Mission',\
        params = {\
            route = {\
                points =_path\
            },\
        },\
    }\
\
\
    -- delayed 2 second to work around bug\
    timer.scheduleFunction(function(_arg)\
        local _grp = ctld.getAliveGroup(_arg[1])\
\
        if _grp ~= nil then\
            local _controller = _grp:getController();\
            Controller.setOption(_controller, AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.AUTO)\
            Controller.setOption(_controller, AI.Option.Ground.id.ROE, AI.Option.Ground.val.ROE.OPEN_FIRE)\
            _controller:setTask(_arg[2])\
        end\
    end\
        , {_group:getName(), _mission}, timer.getTime() + 2)\
\
end\
\
-- are we in pickup zone\
function ctld.inPickupZone(_heli)\
\
    if ctld.inAir(_heli) then\
        return { inZone = false, limit = -1, index = -1 }\
    end\
\
    local _heliPoint = _heli:getPoint()\
\
    for _i, _zoneDetails in pairs(ctld.pickupZones) do\
\
        local _triggerZone = trigger.misc.getZone(_zoneDetails[1])\
\
        if _triggerZone == nil then\
            local _ship = ctld.getTransportUnit(_zoneDetails[1])\
\
            if _ship then\
                local _point = _ship:getPoint()\
                _triggerZone = {}\
                _triggerZone.point = _point\
                _triggerZone.radius = 200 -- should be big enough for ship\
            end\
\
        end\
\
        if _triggerZone ~= nil then\
\
            --get distance to center\
\
            local _dist = ctld.getDistance(_heliPoint, _triggerZone.point)\
\
            if _dist <= _triggerZone.radius then\
                local _heliCoalition = _heli:getCoalition()\
                if _zoneDetails[4] == 1 and (_zoneDetails[5] == _heliCoalition or _zoneDetails[5] == 0) then\
                    return { inZone = true, limit = _zoneDetails[3], index = _i }\
                end\
            end\
        end\
    end\
\
    local _fobs = ctld.getSpawnedFobs(_heli)\
\
    -- now check spawned fobs\
    for _, _fob in ipairs(_fobs) do\
\
        --get distance to center\
\
        local _dist = ctld.getDistance(_heliPoint, _fob:getPoint())\
\
        if _dist <= 150 then\
            return { inZone = true, limit = 10000, index = -1 };\
        end\
    end\
\
\
\
    return { inZone = false, limit = -1, index = -1 };\
end\
\
function ctld.getSpawnedFobs(_heli)\
\
    local _fobs = {}\
\
    for _, _fobName in ipairs(ctld.builtFOBS) do\
\
        local _fob = StaticObject.getByName(_fobName)\
\
        if _fob ~= nil and _fob:isExist() and _fob:getCoalition() == _heli:getCoalition() and _fob:getLife() > 0 then\
\
            table.insert(_fobs, _fob)\
        end\
    end\
\
    return _fobs\
end\
\
-- are we in a dropoff zone\
function ctld.inDropoffZone(_heli)\
\
    if ctld.inAir(_heli) then\
        return false\
    end\
\
    local _heliPoint = _heli:getPoint()\
\
    for _, _zoneDetails in pairs(ctld.dropOffZones) do\
\
        local _triggerZone = trigger.misc.getZone(_zoneDetails[1])\
\
        if _triggerZone ~= nil and (_zoneDetails[3] == _heli:getCoalition() or _zoneDetails[3]== 0) then\
\
            --get distance to center\
\
            local _dist = ctld.getDistance(_heliPoint, _triggerZone.point)\
\
            if _dist <= _triggerZone.radius then\
                return true\
            end\
        end\
    end\
\
    return false\
end\
\
-- are we in a waypoint zone\
function ctld.inWaypointZone(_point,_coalition)\
\
    for _, _zoneDetails in pairs(ctld.wpZones) do\
\
        local _triggerZone = trigger.misc.getZone(_zoneDetails[1])\
\
        --right coalition and active?\
        if _triggerZone ~= nil and (_zoneDetails[4] == _coalition or _zoneDetails[4]== 0) and _zoneDetails[3] == 1 then\
\
            --get distance to center\
\
            local _dist = ctld.getDistance(_point, _triggerZone.point)\
\
            if _dist <= _triggerZone.radius then\
                return {inZone = true, point = _triggerZone.point, name = _zoneDetails[1]}\
            end\
        end\
    end\
\
    return {inZone = false}\
end\
\
-- are we near friendly logistics zone\
function ctld.inLogisticsZone(_heli)\
\
    if ctld.inAir(_heli) then\
        return false\
    end\
\
    local _heliPoint = _heli:getPoint()\
\
    for _, _name in pairs(ctld.logisticUnits) do\
\
        local _logistic = StaticObject.getByName(_name)\
\
        if _logistic ~= nil and _logistic:getCoalition() == _heli:getCoalition() then\
\
            --get distance\
            local _dist = ctld.getDistance(_heliPoint, _logistic:getPoint())\
\
            if _dist <= ctld.maximumDistanceLogistic then\
                return true\
            end\
        end\
    end\
\
    return false\
end\
\
\
-- are far enough from a friendly logistics zone\
function ctld.farEnoughFromLogisticZone(_heli)\
\
    if ctld.inAir(_heli) then\
        return false\
    end\
\
    local _heliPoint = _heli:getPoint()\
\
    local _farEnough = true\
\
    for _, _name in pairs(ctld.logisticUnits) do\
\
        local _logistic = StaticObject.getByName(_name)\
\
        if _logistic ~= nil and _logistic:getCoalition() == _heli:getCoalition() then\
\
            --get distance\
            local _dist = ctld.getDistance(_heliPoint, _logistic:getPoint())\
            -- env.info(\"DIST \".._dist)\
            if _dist <= ctld.minimumDeployDistance then\
                -- env.info(\"TOO CLOSE \".._dist)\
                _farEnough = false\
            end\
        end\
    end\
\
    return _farEnough\
end\
\
function ctld.refreshSmoke()\
\
    if ctld.disableAllSmoke == true then\
        return\
    end\
\
    for _, _zoneGroup in pairs({ ctld.pickupZones, ctld.dropOffZones }) do\
\
        for _, _zoneDetails in pairs(_zoneGroup) do\
\
            local _triggerZone = trigger.misc.getZone(_zoneDetails[1])\
\
            if _triggerZone == nil then\
                local _ship = ctld.getTransportUnit(_triggerZone)\
\
                if _ship then\
                    local _point = _ship:getPoint()\
                    _triggerZone = {}\
                    _triggerZone.point = _point\
                end\
\
            end\
\
\
            --only trigger if smoke is on AND zone is active\
            if _triggerZone ~= nil and _zoneDetails[2] >= 0 and _zoneDetails[4] == 1 then\
\
                -- Trigger smoke markers\
\
                local _pos2 = { x = _triggerZone.point.x, y = _triggerZone.point.z }\
                local _alt = land.getHeight(_pos2)\
                local _pos3 = { x = _pos2.x, y = _alt, z = _pos2.y }\
\
                trigger.action.smoke(_pos3, _zoneDetails[2])\
            end\
        end\
    end\
\
    --waypoint zones\
    for _, _zoneDetails in pairs(ctld.wpZones) do\
\
        local _triggerZone = trigger.misc.getZone(_zoneDetails[1])\
\
        --only trigger if smoke is on AND zone is active\
        if _triggerZone ~= nil and _zoneDetails[2] >= 0 and _zoneDetails[3] == 1 then\
\
            -- Trigger smoke markers\
\
            local _pos2 = { x = _triggerZone.point.x, y = _triggerZone.point.z }\
            local _alt = land.getHeight(_pos2)\
            local _pos3 = { x = _pos2.x, y = _alt, z = _pos2.y }\
\
            trigger.action.smoke(_pos3, _zoneDetails[2])\
        end\
    end\
\
\
    --refresh in 5 minutes\
    timer.scheduleFunction(ctld.refreshSmoke, nil, timer.getTime() + 300)\
end\
\
function ctld.dropSmoke(_args)\
\
    local _heli = ctld.getTransportUnit(_args[1])\
\
    if _heli ~= nil then\
\
        local _colour = \"\"\
\
        if _args[2] == trigger.smokeColor.Red then\
\
            _colour = \"RED\"\
        elseif _args[2] == trigger.smokeColor.Blue then\
\
            _colour = \"BLUE\"\
        elseif _args[2] == trigger.smokeColor.Green then\
\
            _colour = \"GREEN\"\
        elseif _args[2] == trigger.smokeColor.Orange then\
\
            _colour = \"ORANGE\"\
        end\
\
        local _point = _heli:getPoint()\
\
        local _pos2 = { x = _point.x, y = _point.z }\
        local _alt = land.getHeight(_pos2)\
        local _pos3 = { x = _point.x, y = _alt, z = _point.z }\
\
        trigger.action.smoke(_pos3, _args[2])\
\
        trigger.action.outTextForCoalition(_heli:getCoalition(), ctld.getPlayerNameOrType(_heli) .. \" dropped \" .. _colour .. \" smoke \", 10)\
    end\
end\
\
function ctld.unitCanCarryVehicles(_unit)\
\
    local _type = string.lower(_unit:getTypeName())\
\
    for _, _name in ipairs(ctld.vehicleTransportEnabled) do\
        local _nameLower = string.lower(_name)\
        if string.match(_type, _nameLower) then\
            return true\
        end\
    end\
\
    return false\
end\
\
function ctld.isJTACUnitType(_type)\
\
    _type = string.lower(_type)\
\
    for _, _name in ipairs(ctld.jtacUnitTypes) do\
        local _nameLower = string.lower(_name)\
        if string.match(_type, _nameLower) then\
            return true\
        end\
    end\
\
    return false\
end\
\
function ctld.updateZoneCounter(_index, _diff)\
\
    if ctld.pickupZones[_index] ~= nil then\
\
        ctld.pickupZones[_index][3] = ctld.pickupZones[_index][3] + _diff\
\
        if ctld.pickupZones[_index][3] < 0 then\
            ctld.pickupZones[_index][3] = 0\
        end\
\
        if ctld.pickupZones[_index][6] ~= nil then\
            trigger.action.setUserFlag(ctld.pickupZones[_index][6], ctld.pickupZones[_index][3])\
        end\
        --  env.info(ctld.pickupZones[_index][1]..\" = \" ..ctld.pickupZones[_index][3])\
    end\
end\
\
function ctld.processCallback(_callbackArgs)\
\
    for _, _callback in pairs(ctld.callbacks) do\
\
        local _status, _result = pcall(function()\
\
            _callback(_callbackArgs)\
\
        end)\
\
        if (not _status) then\
            env.error(string.format(\"CTLD Callback Error: %s\", _result))\
        end\
    end\
end\
\
\
-- checks the status of all AI troop carriers and auto loads and unloads troops\
-- as long as the troops are on the ground\
function ctld.checkAIStatus()\
\
    timer.scheduleFunction(ctld.checkAIStatus, nil, timer.getTime() + 2)\
\
\
    for _, _unitName in pairs(ctld.transportPilotNames) do\
        local status, error = pcall(function()\
\
            local _unit = ctld.getTransportUnit(_unitName)\
\
            -- no player name means AI!\
            if _unit ~= nil and _unit:getPlayerName() == nil then\
                local _zone = ctld.inPickupZone(_unit)\
                --  env.error(\"Checking.. \".._unit:getName())\
                if _zone.inZone == true and not ctld.troopsOnboard(_unit, true) then\
                    --   env.error(\"in zone, loading.. \".._unit:getName())\
\
                    if ctld.allowRandomAiTeamPickups == true then\
                        -- Random troop pickup implementation\
                        local _team = nil\
                        if _unit:getCoalition() == 1 then\
                            _team = math.floor((math.random(#ctld.redTeams * 100) / 100) + 1)\
                            ctld.loadTroopsFromZone({ _unitName, true,ctld.loadableGroups[ctld.redTeams[_team]],true })\
                        else\
                            _team = math.floor((math.random(#ctld.blueTeams * 100) / 100) + 1)\
                            ctld.loadTroopsFromZone({ _unitName, true,ctld.loadableGroups[ctld.blueTeams[_team]],true })\
                        end\
                    else\
                        ctld.loadTroopsFromZone({ _unitName, true,\"\",true })\
                    end\
\
                elseif ctld.inDropoffZone(_unit) and ctld.troopsOnboard(_unit, true) then\
                    --     env.error(\"in dropoff zone, unloading.. \".._unit:getName())\
                    ctld.unloadTroops( { _unitName, true })\
                end\
\
                if ctld.unitCanCarryVehicles(_unit) then\
\
                    if _zone.inZone == true and not ctld.troopsOnboard(_unit, false) then\
\
                        ctld.loadTroopsFromZone({ _unitName, false,\"\",true })\
\
                    elseif ctld.inDropoffZone(_unit) and ctld.troopsOnboard(_unit, false) then\
\
                        ctld.unloadTroops( { _unitName, false })\
                    end\
                end\
            end\
        end)\
\
        if (not status) then\
            env.error(string.format(\"Error with ai status: %s\", error), false)\
        end\
    end\
\
\
end\
\
function ctld.getTransportLimit(_unitType)\
\
    if ctld.unitLoadLimits[_unitType] then\
\
        return ctld.unitLoadLimits[_unitType]\
    end\
\
    return ctld.numberOfTroops\
\
end\
\
function ctld.getUnitActions(_unitType)\
\
    if ctld.unitActions[_unitType] then\
        return ctld.unitActions[_unitType]\
    end\
\
    return {crates=true,troops=true}\
\
end\
\
-- Adds menuitem to all heli units that are active\
function ctld.addF10MenuOptions()\
    -- Loop through all Heli units\
\
    timer.scheduleFunction(ctld.addF10MenuOptions, nil, timer.getTime() + 10)\
\
    for _, _unitName in pairs(ctld.transportPilotNames) do\
\
        local status, error = pcall(function()\
\
            local _unit = ctld.getTransportUnit(_unitName)\
\
            if _unit ~= nil then\
\
                local _groupId = ctld.getGroupId(_unit)\
\
                if _groupId then\
\
                    if ctld.addedTo[tostring(_groupId)] == nil then\
\
                        local _rootPath = missionCommands.addSubMenuForGroup(_groupId, \"CTLD\")\
\
                        local _unitActions = ctld.getUnitActions(_unit:getTypeName())\
\
\
                        if _unitActions.troops then\
\
                            local _troopCommandsPath = missionCommands.addSubMenuForGroup(_groupId, \"Troop Transport\", _rootPath)\
\
                            missionCommands.addCommandForGroup(_groupId, \"Unload / Extract Troops\", _troopCommandsPath, ctld.unloadExtractTroops, { _unitName })\
\
                            missionCommands.addCommandForGroup(_groupId, \"Check Cargo\", _troopCommandsPath, ctld.checkTroopStatus, { _unitName })\
\
                            -- local _loadPath = missionCommands.addSubMenuForGroup(_groupId, \"Load From Zone\", _troopCommandsPath)\
                            for _,_loadGroup in pairs(ctld.loadableGroups) do\
                                if not _loadGroup.side or _loadGroup.side == _unit:getCoalition() then\
\
                                    -- check size & unit\
                                    if ctld.getTransportLimit(_unit:getTypeName()) >= _loadGroup.total then\
                                        missionCommands.addCommandForGroup(_groupId, \"Load \".._loadGroup.name, _troopCommandsPath, ctld.loadTroopsFromZone, { _unitName, true,_loadGroup,false })\
                                    end\
                                end\
                            end\
\
                            if ctld.unitCanCarryVehicles(_unit) then\
\
                                local _vehicleCommandsPath = missionCommands.addSubMenuForGroup(_groupId, \"Vehicle / FOB Transport\", _rootPath)\
\
                                missionCommands.addCommandForGroup(_groupId, \"Unload Vehicles\", _vehicleCommandsPath, ctld.unloadTroops, { _unitName, false })\
                                missionCommands.addCommandForGroup(_groupId, \"Load / Extract Vehicles\", _vehicleCommandsPath, ctld.loadTroopsFromZone, { _unitName, false,\"\",true })\
\
                                if ctld.enabledFOBBuilding and ctld.staticBugWorkaround == false then\
\
                                    missionCommands.addCommandForGroup(_groupId, \"Load / Unload FOB Crate\", _vehicleCommandsPath, ctld.loadUnloadFOBCrate, { _unitName, false })\
                                end\
                                missionCommands.addCommandForGroup(_groupId, \"Check Cargo\", _vehicleCommandsPath, ctld.checkTroopStatus, { _unitName })\
                            end\
\
                        end\
\
\
                        if ctld.enableCrates and _unitActions.crates then\
\
                            if ctld.unitCanCarryVehicles(_unit) == false then\
\
                                -- local _cratePath = missionCommands.addSubMenuForGroup(_groupId, \"Spawn Crate\", _rootPath)\
                                -- add menu for spawning crates\
                                for _subMenuName, _crates in pairs(ctld.spawnableCrates) do\
\
                                    local _cratePath = missionCommands.addSubMenuForGroup(_groupId, _subMenuName, _rootPath)\
                                    for _, _crate in pairs(_crates) do\
\
                                        if ctld.isJTACUnitType(_crate.unit) == false\
                                                or (ctld.isJTACUnitType(_crate.unit) == true and ctld.JTAC_dropEnabled) then\
                                            if _crate.side == nil or (_crate.side == _unit:getCoalition()) then\
\
                                                local _crateRadioMsg = _crate.desc\
\
                                                --add in the number of crates required to build something\
                                                if _crate.cratesRequired ~= nil and _crate.cratesRequired > 1 then\
                                                    _crateRadioMsg = _crateRadioMsg..\" (\".._crate.cratesRequired..\")\"\
                                                end\
\
                                                missionCommands.addCommandForGroup(_groupId,_crateRadioMsg, _cratePath, ctld.spawnCrate, { _unitName, _crate.weight })\
                                            end\
                                        end\
                                    end\
                                end\
                            end\
                        end\
\
                        if (ctld.enabledFOBBuilding or ctld.enableCrates) and _unitActions.crates then\
\
                            local _crateCommands = missionCommands.addSubMenuForGroup(_groupId, \"CTLD Commands\", _rootPath)\
                            if ctld.hoverPickup == false then\
                                if  ctld.slingLoad == false then\
                                    missionCommands.addCommandForGroup(_groupId, \"Load Nearby Crate\", _crateCommands, ctld.loadNearbyCrate,  _unitName )\
                                end\
                            end\
\
                            missionCommands.addCommandForGroup(_groupId, \"Unpack Any Crate\", _crateCommands, ctld.unpackCrates, { _unitName })\
\
                            if ctld.slingLoad == false then\
                                missionCommands.addCommandForGroup(_groupId, \"Drop Crate\", _crateCommands, ctld.dropSlingCrate, { _unitName })\
                                missionCommands.addCommandForGroup(_groupId, \"Current Cargo Status\", _crateCommands, ctld.slingCargoStatus, { _unitName })\
                            end\
\
                            missionCommands.addCommandForGroup(_groupId, \"List Nearby Crates\", _crateCommands, ctld.listNearbyCrates, { _unitName })\
\
                            if ctld.enabledFOBBuilding then\
                                missionCommands.addCommandForGroup(_groupId, \"List FOBs\", _crateCommands, ctld.listFOBS, { _unitName })\
                            end\
                        end\
\
\
                        if ctld.enableSmokeDrop then\
                            local _smokeMenu = missionCommands.addSubMenuForGroup(_groupId, \"Smoke Markers\", _rootPath)\
                            missionCommands.addCommandForGroup(_groupId, \"Drop Red Smoke\", _smokeMenu, ctld.dropSmoke, { _unitName, trigger.smokeColor.Red })\
                            missionCommands.addCommandForGroup(_groupId, \"Drop Blue Smoke\", _smokeMenu, ctld.dropSmoke, { _unitName, trigger.smokeColor.Blue })\
                            missionCommands.addCommandForGroup(_groupId, \"Drop Orange Smoke\", _smokeMenu, ctld.dropSmoke, { _unitName, trigger.smokeColor.Orange })\
                            missionCommands.addCommandForGroup(_groupId, \"Drop Green Smoke\", _smokeMenu, ctld.dropSmoke, { _unitName, trigger.smokeColor.Green })\
                        end\
\
                        if ctld.enabledRadioBeaconDrop then\
                            local _radioCommands = missionCommands.addSubMenuForGroup(_groupId, \"Radio Beacons\", _rootPath)\
                            missionCommands.addCommandForGroup(_groupId, \"List Beacons\", _radioCommands, ctld.listRadioBeacons, { _unitName })\
                            missionCommands.addCommandForGroup(_groupId, \"Drop Beacon\", _radioCommands, ctld.dropRadioBeacon, { _unitName })\
                            missionCommands.addCommandForGroup(_groupId, \"Remove Closet Beacon\", _radioCommands, ctld.removeRadioBeacon, { _unitName })\
                        elseif ctld.deployedRadioBeacons ~= {} then\
                            local _radioCommands = missionCommands.addSubMenuForGroup(_groupId, \"Radio Beacons\", _rootPath)\
                            missionCommands.addCommandForGroup(_groupId, \"List Beacons\", _radioCommands, ctld.listRadioBeacons, { _unitName })\
                        end\
\
                        ctld.addedTo[tostring(_groupId)] = true\
                    end\
                end\
            else\
                -- env.info(string.format(\"unit nil %s\",_unitName))\
            end\
        end)\
\
        if (not status) then\
            env.error(string.format(\"Error adding f10 to transport: %s\", error), false)\
        end\
    end\
\
    local status, error = pcall(function()\
\
        -- now do any player controlled aircraft that ARENT transport units\
        if ctld.enabledRadioBeaconDrop then\
            -- get all BLUE players\
            ctld.addRadioListCommand(2)\
\
            -- get all RED players\
            ctld.addRadioListCommand(1)\
        end\
\
\
        if ctld.JTAC_jtacStatusF10 then\
            -- get all BLUE players\
            ctld.addJTACRadioCommand(2)\
\
            -- get all RED players\
            ctld.addJTACRadioCommand(1)\
        end\
\
    end)\
\
    if (not status) then\
        env.error(string.format(\"Error adding f10 to other players: %s\", error), false)\
    end\
\
\
end\
\
--add to all players that arent transport\
function ctld.addRadioListCommand(_side)\
\
    local _players = coalition.getPlayers(_side)\
\
    if _players ~= nil then\
\
        for _, _playerUnit in pairs(_players) do\
\
            local _groupId = ctld.getGroupId(_playerUnit)\
\
            if _groupId then\
\
                if ctld.addedTo[tostring(_groupId)] == nil then\
                    missionCommands.addCommandForGroup(_groupId, \"List Radio Beacons\", nil, ctld.listRadioBeacons, { _playerUnit:getName() })\
                    ctld.addedTo[tostring(_groupId)] = true\
                end\
            end\
        end\
    end\
end\
\
function ctld.addJTACRadioCommand(_side)\
\
    local _players = coalition.getPlayers(_side)\
\
    if _players ~= nil then\
\
        for _, _playerUnit in pairs(_players) do\
\
            local _groupId = ctld.getGroupId(_playerUnit)\
\
            if _groupId then\
                --   env.info(\"adding command for \"..index)\
                if ctld.jtacRadioAdded[tostring(_groupId)] == nil then\
                    -- env.info(\"about command for \"..index)\
                    missionCommands.addCommandForGroup(_groupId, \"JTAC Status\", nil, ctld.getJTACStatus, { _playerUnit:getName() })\
                    ctld.jtacRadioAdded[tostring(_groupId)] = true\
                    -- env.info(\"Added command for \" .. index)\
                end\
            end\
\
\
        end\
    end\
end\
\
function ctld.getGroupId(_unit)\
\
    local _unitDB =  mist.DBs.unitsById[tonumber(_unit:getID())]\
    if _unitDB ~= nil and _unitDB.groupId then\
        return _unitDB.groupId\
    end\
\
    return nil\
end\
\
--get distance in meters assuming a Flat world\
function ctld.getDistance(_point1, _point2)\
\
    local xUnit = _point1.x\
    local yUnit = _point1.z\
    local xZone = _point2.x\
    local yZone = _point2.z\
\
    local xDiff = xUnit - xZone\
    local yDiff = yUnit - yZone\
\
    return math.sqrt(xDiff * xDiff + yDiff * yDiff)\
end\
\
\
------------ JTAC -----------\
\
\
ctld.jtacLaserPoints = {}\
ctld.jtacIRPoints = {}\
ctld.jtacSmokeMarks = {}\
ctld.jtacUnits = {} -- list of JTAC units for f10 command\
ctld.jtacStop = {} -- jtacs to tell to stop lasing\
ctld.jtacCurrentTargets = {}\
ctld.jtacRadioAdded = {} --keeps track of who's had the radio command added\
ctld.jtacGeneratedLaserCodes = {} -- keeps track of generated codes, cycles when they run out\
ctld.jtacLaserPointCodes = {}\
\
\
function ctld.JTACAutoLase(_jtacGroupName, _laserCode, _smoke, _lock, _colour)\
\
    if ctld.jtacStop[_jtacGroupName] == true then\
        ctld.jtacStop[_jtacGroupName] = nil -- allow it to be started again\
        ctld.cleanupJTAC(_jtacGroupName)\
        return\
    end\
\
    if _lock == nil then\
\
        _lock = ctld.JTAC_lock\
    end\
\
\
    ctld.jtacLaserPointCodes[_jtacGroupName] = _laserCode\
\
    local _jtacGroup = ctld.getGroup(_jtacGroupName)\
    local _jtacUnit\
\
    if _jtacGroup == nil or #_jtacGroup == 0 then\
\
        --check not in a heli\
        for _, _onboard in pairs(ctld.inTransitTroops) do\
            if _onboard ~= nil then\
                if _onboard.troops ~= nil and _onboard.troops.groupName ~= nil and _onboard.troops.groupName == _jtacGroupName then\
\
                    --jtac soldier being transported by heli\
                    ctld.cleanupJTAC(_jtacGroupName)\
\
                    env.info(_jtacGroupName .. ' in Transport - Waiting 10 seconds')\
                    timer.scheduleFunction(ctld.timerJTACAutoLase, { _jtacGroupName, _laserCode, _smoke, _lock, _colour }, timer.getTime() + 10)\
                    return\
                end\
\
                if _onboard.vehicles ~= nil and _onboard.vehicles.groupName ~= nil and _onboard.vehicles.groupName == _jtacGroupName then\
                    --jtac vehicle being transported by heli\
                    ctld.cleanupJTAC(_jtacGroupName)\
\
                    env.info(_jtacGroupName .. ' in Transport - Waiting 10 seconds')\
                    timer.scheduleFunction(ctld.timerJTACAutoLase, { _jtacGroupName, _laserCode, _smoke, _lock, _colour }, timer.getTime() + 10)\
                    return\
                end\
            end\
        end\
\
\
        if ctld.jtacUnits[_jtacGroupName] ~= nil then\
            ctld.notifyCoalition(\"JTAC Group \" .. _jtacGroupName .. \" KIA!\", 10, ctld.jtacUnits[_jtacGroupName].side)\
        end\
\
        --remove from list\
        ctld.jtacUnits[_jtacGroupName] = nil\
\
        ctld.cleanupJTAC(_jtacGroupName)\
\
        return\
    else\
\
        _jtacUnit = _jtacGroup[1]\
        --add to list\
        ctld.jtacUnits[_jtacGroupName] = { name = _jtacUnit:getName(), side = _jtacUnit:getCoalition() }\
\
        -- work out smoke colour\
        if _colour == nil then\
\
            if _jtacUnit:getCoalition() == 1 then\
                _colour = ctld.JTAC_smokeColour_RED\
            else\
                _colour = ctld.JTAC_smokeColour_BLUE\
            end\
        end\
\
\
        if _smoke == nil then\
\
            if _jtacUnit:getCoalition() == 1 then\
                _smoke = ctld.JTAC_smokeOn_RED\
            else\
                _smoke = ctld.JTAC_smokeOn_BLUE\
            end\
        end\
    end\
\
\
    -- search for current unit\
\
    if _jtacUnit:isActive() == false then\
\
        ctld.cleanupJTAC(_jtacGroupName)\
\
        env.info(_jtacGroupName .. ' Not Active - Waiting 30 seconds')\
        timer.scheduleFunction(ctld.timerJTACAutoLase, { _jtacGroupName, _laserCode, _smoke, _lock, _colour }, timer.getTime() + 30)\
\
        return\
    end\
\
    local _enemyUnit = ctld.getCurrentUnit(_jtacUnit, _jtacGroupName)\
\
    if _enemyUnit == nil and ctld.jtacCurrentTargets[_jtacGroupName] ~= nil then\
\
        local _tempUnitInfo = ctld.jtacCurrentTargets[_jtacGroupName]\
\
        --      env.info(\"TEMP UNIT INFO: \" .. tempUnitInfo.name .. \" \" .. tempUnitInfo.unitType)\
\
        local _tempUnit = Unit.getByName(_tempUnitInfo.name)\
\
        if _tempUnit ~= nil and _tempUnit:getLife() > 0 and _tempUnit:isActive() == true then\
            ctld.notifyCoalition(_jtacGroupName .. \" target \" .. _tempUnitInfo.unitType .. \" lost. Scanning for Targets. \", 10, _jtacUnit:getCoalition())\
        else\
            ctld.notifyCoalition(_jtacGroupName .. \" target \" .. _tempUnitInfo.unitType .. \" KIA. Good Job! Scanning for Targets. \", 10, _jtacUnit:getCoalition())\
        end\
\
        --remove from smoke list\
        ctld.jtacSmokeMarks[_tempUnitInfo.name] = nil\
\
        -- remove from target list\
        ctld.jtacCurrentTargets[_jtacGroupName] = nil\
\
        --stop lasing\
        ctld.cancelLase(_jtacGroupName)\
    end\
\
\
    if _enemyUnit == nil then\
        _enemyUnit = ctld.findNearestVisibleEnemy(_jtacUnit, _lock)\
\
        if _enemyUnit ~= nil then\
\
            -- store current target for easy lookup\
            ctld.jtacCurrentTargets[_jtacGroupName] = { name = _enemyUnit:getName(), unitType = _enemyUnit:getTypeName(), unitId = _enemyUnit:getID() }\
\
            ctld.notifyCoalition(_jtacGroupName .. \" lasing new target \" .. _enemyUnit:getTypeName() .. '. CODE: ' .. _laserCode .. ctld.getPositionString(_enemyUnit), 10, _jtacUnit:getCoalition())\
\
            -- create smoke\
            if _smoke == true then\
\
                --create first smoke\
                ctld.createSmokeMarker(_enemyUnit, _colour)\
            end\
        end\
    end\
\
    if _enemyUnit ~= nil then\
\
        ctld.laseUnit(_enemyUnit, _jtacUnit, _jtacGroupName, _laserCode)\
\
        --   env.info('Timer timerSparkleLase '..jtacGroupName..\" \"..laserCode..\" \"..enemyUnit:getName())\
        timer.scheduleFunction(ctld.timerJTACAutoLase, { _jtacGroupName, _laserCode, _smoke, _lock, _colour }, timer.getTime() + 1)\
\
\
        if _smoke == true then\
            local _nextSmokeTime = ctld.jtacSmokeMarks[_enemyUnit:getName()]\
\
            --recreate smoke marker after 5 mins\
            if _nextSmokeTime ~= nil and _nextSmokeTime < timer.getTime() then\
\
                ctld.createSmokeMarker(_enemyUnit, _colour)\
            end\
        end\
\
    else\
        -- env.info('LASE: No Enemies Nearby')\
\
        -- stop lazing the old spot\
        ctld.cancelLase(_jtacGroupName)\
        --  env.info('Timer Slow timerSparkleLase '..jtacGroupName..\" \"..laserCode..\" \"..enemyUnit:getName())\
\
        timer.scheduleFunction(ctld.timerJTACAutoLase, { _jtacGroupName, _laserCode, _smoke, _lock, _colour }, timer.getTime() + 5)\
    end\
end\
\
function ctld.JTACAutoLaseStop(_jtacGroupName)\
    ctld.jtacStop[_jtacGroupName] = true\
end\
\
-- used by the timer function\
function ctld.timerJTACAutoLase(_args)\
\
    ctld.JTACAutoLase(_args[1], _args[2], _args[3], _args[4], _args[5])\
end\
\
function ctld.cleanupJTAC(_jtacGroupName)\
    -- clear laser - just in case\
    ctld.cancelLase(_jtacGroupName)\
\
    -- Cleanup\
    ctld.jtacUnits[_jtacGroupName] = nil\
\
    ctld.jtacCurrentTargets[_jtacGroupName] = nil\
end\
\
\
function ctld.notifyCoalition(_message, _displayFor, _side)\
\
\
    trigger.action.outTextForCoalition(_side, _message, _displayFor)\
    trigger.action.outSoundForCoalition(_side, \"radiobeep.ogg\")\
end\
\
function ctld.createSmokeMarker(_enemyUnit, _colour)\
\
    --recreate in 5 mins\
    ctld.jtacSmokeMarks[_enemyUnit:getName()] = timer.getTime() + 300.0\
\
    -- move smoke 2 meters above target for ease\
    local _enemyPoint = _enemyUnit:getPoint()\
    trigger.action.smoke({ x = _enemyPoint.x, y = _enemyPoint.y + 2.0, z = _enemyPoint.z }, _colour)\
end\
\
function ctld.cancelLase(_jtacGroupName)\
\
    --local index = \"JTAC_\"..jtacUnit:getID()\
\
    local _tempLase = ctld.jtacLaserPoints[_jtacGroupName]\
\
    if _tempLase ~= nil then\
        Spot.destroy(_tempLase)\
        ctld.jtacLaserPoints[_jtacGroupName] = nil\
\
        --      env.info('Destroy laze  '..index)\
\
        _tempLase = nil\
    end\
\
    local _tempIR = ctld.jtacIRPoints[_jtacGroupName]\
\
    if _tempIR ~= nil then\
        Spot.destroy(_tempIR)\
        ctld.jtacIRPoints[_jtacGroupName] = nil\
\
        --  env.info('Destroy laze  '..index)\
\
        _tempIR = nil\
    end\
end\
\
function ctld.laseUnit(_enemyUnit, _jtacUnit, _jtacGroupName, _laserCode)\
\
    --cancelLase(jtacGroupName)\
\
    local _spots = {}\
\
    local _enemyVector = _enemyUnit:getPoint()\
    local _enemyVectorUpdated = { x = _enemyVector.x, y = _enemyVector.y + 2.0, z = _enemyVector.z }\
\
    local _oldLase = ctld.jtacLaserPoints[_jtacGroupName]\
    local _oldIR = ctld.jtacIRPoints[_jtacGroupName]\
\
    if _oldLase == nil or _oldIR == nil then\
\
        -- create lase\
\
        local _status, _result = pcall(function()\
            _spots['irPoint'] = Spot.createInfraRed(_jtacUnit, { x = 0, y = 2.0, z = 0 }, _enemyVectorUpdated)\
            _spots['laserPoint'] = Spot.createLaser(_jtacUnit, { x = 0, y = 2.0, z = 0 }, _enemyVectorUpdated, _laserCode)\
            return _spots\
        end)\
\
        if not _status then\
            env.error('ERROR: ' .. _result, false)\
        else\
            if _result.irPoint then\
\
                --    env.info(jtacUnit:getName() .. ' placed IR Pointer on '..enemyUnit:getName())\
\
                ctld.jtacIRPoints[_jtacGroupName] = _result.irPoint --store so we can remove after\
            end\
            if _result.laserPoint then\
\
                --  env.info(jtacUnit:getName() .. ' is Lasing '..enemyUnit:getName()..'. CODE:'..laserCode)\
\
                ctld.jtacLaserPoints[_jtacGroupName] = _result.laserPoint\
            end\
        end\
\
    else\
\
        -- update lase\
\
        if _oldLase ~= nil then\
            _oldLase:setPoint(_enemyVectorUpdated)\
        end\
\
        if _oldIR ~= nil then\
            _oldIR:setPoint(_enemyVectorUpdated)\
        end\
    end\
end\
\
-- get currently selected unit and check they're still in range\
function ctld.getCurrentUnit(_jtacUnit, _jtacGroupName)\
\
\
    local _unit = nil\
\
    if ctld.jtacCurrentTargets[_jtacGroupName] ~= nil then\
        _unit = Unit.getByName(ctld.jtacCurrentTargets[_jtacGroupName].name)\
    end\
\
    local _tempPoint = nil\
    local _tempDist = nil\
    local _tempPosition = nil\
\
    local _jtacPosition = _jtacUnit:getPosition()\
    local _jtacPoint = _jtacUnit:getPoint()\
\
    if _unit ~= nil and _unit:getLife() > 0 and _unit:isActive() == true then\
\
        -- calc distance\
        _tempPoint = _unit:getPoint()\
        --   tempPosition = unit:getPosition()\
\
        _tempDist = ctld.getDistance(_unit:getPoint(), _jtacUnit:getPoint())\
        if _tempDist < ctld.JTAC_maxDistance then\
            -- calc visible\
\
            -- check slightly above the target as rounding errors can cause issues, plus the unit has some height anyways\
            local _offsetEnemyPos = { x = _tempPoint.x, y = _tempPoint.y + 2.0, z = _tempPoint.z }\
            local _offsetJTACPos = { x = _jtacPoint.x, y = _jtacPoint.y + 2.0, z = _jtacPoint.z }\
\
            if land.isVisible(_offsetEnemyPos, _offsetJTACPos) then\
                return _unit\
            end\
        end\
    end\
    return nil\
end\
\
\
-- Find nearest enemy to JTAC that isn't blocked by terrain\
function ctld.findNearestVisibleEnemy(_jtacUnit, _targetType,_distance)\
\
    --local startTime = os.clock()\
\
    local _maxDistance = _distance or ctld.JTAC_maxDistance\
\
    local _nearestDistance = _maxDistance\
\
    local _jtacPoint = _jtacUnit:getPoint()\
    local _coa =    _jtacUnit:getCoalition()\
\
    local _offsetJTACPos = { x = _jtacPoint.x, y = _jtacPoint.y + 2.0, z = _jtacPoint.z }\
\
    local _volume = {\
        id = world.VolumeType.SPHERE,\
        params = {\
            point = _offsetJTACPos,\
            radius = _maxDistance\
        }\
    }\
\
    local _unitList = {}\
\
\
    local _search = function(_unit, _coa)\
        pcall(function()\
\
            if _unit ~= nil\
                    and _unit:getLife() > 0\
                    and _unit:isActive()\
                    and _unit:getCoalition() ~= _coa\
                    and not _unit:inAir()\
                    and not ctld.alreadyTarget(_jtacUnit,_unit) then\
\
                local _tempPoint = _unit:getPoint()\
                local _offsetEnemyPos = { x = _tempPoint.x, y = _tempPoint.y + 2.0, z = _tempPoint.z }\
\
                if land.isVisible(_offsetJTACPos,_offsetEnemyPos ) then\
\
                    local _dist = ctld.getDistance(_offsetJTACPos, _offsetEnemyPos)\
\
                    if _dist < _maxDistance then\
                        table.insert(_unitList,{unit=_unit, dist=_dist})\
\
                    end\
                end\
            end\
        end)\
\
        return true\
    end\
\
    world.searchObjects(Object.Category.UNIT, _volume, _search, _coa)\
\
    --log.info(string.format(\"JTAC Search elapsed time: %.4f\\n\", os.clock() - startTime))\
\
    -- generate list order by distance & visible\
\
    -- first check\
    -- hpriority\
    -- priority\
    -- vehicle\
    -- unit\
\
    local _sort = function( a,b ) return a.dist < b.dist end\
    table.sort(_unitList,_sort)\
    -- sort list\
\
    -- check for hpriority\
    for _, _enemyUnit in ipairs(_unitList) do\
        local _enemyName = _enemyUnit.unit:getName()\
\
        if string.match(_enemyName, \"hpriority\") then\
            return _enemyUnit.unit\
        end\
    end\
\
    for _, _enemyUnit in ipairs(_unitList) do\
        local _enemyName = _enemyUnit.unit:getName()\
\
        if string.match(_enemyName, \"priority\") then\
            return _enemyUnit.unit\
        end\
    end\
\
    for _, _enemyUnit in ipairs(_unitList) do\
        local _enemyName = _enemyUnit.unit:getName()\
\
        if (_targetType == \"vehicle\" and ctld.isVehicle(_enemyUnit.unit)) or _targetType == \"all\" then\
            return _enemyUnit.unit\
\
        elseif (_targetType == \"troop\" and ctld.isInfantry(_enemyUnit.unit)) or _targetType == \"all\" then\
            return _enemyUnit.unit\
        end\
    end\
\
    return nil\
\
end\
\
\
function ctld.listNearbyEnemies(_jtacUnit)\
\
    local _maxDistance =  ctld.JTAC_maxDistance\
\
    local _jtacPoint = _jtacUnit:getPoint()\
    local _coa =    _jtacUnit:getCoalition()\
\
    local _offsetJTACPos = { x = _jtacPoint.x, y = _jtacPoint.y + 2.0, z = _jtacPoint.z }\
\
    local _volume = {\
        id = world.VolumeType.SPHERE,\
        params = {\
            point = _offsetJTACPos,\
            radius = _maxDistance\
        }\
    }\
    local _enemies = nil\
\
    local _search = function(_unit, _coa)\
        pcall(function()\
\
            if _unit ~= nil\
                    and _unit:getLife() > 0\
                    and _unit:isActive()\
                    and _unit:getCoalition() ~= _coa\
                    and not _unit:inAir() then\
\
                local _tempPoint = _unit:getPoint()\
                local _offsetEnemyPos = { x = _tempPoint.x, y = _tempPoint.y + 2.0, z = _tempPoint.z }\
\
                if land.isVisible(_offsetJTACPos,_offsetEnemyPos ) then\
\
                    if not _enemies then\
                        _enemies = {}\
                    end\
\
                    _enemies[_unit:getTypeName()] = _unit:getTypeName()\
\
                end\
            end\
        end)\
\
        return true\
    end\
\
    world.searchObjects(Object.Category.UNIT, _volume, _search, _coa)\
\
    return _enemies\
end\
\
-- tests whether the unit is targeted by another JTAC\
function ctld.alreadyTarget(_jtacUnit, _enemyUnit)\
\
    for _, _jtacTarget in pairs(ctld.jtacCurrentTargets) do\
\
        if _jtacTarget.unitId == _enemyUnit:getID() then\
            -- env.info(\"ALREADY TARGET\")\
            return true\
        end\
    end\
\
    return false\
end\
\
\
-- Returns only alive units from group but the group / unit may not be active\
\
function ctld.getGroup(groupName)\
\
    local _groupUnits = Group.getByName(groupName)\
\
    local _filteredUnits = {} --contains alive units\
    local _x = 1\
\
    if _groupUnits ~= nil and _groupUnits:isExist() then\
\
        _groupUnits = _groupUnits:getUnits()\
\
        if _groupUnits ~= nil and #_groupUnits > 0 then\
            for _x = 1, #_groupUnits do\
                if _groupUnits[_x]:getLife() > 0  then -- removed and _groupUnits[_x]:isExist() as isExist doesnt work on single units!\
                table.insert(_filteredUnits, _groupUnits[_x])\
                end\
            end\
        end\
    end\
\
    return _filteredUnits\
end\
\
function ctld.getAliveGroup(_groupName)\
\
    local _group = Group.getByName(_groupName)\
\
    if _group and _group:isExist() == true and #_group:getUnits() > 0 then\
        return _group\
    end\
\
    return nil\
end\
\
-- gets the JTAC status and displays to coalition units\
function ctld.getJTACStatus(_args)\
\
    --returns the status of all JTAC units\
\
    local _playerUnit = ctld.getTransportUnit(_args[1])\
\
    if _playerUnit == nil then\
        return\
    end\
\
    local _side = _playerUnit:getCoalition()\
\
    local _jtacGroupName = nil\
    local _jtacUnit = nil\
\
    local _message = \"JTAC STATUS: \\n\\n\"\
\
    for _jtacGroupName, _jtacDetails in pairs(ctld.jtacUnits) do\
\
        --look up units\
        _jtacUnit = Unit.getByName(_jtacDetails.name)\
\
        if _jtacUnit ~= nil and _jtacUnit:getLife() > 0 and _jtacUnit:isActive() == true and _jtacUnit:getCoalition() == _side then\
\
            local _enemyUnit = ctld.getCurrentUnit(_jtacUnit, _jtacGroupName)\
\
            local _laserCode = ctld.jtacLaserPointCodes[_jtacGroupName]\
\
            if _laserCode == nil then\
                _laserCode = \"UNKNOWN\"\
            end\
\
            if _enemyUnit ~= nil and _enemyUnit:getLife() > 0 and _enemyUnit:isActive() == true then\
                _message = _message .. \"\" .. _jtacGroupName .. \" targeting \" .. _enemyUnit:getTypeName() .. \" CODE: \" .. _laserCode .. ctld.getPositionString(_enemyUnit) .. \"\\n\"\
\
                local _list = ctld.listNearbyEnemies(_jtacUnit)\
\
                if _list then\
                    _message = _message..\"Visual On: \"\
\
                    for _,_type in pairs(_list) do\
                        _message = _message.._type..\" \"\
                    end\
                    _message = _message..\"\\n\"\
                end\
\
            else\
                _message = _message .. \"\" .. _jtacGroupName .. \" searching for targets\" .. ctld.getPositionString(_jtacUnit) .. \"\\n\"\
            end\
        end\
    end\
\
    if _message == \"JTAC STATUS: \\n\\n\" then\
        _message = \"No Active JTACs\"\
    end\
\
\
    ctld.notifyCoalition(_message, 10, _side)\
end\
\
\
\
function ctld.isInfantry(_unit)\
\
    local _typeName = _unit:getTypeName()\
\
    --type coerce tostring\
    _typeName = string.lower(_typeName .. \"\")\
\
    local _soldierType = { \"infantry\", \"paratrooper\", \"stinger\", \"manpad\", \"mortar\" }\
\
    for _key, _value in pairs(_soldierType) do\
        if string.match(_typeName, _value) then\
            return true\
        end\
    end\
\
    return false\
end\
\
-- assume anything that isnt soldier is vehicle\
function ctld.isVehicle(_unit)\
\
    if ctld.isInfantry(_unit) then\
        return false\
    end\
\
    return true\
end\
\
-- The entered value can range from 1111 - 1788,\
-- -- but the first digit of the series must be a 1 or 2\
-- -- and the last three digits must be between 1 and 8.\
--  The range used to be bugged so its not 1 - 8 but 0 - 7.\
-- function below will use the range 1-7 just incase\
function ctld.generateLaserCode()\
\
    ctld.jtacGeneratedLaserCodes = {}\
\
    -- generate list of laser codes\
    local _code = 1111\
\
    local _count = 1\
\
    while _code < 1777 and _count < 30 do\
\
        while true do\
\
            _code = _code + 1\
\
            if not ctld.containsDigit(_code, 8)\
                    and not ctld.containsDigit(_code, 9)\
                    and not ctld.containsDigit(_code, 0) then\
\
                table.insert(ctld.jtacGeneratedLaserCodes, _code)\
\
                --env.info(_code..\" Code\")\
                break\
            end\
        end\
        _count = _count + 1\
    end\
end\
\
function ctld.containsDigit(_number, _numberToFind)\
\
    local _thisNumber = _number\
    local _thisDigit = 0\
\
    while _thisNumber ~= 0 do\
\
        _thisDigit = _thisNumber % 10\
        _thisNumber = math.floor(_thisNumber / 10)\
\
        if _thisDigit == _numberToFind then\
            return true\
        end\
    end\
\
    return false\
end\
\
-- 200 - 400 in 10KHz\
-- 400 - 850 in 10 KHz\
-- 850 - 1250 in 50 KHz\
function ctld.generateVHFrequencies()\
\
    --ignore list\
    --list of all frequencies in KHZ that could conflict with\
    -- 191 - 1290 KHz, beacon range\
    local _skipFrequencies = {\
        745, --Astrahan\
        381,\
        384,\
        300.50,\
        312.5,\
        1175,\
        342,\
        735,\
        300.50,\
        353.00,\
        440,\
        795,\
        525,\
        520,\
        690,\
        625,\
        291.5,\
        300.50,\
        435,\
        309.50,\
        920,\
        1065,\
        274,\
        312.50,\
        580,\
        602,\
        297.50,\
        750,\
        485,\
        950,\
        214,\
        1025, 730, 995, 455, 307, 670, 329, 395, 770,\
        380, 705, 300.5, 507, 740, 1030, 515,\
        330, 309.5,\
        348, 462, 905, 352, 1210, 942, 435,\
        324,\
        320, 420, 311, 389, 396, 862, 680, 297.5,\
        920, 662,\
        866, 907, 309.5, 822, 515, 470, 342, 1182, 309.5, 720, 528,\
        337, 312.5, 830, 740, 309.5, 641, 312, 722, 682, 1050,\
        1116, 935, 1000, 430, 577,\
        326 -- Nevada\
    }\
\
    ctld.freeVHFFrequencies = {}\
    local _start = 200000\
\
    -- first range\
    while _start < 400000 do\
\
        -- skip existing NDB frequencies\
        local _found = false\
        for _, value in pairs(_skipFrequencies) do\
            if value * 1000 == _start then\
                _found = true\
                break\
            end\
        end\
\
\
        if _found == false then\
            table.insert(ctld.freeVHFFrequencies, _start)\
        end\
\
        _start = _start + 10000\
    end\
\
    _start = 400000\
    -- second range\
    while _start < 850000 do\
\
        -- skip existing NDB frequencies\
        local _found = false\
        for _, value in pairs(_skipFrequencies) do\
            if value * 1000 == _start then\
                _found = true\
                break\
            end\
        end\
\
        if _found == false then\
            table.insert(ctld.freeVHFFrequencies, _start)\
        end\
\
\
        _start = _start + 10000\
    end\
\
    _start = 850000\
    -- third range\
    while _start <= 1250000 do\
\
        -- skip existing NDB frequencies\
        local _found = false\
        for _, value in pairs(_skipFrequencies) do\
            if value * 1000 == _start then\
                _found = true\
                break\
            end\
        end\
\
        if _found == false then\
            table.insert(ctld.freeVHFFrequencies, _start)\
        end\
\
        _start = _start + 50000\
    end\
end\
\
-- 220 - 399 MHZ, increments of 0.5MHZ\
function ctld.generateUHFrequencies()\
\
    ctld.freeUHFFrequencies = {}\
    local _start = 220000000\
\
    while _start < 399000000 do\
        table.insert(ctld.freeUHFFrequencies, _start)\
        _start = _start + 500000\
    end\
end\
\
\
-- 220 - 399 MHZ, increments of 0.5MHZ\
--    -- first digit 3-7MHz\
--    -- second digit 0-5KHz\
--    -- third digit 0-9\
--    -- fourth digit 0 or 5\
--    -- times by 10000\
--\
function ctld.generateFMFrequencies()\
\
    ctld.freeFMFrequencies = {}\
    local _start = 220000000\
\
    while _start < 399000000 do\
\
        _start = _start + 500000\
    end\
\
    for _first = 3, 7 do\
        for _second = 0, 5 do\
            for _third = 0, 9 do\
                local _frequency = ((100 * _first) + (10 * _second) + _third) * 100000 --extra 0 because we didnt bother with 4th digit\
                table.insert(ctld.freeFMFrequencies, _frequency)\
            end\
        end\
    end\
end\
\
function ctld.getPositionString(_unit)\
\
    if ctld.JTAC_location == false then\
        return \"\"\
    end\
\
    local _lat, _lon = coord.LOtoLL(_unit:getPosition().p)\
\
    local _latLngStr = mist.tostringLL(_lat, _lon, 3, false)\
\
    local _mgrsString = mist.tostringMGRS(coord.LLtoMGRS(coord.LOtoLL(_unit:getPosition().p)), 5)\
\
    return \" @ \" .. _latLngStr .. \" - MGRS \" .. _mgrsString\
end\
\
\
-- ***************** SETUP SCRIPT ****************\
\
assert(mist ~= nil, \"\\n\\n** HEY MISSION-DESIGNER! **\\n\\nMiST has not been loaded!\\n\\nMake sure MiST 3.6 or higher is running\\n*before* running this script!\\n\")\
\
ctld.addedTo = {}\
ctld.spawnedCratesRED = {} -- use to store crates that have been spawned\
ctld.spawnedCratesBLUE = {} -- use to store crates that have been spawned\
\
ctld.droppedTroopsRED = {} -- stores dropped troop groups\
ctld.droppedTroopsBLUE = {} -- stores dropped troop groups\
\
ctld.droppedVehiclesRED = {} -- stores vehicle groups for c-130 / hercules\
ctld.droppedVehiclesBLUE = {} -- stores vehicle groups for c-130 / hercules\
\
ctld.inTransitTroops = {}\
\
ctld.inTransitFOBCrates = {}\
\
ctld.inTransitSlingLoadCrates = {} -- stores crates that are being transported by helicopters for alternative to real slingload\
\
ctld.droppedFOBCratesRED = {}\
ctld.droppedFOBCratesBLUE = {}\
\
ctld.builtFOBS = {} -- stores fully built fobs\
\
ctld.completeAASystems = {} -- stores complete spawned groups from multiple crates\
\
ctld.fobBeacons = {} -- stores FOB radio beacon details, refreshed every 60 seconds\
\
ctld.deployedRadioBeacons = {} -- stores details of deployed radio beacons\
\
ctld.beaconCount = 1\
\
ctld.usedUHFFrequencies = {}\
ctld.usedVHFFrequencies = {}\
ctld.usedFMFrequencies = {}\
\
ctld.freeUHFFrequencies = {}\
ctld.freeVHFFrequencies = {}\
ctld.freeFMFrequencies = {}\
\
--used to lookup what the crate will contain\
ctld.crateLookupTable = {}\
\
ctld.extractZones = {} -- stored extract zones\
\
ctld.missionEditorCargoCrates = {} --crates added by mission editor for triggering cratesinzone\
ctld.hoverStatus = {} -- tracks status of a helis hover above a crate\
\
ctld.callbacks = {} -- function callback\
\
\
-- Remove intransit troops when heli / cargo plane dies\
--ctld.eventHandler = {}\
--function ctld.eventHandler:onEvent(_event)\
--\
--    if _event == nil or _event.initiator == nil then\
--        env.info(\"CTLD null event\")\
--    elseif _event.id == 9 then\
--        -- Pilot dead\
--        ctld.inTransitTroops[_event.initiator:getName()] = nil\
--\
--    elseif world.event.S_EVENT_EJECTION == _event.id or _event.id == 8 then\
--        -- env.info(\"Event unit - Pilot Ejected or Unit Dead\")\
--        ctld.inTransitTroops[_event.initiator:getName()] = nil\
--\
--        -- env.info(_event.initiator:getName())\
--    end\
--\
--end\
\
-- create crate lookup table\
for _subMenuName, _crates in pairs(ctld.spawnableCrates) do\
\
    for _, _crate in pairs(_crates) do\
        -- convert number to string otherwise we'll have a pointless giant\
        -- table. String means 'hashmap' so it will only contain the right number of elements\
        ctld.crateLookupTable[tostring(_crate.weight)] = _crate\
    end\
end\
\
\
--sort out pickup zones\
for _, _zone in pairs(ctld.pickupZones) do\
\
    local _zoneName = _zone[1]\
    local _zoneColor = _zone[2]\
    local _zoneActive = _zone[4]\
\
    if _zoneColor == \"green\" then\
        _zone[2] = trigger.smokeColor.Green\
    elseif _zoneColor == \"red\" then\
        _zone[2] = trigger.smokeColor.Red\
    elseif _zoneColor == \"white\" then\
        _zone[2] = trigger.smokeColor.White\
    elseif _zoneColor == \"orange\" then\
        _zone[2] = trigger.smokeColor.Orange\
    elseif _zoneColor == \"blue\" then\
        _zone[2] = trigger.smokeColor.Blue\
    else\
        _zone[2] = -1 -- no smoke colour\
    end\
\
    -- add in counter for troops or units\
    if _zone[3] == -1 then\
        _zone[3] = 10000;\
    end\
\
    -- change active to 1 / 0\
    if _zoneActive == \"yes\" then\
        _zone[4] = 1\
    else\
        _zone[4] = 0\
    end\
end\
\
--sort out dropoff zones\
for _, _zone in pairs(ctld.dropOffZones) do\
\
    local _zoneColor = _zone[2]\
\
    if _zoneColor == \"green\" then\
        _zone[2] = trigger.smokeColor.Green\
    elseif _zoneColor == \"red\" then\
        _zone[2] = trigger.smokeColor.Red\
    elseif _zoneColor == \"white\" then\
        _zone[2] = trigger.smokeColor.White\
    elseif _zoneColor == \"orange\" then\
        _zone[2] = trigger.smokeColor.Orange\
    elseif _zoneColor == \"blue\" then\
        _zone[2] = trigger.smokeColor.Blue\
    else\
        _zone[2] = -1 -- no smoke colour\
    end\
\
    --mark as active for refresh smoke logic to work\
    _zone[4] = 1\
end\
\
--sort out waypoint zones\
for _, _zone in pairs(ctld.wpZones) do\
\
    local _zoneColor = _zone[2]\
\
    if _zoneColor == \"green\" then\
        _zone[2] = trigger.smokeColor.Green\
    elseif _zoneColor == \"red\" then\
        _zone[2] = trigger.smokeColor.Red\
    elseif _zoneColor == \"white\" then\
        _zone[2] = trigger.smokeColor.White\
    elseif _zoneColor == \"orange\" then\
        _zone[2] = trigger.smokeColor.Orange\
    elseif _zoneColor == \"blue\" then\
        _zone[2] = trigger.smokeColor.Blue\
    else\
        _zone[2] = -1 -- no smoke colour\
    end\
\
    --mark as active for refresh smoke logic to work\
    -- change active to 1 / 0\
    if  _zone[3] == \"yes\" then\
        _zone[3] = 1\
    else\
        _zone[3] = 0\
    end\
end\
\
-- Sort out extractable groups\
for _, _groupName in pairs(ctld.extractableGroups) do\
\
    local _group = Group.getByName(_groupName)\
\
    if _group ~= nil then\
\
        if _group:getCoalition() == 1 then\
            table.insert(ctld.droppedTroopsRED, _group:getName())\
        else\
            table.insert(ctld.droppedTroopsBLUE, _group:getName())\
        end\
    end\
end\
\
\
-- Seperate troop teams into red and blue for random AI pickups\
if ctld.allowRandomAiTeamPickups == true then\
    ctld.redTeams = {}\
    ctld.blueTeams = {}\
    for _,_loadGroup in pairs(ctld.loadableGroups) do\
        if not _loadGroup.side then\
            table.insert(ctld.redTeams, _)\
            table.insert(ctld.blueTeams, _)\
        elseif _loadGroup.side == 1 then\
            table.insert(ctld.redTeams, _)\
        elseif _loadGroup.side == 2 then\
            table.insert(ctld.blueTeams, _)\
        end\
    end\
end\
\
-- add total count\
\
for _,_loadGroup in pairs(ctld.loadableGroups) do\
\
    _loadGroup.total = 0\
    if _loadGroup.aa then\
        _loadGroup.total = _loadGroup.aa + _loadGroup.total\
    end\
\
    if _loadGroup.inf then\
        _loadGroup.total = _loadGroup.inf + _loadGroup.total\
    end\
\
\
    if _loadGroup.mg then\
        _loadGroup.total = _loadGroup.mg + _loadGroup.total\
    end\
\
    if _loadGroup.at then\
        _loadGroup.total = _loadGroup.at + _loadGroup.total\
    end\
\
    if _loadGroup.mortar then\
        _loadGroup.total = _loadGroup.mortar + _loadGroup.total\
    end\
\
end\
\
\
-- Scheduled functions (run cyclically) -- but hold execution for a second so we can override parts\
\
timer.scheduleFunction(ctld.checkAIStatus, nil, timer.getTime() + 1)\
timer.scheduleFunction(ctld.checkTransportStatus, nil, timer.getTime() + 5)\
\
timer.scheduleFunction(function()\
\
    timer.scheduleFunction(ctld.refreshRadioBeacons, nil, timer.getTime() + 5)\
    timer.scheduleFunction(ctld.refreshSmoke, nil, timer.getTime() + 5)\
    timer.scheduleFunction(ctld.addF10MenuOptions, nil, timer.getTime() + 5)\
\
    if ctld.enableCrates == true and ctld.slingLoad == false and ctld.hoverPickup == true then\
        timer.scheduleFunction(ctld.checkHoverStatus, nil, timer.getTime() + 1)\
    end\
\
end,nil, timer.getTime()+1 )\
\
--event handler for deaths\
--world.addEventHandler(ctld.eventHandler)\
\
--env.info(\"CTLD event handler added\")\
\
env.info(\"Generating Laser Codes\")\
ctld.generateLaserCode()\
env.info(\"Generated Laser Codes\")\
\
\
\
env.info(\"Generating UHF Frequencies\")\
ctld.generateUHFrequencies()\
env.info(\"Generated  UHF Frequencies\")\
\
env.info(\"Generating VHF Frequencies\")\
ctld.generateVHFrequencies()\
env.info(\"Generated VHF Frequencies\")\
\
\
env.info(\"Generating FM Frequencies\")\
ctld.generateFMFrequencies()\
env.info(\"Generated FM Frequencies\")\
\
-- Search for crates\
-- Crates are NOT returned by coalition.getStaticObjects() for some reason\
-- Search for crates in the mission editor instead\
env.info(\"Searching for Crates\")\
for _coalitionName, _coalitionData in pairs(env.mission.coalition) do\
\
    if (_coalitionName == 'red' or _coalitionName == 'blue')\
            and type(_coalitionData) == 'table' then\
        if _coalitionData.country then --there is a country table\
        for _, _countryData in pairs(_coalitionData.country) do\
\
            if type(_countryData) == 'table' then\
                for _objectTypeName, _objectTypeData in pairs(_countryData) do\
                    if _objectTypeName == \"static\" then\
\
                        if ((type(_objectTypeData) == 'table')\
                                and _objectTypeData.group\
                                and (type(_objectTypeData.group) == 'table')\
                                and (#_objectTypeData.group > 0)) then\
\
                            for _groupId, _group in pairs(_objectTypeData.group) do\
                                if _group and _group.units and type(_group.units) == 'table' then\
                                    for _unitNum, _unit in pairs(_group.units) do\
                                        if _unit.canCargo == true then\
                                            local _cargoName = env.getValueDictByKey(_unit.name)\
                                            ctld.missionEditorCargoCrates[_cargoName] = _cargoName\
                                            env.info(\"Crate Found: \" .. _unit.name..\" - Unit: \".._cargoName)\
                                        end\
                                    end\
                                end\
                            end\
                        end\
                    end\
                end\
            end\
        end\
        end\
    end\
end\
env.info(\"END search for crates\")\
\
env.info(\"CTLD READY\")\
\
\
--DEBUG FUNCTION\
--        for key, value in pairs(getmetatable(_spawnedCrate)) do\
--            env.info(tostring(key))\
--            env.info(tostring(value))\
--        end",
    ["DictKey_UnitName_71"] = "Unit #047",
    ["DictKey_UnitName_3914"] = "Uzi 2-2",
    ["DictKey_UnitName_1849"] = "Oil tower #003",
    ["DictKey_UnitName_4855"] = "",
    ["DictKey_WptName_3592"] = "",
    ["DictKey_GroupName_4750"] = "",
    ["DictKey_WptName_5403"] = "IP",
    ["DictKey_UnitName_362"] = "Unit #085",
    ["DictKey_UnitName_472"] = "Ford 1-1",
    ["DictKey_UnitName_3651"] = "Munición #002",
    ["DictKey_UnitName_4989"] = "Unit #296",
    ["DictKey_UnitName_4296"] = "Pilot #004",
    ["DictKey_UnitName_887"] = "Unit #216",
    ["DictKey_UnitName_4481"] = "Pilot #025",
    ["DictKey_GroupName_2004"] = "Plant #014",
    ["DictKey_WptName_2045"] = "",
    ["DictKey_WptName_1261"] = "",
    ["DictKey_UnitName_3754"] = "Munición #020",
    ["DictKey_WptName_3149"] = "",
    ["DictKey_UnitName_1421"] = "Pilot #021",
    ["DictKey_GroupName_3479"] = "Refinery #093",
    ["DictKey_UnitName_3342"] = "Tanque de combustible #002",
    ["DictKey_WptName_369"] = "",
    ["DictKey_UnitName_1873"] = "Oil tower #005",
    ["DictKey_GroupName_3323"] = "Tanque de combustible #010",
    ["DictKey_UnitName_4437"] = " #001",
    ["DictKey_WptName_2923"] = "",
    ["DictKey_UnitName_3585"] = "Refinery #096",
    ["DictKey_WptName_3995"] = "",
    ["DictKey_UnitName_4176"] = "",
    ["DictKey_UnitName_224"] = "",
    ["DictKey_UnitName_5115"] = "Combat Training F14B #001",
    ["DictKey_WptName_956"] = "",
    ["DictKey_UnitName_4465"] = "",
    ["DictKey_GroupName_2248"] = "Refinery #018",
    ["DictKey_UnitName_1194"] = "Unit #240",
    ["DictKey_UnitName_718"] = " #018",
    ["DictKey_WptName_1489"] = "",
    ["DictKey_UnitName_2053"] = "Plant #003",
    ["DictKey_WptName_2619"] = "",
    ["DictKey_UnitName_934"] = " #066",
    ["DictKey_UnitName_3243"] = "Refinery #078",
    ["DictKey_WptName_1428"] = "",
    ["DictKey_UnitName_1351"] = "Unit #003",
    ["DictKey_UnitName_2975"] = "",
    ["DictKey_WptName_495"] = "",
    ["DictKey_UnitName_4934"] = "",
    ["DictKey_GroupName_3596"] = "Tanque de combustible #047",
    ["DictKey_GroupName_2115"] = "Bandar Abbas SA-2",
    ["DictKey_WptName_4339"] = "",
    ["DictKey_UnitName_578"] = "Unit #177",
    ["DictKey_UnitName_4935"] = "",
    ["DictKey_UnitName_3876"] = "Hawg 1-4",
    ["DictKey_UnitName_1648"] = "Refinery #003",
    ["DictKey_UnitName_4875"] = "Unit #281",
    ["DictKey_UnitName_2917"] = "Unidad #036",
    ["DictKey_WptName_2992"] = "",
    ["DictKey_UnitName_548"] = " #014",
    ["DictKey_UnitName_86"] = "Unit #056",
    ["DictKey_UnitName_1387"] = "Pilot #010",
    ["DictKey_UnitName_4695"] = "Unit #182",
    ["DictKey_UnitName_4297"] = "Pilot #005",
    ["DictKey_UnitName_5002"] = "Unit #307",
    ["DictKey_UnitName_4661"] = "Unit #133",
    ["DictKey_UnitName_4102"] = "Springfield 1-4",
    ["DictKey_GroupName_404"] = "Kish SA-10 Site",
    ["DictKey_WptName_1418"] = "",
    ["DictKey_GroupName_713"] = " #019",
    ["DictKey_WptName_3469"] = "",
    ["DictKey_GroupName_3856"] = "Refinery #098",
    ["DictKey_UnitName_5479"] = "11 #004",
    ["DictKey_UnitName_305"] = "Unit #071",
    ["DictKey_UnitName_3002"] = " #082",
    ["DictKey_WptName_3805"] = "",
    ["DictKey_WptName_1380"] = "",
    ["DictKey_GroupName_2010"] = "Plant #016",
    ["DictKey_GroupName_2305"] = "Refinery #003",
    ["DictKey_UnitName_4745"] = "",
    ["DictKey_UnitName_790"] = "Unit #105",
    ["DictKey_WptName_5469"] = "",
    ["DictKey_GroupName_3029"] = "Plant #019",
    ["DictKey_UnitName_3697"] = "Munición #003",
    ["DictKey_UnitName_1464"] = "Unit #075",
    ["DictKey_GroupName_2635"] = "Plant #097",
    ["DictKey_GroupName_3100"] = "L=39 Kerman Airport CAS",
    ["DictKey_UnitName_4721"] = "Unit #218",
    ["DictKey_WptName_4455"] = "",
    ["DictKey_GroupName_3629"] = "Munición #004",
    ["DictKey_WptName_5161"] = "",
    ["DictKey_UnitName_2711"] = "Plant #066",
    ["DictKey_GroupName_1653"] = "Refinery #025",
    ["DictKey_WptName_4538"] = "",
    ["DictKey_GroupName_2464"] = "Plant #034",
    ["DictKey_WptName_2526"] = "",
    ["DictKey_GroupName_2927"] = "Rudan Conversion #002",
    ["DictKey_UnitName_2618"] = "Plant #065",
    ["DictKey_UnitName_4692"] = "Unit #179",
    ["DictKey_UnitName_906"] = "Unit #219",
    ["DictKey_WptName_669"] = "",
    ["DictKey_WptName_884"] = "",
    ["DictKey_UnitName_885"] = "Unit #214",
    ["DictKey_WptName_1892"] = "",
    ["DictKey_GroupName_531"] = " #013",
    ["DictKey_UnitName_129"] = "Unit #081",
    ["DictKey_UnitName_1588"] = "Refinery #001",
    ["DictKey_WptName_1751"] = "",
    ["DictKey_UnitName_1918"] = "Oil tower",
    ["DictKey_UnitName_4074"] = "Unidad #071",
    ["DictKey_UnitName_4960"] = "",
    ["DictKey_WptName_2727"] = "",
    ["DictKey_UnitName_1933"] = "Oil platform",
    ["DictKey_GroupName_1329"] = "Bandar Abbas HAWK #004",
    ["DictKey_GroupName_1587"] = "Refinery #017",
    ["DictKey_GroupName_3221"] = "Refinery #080",
    ["DictKey_GroupName_2857"] = "Nuevo grupo de barcos #005",
    ["DictKey_UnitName_3564"] = "Refinery #098",
    ["DictKey_GroupName_388"] = "SAM site 01 #016",
    ["DictKey_WptName_1922"] = "",
    ["DictKey_UnitName_4837"] = "",
    ["DictKey_UnitName_3237"] = "Refinery #077",
    ["DictKey_WptName_5278"] = "",
    ["DictKey_UnitName_4196"] = "",
    ["DictKey_WptName_2048"] = "",
    ["DictKey_UnitName_4101"] = "Springfield 1-3",
    ["DictKey_GroupName_2272"] = "Refinery",
    ["DictKey_GroupName_3353"] = "Tanque de combustible #012",
    ["DictKey_UnitName_1068"] = "Unit #175",
    ["DictKey_WptName_403"] = "",
    ["DictKey_WptName_596"] = "",
    ["DictKey_UnitName_592"] = "Unit #182",
    ["DictKey_UnitName_3778"] = "Unidad #040",
    ["DictKey_UnitName_2567"] = "Plant #067",
    ["DictKey_WptName_655"] = "",
    ["DictKey_GroupName_5380"] = "SEAD Lavan Island",
    ["DictKey_GroupName_2626"] = "Plant #094",
    ["DictKey_UnitName_2513"] = "Plant #034",
    ["DictKey_UnitName_411"] = "Unit #140",
    ["DictKey_UnitName_1280"] = "Unit #025",
    ["DictKey_WptName_5255"] = "",
    ["DictKey_GroupName_3410"] = "Tanque de combustible #017",
    ["DictKey_WptName_2196"] = "",
    ["DictKey_WptName_5446"] = "",
    ["DictKey_WptName_5261"] = "",
    ["DictKey_WptName_5297"] = "",
    ["DictKey_WptName_815"] = "",
    ["DictKey_UnitName_469"] = "",
    ["DictKey_WptName_5450"] = "",
    ["DictKey_WptName_4479"] = "",
    ["DictKey_GroupName_612"] = " #058",
    ["DictKey_UnitName_4311"] = "F-16 Al Dhafra AB #003",
    ["DictKey_UnitName_421"] = "Chevy 1-2",
    ["DictKey_GroupName_3957"] = "JTAC1",
    ["DictKey_UnitName_3396"] = "Tanque de combustible #005",
    ["DictKey_UnitName_2840"] = "Oil tower #003",
    ["DictKey_WptName_1526"] = "",
    ["DictKey_UnitName_1184"] = "Unit #014",
    ["DictKey_GroupName_642"] = "SAM site 01 #028",
    ["DictKey_GroupName_5192"] = "Combat Training AV-B Instructor",
    ["DictKey_WptName_2427"] = "",
    ["DictKey_GroupName_1475"] = "",
    ["DictKey_GroupName_2761"] = "Oil tower #044",
    ["DictKey_WptName_2796"] = "",
    ["DictKey_GroupName_2037"] = "Plant #025",
    ["DictKey_WptName_2307"] = "",
    ["DictKey_WptName_1754"] = "",
    ["DictKey_UnitName_1063"] = "Unit #151",
    ["DictKey_WptName_664"] = "",
    ["DictKey_UnitName_131"] = "Unit #083",
    ["DictKey_UnitName_4769"] = "",
    ["DictKey_WptName_4053"] = "",
    ["DictKey_GroupName_1800"] = "Refinery #046",
    ["DictKey_UnitName_420"] = "Unit #147",
    ["DictKey_UnitName_1729"] = "Refinery #004",
    ["DictKey_GroupName_1168"] = "New Static Object #005",
    ["DictKey_WptName_4573"] = "",
    ["DictKey_UnitName_1089"] = "Pilot #005",
    ["DictKey_UnitName_4148"] = "Piloto #033",
    ["DictKey_UnitName_711"] = "Pilot #009",
    ["DictKey_GroupName_548"] = "New Ship Group #006",
    ["DictKey_UnitName_1165"] = "Unit #217",
    ["DictKey_UnitName_4218"] = "",
    ["DictKey_UnitName_314"] = "Unit #076",
    ["DictKey_WptName_2938"] = "",
    ["DictKey_WptName_3328"] = "",
    ["DictKey_GroupName_1614"] = "Refinery #002",
    ["DictKey_GroupName_1929"] = "Oil tower #035",
    ["DictKey_GroupName_3218"] = "Refinery #078",
    ["DictKey_UnitName_4043"] = "Magic",
    ["DictKey_GroupName_695"] = "10",
    ["DictKey_UnitName_624"] = "Unit #170",
    ["DictKey_UnitName_3471"] = "Tanque de combustible",
    ["DictKey_GroupName_5205"] = "F18 Carrier Spawn CAT",
    ["DictKey_GroupName_2945"] = "Rudan Conversion #008",
    ["DictKey_WptName_1877"] = "",
    ["DictKey_WptName_5129"] = "AG RANGE",
    ["DictKey_GroupName_3632"] = "Munición #005",
    ["DictKey_WptName_4054"] = "",
    ["DictKey_WptName_4599"] = "",
    ["DictKey_GroupName_5055"] = "TGT Practice #006",
    ["DictKey_GroupName_1815"] = "Oil tower",
    ["DictKey_UnitName_1234"] = "Unit #020",
    ["DictKey_UnitName_3685"] = "Munición",
    ["DictKey_UnitName_3228"] = "Refinery #079",
    ["DictKey_GroupName_3527"] = "Tanque de combustible #034",
    ["DictKey_UnitName_4690"] = "Unit #175",
    ["DictKey_GroupName_5339"] = "AV-8B Carrier #003",
    ["DictKey_UnitName_2486"] = "Plant #032",
    ["DictKey_WptName_358"] = "",
    ["DictKey_GroupName_536"] = "New Ship Group #003",
    ["DictKey_WptName_5447"] = "",
    ["DictKey_GroupName_474"] = "New Static Object #005",
    ["DictKey_GroupName_544"] = "New Ship Group #005",
    ["DictKey_GroupName_4589"] = "Target Drone",
    ["DictKey_UnitName_1780"] = "Refinery #005",
    ["DictKey_UnitName_1442"] = "Unit #021",
    ["DictKey_GroupName_2179"] = "Plant #038",
    ["DictKey_GroupName_88"] = "SAM site 01 #010",
    ["DictKey_WptName_5367"] = "",
    ["DictKey_UnitName_846"] = "",
    ["DictKey_UnitName_189"] = "Pilot #004",
    ["DictKey_GroupName_1734"] = "Refinery #001",
    ["DictKey_WptName_112"] = "",
    ["DictKey_WptName_3232"] = "",
    ["DictKey_UnitName_249"] = "Unit #039",
    ["DictKey_WptName_3544"] = "",
    ["DictKey_WptName_5064"] = "",
    ["DictKey_WptName_5435"] = "",
    ["DictKey_WptName_610"] = "",
    ["DictKey_WptName_3006"] = "",
    ["DictKey_WptName_5321"] = "",
    ["DictKey_UnitName_7"] = "Unit #013",
    ["DictKey_WptName_2265"] = "",
    ["DictKey_WptName_1955"] = "",
    ["DictKey_WptName_3855"] = "",
    ["DictKey_GroupName_1028"] = "Enfield #001",
    ["DictKey_UnitName_1055"] = "Unit #111",
    ["DictKey_WptName_4614"] = "Sirri",
    ["DictKey_WptName_476"] = "",
    ["DictKey_UnitName_1837"] = "Oil tower #005",
    ["DictKey_WptName_5092"] = "",
    ["DictKey_UnitName_4893"] = "",
    ["DictKey_WptName_3928"] = "",
    ["DictKey_WptName_3013"] = "",
    ["DictKey_WptName_154"] = "",
    ["DictKey_WptName_922"] = "",
    ["DictKey_UnitName_4950"] = "",
    ["DictKey_GroupName_1106"] = "Kish HAWK Site #001",
    ["DictKey_UnitName_5053"] = "Unit #350",
    ["DictKey_UnitName_3133"] = "Nuevo objeto estático #001",
    ["DictKey_GroupName_995"] = "",
    ["DictKey_WptName_3897"] = "",
    ["DictKey_WptName_2042"] = "",
    ["DictKey_UnitName_2234"] = "Refinery #020",
    ["DictKey_WptName_665"] = "",
    ["DictKey_UnitName_2861"] = "Unidad #033",
    ["DictKey_UnitName_3330"] = "Tanque de combustible #001",
    ["DictKey_WptName_202"] = "",
    ["DictKey_UnitName_951"] = "Unit #023",
    ["DictKey_WptName_613"] = "",
    ["DictKey_UnitName_2111"] = "Unidad #009",
    ["DictKey_WptName_4016"] = "",
    ["DictKey_WptName_5476"] = "",
    ["DictKey_UnitName_1203"] = "Unit #015",
    ["DictKey_GroupName_3500"] = "Tanque de combustible #028",
    ["DictKey_WptName_5413"] = "",
    ["DictKey_WptName_5251"] = "",
    ["DictKey_GroupName_2194"] = "Plant #051",
    ["DictKey_UnitName_513"] = " #009",
    ["DictKey_UnitName_5229"] = "Enfield 2-4",
    ["DictKey_UnitName_481"] = "New Static Object #004",
    ["DictKey_UnitName_354"] = "",
    ["DictKey_GroupName_1533"] = "Oil platform",
    ["DictKey_GroupName_1211"] = "SAM site 01 #014",
    ["DictKey_UnitName_1133"] = "Unit #180",
    ["DictKey_UnitName_4968"] = "",
    ["DictKey_WptName_1462"] = "",
    ["DictKey_WptName_4454"] = "",
    ["DictKey_UnitName_45"] = "Unit #030",
    ["DictKey_GroupName_3771"] = "Munición #004",
    ["DictKey_WptName_4125"] = "",
    ["DictKey_UnitName_4896"] = "",
    ["DictKey_UnitName_4380"] = "",
    ["DictKey_GroupName_3365"] = "Tanque de combustible #016",
    ["DictKey_UnitName_5022"] = "Unit #323",
    ["DictKey_UnitName_1312"] = "Unit #036",
    ["DictKey_WptName_2715"] = "",
    ["DictKey_WptName_2051"] = "",
    ["DictKey_UnitName_3426"] = "Plant #104",
    ["DictKey_UnitName_4975"] = "",
    ["DictKey_GroupName_3693"] = "Munición #001",
    ["DictKey_UnitName_338"] = "Unit #049",
    ["DictKey_GroupName_973"] = "SAM site 01 #038",
    ["DictKey_GroupName_3813"] = "FARP Roma",
    ["DictKey_UnitName_3387"] = "Tanque de combustible #004",
    ["DictKey_UnitName_4786"] = "",
    ["DictKey_WptName_2316"] = "",
    ["DictKey_GroupName_346"] = "AWACS 303",
    ["DictKey_GroupName_2980"] = "Oil ship #002",
    ["DictKey_GroupName_1590"] = "Refinery #018",
    ["DictKey_WptName_4082"] = "",
    ["DictKey_UnitName_1002"] = "Pilot #023",
    ["DictKey_UnitName_1266"] = "Pilot #005",
    ["DictKey_WptName_3406"] = "",
    ["DictKey_UnitName_4477"] = "Pilot #022",
    ["DictKey_UnitName_616"] = " #061",
    ["DictKey_WptName_5213"] = "",
    ["DictKey_GroupName_1989"] = "Plant #009",
    ["DictKey_WptName_3668"] = "",
    ["DictKey_GroupName_5245"] = "F18 Carrier Spawn CAT",
    ["DictKey_ActionText_4627"] = "An USAF JTAC predator drone is underway too Sirri Island.\
N25.53.818 E54.32.489 ELEV 10ft \
 JTAC4  Lasercode: 1660\
",
    ["DictKey_GroupName_4422"] = "F-14 Carrier CAP #005",
    ["DictKey_UnitName_3880"] = "Uzi 4-1",
    ["DictKey_UnitName_2825"] = "Oil tower #005",
    ["DictKey_UnitName_873"] = "Unit #108",
    ["DictKey_UnitName_886"] = "Unit #215",
    ["DictKey_GroupName_3506"] = "Tanque de combustible #030",
    ["DictKey_GroupName_1299"] = "SAM site 01 #005",
    ["DictKey_UnitName_339"] = "Unit #050",
    ["DictKey_WptName_4376"] = "",
    ["DictKey_UnitName_2113"] = "Unidad #011",
    ["DictKey_UnitName_1945"] = "Unidad #003",
    ["DictKey_WptName_2956"] = "",
    ["DictKey_GroupName_2215"] = "Plant #058",
    ["DictKey_UnitName_2068"] = "Plant",
    ["DictKey_WptName_1382"] = "",
    ["DictKey_GroupName_145"] = "SAM site 01 #021",
    ["DictKey_WptName_3746"] = "",
    ["DictKey_WptName_4410"] = "",
    ["DictKey_UnitName_404"] = "Hawg 1-3",
    ["DictKey_WptName_3665"] = "",
    ["DictKey_UnitName_375"] = "Unit #123",
    ["DictKey_WptName_165"] = "",
    ["DictKey_WptName_777"] = "",
    ["DictKey_UnitName_4116"] = "Piloto #037",
    ["DictKey_UnitName_4940"] = "",
    ["DictKey_GroupName_3687"] = "Munición #002",
    ["DictKey_GroupName_1899"] = "Oil tower #025",
    ["DictKey_WptName_3152"] = "",
    ["DictKey_UnitName_4259"] = "",
    ["DictKey_GroupName_3138"] = "Nuevo objeto estático #006",
    ["DictKey_WptName_194"] = "",
    ["DictKey_WptName_72"] = "",
    ["DictKey_WptName_368"] = "",
    ["DictKey_WptName_787"] = "",
    ["DictKey_WptName_1091"] = "",
    ["DictKey_WptName_2589"] = "",
    ["DictKey_WptName_5128"] = "",
    ["DictKey_UnitName_2228"] = "Plant #003",
    ["DictKey_UnitName_1315"] = "Unit #039",
    ["DictKey_WptName_2637"] = "",
    ["DictKey_UnitName_228"] = "",
    ["DictKey_UnitName_5043"] = "Unit #342",
    ["DictKey_GroupName_2909"] = "Weapons storage #007",
    ["DictKey_WptName_4565"] = "",
    ["DictKey_UnitName_2459"] = "Refinery #005",
    ["DictKey_UnitName_1783"] = "Refinery #002",
    ["DictKey_UnitName_4764"] = "",
    ["DictKey_WptName_3128"] = "",
    ["DictKey_ActionText_3983"] = "mist.respawnGroup('JTAC3', true)",
    ["DictKey_WptName_4500"] = "",
    ["DictKey_UnitName_5072"] = "Unit #365",
    ["DictKey_GroupName_128"] = "SAM site 01 #018",
    ["DictKey_ActionText_3941"] = "if Group.getByName('Texaco') == nil then\
return true\
else\
return false\
end",
    ["DictKey_GroupName_1689"] = "Refinery #003",
    ["DictKey_UnitName_4686"] = "Unit #171",
    ["DictKey_GroupName_1536"] = "Oil platform #001",
    ["DictKey_UnitName_147"] = "Unit #089",
    ["DictKey_GroupName_1947"] = "Oil platform #005",
    ["DictKey_WptName_3322"] = "",
    ["DictKey_WptName_3184"] = "",
    ["DictKey_UnitName_4892"] = "",
    ["DictKey_UnitName_3048"] = "Plant #023",
    ["DictKey_WptName_2241"] = "",
    ["DictKey_UnitName_2112"] = "Unidad #010",
    ["DictKey_WptName_1388"] = "",
    ["DictKey_WptName_2733"] = "",
    ["DictKey_UnitName_4351"] = "West Test",
    ["DictKey_UnitName_1271"] = "",
    ["DictKey_GroupName_708"] = "New Helicopter Group #002",
    ["DictKey_WptName_653"] = "",
    ["DictKey_GroupName_524"] = " #012",
    ["DictKey_WptName_1389"] = "",
    ["DictKey_GroupName_2533"] = "Plant #071",
    ["DictKey_GroupName_2064"] = "Plant #006",
    ["DictKey_UnitName_3195"] = "Refinery #078",
    ["DictKey_UnitName_5286"] = "Enfield 2-1",
    ["DictKey_UnitName_2285"] = "Refinery #003",
    ["DictKey_WptName_3643"] = "",
    ["DictKey_WptName_5355"] = "",
    ["DictKey_UnitName_4743"] = "",
    ["DictKey_UnitName_4090"] = "Unidad #074",
    ["DictKey_WptName_137"] = "",
    ["DictKey_UnitName_4252"] = "",
    ["DictKey_UnitName_1310"] = "Unit #034",
    ["DictKey_GroupName_2497"] = "Plant #037",
    ["DictKey_GroupName_4369"] = "Shell",
    ["DictKey_GroupName_1890"] = "Oil tower #022",
    ["DictKey_WptName_4577"] = "",
    ["DictKey_UnitName_2312"] = "Refinery #005",
    ["DictKey_UnitName_1260"] = "Pilot #001",
    ["DictKey_UnitName_1124"] = "",
    ["DictKey_UnitName_4972"] = "",
    ["DictKey_WptName_1550"] = "",
    ["DictKey_GroupName_1698"] = "Refinery #002",
    ["DictKey_WptName_779"] = "",
    ["DictKey_UnitName_1759"] = "Refinery #005",
    ["DictKey_UnitName_1342"] = "Unit #003",
    ["DictKey_GroupName_4527"] = "",
    ["DictKey_UnitName_4767"] = "",
    ["DictKey_GroupName_3019"] = "F-16 Al Fijarah Intl",
    ["DictKey_WptName_4540"] = "",
    ["DictKey_WptName_5135"] = "AG RANGE",
    ["DictKey_UnitName_716"] = " #018",
    ["DictKey_WptName_446"] = "",
    ["DictKey_WptName_1425"] = "",
    ["DictKey_WptName_2289"] = "",
    ["DictKey_UnitName_2360"] = "Refinery",
    ["DictKey_WptName_2920"] = "",
    ["DictKey_UnitName_4978"] = "",
    ["DictKey_WptName_4325"] = "",
    ["DictKey_UnitName_343"] = "",
    ["DictKey_WptName_3580"] = "",
    ["DictKey_UnitName_4928"] = "",
    ["DictKey_GroupName_2873"] = "SAM Avenger",
    ["DictKey_WptName_1748"] = "",
    ["DictKey_GroupName_2242"] = "Refinery #016",
    ["DictKey_WptName_4484"] = "",
    ["DictKey_GroupName_2605"] = "Plant #087",
    ["DictKey_GroupName_3344"] = "Tanque de combustible #017",
    ["DictKey_WptName_4025"] = "",
    ["DictKey_GroupName_3173"] = "Refinery #077",
    ["DictKey_UnitName_3902"] = "11 #001",
    ["DictKey_UnitName_3727"] = "Munición #004",
    ["DictKey_UnitName_348"] = "",
    ["DictKey_UnitName_2925"] = "Rudan Conversion",
    ["DictKey_WptName_2238"] = "",
    ["DictKey_UnitName_600"] = "Unit #188",
    ["DictKey_WptName_2932"] = "",
    ["DictKey_UnitName_3145"] = "Nuevo objeto estático #007",
    ["DictKey_WptName_5235"] = "",
    ["DictKey_UnitName_290"] = "Unit #061",
    ["DictKey_GroupName_2293"] = "Refinery #006",
    ["DictKey_GroupName_2936"] = "Rudan Conversion #005",
    ["DictKey_GroupName_3356"] = "Tanque de combustible #013",
    ["DictKey_GroupName_3302"] = "Tanque de combustible",
    ["DictKey_WptName_822"] = "",
    ["DictKey_UnitName_1034"] = "Unit #009",
    ["DictKey_UnitName_4843"] = "",
    ["DictKey_ActionText_3936"] = "",
    ["DictKey_GroupName_2140"] = "Plant #012",
    ["DictKey_UnitName_3171"] = "Refinery #077",
    ["DictKey_UnitName_99"] = "Unit #063",
    ["DictKey_UnitName_1960"] = "Unidad #006",
    ["DictKey_UnitName_735"] = " #015",
    ["DictKey_GroupName_3431"] = "Plant #114",
    ["DictKey_GroupName_3714"] = "Munición #009",
    ["DictKey_UnitName_2989"] = "Unidad #003",
    ["DictKey_WptName_2391"] = "",
    ["DictKey_UnitName_4189"] = "",
    ["DictKey_UnitName_4672"] = "Unit #144",
    ["DictKey_WptName_3008"] = "",
    ["DictKey_WptName_1649"] = "",
    ["DictKey_WptName_4926"] = "",
    ["DictKey_WptName_2036"] = "",
    ["DictKey_WptName_1622"] = "",
    ["DictKey_WptName_2139"] = "",
    ["DictKey_GroupName_1686"] = "Refinery #004",
    ["DictKey_UnitName_5145"] = "Combat Training F14B  Instructor",
    ["DictKey_UnitName_752"] = "New Static Object #001",
    ["DictKey_UnitName_1511"] = "Unit #124",
    ["DictKey_WptName_200"] = "",
    ["DictKey_UnitName_316"] = "Unit #077",
    ["DictKey_UnitName_3348"] = "Piloto #014",
    ["DictKey_WptName_4076"] = "",
    ["DictKey_GroupName_3314"] = "Tanque de combustible #007",
    ["DictKey_WptName_590"] = "",
    ["DictKey_WptName_605"] = "",
    ["DictKey_UnitName_4858"] = "",
    ["DictKey_UnitName_2645"] = "Plant #065",
    ["DictKey_UnitName_1006"] = "Pilot #026",
    ["DictKey_UnitName_1518"] = "Unidad #001",
    ["DictKey_UnitName_3069"] = "Plant #017",
    ["DictKey_WptName_1640"] = "",
    ["DictKey_UnitName_4308"] = "F-16 Al Dhafra AB",
    ["DictKey_UnitName_4166"] = "",
    ["DictKey_UnitName_904"] = "Unit #038",
    ["DictKey_WptName_4503"] = "",
    ["DictKey_UnitName_3915"] = "Uzi 2-3",
    ["DictKey_UnitName_3600"] = "Tanque de combustible #028",
    ["DictKey_UnitName_448"] = " #041",
    ["DictKey_GroupName_2091"] = "Plant #043",
    ["DictKey_UnitName_2126"] = "Unidad #020",
    ["DictKey_UnitName_4470"] = " #002",
    ["DictKey_WptName_5260"] = "",
    ["DictKey_GroupName_1432"] = "SAM site 01 #024",
    ["DictKey_GroupName_2851"] = "Oil tower #068",
    ["DictKey_UnitName_2916"] = "Unidad #035",
    ["DictKey_UnitName_1954"] = "Unidad #004",
    ["DictKey_GroupName_3690"] = "Munición #004",
    ["DictKey_UnitName_2669"] = "Plant #104",
    ["DictKey_GroupName_1095"] = "",
    ["DictKey_WptName_3535"] = "",
    ["DictKey_WptName_3686"] = "",
    ["DictKey_UnitName_215"] = "",
    ["DictKey_UnitName_3249"] = "Refinery #077",
    ["DictKey_WptName_3037"] = "",
    ["DictKey_GroupName_2025"] = "Plant #021",
    ["DictKey_UnitName_5169"] = "Combat Training F5E  Instructor",
    ["DictKey_UnitName_651"] = "Unit #212",
    ["DictKey_UnitName_769"] = " #052",
    ["DictKey_WptName_2364"] = "",
    ["DictKey_UnitName_2693"] = "Plant #064",
    ["DictKey_GroupName_3662"] = "Nuevo grupo de helicópteros",
    ["DictKey_UnitName_1678"] = "Refinery #002",
    ["DictKey_WptName_5347"] = "",
    ["DictKey_WptName_2475"] = "",
    ["DictKey_UnitName_5015"] = "Unit #318",
    ["DictKey_GroupName_1950"] = "Oil platform #004",
    ["DictKey_UnitName_3456"] = "Refinery #079",
    ["DictKey_UnitName_3363"] = "Tanque de combustible",
    ["DictKey_UnitName_2029"] = "Plant #003",
    ["DictKey_WptName_4553"] = "",
    ["DictKey_UnitName_4228"] = "",
    ["DictKey_WptName_3658"] = "",
    ["DictKey_UnitName_4396"] = "Pilot #001",
    ["DictKey_WptName_1206"] = "",
    ["DictKey_UnitName_3848"] = "Refinery #099",
    ["DictKey_WptName_2018"] = "",
    ["DictKey_WptName_869"] = "",
    ["DictKey_GroupName_2575"] = "Plant #077",
    ["DictKey_UnitName_1137"] = "Unit #185",
    ["DictKey_UnitName_5121"] = "Combat Training F14B",
    ["DictKey_WptName_2784"] = "",
    ["DictKey_UnitName_3375"] = "Tanque de combustible #003",
    ["DictKey_WptName_4441"] = "",
    ["DictKey_UnitName_2378"] = "Refinery #006",
    ["DictKey_ActionText_3991"] = "",
    ["DictKey_UnitName_3186"] = "Refinery #080",
    ["DictKey_GroupName_752"] = " #020",
    ["DictKey_UnitName_2074"] = "Plant #002",
    ["DictKey_GroupName_1911"] = "Oil tower #029",
    ["DictKey_UnitName_5181"] = "Combat Training AV8-B Instructor",
    ["DictKey_WptName_982"] = "",
    ["DictKey_UnitName_2768"] = "Oil tower #003",
    ["DictKey_GroupName_3050"] = "Plant #019",
    ["DictKey_WptName_5218"] = "",
    ["DictKey_UnitName_3120"] = "IRN Shell",
    ["DictKey_WptName_3118"] = "",
    ["DictKey_WptName_4347"] = "",
    ["DictKey_GroupName_2137"] = "Plant #011",
    ["DictKey_WptName_2544"] = "",
    ["DictKey_GroupName_1596"] = "Refinery #020",
    ["DictKey_WptName_4581"] = "",
    ["DictKey_WptName_3169"] = "",
    ["DictKey_UnitName_2038"] = "Plant #005",
    ["DictKey_GroupName_5096"] = "Combat Training A10C Trainee",
    ["DictKey_GroupName_2173"] = "Plant #036",
    ["DictKey_GroupName_4480"] = "Carrier Protection Force F-14A",
    ["DictKey_UnitName_134"] = "Unit #084",
    ["DictKey_GroupName_366"] = "SAM site 01 #012",
    ["DictKey_GroupName_2233"] = "Refinery #020",
    ["DictKey_GroupName_2737"] = "Oil tower #036",
    ["DictKey_GroupName_2614"] = "Plant #090",
    ["DictKey_GroupName_564"] = " #026",
    ["DictKey_WptName_4368"] = "",
    ["DictKey_WptName_4032"] = "",
    ["DictKey_GroupName_2185"] = "Plant #048",
    ["DictKey_UnitName_3827"] = " #086",
    ["DictKey_UnitName_1231"] = "Unit #265",
    ["DictKey_WptName_3081"] = "",
    ["DictKey_GroupName_4402"] = "F-14 Carrier CAP #001",
    ["DictKey_GroupName_3711"] = "Munición #003",
    ["DictKey_WptName_3005"] = "",
    ["DictKey_UnitName_3030"] = "Plant #019",
    ["DictKey_GroupName_3681"] = "Munición #003",
    ["DictKey_GroupName_2785"] = "Oil tower #003",
    ["DictKey_GroupName_3623"] = "Munición #002",
    ["DictKey_UnitName_2657"] = "Plant #066",
    ["DictKey_WptName_3445"] = "",
    ["DictKey_UnitName_21"] = "Unit #013",
    ["DictKey_UnitName_2507"] = "Plant #033",
    ["DictKey_WptName_5164"] = "",
    ["DictKey_UnitName_4182"] = "",
    ["DictKey_UnitName_4017"] = "Enfield 2-2 ",
    ["DictKey_UnitName_1061"] = "Unit #149",
    ["DictKey_WptName_4327"] = "",
    ["DictKey_ActionRadioText_5088"] = "Spawn practive targets",
    ["DictKey_WptName_3093"] = "",
    ["DictKey_WptName_5315"] = "",
    ["DictKey_GroupName_177"] = "",
    ["DictKey_UnitName_520"] = "",
    ["DictKey_UnitName_3811"] = "",
    ["DictKey_WptName_2808"] = "",
    ["DictKey_GroupName_1677"] = "Refinery #033",
    ["DictKey_UnitName_705"] = "Pilot #007",
    ["DictKey_UnitName_514"] = " #009",
    ["DictKey_UnitName_1019"] = " #022",
    ["DictKey_WptName_616"] = "",
    ["DictKey_WptName_1901"] = "",
    ["DictKey_WptName_5257"] = "",
    ["DictKey_WptName_788"] = "",
    ["DictKey_UnitName_1681"] = "Refinery",
    ["DictKey_UnitName_4284"] = "",
    ["DictKey_UnitName_696"] = " #008",
    ["DictKey_UnitName_643"] = "Unit #170",
    ["DictKey_UnitName_4766"] = "",
    ["DictKey_UnitName_1645"] = "Refinery #004",
    ["DictKey_GroupName_1821"] = "Oil tower",
    ["DictKey_UnitName_3004"] = " #077",
    ["DictKey_UnitName_4969"] = "",
    ["DictKey_GroupName_2143"] = "Plant #013",
    ["DictKey_UnitName_4247"] = "",
    ["DictKey_WptName_891"] = "",
    ["DictKey_UnitName_4994"] = "Unit #299",
    ["DictKey_WptName_1020"] = "",
    ["DictKey_UnitName_4728"] = "Unit #238",
    ["DictKey_UnitName_1334"] = "Unit #062",
    ["DictKey_GroupName_2860"] = "Nuevo grupo de barcos #006",
    ["DictKey_UnitName_3808"] = "Unidad #057",
    ["DictKey_WptName_4041"] = "",
    ["DictKey_WptName_4495"] = "",
    ["DictKey_UnitName_181"] = "LHA-1",
    ["DictKey_GroupName_1054"] = "SAM site 01 #005",
    ["DictKey_WptName_1468"] = "",
    ["DictKey_UnitName_4250"] = "",
    ["DictKey_WptName_839"] = "",
    ["DictKey_UnitName_1052"] = "Unit #110",
    ["DictKey_UnitName_2008"] = "Plant #007",
    ["DictKey_GroupName_138"] = "",
    ["DictKey_WptName_2592"] = "",
    ["DictKey_WptName_445"] = "",
    ["DictKey_GroupName_3599"] = "Tanque de combustible #048",
    ["DictKey_WptName_960"] = "",
    ["DictKey_WptName_4096"] = "",
    ["DictKey_WptName_2979"] = "",
    ["DictKey_WptName_2631"] = "",
    ["DictKey_UnitName_4783"] = "",
    ["DictKey_GroupName_2659"] = "Plant #104",
    ["DictKey_WptName_772"] = "",
    ["DictKey_UnitName_1311"] = "Unit #035",
    ["DictKey_UnitName_4031"] = "",
    ["DictKey_GroupName_2500"] = "Plant #038",
    ["DictKey_WptName_2875"] = "",
    ["DictKey_UnitName_1373"] = "",
    ["DictKey_UnitName_2804"] = "Oil tower #003",
    ["DictKey_WptName_2887"] = "",
    ["DictKey_WptName_2259"] = "",
    ["DictKey_UnitName_4970"] = "",
    ["DictKey_GroupName_853"] = "New Static Object #003",
    ["DictKey_WptName_4363"] = "",
    ["DictKey_UnitName_5157"] = "Combat Training F5E  Trainee",
    ["DictKey_UnitName_1209"] = "Unit #247",
    ["DictKey_UnitName_3633"] = "Munición",
    ["DictKey_WptName_5222"] = "",
    ["DictKey_WptName_674"] = "",
    ["DictKey_WptName_1604"] = "",
    ["DictKey_WptName_1412"] = "",
    ["DictKey_WptName_1718"] = "",
    ["DictKey_GroupName_2506"] = "Plant #033",
    ["DictKey_WptName_706"] = "",
    ["DictKey_WptName_4604"] = "",
    ["DictKey_GroupName_489"] = "New Static Object #008",
    ["DictKey_GroupName_1451"] = "Bandar Abbas HAWK #001",
    ["DictKey_UnitName_100"] = "Unit #064",
    ["DictKey_UnitName_1115"] = "Unit #141",
    ["DictKey_UnitName_1139"] = "Unit #187",
    ["DictKey_UnitName_1062"] = "Unit #150",
    ["DictKey_WptName_4546"] = "",
    ["DictKey_UnitName_1177"] = "Unit #007",
    ["DictKey_UnitName_1457"] = "Unit #050",
    ["DictKey_WptName_4559"] = "",
    ["DictKey_UnitName_385"] = "Unit #129",
    ["DictKey_UnitName_5389"] = "SEAD Strike Island Kish #001",
    ["DictKey_WptName_2120"] = "",
    ["DictKey_WptName_4142"] = "",
    ["DictKey_UnitName_1196"] = "Unit #244",
    ["DictKey_GroupName_3341"] = "Tanque de combustible #016",
    ["DictKey_GroupName_552"] = "New Ship Group #007",
    ["DictKey_WptName_3466"] = "",
    ["DictKey_UnitName_505"] = "",
    ["DictKey_WptName_77"] = "",
    ["DictKey_UnitName_4658"] = "Unit #130",
    ["DictKey_GroupName_2921"] = "Rudan Conversion",
    ["DictKey_WptName_3511"] = "",
    ["DictKey_WptName_500"] = "",
    ["DictKey_WptName_546"] = "",
    ["DictKey_WptName_3852"] = "",
    ["DictKey_ActionRadioText_4520"] = "Spawn Target Drone",
    ["DictKey_WptName_454"] = "",
    ["DictKey_WptName_5140"] = "",
    ["DictKey_GroupName_2176"] = "Plant #037",
    ["DictKey_WptName_1018"] = "",
    ["DictKey_WptName_5176"] = "",
    ["DictKey_WptName_3743"] = "",
    ["DictKey_UnitName_3252"] = "Refinery #079",
    ["DictKey_GroupName_2521"] = "Plant #067",
    ["DictKey_UnitName_4223"] = "",
    ["DictKey_GroupName_434"] = "f-4 Havadarya Island CAP",
    ["DictKey_WptName_622"] = "",
    ["DictKey_UnitName_4232"] = "",
    ["DictKey_UnitName_3020"] = "F-16 Al Fijarah Intl",
    ["DictKey_WptName_3891"] = "",
    ["DictKey_UnitName_1987"] = "Plant #004",
    ["DictKey_WptName_3781"] = "",
    ["DictKey_UnitName_310"] = "Unit #069",
    ["DictKey_UnitName_406"] = "Unit #135",
    ["DictKey_UnitName_4104"] = "Piloto #033",
    ["DictKey_WptName_433"] = "",
    ["DictKey_WptName_5083"] = "",
    ["DictKey_UnitName_2759"] = "Oil tower #002",
    ["DictKey_ActionRadioText_4521"] = "Spawn Target Drone north of Abu Dhabi",
    ["DictKey_GroupName_235"] = "",
    ["DictKey_UnitName_4698"] = "Unit #185",
    ["DictKey_WptName_3190"] = "",
    ["DictKey_WptName_4028"] = "",
    ["DictKey_WptName_578"] = "",
    ["DictKey_ActionText_4635"] = "Tankers available:\
\
255.00 AM  TCN 41Y  KC-130  - Texaco\
256.00 AM  TCN 43Y  KC-135  - Shell\
257.00 AM  TCN 45Y  KC-135  - Arco",
    ["DictKey_UnitName_3336"] = "Tanque de combustible #005",
    ["DictKey_ActionText_3956"] = "mist.respawnGroup('IRN Shell', true)",
    ["DictKey_UnitName_2297"] = "Refinery",
    ["DictKey_WptName_3716"] = "",
    ["DictKey_WptName_1434"] = "",
    ["DictKey_UnitName_4274"] = "",
    ["DictKey_WptName_572"] = "",
    ["DictKey_WptName_3502"] = "",
    ["DictKey_UnitName_987"] = "Unit #116",
    ["DictKey_WptName_1401"] = "",
    ["DictKey_WptName_4034"] = "",
    ["DictKey_GroupName_2779"] = "Oil tower #004",
    ["DictKey_WptName_3046"] = "",
    ["DictKey_WptName_179"] = "",
    ["DictKey_WptName_3076"] = "",
    ["DictKey_UnitName_3908"] = "F-16 Al Fijarah Intl #002",
    ["DictKey_UnitName_2119"] = "Unidad #014",
    ["DictKey_WptName_3070"] = "",
    ["DictKey_GroupName_2894"] = "Weapons storage #003",
    ["DictKey_UnitName_1274"] = "Unit #019",
    ["DictKey_WptName_4154"] = "",
    ["DictKey_WptName_716"] = "",
    ["DictKey_UnitName_1142"] = "Unit #214",
    ["DictKey_UnitName_3788"] = "",
    ["DictKey_UnitName_2498"] = "Plant #037",
    ["DictKey_UnitName_4708"] = "Unit #200",
    ["DictKey_UnitName_31"] = "Unit #018",
    ["DictKey_UnitName_594"] = "Uzi 2-1",
    ["DictKey_UnitName_3025"] = "F-16 Al Fijarah Intl #001",
    ["DictKey_WptName_4108"] = "",
    ["DictKey_UnitName_4066"] = "Unidad #064",
    ["DictKey_UnitName_272"] = "Unit #049",
    ["DictKey_GroupName_2377"] = "Refinery #006",
    ["DictKey_WptName_4372"] = "",
    ["DictKey_WptName_3487"] = "",
    ["DictKey_UnitName_1138"] = "Unit #186",
    ["DictKey_ActionText_4083"] = "if Group.getByName('Shell') == nil then\
return true\
else\
return false\
end",
    ["DictKey_UnitName_155"] = "LHA-1 Tarawa",
    ["DictKey_UnitName_2438"] = "Refinery #005",
    ["DictKey_GroupName_3696"] = "Munición #003",
    ["DictKey_UnitName_3798"] = "Unidad #051",
    ["DictKey_UnitName_1429"] = "Pilot #024",
    ["DictKey_UnitName_5269"] = "Enfield 2-4",
    ["DictKey_UnitName_2642"] = "Plant #070",
    ["DictKey_WptName_1082"] = "",
    ["DictKey_GroupName_2839"] = "Oil tower #064",
    ["DictKey_UnitName_2834"] = "Oil tower #004",
    ["DictKey_GroupName_2251"] = "Refinery #019",
    ["DictKey_GroupName_2590"] = "Plant #082",
    ["DictKey_WptName_2490"] = "",
    ["DictKey_UnitName_1366"] = "",
    ["DictKey_WptName_3098"] = "",
    ["DictKey_WptName_1013"] = "",
    ["DictKey_WptName_3080"] = "",
    ["DictKey_UnitName_3757"] = "Munición #022",
    ["DictKey_UnitName_1021"] = " #071",
    ["DictKey_UnitName_4345"] = "Piloto #012",
    ["DictKey_UnitName_2603"] = "Plant #064",
    ["DictKey_UnitName_935"] = " #066",
    ["DictKey_GroupName_192"] = "New Airplane Group #004",
    ["DictKey_UnitName_1391"] = "Pilot #011",
    ["DictKey_UnitName_3267"] = "Refinery #078",
    ["DictKey_UnitName_4253"] = "",
    ["DictKey_UnitName_236"] = "",
    ["DictKey_GroupName_4468"] = "f-5 Havadarya Island CAP 2",
    ["DictKey_WptName_1952"] = "",
    ["DictKey_UnitName_5163"] = "Combat Training F18C Instructor",
    ["DictKey_WptName_1772"] = "",
    ["DictKey_UnitName_3177"] = "Refinery #077",
    ["DictKey_UnitName_761"] = "",
    ["DictKey_GroupName_2695"] = "Plant #100",
    ["DictKey_WptName_324"] = "",
    ["DictKey_WptName_3235"] = "",
    ["DictKey_WptName_4117"] = "",
    ["DictKey_WptName_463"] = "",
    ["DictKey_UnitName_42"] = "Unit #027",
    ["DictKey_UnitName_2609"] = "Plant #068",
    ["DictKey_WptName_3193"] = "",
    ["DictKey_WptName_868"] = "",
    ["DictKey_WptName_5118"] = "AA TGT",
    ["DictKey_UnitName_2729"] = "Oil tower",
    ["DictKey_UnitName_2077"] = "Plant #003",
    ["DictKey_UnitName_4370"] = "Shell",
    ["DictKey_UnitName_168"] = "Unit #107",
    ["DictKey_GroupName_2560"] = "Plant #072",
    ["DictKey_GroupName_372"] = "SAM site 01 #013",
    ["DictKey_UnitName_1072"] = "Unit #039",
    ["DictKey_GroupName_2986"] = "Oil ship",
    ["DictKey_UnitName_5046"] = "Unit #343",
    ["DictKey_UnitName_34"] = "Unit #020",
    ["DictKey_UnitName_1074"] = "Unit #054",
    ["DictKey_UnitName_4751"] = "",
    ["DictKey_UnitName_1349"] = "Unit #081",
    ["DictKey_UnitName_4010"] = "Pilot #008",
    ["DictKey_WptName_3211"] = "",
    ["DictKey_UnitName_109"] = "Piotr Velikiy",
    ["DictKey_WptName_4578"] = "",
    ["DictKey_UnitName_2080"] = "Plant #007",
    ["DictKey_WptName_4478"] = "",
    ["DictKey_WptName_1383"] = "",
    ["DictKey_GroupName_2425"] = "Refinery #001",
    ["DictKey_WptName_1784"] = "",
    ["DictKey_GroupName_4891"] = "",
    ["DictKey_WptName_4349"] = "",
    ["DictKey_WptName_1940"] = "",
    ["DictKey_UnitName_4428"] = "Pilot #021",
    ["DictKey_GroupName_2055"] = "Plant #031",
    ["DictKey_WptName_920"] = "",
    ["DictKey_GroupName_2680"] = "Plant #069",
    ["DictKey_GroupName_5180"] = "Combat Training AV-8B Instructor",
    ["DictKey_UnitName_2125"] = "Unidad #019",
    ["DictKey_WptName_5299"] = "",
    ["DictKey_UnitName_3826"] = " #085",
    ["DictKey_GroupName_492"] = "New Static Object #001",
    ["DictKey_UnitName_4660"] = "Unit #132",
    ["DictKey_UnitName_729"] = "",
    ["DictKey_GroupName_3317"] = "Tanque de combustible #008",
    ["DictKey_UnitName_1531"] = "Oil tower",
    ["DictKey_UnitName_5047"] = "Unit #344",
    ["DictKey_UnitName_3072"] = "Plant #023",
    ["DictKey_UnitName_3688"] = "Munición #002",
    ["DictKey_GroupName_2290"] = "Refinery #005",
    ["DictKey_WptName_3475"] = "",
    ["DictKey_UnitName_4697"] = "Unit #184",
    ["DictKey_GroupName_3545"] = "Tanque de combustible #038",
    ["DictKey_UnitName_1630"] = "Refinery #001",
    ["DictKey_UnitName_124"] = "Unit #078",
    ["DictKey_WptName_4557"] = "",
    ["DictKey_GroupName_2446"] = "Refinery #071",
    ["DictKey_UnitName_4239"] = "",
    ["DictKey_WptName_579"] = "",
    ["DictKey_GroupName_123"] = "SAM site 01 #017",
    ["DictKey_UnitName_1984"] = "Plant #006",
    ["DictKey_UnitName_4693"] = "Unit #180",
    ["DictKey_GroupName_3777"] = "SS-N-2",
    ["DictKey_UnitName_1300"] = "Unit #031",
    ["DictKey_GroupName_3862"] = "Refinery #113",
    ["DictKey_GroupName_1881"] = "Oil tower #019",
    ["DictKey_UnitName_4281"] = "",
    ["DictKey_UnitName_990"] = "Unit #119",
    ["DictKey_UnitName_2981"] = "Oil ship",
    ["DictKey_UnitName_1017"] = " #022",
    ["DictKey_WptName_1352"] = "",
    ["DictKey_WptName_4563"] = "",
    ["DictKey_GroupName_2647"] = "Plant #067",
    ["DictKey_GroupName_2082"] = "Plant #040",
    ["DictKey_UnitName_2375"] = "Refinery #005",
    ["DictKey_UnitName_4869"] = "",
    ["DictKey_GroupName_2608"] = "Plant #088",
    ["DictKey_UnitName_121"] = "Unit #077",
    ["DictKey_UnitName_37"] = "Unit #022",
    ["DictKey_UnitName_4333"] = "Pilot #009",
    ["DictKey_UnitName_4723"] = "Unit #220",
    ["DictKey_UnitName_4717"] = "Unit #214",
    ["DictKey_WptName_1973"] = "",
    ["DictKey_GroupName_1088"] = "New Airplane Group #001",
    ["DictKey_GroupName_1779"] = "Refinery #039",
    ["DictKey_GroupName_620"] = "SAM site 01 #027",
    ["DictKey_UnitName_4064"] = "Unidad #062",
    ["DictKey_UnitName_5386"] = "",
    ["DictKey_WptName_3649"] = "",
    ["DictKey_GroupName_2617"] = "Plant #091",
    ["DictKey_WptName_5358"] = "",
    ["DictKey_WptName_2778"] = "",
    ["DictKey_WptName_2000"] = "",
    ["DictKey_GroupName_1866"] = "Oil tower #008",
    ["DictKey_UnitName_3066"] = "Plant #022",
    ["DictKey_GroupName_2749"] = "Oil tower #040",
    ["DictKey_UnitName_702"] = " #016",
    ["DictKey_WptName_3890"] = "",
    ["DictKey_WptName_464"] = "",
    ["DictKey_WptName_3538"] = "",
    ["DictKey_UnitName_2059"] = "Plant #004",
    ["DictKey_UnitName_1594"] = "Refinery #002",
    ["DictKey_UnitName_1449"] = "Unit #044",
    ["DictKey_GroupName_3123"] = "Nuevo objeto estático",
    ["DictKey_UnitName_715"] = "Pilot #010",
    ["DictKey_WptName_3131"] = "",
    ["DictKey_WptName_4552"] = "",
    ["DictKey_WptName_2890"] = "",
    ["DictKey_WptName_4110"] = "",
    ["DictKey_WptName_2355"] = "",
    ["DictKey_UnitName_1238"] = "Unit #155",
    ["DictKey_WptName_986"] = "",
    ["DictKey_WptName_2262"] = "",
    ["DictKey_GroupName_3476"] = "Tanque de combustible #024",
    ["DictKey_UnitName_403"] = "Hawg 1-2",
    ["DictKey_GroupName_2710"] = "Plant #109",
    ["DictKey_UnitName_159"] = "Unit #101",
    ["DictKey_UnitName_579"] = "Unit #178",
    ["DictKey_WptName_4549"] = "",
    ["DictKey_WptName_5182"] = "",
    ["DictKey_WptName_5457"] = "",
    ["DictKey_GroupName_2182"] = "Plant #039",
    ["DictKey_WptName_1880"] = "",
    ["DictKey_WptName_488"] = "",
    ["DictKey_WptName_2280"] = "",
    ["DictKey_UnitName_4841"] = "",
    ["DictKey_WptName_1047"] = "",
    ["DictKey_WptName_204"] = "",
    ["DictKey_UnitName_218"] = "",
    ["DictKey_WptName_4483"] = "",
    ["DictKey_WptName_2298"] = "",
    ["DictKey_UnitName_875"] = "Unit #110",
    ["DictKey_WptName_2721"] = "",
    ["DictKey_UnitName_1948"] = "Oil platform #004",
    ["DictKey_WptName_387"] = "",
    ["DictKey_WptName_671"] = "",
    ["DictKey_UnitName_90"] = "Unit #058",
    ["DictKey_UnitName_286"] = "Unit #059",
    ["DictKey_UnitName_1319"] = "Unit #041",
    ["DictKey_UnitName_3519"] = "Tanque de combustible #002",
    ["DictKey_GroupName_1785"] = "Refinery #041",
    ["DictKey_GroupName_302"] = "Qeshm SA-6 Site",
    ["DictKey_UnitName_621"] = "Unit #198",
    ["DictKey_WptName_5455"] = "",
    ["DictKey_GroupName_1112"] = "SAM site 01 #003",
    ["DictKey_GroupName_5225"] = "F18 Carrier Spawn CAT",
    ["DictKey_UnitName_2753"] = "Oil tower #005",
    ["DictKey_UnitName_4987"] = "Unit #294",
    ["DictKey_WptName_4332"] = "",
    ["DictKey_UnitName_3531"] = "Refinery #097",
    ["DictKey_UnitName_2843"] = "Oil tower #005",
    ["DictKey_UnitName_4267"] = "",
    ["DictKey_UnitName_2023"] = "Plant #001",
    ["DictKey_UnitName_650"] = "Unit #211",
    ["DictKey_WptName_3598"] = "",
    ["DictKey_WptName_2896"] = "",
    ["DictKey_WptName_573"] = "",
    ["DictKey_UnitName_130"] = "Unit #082",
    ["DictKey_GroupName_2644"] = "Plant #099",
    ["DictKey_UnitName_1134"] = "Unit #181",
    ["DictKey_UnitName_2525"] = "Plant #038",
    ["DictKey_UnitName_4714"] = "Unit #211",
    ["DictKey_WptName_4541"] = "",
    ["DictKey_UnitName_2471"] = "Plant #036",
    ["DictKey_UnitName_5069"] = "Unit #362",
    ["DictKey_GroupName_442"] = "Mig-21 Quesm Island CAP",
    ["DictKey_UnitName_4299"] = "F-16 Al Dhafra AB #004",
    ["DictKey_WptName_1562"] = "",
    ["DictKey_GroupName_5120"] = "Combat Training F14B  #001",
    ["DictKey_UnitName_1642"] = "Refinery #006",
    ["DictKey_UnitName_3369"] = "Tanque de combustible #004",
    ["DictKey_WptName_597"] = "",
    ["DictKey_UnitName_5187"] = "Combat Training AV-8B Trainee",
    ["DictKey_UnitName_3921"] = "Unit #109",
    ["DictKey_UnitName_1064"] = "Unit #152",
    ["DictKey_UnitName_5027"] = "Unit #328",
    ["DictKey_UnitName_4900"] = "",
    ["DictKey_UnitName_3045"] = "Plant #017",
    ["DictKey_UnitName_3624"] = "Munición",
    ["DictKey_GroupName_3084"] = "MIg-29A Shiraz International Airport CAP",
    ["DictKey_UnitName_556"] = "Unit #167",
    ["DictKey_WptName_2145"] = "",
    ["DictKey_GroupName_2380"] = "Refinery #049",
    ["DictKey_GroupName_3753"] = "Munición #020",
    ["DictKey_GroupName_1557"] = "Refinery #007",
    ["DictKey_UnitName_2261"] = "Refinery #015",
    ["DictKey_GroupName_2548"] = "Plant #038",
    ["DictKey_UnitName_370"] = "Unit #119",
    ["DictKey_GroupName_5126"] = "Combat Training F14B  Instructor",
    ["DictKey_GroupName_3161"] = "Refinery #077",
    ["DictKey_UnitName_4278"] = "",
    ["DictKey_UnitName_2952"] = "Rudan Conversion #008",
    ["DictKey_WptName_2472"] = "",
    ["DictKey_UnitName_631"] = " #063",
    ["DictKey_GroupName_1384"] = "New Airplane Group #003",
    ["DictKey_UnitName_1303"] = "Unit #032",
    ["DictKey_UnitName_941"] = "Unit #228",
    ["DictKey_UnitName_1375"] = "",
    ["DictKey_GroupName_2845"] = "Oil tower #066",
    ["DictKey_UnitName_175"] = "",
    ["DictKey_UnitName_1216"] = "Unit #253",
    ["DictKey_UnitName_4225"] = "",
    ["DictKey_UnitName_1855"] = "Oil tower #005",
    ["DictKey_WptName_92"] = "",
    ["DictKey_WptName_1090"] = "",
    ["DictKey_GroupName_3170"] = "Refinery #080",
    ["DictKey_WptName_5250"] = "",
    ["DictKey_WptName_1413"] = "",
    ["DictKey_GroupName_555"] = "New Ship Group #008",
    ["DictKey_WptName_1898"] = "",
    ["DictKey_UnitName_849"] = "Pilot #007",
    ["DictKey_UnitName_4219"] = "",
    ["DictKey_GroupName_3062"] = "Plant #020",
    ["DictKey_UnitName_536"] = " #012",
    ["DictKey_UnitName_3923"] = "Unit #111",
    ["DictKey_GroupName_1602"] = "Refinery #004",
    ["DictKey_UnitName_1603"] = "Refinery #004",
    ["DictKey_UnitName_4317"] = "Pilot #002",
    ["DictKey_UnitName_2264"] = "Refinery #016",
    ["DictKey_WptName_141"] = "",
    ["DictKey_WptName_807"] = "",
    ["DictKey_GroupName_1147"] = "SAM site 01 #007",
    ["DictKey_UnitName_844"] = "Pilot #009",
    ["DictKey_UnitName_3180"] = "Refinery #079",
    ["DictKey_GroupName_3796"] = "SS-N-2 #002",
    ["DictKey_UnitName_2204"] = "Plant #010",
    ["DictKey_WptName_4114"] = "",
    ["DictKey_GroupName_1977"] = "Plant #005",
    ["DictKey_UnitName_1042"] = "Unit #151",
    ["DictKey_UnitName_3324"] = "Tanque de combustible #002",
    ["DictKey_WptName_942"] = "",
    ["DictKey_GroupName_3993"] = "JTAC6",
    ["DictKey_UnitName_4974"] = "",
    ["DictKey_UnitName_612"] = "Unit #195",
    ["DictKey_WptName_828"] = "",
    ["DictKey_WptName_3292"] = "",
    ["DictKey_UnitName_830"] = "",
    ["DictKey_UnitName_4794"] = "",
    ["DictKey_GroupName_1722"] = "Refinery",
    ["DictKey_UnitName_940"] = "Unit #227",
    ["DictKey_WptName_4545"] = "",
    ["DictKey_UnitName_1193"] = "Unit #239",
    ["DictKey_WptName_382"] = "",
    ["DictKey_WptName_5343"] = "",
    ["DictKey_UnitName_4973"] = "",
    ["DictKey_WptName_4575"] = "",
    ["DictKey_WptName_2442"] = "",
    ["DictKey_ActionText_3947"] = "if Group.getByName('Arco') == nil then\
return true\
else\
return false\
end",
    ["DictKey_UnitName_1288"] = "",
    ["DictKey_UnitName_1330"] = "Unit #058",
    ["DictKey_WptName_680"] = "",
    ["DictKey_GroupName_3320"] = "Tanque de combustible #009",
    ["DictKey_GroupName_2161"] = "Plant #032",
    ["DictKey_GroupName_3407"] = "Tanque de combustible #014",
    ["DictKey_UnitName_1322"] = "Unit #052",
    ["DictKey_UnitName_2144"] = "Plant #013",
    ["DictKey_UnitName_4408"] = "Colt 1-1 #002",
    ["DictKey_WptName_5330"] = "",
    ["DictKey_UnitName_4803"] = "",
    ["DictKey_WptName_1005"] = "",
    ["DictKey_WptName_5463"] = "",
    ["DictKey_WptName_506"] = "",
    ["DictKey_WptName_5365"] = "",
    ["DictKey_UnitName_1033"] = "Unit #165",
    ["DictKey_GroupName_2788"] = "Oil tower #005",
    ["DictKey_GroupName_5144"] = "Combat Training F14B  Instructor #001",
    ["DictKey_WptName_265"] = "",
    ["DictKey_WptName_2941"] = "",
    ["DictKey_WptName_4501"] = "",
    ["DictKey_UnitName_410"] = "Unit #139",
    ["DictKey_UnitName_318"] = "Unit #078",
    ["DictKey_GroupName_1611"] = "Refinery #005",
    ["DictKey_UnitName_2570"] = "Plant #069",
    ["DictKey_GroupName_3759"] = "Munición #016",
    ["DictKey_WptName_3971"] = "",
    ["DictKey_WptName_3283"] = "",
    ["DictKey_GroupName_3650"] = "Munición #011",
    ["DictKey_WptName_1007"] = "",
    ["DictKey_GroupName_3548"] = "Tanque de combustible #039",
    ["DictKey_UnitName_1127"] = "",
    ["DictKey_UnitName_3012"] = " #079",
    ["DictKey_UnitName_1452"] = "Unit #045",
    ["DictKey_WptName_1682"] = "",
    ["DictKey_GroupName_315"] = "SAM site 01 #011",
    ["DictKey_UnitName_3804"] = "Unidad #055",
    ["DictKey_WptName_3346"] = "",
    ["DictKey_UnitName_1771"] = "Refinery #004",
    ["DictKey_WptName_3725"] = "",
    ["DictKey_GroupName_3176"] = "Refinery #077",
    ["DictKey_WptName_4585"] = "",
    ["DictKey_WptName_1679"] = "",
    ["DictKey_WptName_3773"] = "",
    ["DictKey_WptName_1143"] = "",
    ["DictKey_WptName_5256"] = "",
    ["DictKey_WptName_5262"] = "",
    ["DictKey_WptName_3734"] = "",
    ["DictKey_UnitName_1176"] = "Unit #006",
    ["DictKey_UnitName_5175"] = "Combat Training F18C Trainee",
    ["DictKey_UnitName_933"] = " #066",
    ["DictKey_WptName_2286"] = "",
    ["DictKey_UnitName_4204"] = "",
    ["DictKey_GroupName_1836"] = "Oil tower #005",
    ["DictKey_WptName_5462"] = "",
    ["DictKey_WptName_107"] = "",
    ["DictKey_UnitName_603"] = "Unit #190",
    ["DictKey_UnitName_4656"] = "Unit #128",
    ["DictKey_UnitName_3079"] = "Shell 1-1",
    ["DictKey_UnitName_1654"] = "Refinery #005",
    ["DictKey_WptName_3077"] = "",
    ["DictKey_UnitName_2089"] = "Plant #006",
    ["DictKey_WptName_3652"] = "",
    ["DictKey_WptName_234"] = "",
    ["DictKey_UnitName_1503"] = "Unit #116",
    ["DictKey_GroupName_4762"] = "",
    ["DictKey_UnitName_4160"] = "Piloto #036",
    ["DictKey_UnitName_1369"] = "",
    ["DictKey_UnitName_894"] = "Pilot #020",
    ["DictKey_UnitName_1114"] = "Unit #140",
    ["DictKey_UnitName_695"] = "Pilot #003",
    ["DictKey_GroupName_1566"] = "Refinery #010",
    ["DictKey_UnitName_321"] = "Unit #081",
    ["DictKey_UnitName_4246"] = "",
    ["DictKey_UnitName_4358"] = "East Test",
    ["DictKey_UnitName_4819"] = "",
    ["DictKey_GroupName_570"] = " #028",
    ["DictKey_WptName_2322"] = "",
    ["DictKey_UnitName_5038"] = "Unit #337",
    ["DictKey_GroupName_2683"] = "Plant #071",
    ["DictKey_UnitName_2991"] = " #075",
    ["DictKey_UnitName_4489"] = "Springfield 1-4",
    ["DictKey_UnitName_3878"] = "Piloto #018",
    ["DictKey_UnitName_1197"] = "Unit #009",
    ["DictKey_WptName_1340"] = "",
    ["DictKey_UnitName_264"] = "Unit #043",
    ["DictKey_UnitName_2294"] = "Refinery #006",
    ["DictKey_UnitName_4186"] = "",
    ["DictKey_UnitName_5014"] = "Unit #317",
    ["DictKey_WptName_5366"] = "",
    ["DictKey_WptName_840"] = "",
    ["DictKey_ActionText_4526"] = "",
    ["DictKey_WptName_518"] = "",
    ["DictKey_WptName_3316"] = "",
    ["DictKey_GroupName_4374"] = "West Tanker",
    ["DictKey_UnitName_608"] = "Unit #193",
    ["DictKey_UnitName_252"] = "",
    ["DictKey_UnitName_51"] = "Unit #034",
    ["DictKey_WptName_5364"] = "",
    ["DictKey_WptName_1814"] = "",
    ["DictKey_GroupName_1599"] = "Refinery #006",
    ["DictKey_ActionText_3982"] = "if Group.getByName('JTAC3') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_4459"] = "",
    ["DictKey_UnitName_726"] = "",
    ["DictKey_UnitName_1320"] = "Unit #042",
    ["DictKey_GroupName_471"] = "AV-8V Carrier Hot",
    ["DictKey_UnitName_1058"] = "Unit #113",
    ["DictKey_GroupName_1770"] = "Refinery #036",
    ["DictKey_UnitName_567"] = "Unit #173",
    ["DictKey_UnitName_727"] = "",
    ["DictKey_UnitName_2450"] = "Refinery #002",
    ["DictKey_GroupName_1788"] = "Refinery #042",
    ["DictKey_WptName_5243"] = "",
    ["DictKey_WptName_5079"] = "",
    ["DictKey_WptName_4038"] = "",
    ["DictKey_WptName_5277"] = "",
    ["DictKey_WptName_2514"] = "",
    ["DictKey_ActionRadioText_4628"] = "Request JTAC: Sirri Island",
    ["DictKey_WptName_689"] = "",
    ["DictKey_WptName_2968"] = "",
    ["DictKey_WptName_5345"] = "",
    ["DictKey_WptName_2412"] = "",
    ["DictKey_UnitName_970"] = "Unit #235",
    ["DictKey_WptName_3704"] = "",
    ["DictKey_GroupName_53"] = "SAM site 01 #003",
    ["DictKey_WptName_1943"] = "",
    ["DictKey_UnitName_1882"] = "Oil tower",
    ["DictKey_UnitName_1726"] = "Refinery #006",
    ["DictKey_UnitName_3432"] = "Plant #112",
    ["DictKey_WptName_3331"] = "",
    ["DictKey_GroupName_3720"] = "Munición #014",
    ["DictKey_UnitName_5203"] = "Pilot #029",
    ["DictKey_WptName_1450"] = "",
    ["DictKey_WptName_4502"] = "",
    ["DictKey_GroupName_1390"] = "New Airplane Group #004",
    ["DictKey_GroupName_3485"] = "Refinery #094",
    ["DictKey_WptName_3764"] = "",
    ["DictKey_UnitName_847"] = "Pilot #003",
    ["DictKey_UnitName_494"] = "11",
    ["DictKey_GroupName_2365"] = "Refinery #002",
    ["DictKey_WptName_978"] = "",
    ["DictKey_UnitName_1470"] = "Unit #087",
    ["DictKey_UnitName_2922"] = "",
    ["DictKey_WptName_5362"] = "",
    ["DictKey_UnitName_4227"] = "",
    ["DictKey_WptName_5461"] = "",
    ["DictKey_WptName_3102"] = "",
    ["DictKey_GroupName_3684"] = "Munición",
    ["DictKey_UnitName_5227"] = "Enfield 2-2 ",
    ["DictKey_UnitName_4948"] = "",
    ["DictKey_WptName_3157"] = "",
    ["DictKey_WptName_1586"] = "",
    ["DictKey_WptName_3977"] = "",
    ["DictKey_UnitName_5025"] = "Unit #326",
    ["DictKey_WptName_5401"] = "",
    ["DictKey_WptName_2072"] = "",
    ["DictKey_UnitName_3733"] = "Munición #008",
    ["DictKey_WptName_1131"] = "",
    ["DictKey_UnitName_1027"] = "Unit #072",
    ["DictKey_UnitName_2011"] = "Plant #004",
    ["DictKey_WptName_2556"] = "",
    ["DictKey_GroupName_4991"] = "TGT Practice",
    ["DictKey_UnitName_3378"] = "Tanque de combustible #005",
    ["DictKey_UnitName_932"] = " #066",
    ["DictKey_UnitName_3670"] = "Munición",
    ["DictKey_UnitName_3246"] = "Refinery #080",
    ["DictKey_UnitName_3405"] = "Tanque de combustible #004",
    ["DictKey_GroupName_1668"] = "Refinery #030",
    ["DictKey_WptName_4600"] = "",
    ["DictKey_WptName_341"] = "",
    ["DictKey_UnitName_4919"] = "",
    ["DictKey_WptName_2118"] = "",
    ["DictKey_UnitName_4816"] = "",
    ["DictKey_UnitName_2135"] = "Unidad #029",
    ["DictKey_WptName_3905"] = "",
    ["DictKey_WptName_3238"] = "",
    ["DictKey_UnitName_444"] = "Unit #157",
    ["DictKey_ActionRadioText_4611"] = "Spawn 2 x F-14A at the Stennis",
    ["DictKey_UnitName_4806"] = "",
    ["DictKey_GroupName_2951"] = "Rudan Conversion #010",
    ["DictKey_UnitName_4403"] = "Colt 1-1 #001",
    ["DictKey_GroupName_1803"] = "Refinery #047",
    ["DictKey_GroupName_2638"] = "Pump",
    ["DictKey_WptName_317"] = "",
    ["DictKey_UnitName_890"] = "Pilot #005",
    ["DictKey_WptName_1030"] = "",
    ["DictKey_UnitName_3130"] = "Nuevo objeto estático #001",
    ["DictKey_GroupName_4916"] = "",
    ["DictKey_UnitName_2083"] = "Plant #004",
    ["DictKey_WptName_257"] = "",
    ["DictKey_GroupName_2836"] = "Oil tower #063",
    ["DictKey_GroupName_1378"] = "New Airplane Group #002",
    ["DictKey_UnitName_3198"] = "Refinery #080",
    ["DictKey_WptName_4024"] = "",
    ["DictKey_UnitName_3748"] = "Munición #002",
    ["DictKey_UnitName_2837"] = "Oil tower #001",
    ["DictKey_UnitName_395"] = "Unit #039",
    ["DictKey_GroupName_3533"] = "Refinery #101",
    ["DictKey_UnitName_3801"] = "Unidad #054",
    ["DictKey_UnitName_2114"] = "Unidad #012",
    ["DictKey_WptName_5324"] = "",
    ["DictKey_UnitName_5323"] = "AV-8B Carrier",
    ["DictKey_UnitName_2984"] = "Oil ship",
    ["DictKey_WptName_3940"] = "",
    ["DictKey_UnitName_23"] = "Unit #014",
    ["DictKey_WptName_759"] = "",
    ["DictKey_UnitName_460"] = "",
    ["DictKey_GroupName_3056"] = "Plant #016",
    ["DictKey_UnitName_2995"] = " #081",
    ["DictKey_UnitName_126"] = "Unit #080",
    ["DictKey_UnitName_4649"] = "Unit #068",
    ["DictKey_GroupName_2653"] = "Plant #064",
    ["DictKey_UnitName_4961"] = "",
    ["DictKey_UnitName_4646"] = "Unit #056",
    ["DictKey_UnitName_3273"] = "Refinery #077",
    ["DictKey_UnitName_81"] = "Unit #053",
    ["DictKey_UnitName_955"] = " #068",
    ["DictKey_UnitName_293"] = "Unit #064",
    ["DictKey_GroupName_350"] = "Overlord",
    ["DictKey_UnitName_4933"] = "",
    ["DictKey_UnitName_2426"] = "Refinery #001",
    ["DictKey_GroupName_3191"] = "Refinery #079",
    ["DictKey_WptName_3325"] = "",
    ["DictKey_UnitName_632"] = "Unit #202",
    ["DictKey_UnitName_975"] = "Unit #242",
    ["DictKey_GroupName_2722"] = "Oil tower",
    ["DictKey_WptName_4039"] = "",
    ["DictKey_GroupName_603"] = " #057",
    ["DictKey_WptName_1589"] = "",
    ["DictKey_UnitName_424"] = "Unit #150",
    ["DictKey_WptName_3154"] = "",
    ["DictKey_UnitName_2246"] = "Refinery #017",
    ["DictKey_UnitName_1101"] = "Unit #115",
    ["DictKey_UnitName_4273"] = "",
    ["DictKey_UnitName_1921"] = "Oil tower #003",
    ["DictKey_WptName_913"] = "",
    ["DictKey_GroupName_2392"] = "Refinery #054",
    ["DictKey_UnitName_958"] = "Unit #235",
    ["DictKey_GroupName_2263"] = "Refinery #004",
    ["DictKey_UnitName_1246"] = "Unit #269",
    ["DictKey_WptName_2947"] = "",
    ["DictKey_UnitName_1381"] = "Pilot #008",
    ["DictKey_WptName_5309"] = "",
    ["DictKey_WptName_782"] = "",
    ["DictKey_GroupName_3239"] = "Refinery #085",
    ["DictKey_UnitName_944"] = "Unit #229",
    ["DictKey_UnitName_475"] = "New Static Object #004",
    ["DictKey_UnitName_4795"] = "",
    ["DictKey_GroupName_4387"] = "F-14 Carrier CAP",
    ["DictKey_WptName_3873"] = "",
    ["DictKey_WptName_5296"] = "",
    ["DictKey_WptName_504"] = "",
    ["DictKey_WptName_3163"] = "",
    ["DictKey_UnitName_3910"] = "Piloto #023",
    ["DictKey_WptName_1934"] = "",
    ["DictKey_WptName_1394"] = "",
    ["DictKey_GroupName_3732"] = "Munición #018",
    ["DictKey_UnitName_3234"] = "Refinery #080",
    ["DictKey_UnitName_4734"] = "Unit #278",
    ["DictKey_GroupName_1126"] = "Peace Ruby",
    ["DictKey_UnitName_135"] = "Unit #085",
    ["DictKey_WptName_3556"] = "",
    ["DictKey_WptName_571"] = "",
    ["DictKey_WptName_5104"] = "",
    ["DictKey_WptName_50"] = "",
    ["DictKey_UnitName_4151"] = "Piloto #036",
    ["DictKey_WptName_3896"] = "",
    ["DictKey_UnitName_4205"] = "",
    ["DictKey_GroupName_789"] = "New Vehicle Group",
    ["DictKey_WptName_3355"] = "",
    ["DictKey_WptName_3710"] = "",
    ["DictKey_UnitName_2871"] = "FARP Madrid",
    ["DictKey_UnitName_1252"] = "Unit #274",
    ["DictKey_UnitName_4118"] = "Piloto #038",
    ["DictKey_UnitName_3339"] = "Tanque de combustible",
    ["DictKey_GroupName_707"] = " #030",
    ["DictKey_UnitName_405"] = "Unit #060",
    ["DictKey_GroupName_2794"] = "Oil tower #049",
    ["DictKey_WptName_4099"] = "",
    ["DictKey_GroupName_188"] = "New Airplane Group #003",
    ["DictKey_WptName_2876"] = "",
    ["DictKey_WptName_936"] = "",
    ["DictKey_UnitName_1897"] = "Oil tower #001",
    ["DictKey_UnitName_296"] = "Unit #067",
    ["DictKey_UnitName_3483"] = "Tanque de combustible #001",
    ["DictKey_UnitName_4654"] = "Unit #126",
    ["DictKey_UnitName_3872"] = "",
    ["DictKey_WptName_1868"] = "",
    ["DictKey_GroupName_733"] = " #016",
    ["DictKey_UnitName_2255"] = "Refinery #020",
    ["DictKey_WptName_1407"] = "",
    ["DictKey_UnitName_3384"] = "Tanque de combustible #002",
    ["DictKey_WptName_3899"] = "",
    ["DictKey_UnitName_4813"] = "",
    ["DictKey_WptName_744"] = "",
    ["DictKey_UnitName_4923"] = "",
    ["DictKey_UnitName_966"] = " #069",
    ["DictKey_GroupName_171"] = "New Airplane Group",
    ["DictKey_WptName_1805"] = "",
    ["DictKey_GroupName_2503"] = "Plant #039",
    ["DictKey_UnitName_529"] = " #011",
    ["DictKey_GroupName_3834"] = "FARP Dallas",
    ["DictKey_UnitName_4798"] = "",
    ["DictKey_WptName_1646"] = "",
    ["DictKey_GroupName_3602"] = "Tanque de combustible #049",
    ["DictKey_UnitName_3018"] = " #080",
    ["DictKey_WptName_2424"] = "",
    ["DictKey_GroupName_4042"] = "Magic",
    ["DictKey_UnitName_391"] = "Unit #132",
    ["DictKey_WptName_1967"] = "",
    ["DictKey_UnitName_5193"] = "Combat Training AV-B Instructor",
    ["DictKey_GroupName_427"] = "MIG-29A Lar Airbase CAP",
    ["DictKey_GroupName_2527"] = "Plant #069",
    ["DictKey_ActionText_3984"] = "if Group.getByName('JTAC4') == nil then\
return true\
else\
return false\
end",
    ["DictKey_UnitName_997"] = "Pilot #020",
    ["DictKey_GroupName_2269"] = "Refinery #006",
    ["DictKey_UnitName_1204"] = "Unit #016",
    ["DictKey_UnitName_1762"] = "Refinery #002",
    ["DictKey_UnitName_4957"] = "",
    ["DictKey_UnitName_625"] = "Unit #199",
    ["DictKey_UnitName_158"] = "Unit #100",
    ["DictKey_UnitName_442"] = "Unit #155",
    ["DictKey_WptName_5087"] = "",
    ["DictKey_GroupName_2812"] = "Oil tower #055",
    ["DictKey_UnitName_4883"] = "Unit #287",
    ["DictKey_UnitName_172"] = "Pilot #001",
    ["DictKey_WptName_4121"] = "",
    ["DictKey_GroupName_3747"] = "Munición #023",
    ["DictKey_WptName_419"] = "",
    ["DictKey_WptName_2301"] = "",
    ["DictKey_WptName_1832"] = "",
    ["DictKey_UnitName_4255"] = "",
    ["DictKey_UnitName_3498"] = "Refinery #078",
    ["DictKey_GroupName_3206"] = "Refinery #078",
    ["DictKey_WptName_4001"] = "",
    ["DictKey_WptName_301"] = "",
    ["DictKey_UnitName_3294"] = "Tanque de combustible #001",
    ["DictKey_WptName_5253"] = "",
    ["DictKey_GroupName_2152"] = "Plant #009",
    ["DictKey_UnitName_2288"] = "Refinery #004",
    ["DictKey_UnitName_2795"] = "Oil tower #002",
    ["DictKey_GroupName_2623"] = "Plant #093",
    ["DictKey_GroupName_1872"] = "Oil tower #010",
    ["DictKey_GroupName_2266"] = "Refinery #005",
    ["DictKey_UnitName_4214"] = "",
    ["DictKey_WptName_491"] = "",
    ["DictKey_WptName_2580"] = "",
    ["DictKey_WptName_524"] = "",
    ["DictKey_UnitName_1999"] = "Plant #001",
    ["DictKey_UnitName_1359"] = "Unit #090",
    ["DictKey_GroupName_2320"] = "Refinery #001",
    ["DictKey_GroupName_633"] = " #061",
    ["DictKey_WptName_1004"] = "",
    ["DictKey_UnitName_3087"] = "Piloto #005",
    ["DictKey_UnitName_9"] = "Unit #013",
    ["DictKey_UnitName_1487"] = "Unit #007",
    ["DictKey_WptName_3391"] = "",
    ["DictKey_WptName_4617"] = "Lavan",
    ["DictKey_WptName_1538"] = "",
    ["DictKey_WptName_3776"] = "",
    ["DictKey_UnitName_783"] = " #003",
    ["DictKey_UnitName_5387"] = "",
    ["DictKey_WptName_5318"] = "",
    ["DictKey_UnitName_679"] = "",
    ["DictKey_UnitName_2883"] = "",
    ["DictKey_UnitName_2552"] = "Plant #039",
    ["DictKey_UnitName_297"] = "Unit #068",
    ["DictKey_UnitName_4688"] = "Unit #173",
    ["DictKey_WptName_2893"] = "",
    ["DictKey_UnitName_431"] = "Unit #062",
    ["DictKey_WptName_2757"] = "",
    ["DictKey_UnitName_2174"] = "Plant #008",
    ["DictKey_WptName_4597"] = "",
    ["DictKey_UnitName_26"] = "Unit #017",
    ["DictKey_UnitName_3920"] = "Unit #108",
    ["DictKey_GroupName_2602"] = "Plant #086",
    ["DictKey_WptName_5276"] = "",
    ["DictKey_UnitName_2306"] = "Refinery #003",
    ["DictKey_WptName_2373"] = "",
    ["DictKey_WptName_4340"] = "",
    ["DictKey_UnitName_3264"] = "Refinery #079",
    ["DictKey_GroupName_2974"] = "Oil ship",
    ["DictKey_UnitName_1627"] = "Refinery #003",
    ["DictKey_GroupName_1253"] = "",
    ["DictKey_GroupName_332"] = "Bandar Abbas HAWK",
    ["DictKey_WptName_756"] = "",
    ["DictKey_WptName_1994"] = "",
    ["DictKey_WptName_972"] = "",
    ["DictKey_UnitName_2774"] = "Oil tower",
    ["DictKey_UnitName_25"] = "Unit #016",
    ["DictKey_WptName_4303"] = "",
    ["DictKey_UnitName_378"] = "Unit #010",
    ["DictKey_GroupName_560"] = "",
    ["DictKey_GroupName_3641"] = "Munición #008",
    ["DictKey_WptName_3553"] = "",
    ["DictKey_UnitName_5013"] = "Unit #316",
    ["DictKey_WptName_5099"] = "AG RANGE",
    ["DictKey_WptName_5353"] = "",
    ["DictKey_UnitName_345"] = "",
    ["DictKey_WptName_5383"] = "",
    ["DictKey_WptName_5308"] = "",
    ["DictKey_UnitName_3824"] = " #053",
    ["DictKey_WptName_2006"] = "",
    ["DictKey_UnitName_4949"] = "",
    ["DictKey_UnitName_4240"] = "",
    ["DictKey_GroupName_4008"] = "F18 Carrier Spawn CAT",
    ["DictKey_UnitName_4275"] = "",
    ["DictKey_UnitName_1011"] = " #021",
    ["DictKey_UnitName_3782"] = "Unidad #041",
    ["DictKey_UnitName_4903"] = "",
    ["DictKey_WptName_4164"] = "",
    ["DictKey_GroupName_3503"] = "Tanque de combustible #029",
    ["DictKey_GroupName_5356"] = "AV-8B Carrier #004",
    ["DictKey_UnitName_2970"] = " #045",
    ["DictKey_GroupName_2776"] = "Oil tower #002",
    ["DictKey_WptName_4445"] = "",
    ["DictKey_UnitName_4531"] = "",
    ["DictKey_WptName_527"] = "",
    ["DictKey_WptName_3015"] = "",
    ["DictKey_GroupName_2512"] = "Plant #064",
    ["DictKey_UnitName_743"] = "New Static Object #001",
    ["DictKey_UnitName_55"] = "Unit #037",
    ["DictKey_UnitName_4134"] = "Piloto #044",
    ["DictKey_GroupName_3635"] = "Munición #006",
    ["DictKey_GroupName_1569"] = "Refinery #011",
    ["DictKey_WptName_1010"] = "",
    ["DictKey_WptName_2151"] = "",
    ["DictKey_GroupName_1818"] = "Oil tower",
    ["DictKey_ActionRadioText_4587"] = "Spawn 2 x F-18C at the Stennis",
    ["DictKey_UnitName_1924"] = "Oil tower #004",
    ["DictKey_UnitName_1508"] = "Unit #121",
    ["DictKey_WptName_4184"] = "",
    ["DictKey_UnitName_5061"] = "Unit #356",
    ["DictKey_WptName_587"] = "",
    ["DictKey_UnitName_4669"] = "Unit #141",
    ["DictKey_UnitName_2681"] = "Plant #069",
    ["DictKey_GroupName_961"] = "SAM site 01 #037",
    ["DictKey_WptName_855"] = "",
    ["DictKey_UnitName_596"] = "Unit #184",
    ["DictKey_GroupName_3515"] = "Refinery #098",
    ["DictKey_WptName_4314"] = "",
    ["DictKey_WptName_176"] = "",
    ["DictKey_UnitName_1441"] = "Unit #020",
    ["DictKey_ActionText_4610"] = "Twoo  AI Usaf  F-14A's  have spawned at the Stennis to defend the Carrier Fleet",
    ["DictKey_WptName_954"] = "",
    ["DictKey_WptName_3265"] = "",
    ["DictKey_UnitName_478"] = "Ford 1-2",
    ["DictKey_WptName_817"] = "",
    ["DictKey_GroupName_3115"] = "MOBILE SAM #001",
    ["DictKey_GroupName_766"] = "New Static Object #011",
    ["DictKey_UnitName_185"] = "Unit #113",
    ["DictKey_GroupName_2203"] = "Plant #054",
    ["DictKey_UnitName_2531"] = "Plant #033",
    ["DictKey_UnitName_4270"] = "",
    ["DictKey_GroupName_394"] = "SAM site 01 #004",
    ["DictKey_WptName_2553"] = "",
    ["DictKey_UnitName_3787"] = "",
    ["DictKey_GroupName_5373"] = "Combat Training F18C Instructor #001",
    ["DictKey_WptName_3677"] = "",
    ["DictKey_UnitName_1199"] = "Unit #011",
    ["DictKey_UnitName_1078"] = "Unit #058",
    ["DictKey_UnitName_4793"] = "",
    ["DictKey_WptName_4046"] = "",
    ["DictKey_WptName_32"] = "",
    ["DictKey_UnitName_1651"] = "Refinery #001",
    ["DictKey_GroupName_3554"] = "Refinery #103",
    ["DictKey_UnitName_720"] = "Pilot #011",
    ["DictKey_UnitName_1660"] = "Refinery",
    ["DictKey_GroupName_714"] = "New Airplane Group #002",
    ["DictKey_UnitName_3730"] = "Munición #006",
    ["DictKey_UnitName_4095"] = "Springfield 1-1",
    ["DictKey_WptName_4365"] = "",
    ["DictKey_UnitName_5024"] = "Unit #325",
    ["DictKey_GroupName_3422"] = "Tanque de combustible #021",
    ["DictKey_WptName_2844"] = "",
    ["DictKey_UnitName_1182"] = "Unit #012",
    ["DictKey_WptName_5238"] = "",
    ["DictKey_WptName_758"] = "",
    ["DictKey_UnitName_2168"] = "Plant #013",
    ["DictKey_WptName_4569"] = "",
    ["DictKey_GroupName_950"] = " #064",
    ["DictKey_WptName_1757"] = "",
    ["DictKey_GroupName_1524"] = "moved Qum TOR #001",
    ["DictKey_UnitName_47"] = "Unit #032",
    ["DictKey_GroupName_1306"] = "New Vehicle Group",
    ["DictKey_GroupName_5162"] = "Combat Training F18C Instructor",
    ["DictKey_GroupName_915"] = "New Airplane Group #006",
    ["DictKey_UnitName_4797"] = "",
    ["DictKey_UnitName_1403"] = "Pilot #015",
    ["DictKey_UnitName_2318"] = "Refinery",
    ["DictKey_GroupName_459"] = "New Static Object #001",
    ["DictKey_GroupName_1716"] = "Refinery #005",
    ["DictKey_GroupName_3200"] = "Refinery #077",
    ["DictKey_UnitName_749"] = "New Static Object #001",
    ["DictKey_WptName_5122"] = "",
    ["DictKey_GroupName_2524"] = "Plant #068",
    ["DictKey_UnitName_4996"] = "Unit #301",
    ["DictKey_WptName_2926"] = "",
    ["DictKey_WptName_5351"] = "",
    ["DictKey_UnitName_1936"] = "Oil platform",
    ["DictKey_UnitName_4826"] = "",
    ["DictKey_WptName_3001"] = "",
    ["DictKey_GroupName_1980"] = "Plant #006",
    ["DictKey_UnitName_1717"] = "Refinery #005",
    ["DictKey_UnitName_4876"] = "Unit #282",
    ["DictKey_GroupName_450"] = "New Airplane Group #001",
    ["DictKey_UnitName_1480"] = "Unit #097",
    ["DictKey_UnitName_1696"] = "Refinery #005",
    ["DictKey_WptName_4920"] = "",
    ["DictKey_UnitName_3085"] = "Piloto #004",
    ["DictKey_UnitName_1149"] = "Unit #082",
    ["DictKey_UnitName_5396"] = "SEAD Kish Island",
    ["DictKey_UnitName_1479"] = "Unit #096",
    ["DictKey_WptName_4507"] = "",
    ["DictKey_UnitName_602"] = "Unit #189",
    ["DictKey_WptName_473"] = "",
    ["DictKey_GroupName_573"] = " #029",
    ["DictKey_UnitName_1232"] = "Unit #266",
    ["DictKey_WptName_1790"] = "",
    ["DictKey_WptName_659"] = "",
    ["DictKey_UnitName_2444"] = "Refinery",
    ["DictKey_GroupName_561"] = " #025",
    ["DictKey_WptName_966"] = "",
    ["DictKey_UnitName_4133"] = "Piloto #043",
    ["DictKey_ActionText_3978"] = "if Group.getByName('JTAC1') == nil then\
return true\
else\
return false\
end",
    ["DictKey_WptName_2027"] = "",
    ["DictKey_UnitName_393"] = "Unit #134",
    ["DictKey_UnitName_1393"] = "Pilot #012",
    ["DictKey_UnitName_4119"] = "Piloto #039",
    ["DictKey_GroupName_1560"] = "Refinery #008",
    ["DictKey_ActionText_3948"] = "mist.respawnGroup('Arco', true)",
    ["DictKey_UnitName_4760"] = "",
    ["DictKey_UnitName_1004"] = "Pilot #024",
    ["DictKey_WptName_3532"] = "",
    ["DictKey_UnitName_4908"] = "",
    ["DictKey_UnitName_2594"] = "Plant #065",
    ["DictKey_WptName_4352"] = "",
    ["DictKey_UnitName_1262"] = "",
    ["DictKey_WptName_2817"] = "",
    ["DictKey_WptName_781"] = "",
    ["DictKey_GroupName_3644"] = "Munición #009",
    ["DictKey_UnitName_4833"] = "",
    ["DictKey_WptName_866"] = "",
    ["DictKey_WptName_2709"] = "",
    ["DictKey_UnitName_3417"] = "Tanque de combustible",
    ["DictKey_WptName_2346"] = "",
    ["DictKey_WptName_3478"] = "",
    ["DictKey_UnitName_767"] = "New Static Object #009",
    ["DictKey_UnitName_3857"] = "Refinery #098",
    ["DictKey_WptName_3906"] = "",
    ["DictKey_UnitName_3393"] = "Tanque de combustible #003",
    ["DictKey_WptName_3187"] = "",
    ["DictKey_WptName_1595"] = "",
    ["DictKey_UnitName_466"] = " #050",
    ["DictKey_UnitName_5151"] = "Combat Training F5E  Instructor",
    ["DictKey_WptName_5346"] = "",
    ["DictKey_WptName_3999"] = "",
    ["DictKey_GroupName_1420"] = "New Airplane Group #010",
    ["DictKey_UnitName_4894"] = "",
    ["DictKey_WptName_5341"] = "",
    ["DictKey_UnitName_2828"] = "Oil tower",
    ["DictKey_GroupName_2449"] = "Refinery #072",
    ["DictKey_WptName_1267"] = "",
    ["DictKey_GroupName_4412"] = "F-14 Carrier CAP #003",
    ["DictKey_UnitName_4937"] = "",
    ["DictKey_GroupName_3446"] = "Tanque de combustible #005",
    ["DictKey_GroupName_3521"] = "Tanque de combustible #033",
    ["DictKey_UnitName_2998"] = " #076",
    ["DictKey_WptName_3310"] = "",
    ["DictKey_UnitName_2222"] = "Plant #001",
    ["DictKey_WptName_3394"] = "",
    ["DictKey_UnitName_3510"] = "Refinery #077",
    ["DictKey_UnitName_1379"] = "Pilot #004",
    ["DictKey_WptName_3400"] = "",
    ["DictKey_UnitName_1576"] = "Refinery",
    ["DictKey_UnitName_5465"] = "11 #002",
    ["DictKey_UnitName_991"] = "Unit #120",
    ["DictKey_GroupName_4801"] = "",
    ["DictKey_GroupName_826"] = " #052",
    ["DictKey_WptName_2929"] = "",
    ["DictKey_WptName_1601"] = "",
    ["DictKey_UnitName_2915"] = "Unidad #034",
    ["DictKey_GroupName_3392"] = "Tanque de combustible #003",
    ["DictKey_UnitName_3042"] = "Plant #016",
    ["DictKey_WptName_2790"] = "",
    ["DictKey_GroupName_1665"] = "Refinery #029",
    ["DictKey_UnitName_4997"] = "Unit #302",
    ["DictKey_UnitName_3807"] = "Unidad #056",
    ["DictKey_GroupName_2353"] = "Refinery #063",
    ["DictKey_GroupName_5084"] = "JTAC7",
    ["DictKey_UnitName_4998"] = "Unit #303",
    ["DictKey_UnitName_3875"] = "Chevy 1-4",
    ["DictKey_UnitName_150"] = "Unit #092",
    ["DictKey_UnitName_4012"] = " #058",
    ["DictKey_GroupName_5080"] = "JTAC6",
    ["DictKey_WptName_5273"] = "",
    ["DictKey_UnitName_1473"] = "Unit #095",
    ["DictKey_UnitName_3168"] = "Refinery #077",
    ["DictKey_WptName_3337"] = "",
    ["DictKey_WptName_2583"] = "",
    ["DictKey_WptName_3301"] = "",
    ["DictKey_WptName_792"] = "",
    ["DictKey_WptName_1406"] = "",
    ["DictKey_UnitName_4100"] = "Springfield 1-2",
    ["DictKey_UnitName_4791"] = "",
    ["DictKey_WptName_1513"] = "",
    ["DictKey_WptName_550"] = "",
    ["DictKey_WptName_852"] = "",
    ["DictKey_WptName_4023"] = "",
    ["DictKey_GroupName_2990"] = "Uzi",
    ["DictKey_UnitName_2543"] = "Plant #036",
    ["DictKey_WptName_3892"] = "",
    ["DictKey_UnitName_3817"] = "",
    ["DictKey_WptName_4761"] = "",
    ["DictKey_UnitName_2005"] = "Plant #003",
    ["DictKey_WptName_3427"] = "",
    ["DictKey_WptName_3836"] = "",
    ["DictKey_WptName_4452"] = "",
    ["DictKey_UnitName_4641"] = "Unit #044",
    ["DictKey_GroupName_2897"] = "Weapons storage #002",
    ["DictKey_WptName_3806"] = "",
    ["DictKey_UnitName_2789"] = "Oil tower #005",
    ["DictKey_UnitName_1720"] = "Refinery #002",
    ["DictKey_WptName_4737"] = "",
    ["DictKey_UnitName_722"] = "Pilot #013",
    ["DictKey_GroupName_2734"] = "Oil tower",
    ["DictKey_WptName_551"] = "",
    ["DictKey_UnitName_4065"] = "Unidad #063",
    ["DictKey_GroupName_3859"] = "Refinery #112",
    ["DictKey_UnitName_4850"] = "",
    ["DictKey_WptName_1031"] = "",
    ["DictKey_WptName_2763"] = "",
    ["DictKey_UnitName_4321"] = "Piloto #006",
    ["DictKey_UnitName_5388"] = "",
    ["DictKey_WptName_4331"] = "",
    ["DictKey_UnitName_3618"] = "Weapons storage #007",
    ["DictKey_UnitName_4918"] = "",
    ["DictKey_UnitName_1639"] = "Refinery",
    ["DictKey_WptName_3574"] = "",
    ["DictKey_GroupName_574"] = "New Ship Group #011",
    ["DictKey_UnitName_363"] = "Unit #086",
    ["DictKey_UnitName_1690"] = "Refinery #003",
    ["DictKey_GroupName_1408"] = "New Airplane Group #007",
    ["DictKey_GroupName_2467"] = "Plant #035",
    ["DictKey_UnitName_2213"] = "Plant #005",
    ["DictKey_UnitName_988"] = "Unit #117",
    ["DictKey_WptName_3680"] = "",
    ["DictKey_UnitName_916"] = "Pilot #021",
    ["DictKey_GroupName_2022"] = "Plant #020",
    ["DictKey_UnitName_1355"] = "Unit #085",
    ["DictKey_GroupName_2924"] = "Rudan Conversion #001",
    ["DictKey_UnitName_2357"] = "Refinery #006",
    ["DictKey_WptName_786"] = "",
    ["DictKey_UnitName_2339"] = "Refinery",
    ["DictKey_ActionText_4629"] = "An USAF JTAC Predator drone is underway too Abu Musa Island\
N25.51.709 E54..03.000 ELEV: 7ft \
 JTAC5  Lasercode: 1660\
",
    ["DictKey_WptName_5448"] = "",
    ["DictKey_WptName_2349"] = "",
    ["DictKey_WptName_1835"] = "",
    ["DictKey_WptName_406"] = "",
    ["DictKey_GroupName_746"] = " #033",
    ["DictKey_UnitName_4167"] = "",
    ["DictKey_WptName_4491"] = "",
    ["DictKey_WptName_3121"] = "",
    ["DictKey_WptName_3397"] = "",
    ["DictKey_UnitName_1205"] = "Unit #017",
    ["DictKey_GroupName_1071"] = "Kish HAWK Site",
    ["DictKey_WptName_3646"] = "",
    ["DictKey_UnitName_66"] = "Unit #044",
    ["DictKey_GroupName_3380"] = "Tanque de combustible #009",
    ["DictKey_UnitName_1774"] = "Refinery #003",
    ["DictKey_GroupName_437"] = "SAM site 01 #002",
    ["DictKey_WptName_1438"] = "",
    ["DictKey_UnitName_4657"] = "Unit #129",
    ["DictKey_UnitName_4329"] = "Pilot #008",
    ["DictKey_GroupName_4165"] = "",
    ["DictKey_UnitName_3839"] = " #087",
    ["DictKey_WptName_3619"] = "",
    ["DictKey_WptName_2093"] = "",
    ["DictKey_UnitName_4731"] = "Unit #275",
    ["DictKey_UnitName_4488"] = "Springfield 1-3",
    ["DictKey_UnitName_1336"] = "Unit #064",
    ["DictKey_UnitName_4967"] = "",
    ["DictKey_WptName_670"] = "",
    ["DictKey_UnitName_104"] = "Kuznetsov",
    ["DictKey_WptName_2181"] = "",
    ["DictKey_WptName_4341"] = "",
    ["DictKey_UnitName_4699"] = "Unit #186",
    ["DictKey_WptName_3779"] = "",
    ["DictKey_UnitName_3603"] = "Tanque de combustible #030",
    ["DictKey_WptName_676"] = "",
    ["DictKey_UnitName_688"] = "Pilot #001",
    ["DictKey_UnitName_1076"] = "Unit #056",
    ["DictKey_UnitName_4159"] = "Piloto #035",
    ["DictKey_GroupName_2620"] = "Plant #092",
    ["DictKey_GroupName_4307"] = "F-16 Al Dhafra AB",
    ["DictKey_UnitName_3573"] = "Tanque de combustible #030",
    ["DictKey_WptName_2069"] = "",
    ["DictKey_WptName_5112"] = "AA TGT",
    ["DictKey_WptName_2436"] = "",
    ["DictKey_WptName_372"] = "",
    ["DictKey_UnitName_5466"] = "12 #002",
    ["DictKey_ActionText_5423"] = "if Group.getByName('Rescue') == nil then\
return true\
else\
return false\
end",
    ["DictKey_GroupName_784"] = " #037",
    ["DictKey_WptName_2856"] = "",
    ["DictKey_UnitName_3838"] = "Unit #012",
    ["DictKey_UnitName_4067"] = "Unidad #065",
    ["DictKey_UnitName_4811"] = "",
    ["DictKey_WptName_949"] = "",
    ["DictKey_WptName_2057"] = "",
    ["DictKey_UnitName_518"] = " #010",
    ["DictKey_GroupName_1157"] = "SAM site 01 #010",
    ["DictKey_UnitName_5016"] = "Unit #319",
    ["DictKey_UnitName_1081"] = "Unit #176",
    ["DictKey_UnitName_734"] = " #015",
    ["DictKey_UnitName_1237"] = "Unit #154",
    ["DictKey_UnitName_4707"] = "Unit #199",
    ["DictKey_UnitName_1345"] = "Unit #077",
    ["DictKey_UnitName_1037"] = "Unit #171",
    ["DictKey_WptName_5200"] = "",
    ["DictKey_WptName_5223"] = "",
    ["DictKey_WptName_735"] = "",
    ["DictKey_GroupName_4449"] = "MiG-29 Havadarya Island CAP #003",
    ["DictKey_WptName_5458"] = "",
    ["DictKey_WptName_3671"] = "",
    ["DictKey_WptName_627"] = "",
    ["DictKey_WptName_1571"] = "",
    ["DictKey_UnitName_4681"] = "Unit #163",
    ["DictKey_WptName_4555"] = "",
    ["DictKey_UnitName_4224"] = "",
    ["DictKey_UnitName_4068"] = "Unidad #066",
    ["DictKey_GroupName_3035"] = "Plant #021",
    ["DictKey_GroupName_2311"] = "Refinery #005",
    ["DictKey_UnitName_4070"] = "Unidad #067",
    ["DictKey_UnitName_746"] = "New Static Object #001",
    ["DictKey_UnitName_2420"] = "Refinery #006",
    ["DictKey_UnitName_377"] = " #054",
    ["DictKey_UnitName_4276"] = "",
    ["DictKey_GroupName_2395"] = "Refinery #055",
    ["DictKey_UnitName_909"] = "Unit #222",
    ["DictKey_UnitName_2408"] = "Refinery #002",
    ["DictKey_UnitName_3970"] = "JTAC4",
    ["DictKey_GroupName_505"] = "FARP Moscow",
    ["DictKey_WptName_1925"] = "",
    ["DictKey_UnitName_781"] = " #043",
    ["DictKey_UnitName_3918"] = "Unit #106",
    ["DictKey_UnitName_4864"] = "",
    ["DictKey_WptName_3828"] = "",
    ["DictKey_WptName_5143"] = "",
    ["DictKey_UnitName_1888"] = "Oil tower #004",
    ["DictKey_UnitName_950"] = "Unit #229",
    ["DictKey_UnitName_4754"] = "",
    ["DictKey_WptName_2268"] = "",
    ["DictKey_GroupName_4115"] = "F-14A Havadarya Intercept",
    ["DictKey_UnitName_4790"] = "",
    ["DictKey_GroupName_276"] = "SAM site 01 #006",
    ["DictKey_UnitName_3794"] = "Unidad #049",
    ["DictKey_GroupName_3129"] = "Nuevo objeto estático #002",
    ["DictKey_UnitName_613"] = " #061",
    ["DictKey_GroupName_1563"] = "Refinery #009",
    ["DictKey_WptName_2673"] = "",
    ["DictKey_WptName_867"] = "",
    ["DictKey_UnitName_974"] = "Unit #241",
    ["DictKey_UnitName_3745"] = "Munición #005",
    ["DictKey_WptName_3661"] = "",
    ["DictKey_GroupName_1014"] = " #023",
    ["DictKey_GroupName_3144"] = "Nuevo objeto estático #007",
    ["DictKey_WptName_5314"] = "",
    ["DictKey_UnitName_512"] = " #009",
    ["DictKey_WptName_3893"] = "",
    ["DictKey_UnitName_753"] = " #019",
    ["DictKey_WptName_4326"] = "",
    ["DictKey_UnitName_4715"] = "Unit #212",
    ["DictKey_WptName_2787"] = "",
    ["DictKey_GroupName_1647"] = "Refinery #023",
    ["DictKey_WptName_5117"] = "AG RANGE",
    ["DictKey_WptName_3780"] = "",
    ["DictKey_WptName_2277"] = "",
    ["DictKey_UnitName_4988"] = "Unit #295",
    ["DictKey_WptName_646"] = "",
    ["DictKey_GroupName_4874"] = "moved Qum HAWK #006",
    ["DictKey_UnitName_4694"] = "Unit #181",
    ["DictKey_GroupName_2398"] = "Refinery #056",
    ["DictKey_WptName_2550"] = "",
    ["DictKey_UnitName_407"] = "Unit #136",
    ["DictKey_GroupName_447"] = "",
    ["DictKey_GroupName_3972"] = "JTAC5",
    ["DictKey_GroupName_2900"] = "",
    ["DictKey_GroupName_1701"] = "Refinery",
    ["DictKey_WptName_654"] = "",
    ["DictKey_GroupName_196"] = "Ford",
    ["DictKey_GroupName_3518"] = "Tanque de combustible #032",
    ["DictKey_GroupName_2731"] = "Oil tower",
    ["DictKey_UnitName_4953"] = "",
    ["DictKey_GroupName_3470"] = "Tanque de combustible #022",
    ["DictKey_GroupName_2359"] = "Refinery",
    ["DictKey_UnitName_5029"] = "Unit #330",
    ["DictKey_ActionText_4632"] = "",
    ["DictKey_UnitName_996"] = "",
    ["DictKey_GroupName_2281"] = "Refinery #002",
    ["DictKey_WptName_4306"] = "",
    ["DictKey_UnitName_4778"] = "",
    ["DictKey_UnitName_4946"] = "",
    ["DictKey_WptName_5311"] = "",
    ["DictKey_WptName_494"] = "",
    ["DictKey_UnitName_205"] = "",
    ["DictKey_UnitName_1915"] = "Oil tower #001",
    ["DictKey_UnitName_4884"] = "Unit #288",
    ["DictKey_GroupName_736"] = "New Static Object #006",
    ["DictKey_WptName_29"] = "",
    ["DictKey_WptName_2166"] = "",
    ["DictKey_GroupName_2752"] = "Oil tower #041",
    ["DictKey_UnitName_3579"] = "Tanque de combustible #032",
    ["DictKey_WptName_2247"] = "",
    ["DictKey_WptName_1760"] = "",
    ["DictKey_WptName_5310"] = "",
    ["DictKey_WptName_3707"] = "",
    ["DictKey_WptName_509"] = "",
    ["DictKey_WptName_3526"] = "",
    ["DictKey_GroupName_1725"] = "Refinery #006",
    ["DictKey_GroupName_4298"] = "F-16 Al Dhafra AB #001",
    ["DictKey_GroupName_5150"] = "Combat Training F5E  Instructor",
    ["DictKey_UnitName_2874"] = " #074",
    ["DictKey_UnitName_2399"] = "Refinery #006",
    ["DictKey_UnitName_116"] = "Unit #074",
    ["DictKey_WptName_614"] = "",
    ["DictKey_UnitName_4322"] = "Piloto #007",
    ["DictKey_WptName_5231"] = "",
    ["DictKey_UnitName_736"] = " #015",
    ["DictKey_UnitName_3219"] = "Refinery #078",
    ["DictKey_UnitName_2381"] = "Refinery",
    ["DictKey_GroupName_967"] = "SAM site 01 #036",
    ["DictKey_UnitName_2880"] = "",
    ["DictKey_UnitName_2128"] = "Unidad #022",
    ["DictKey_WptName_5312"] = "",
    ["DictKey_UnitName_3390"] = "Tanque de combustible #001",
    ["DictKey_UnitName_1268"] = "",
    ["DictKey_WptName_923"] = "",
    ["DictKey_UnitName_540"] = " #013",
    ["DictKey_WptName_2884"] = "",
    ["DictKey_GroupName_1402"] = "New Airplane Group #006",
    ["DictKey_UnitName_4805"] = "",
    ["DictKey_UnitName_1000"] = "",
    ["DictKey_GroupName_3542"] = "Tanque de combustible #037",
    ["DictKey_GroupName_673"] = "",
    ["DictKey_UnitName_4913"] = "",
    ["DictKey_UnitName_4222"] = "",
    ["DictKey_WptName_1715"] = "",
    ["DictKey_GroupName_2031"] = "Plant #023",
    ["DictKey_UnitName_4256"] = "",
    ["DictKey_UnitName_549"] = "Unit #165",
    ["DictKey_WptName_870"] = "",
    ["DictKey_WptName_2157"] = "",
    ["DictKey_UnitName_4300"] = "F-16 Al Dhafra AB #005",
    ["DictKey_WptName_2520"] = "",
    ["DictKey_WptName_3974"] = "",
    ["DictKey_WptName_1874"] = "",
    ["DictKey_UnitName_4243"] = "",
    ["DictKey_WptName_801"] = "",
    ["DictKey_GroupName_5108"] = "Combat Training C101EB",
    ["DictKey_GroupName_3765"] = "Munición #002",
    ["DictKey_UnitName_4832"] = "",
    ["DictKey_WptName_4592"] = "",
    ["DictKey_UnitName_1804"] = "Refinery #002",
    ["DictKey_UnitName_3201"] = "Refinery #077",
    ["DictKey_UnitName_282"] = "Unit #055",
    ["DictKey_ActionRadioText_5408"] = "Spawn AI SEAD package (Island Strike)",
    ["DictKey_WptName_4834"] = "",
    ["DictKey_UnitName_3444"] = "Tanque de combustible #004",
    ["DictKey_WptName_5460"] = "",
    ["DictKey_UnitName_5493"] = "Unit #037",
    ["DictKey_GroupName_2058"] = "Plant #004",
} -- end of dictionary
