Skip to content
Beta: this is a preview of the new SplitScreen.Me. Data may be reset before launch.

Call of Duty: Modern Warfare 2 · handler “Modern Warfare 2 Multiplayer”

Version 14

Release notes

Match restarts automatically when connecting to dedicated server. When restarting a match, bots are automatically added.

Released
Size
16.7 MB
Downloads
1,641
Check
Verified
SHA-256
ed321328b01a6ff80011e20df4f4b770c759565623fec9441b660df2e61291f7
Download v14 (.nc)All versions

Files 291

PathSize
handler/CoD profile.cfg590 B
handler/d3d9.dll8.1 MB
handler/d3d9.ini4.3 KB
handler/Dedicated Server/DedicatedLobbyServer.bat5.3 KB
handler/Dedicated Server/DedicatedLobbyServerLAN.bat5.3 KB
handler/Dedicated Server/DedicatedServer.bat2.9 KB
handler/Dedicated Server/DedicatedServerLAN.bat3.0 KB
handler/F2 Guest.au31.3 KB
handler/F2 Guest.exe894 KB
handler/F2 Host.au31.1 KB
handler/F2 Host.exe894 KB
handler/F3 Restart.au3337 B
handler/F3 Restart.exe894 KB
handler/FPS_Unlock.txt65 B
handler/JoyToKey.exe2.0 MB
handler/JoyToKey.ini1.2 KB
handler/JoyToKey.log2.9 KB
handler/Local IP.txt20 B
handler/mods/bots/bots.txt355 B
handler/mods/bots/demos/auto_1700410148.dm_13.json105 B
handler/mods/bots/demos/auto_1700433982.dm_13304 KB
handler/mods/bots/demos/auto_1700438157.dm_13212 KB
handler/mods/bots/demos/auto_1700438157.dm_13.json101 B
handler/mods/bots/demos/auto_1700438234.dm_13280 KB
handler/mods/bots/demos/auto_1700438758.dm_13252 KB
handler/mods/bots/demos/auto_1700439266.dm_13440 KB
handler/mods/bots/demos/auto_1700439973.dm_13244 KB
handler/mods/bots/demos/auto_1700440251.dm_131.0 MB
handler/mods/bots/demos/auto_1700441262.dm_13404 KB
handler/mods/bots/demos/auto_1700441604.dm_13188 KB
handler/mods/bots/demos/auto_1700441605.dm_13192 KB
handler/mods/bots/demos/auto_1700443153.dm_131.3 MB
handler/mods/bots/demos/auto_1700523109.dm_1368 KB
handler/mods/bots/demos/auto_1700609111.dm_13240 KB
handler/mods/bots/demos/auto_1700609113.dm_13236 KB
handler/mods/bots/demos/auto_1700609387.dm_13316 KB
handler/mods/bots/demos/auto_1700609388.dm_13316 KB
handler/mods/bots/demos/auto_1700610046.dm_13132 KB
handler/mods/bots/demos/auto_1700610048.dm_13132 KB
handler/mods/bots/demos/auto_1700610420.dm_13100 KB
handler/mods/bots/demos/auto_1700610422.dm_13100 KB
handler/mods/bots/demos/auto_1700610601.dm_13104 KB
handler/mods/bots/demos/auto_1700610603.dm_13100 KB
handler/mods/bots/demos/auto_1700610831.dm_13160 KB
handler/mods/bots/demos/auto_1700610832.dm_13164 KB
handler/mods/bots/demos/auto_1701164186.dm_13242 KB
handler/mods/bots/demos/auto_1701164186.dm_13.json100 B
handler/mods/bots/demos/auto_1701164243.dm_13303 KB
handler/mods/bots/demos/auto_1701164243.dm_13.json100 B
handler/mods/bots/demos/auto_1701164327.dm_13256 KB
handler/mods/bots/demos/auto_1701164603.dm_13612 KB
handler/mods/bots/demos/auto_1701165046.dm_13232 KB
handler/mods/bots/demos/auto_1701165265.dm_131.7 MB
handler/mods/bots/demos/auto_1701165266.dm_131.7 MB
handler/mods/bots/logs/console_mp.log33 KB
handler/mods/bots/logs/console_mp.log.00018 KB
handler/mods/bots/logs/console_mp.log.00112 KB
handler/mods/bots/logs/console_mp.log.00216 KB
handler/mods/bots/logs/console_mp.log.00318 KB
handler/mods/bots/logs/console_mp.log.00419 KB
handler/mods/bots/logs/console_mp.log.00516 KB
handler/mods/bots/logs/console_mp.log.00616 KB
handler/mods/bots/logs/console_mp.log.00716 KB
handler/mods/bots/logs/console_mp.log.00841 KB
handler/mods/bots/logs/console_mp.log.00911 KB
handler/mods/bots/logs/console_mp.log.01030 KB
handler/mods/bots/logs/console_mp.log.01127 KB
handler/mods/bots/logs/console_mp.log.01216 KB
handler/mods/bots/logs/console_mp.log.01316 KB
handler/mods/bots/logs/console_mp.log.01414 KB
handler/mods/bots/logs/console_mp.log.01514 KB
handler/mods/bots/logs/console_mp.log.01616 KB
handler/mods/bots/logs/console_mp.log.01717 KB
handler/mods/bots/logs/console_mp.log.01817 KB
handler/mods/bots/logs/console_mp.log.01917 KB
handler/mods/bots/logs/localgame_mp.log832 KB
handler/mods/bots/maps/iw4_credits.d3dbsp.ents12 KB
handler/mods/bots/maps/mp/bots/waypoints/_custom_map.gsc99 KB
handler/mods/bots/maps/mp/bots/_bot.gsc23 KB
handler/mods/bots/maps/mp/bots/_bot_chat.gsc58 KB
handler/mods/bots/maps/mp/bots/_bot_http.gsc356 B
handler/mods/bots/maps/mp/bots/_bot_internal.gsc61 KB
handler/mods/bots/maps/mp/bots/_bot_script.gsc162 KB
handler/mods/bots/maps/mp/bots/_bot_utility.gsc59 KB
handler/mods/bots/maps/mp/bots/_menu.gsc29 KB
handler/mods/bots/maps/mp/bots/_wp_editor.gsc20 KB
handler/mods/bots/maps/mp/gametypes/dd.gsc30 KB
handler/mods/bots/maps/mp/gametypes/vip.gsc11 KB
handler/mods/bots/maps/mp/gametypes/_class.gsc43 KB
handler/mods/bots/maps/mp/gametypes/_damage.gsc74 KB
handler/mods/bots/maps/mp/gametypes/_gamelogic.gsc78 KB
handler/mods/bots/maps/mp/gametypes/_killcam.gsc15 KB
handler/mods/bots/maps/mp/gametypes/_menus.gsc16 KB
handler/mods/bots/maps/mp/gametypes/_persistence.gsc5.3 KB
handler/mods/bots/maps/mp/gametypes/_rank.gsc16 KB
handler/mods/bots/maps/mp/gametypes/_spawnlogic.gsc51 KB
handler/mods/bots/maps/mp/gametypes/_weapons.gsc76 KB
handler/mods/bots/maps/mp/killstreaks/_ac130.gsc54 KB
handler/mods/bots/maps/mp/killstreaks/_airdrop.gsc42 KB
handler/mods/bots/maps/mp/killstreaks/_airstrike.gsc34 KB
handler/mods/bots/maps/mp/killstreaks/_autosentry.gsc16 KB
handler/mods/bots/maps/mp/killstreaks/_emp.gsc11 KB
handler/mods/bots/maps/mp/killstreaks/_harrier.gsc28 KB
handler/mods/bots/maps/mp/killstreaks/_helicopter.gsc59 KB
handler/mods/bots/maps/mp/killstreaks/_killstreaks.gsc41 KB
handler/mods/bots/maps/mp/killstreaks/_nuke.gsc15 KB
handler/mods/bots/maps/mp/killstreaks/_uav.gsc15 KB
handler/mods/bots/maps/mp/mp_afghan.gsc655 B
handler/mods/bots/maps/mp/mp_derail.gsc610 B
handler/mods/bots/maps/mp/mp_nuked.d3dbsp.ents125 KB
handler/mods/bots/maps/mp/mp_rust.gsc451 B
handler/mods/bots/maps/mp/perks/_perkfunctions.gsc23 KB
handler/mods/bots/maps/mp/perks/_perks.gsc14 KB
handler/mods/bots/maps/mp/_stinger.gsc8.0 KB
handler/mods/bots/maps/mp/_utility.gsc59 KB
handler/mods/bots/scripts/bots.gsc56 B
handler/mods/bots/scripts/bots_chat.gsc61 B
handler/mods/bots/scripts/bots_menu.gsc57 B
handler/mods/bots/scripts/bots_pvb.gsc3.6 KB
handler/mods/bots/scripts/bots_sniper_loadout.gsc2.0 KB
handler/mods/bots/scripts/bots_test.gsc518 B
handler/mods/bots/scripts/bots_wp_editor.gsc62 B
handler/mods/bots/scripts/FPSBooster.gsc1.6 KB
handler/mods/bots/scripts/mp/co_hunted/hunted.gsc18 KB
handler/mods/bots/scripts/mp/mp_abandon/carnival.gsc43 KB
handler/mods/bots/scripts/mp/mp_abandon/wps_abandon.gsc43 KB
handler/mods/bots/scripts/mp/mp_afghan/afghan.gsc32 KB
handler/mods/bots/scripts/mp/mp_afghan/wps_afghan.gsc32 KB
handler/mods/bots/scripts/mp/mp_aground_ss/wps_aground.gsc61 KB
handler/mods/bots/scripts/mp/mp_alpha/lockdown.gsc72 KB
handler/mods/bots/scripts/mp/mp_alpha/wps_lockdown.gsc72 KB
handler/mods/bots/scripts/mp/mp_backlot/backlot.gsc49 KB
handler/mods/bots/scripts/mp/mp_backlot_sh/wps_backlot.gsc46 KB
handler/mods/bots/scripts/mp/mp_bloc/bloc.gsc70 KB
handler/mods/bots/scripts/mp/mp_bloc_sh/bloc.gsc70 KB
handler/mods/bots/scripts/mp/mp_boardwalk/wps_boardwalk.gsc60 KB
handler/mods/bots/scripts/mp/mp_bog_sh/bog.gsc41 KB
handler/mods/bots/scripts/mp/mp_bog_sh/wps_bog.gsc41 KB
handler/mods/bots/scripts/mp/mp_boneyard/scrapyard.gsc40 KB
handler/mods/bots/scripts/mp/mp_boneyard/wps_scrapyard.gsc40 KB
handler/mods/bots/scripts/mp/mp_bootleg/wps_bootleg.gsc67 KB
handler/mods/bots/scripts/mp/mp_bravo/mission.gsc70 KB
handler/mods/bots/scripts/mp/mp_bravo/wps_mission.gsc70 KB
handler/mods/bots/scripts/mp/mp_brecourt/wasteland.gsc53 KB
handler/mods/bots/scripts/mp/mp_brecourt/wps_wasteland.gsc53 KB
handler/mods/bots/scripts/mp/mp_broadcast/broadcast.gsc94 KB
handler/mods/bots/scripts/mp/mp_broadcast/wps_broadcast.gsc80 KB
handler/mods/bots/scripts/mp/mp_burn_ss/wps_uturn.gsc51 KB
handler/mods/bots/scripts/mp/mp_carbon/wps_carbon.gsc91 KB
handler/mods/bots/scripts/mp/mp_carentan/chinatown.gsc96 KB
handler/mods/bots/scripts/mp/mp_cargoship/wetwork.gsc63 KB
handler/mods/bots/scripts/mp/mp_cargoship/wps_wetwork.gsc63 KB
handler/mods/bots/scripts/mp/mp_cargoship_sh/wetwork.gsc63 KB
handler/mods/bots/scripts/mp/mp_cargoship_sh/wps_wetwork.gsc63 KB
handler/mods/bots/scripts/mp/mp_cement/wps_foundation.gsc70 KB
handler/mods/bots/scripts/mp/mp_checkpoint/karachi.gsc46 KB
handler/mods/bots/scripts/mp/mp_checkpoint/wps_karachi.gsc46 KB
handler/mods/bots/scripts/mp/mp_citystreets/district.gsc67 KB
handler/mods/bots/scripts/mp/mp_citystreets/wps_district.gsc57 KB
handler/mods/bots/scripts/mp/mp_compact/salvage.gsc57 KB
handler/mods/bots/scripts/mp/mp_complex/bailout.gsc68 KB
handler/mods/bots/scripts/mp/mp_complex/wps_bailout.gsc68 KB
handler/mods/bots/scripts/mp/mp_convoy/ambush.gsc78 KB
handler/mods/bots/scripts/mp/mp_convoy/wps_ambush.gsc67 KB
handler/mods/bots/scripts/mp/mp_countdown/countdown.gsc69 KB
handler/mods/bots/scripts/mp/mp_countdown/wps_countdown.gsc59 KB
handler/mods/bots/scripts/mp/mp_courtyard_ss/wps_erosion.gsc40 KB
handler/mods/bots/scripts/mp/mp_crash/crash.gsc62 KB
handler/mods/bots/scripts/mp/mp_crash/wps_crash.gsc62 KB
handler/mods/bots/scripts/mp/mp_crash_snow/crash.gsc62 KB
handler/mods/bots/scripts/mp/mp_crash_tropical/crash.gsc62 KB
handler/mods/bots/scripts/mp/mp_creek/wps_creek.gsc86 KB
handler/mods/bots/scripts/mp/mp_crosswalk_ss/wps_intersection.gsc47 KB
handler/mods/bots/scripts/mp/mp_cross_fire/crossfire.gsc85 KB
handler/mods/bots/scripts/mp/mp_cross_fire/wps_crossfire.gsc85 KB
handler/mods/bots/scripts/mp/mp_derail/derail.gsc80 KB
handler/mods/bots/scripts/mp/mp_derail/wps_derail.gsc80 KB
handler/mods/bots/scripts/mp/mp_dome/dome.gsc63 KB
handler/mods/bots/scripts/mp/mp_dome/wps_dome.gsc63 KB
handler/mods/bots/scripts/mp/mp_estate/estate.gsc61 KB
handler/mods/bots/scripts/mp/mp_estate/wps_estate.gsc61 KB
handler/mods/bots/scripts/mp/mp_estate_tropical/estate.gsc61 KB
handler/mods/bots/scripts/mp/mp_exchange/wps_downturn.gsc68 KB
handler/mods/bots/scripts/mp/mp_farm/downpour.gsc84 KB
handler/mods/bots/scripts/mp/mp_farm/wps_downpour.gsc71 KB
handler/mods/bots/scripts/mp/mp_favela/favela.gsc50 KB
handler/mods/bots/scripts/mp/mp_favela/wps_favela.gsc118 KB
handler/mods/bots/scripts/mp/mp_fav_tropical/favela.gsc50 KB
handler/mods/bots/scripts/mp/mp_firingrange/firingrange.gsc66 KB
handler/mods/bots/scripts/mp/mp_firingrange/wps_firingrange.gsc66 KB
handler/mods/bots/scripts/mp/mp_fuel2/fuel.gsc74 KB
handler/mods/bots/scripts/mp/mp_hardhat/hardhat.gsc60 KB
handler/mods/bots/scripts/mp/mp_hardhat/wps_hardhat.gsc60 KB
handler/mods/bots/scripts/mp/mp_highrise/highrise.gsc65 KB
handler/mods/bots/scripts/mp/mp_highrise/wps_highrise.gsc67 KB
handler/mods/bots/scripts/mp/mp_hillside_ss/wps_getaway.gsc50 KB
handler/mods/bots/scripts/mp/mp_interchange/wps_interchange.gsc69 KB
handler/mods/bots/scripts/mp/mp_invasion/invasion.gsc59 KB
handler/mods/bots/scripts/mp/mp_invasion/wps_invasion.gsc59 KB
handler/mods/bots/scripts/mp/mp_italy/wps_piazza.gsc69 KB
handler/mods/bots/scripts/mp/mp_killhouse/killhouse.gsc32 KB
handler/mods/bots/scripts/mp/mp_killhouse/wps_killhouse.gsc32 KB
handler/mods/bots/scripts/mp/mp_lambeth/wps_fallen.gsc86 KB
handler/mods/bots/scripts/mp/mp_meteora/wps_sanctuary.gsc96 KB
handler/mods/bots/scripts/mp/mp_moab/wps_gulch.gsc51 KB
handler/mods/bots/scripts/mp/mp_mogadishu/wps_bakaara.gsc121 KB
handler/mods/bots/scripts/mp/mp_morningwood/wps_blackbox.gsc111 KB
handler/mods/bots/scripts/mp/mp_nightshift/skidrow.gsc63 KB
handler/mods/bots/scripts/mp/mp_nightshift/wps_skidrow.gsc63 KB
handler/mods/bots/scripts/mp/mp_nola/wps_parish.gsc40 KB
handler/mods/bots/scripts/mp/mp_nuked/nuketown.gsc53 KB
handler/mods/bots/scripts/mp/mp_nuked/wps_nuketown.gsc80 KB
handler/mods/bots/scripts/mp/mp_overgrown/overgrown.gsc81 KB
handler/mods/bots/scripts/mp/mp_overgrown/wps_overgrown.gsc81 KB
handler/mods/bots/scripts/mp/mp_overwatch/wps_overwatch.gsc95 KB
handler/mods/bots/scripts/mp/mp_paris/resistance.gsc82 KB
handler/mods/bots/scripts/mp/mp_paris/wps_resistance.gsc82 KB
handler/mods/bots/scripts/mp/mp_park/wps_liberation.gsc121 KB
handler/mods/bots/scripts/mp/mp_pipeline/pipeline.gsc101 KB
handler/mods/bots/scripts/mp/mp_pipeline/wps_pipeline.gsc86 KB
handler/mods/bots/scripts/mp/mp_plaza2/arkaden.gsc106 KB
handler/mods/bots/scripts/mp/mp_plaza2/wps_arkaden.gsc106 KB
handler/mods/bots/scripts/mp/mp_poolday/mp_poolday_waypoints.gsc129 KB
handler/mods/bots/scripts/mp/mp_poolday_reunion/mp_poolday_reunion_waypoints.gsc32 KB
handler/mods/bots/scripts/mp/mp_poolparty/mp_poolparty_waypoints.gsc57 KB
handler/mods/bots/scripts/mp/mp_qadeem/wps_oasis.gsc53 KB
handler/mods/bots/scripts/mp/mp_quarry/quarry.gsc46 KB
handler/mods/bots/scripts/mp/mp_radar/wps_outpost.gsc78 KB
handler/mods/bots/scripts/mp/mp_radiation_sh/wps_radiation_sh.gsc93 KB
handler/mods/bots/scripts/mp/mp_raid/wps_raid.gsc76 KB
handler/mods/bots/scripts/mp/mp_restrepo_ss/wps_lookout.gsc37 KB
handler/mods/bots/scripts/mp/mp_roughneck/wps_offshore.gsc61 KB
handler/mods/bots/scripts/mp/mp_rundown/rundown.gsc58 KB
handler/mods/bots/scripts/mp/mp_rundown/wps_rundown.gsc58 KB
handler/mods/bots/scripts/mp/mp_rust/rust.gsc54 KB
handler/mods/bots/scripts/mp/mp_rust/wps_rust.gsc55 KB
handler/mods/bots/scripts/mp/mp_rust_long/rustlong.gsc36 KB
handler/mods/bots/scripts/mp/mp_rust_long/wps_rust_long.gsc36 KB
handler/mods/bots/scripts/mp/mp_seatown/seatown.gsc109 KB
handler/mods/bots/scripts/mp/mp_seatown/wps_seatown.gsc109 KB
handler/mods/bots/scripts/mp/mp_shipbreaker/wps_decommission.gsc49 KB
handler/mods/bots/scripts/mp/mp_shipment/shipment.gsc15 KB
handler/mods/bots/scripts/mp/mp_shipment/wps_shipment.gsc25 KB
handler/mods/bots/scripts/mp/mp_shipmentlong/wps_shipmentlong.gsc26 KB
handler/mods/bots/scripts/mp/mp_shipment_long/shipmentlong.gsc26 KB
handler/mods/bots/scripts/mp/mp_showdown/showdown.gsc36 KB
handler/mods/bots/scripts/mp/mp_showdown/wps_showdown.gsc30 KB
handler/mods/bots/scripts/mp/mp_showdown_sh/wps_showdown.gsc30 KB
handler/mods/bots/scripts/mp/mp_six_ss/wps_vortex.gsc34 KB
handler/mods/bots/scripts/mp/mp_storm/storm.gsc82 KB
handler/mods/bots/scripts/mp/mp_storm/wps_storm.gsc82 KB
handler/mods/bots/scripts/mp/mp_storm_spring/storm.gsc82 KB
handler/mods/bots/scripts/mp/mp_strike/strike.gsc94 KB
handler/mods/bots/scripts/mp/mp_strike_sh/wps_strike.gsc94 KB
handler/mods/bots/scripts/mp/mp_subbase/subbase.gsc53 KB
handler/mods/bots/scripts/mp/mp_subbase/wps_subbase.gsc53 KB
handler/mods/bots/scripts/mp/mp_summit/wps_summit.gsc77 KB
handler/mods/bots/scripts/mp/mp_terminal/terminal.gsc66 KB
handler/mods/bots/scripts/mp/mp_terminal_cls/wps_terminal.gsc67 KB
handler/mods/bots/scripts/mp/mp_test/wps_testmap.gsc8.1 KB
handler/mods/bots/scripts/mp/mp_trailerpark/trailerpark.gsc40 KB
handler/mods/bots/scripts/mp/mp_trailerpark/wps_trailerpark.gsc40 KB
handler/mods/bots/scripts/mp/mp_underground/underground.gsc71 KB
handler/mods/bots/scripts/mp/mp_underground/wps_underground.gsc71 KB
handler/mods/bots/scripts/mp/mp_underpass/underpass.gsc39 KB
handler/mods/bots/scripts/mp/mp_underpass/wps_underpass.gsc39 KB
handler/mods/bots/scripts/mp/mp_vacant/vacant.gsc39 KB
handler/mods/bots/scripts/mp/mp_vacant/wps_vacant.gsc39 KB
handler/mods/bots/scripts/mp/mp_village/village.gsc57 KB
handler/mods/bots/scripts/mp/mp_village/wps_village.gsc57 KB
handler/mods/bots/scripts/mp/oilrig/oilrig.gsc31 KB
handler/mods/bots/scripts/showHP.gsc1.4 KB
handler/mods/bots/scripts/spawnTest.gsc1.4 KB
handler/mods/bots/scripts/spectatorKick.gsc790 B
handler/mods/bots/scripts/tripleDom.gsc1.5 KB
handler/osd.ini4.6 KB
handler/Prompt.au31.2 KB
handler/Prompt.exe894 KB
handler/Prompt2.au3515 B
handler/Prompt2.exe894 KB
handler/Prompt3.au31.3 KB
handler/Prompt3.exe894 KB
handler/start.au31023 B
handler/start.exe894 KB
handler/userraw/LANPlaylist.info62 KB
handler/userraw/myplaylists.info53 KB
handler/userraw/partyserver.cfg12 KB
handler/userraw/partyserverlan.cfg12 KB
handler/userraw/server.cfg32 KB
handler/userraw/serverlan.cfg32 KB
handler.js53 KB

handler.js

Plain text
Hub.Handler.Version = 14; // Released at https://hub.splitscreen.me/ on Thu Nov 30 2023 12:26:04 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "esp2D3Wr49B3EBkbX";
Hub.Maintainer.Name = "Perserveruz";
Hub.Maintainer.Id = "nFAYvHKj75jAFRAgt";

var answers = ["Default", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"];
var answers1 = ["2", "1", "3", "4", "5", "6", "7", "8", "0"];
var answers2 = ["No", "Yes"];
var answers3 = ["Yes", "No"];
var answers4 = ["60", "45", "30", "0"];
var answers5 = ["Default", "Yes", "No"];
var answers6 = [
  "-",
  "1",
  "2",
  "3",
  "4",
  "5",
  "6",
  "7",
  "8",
  "9",
  "10",
  "11",
  "12",
  "13",
  "14",
  "15",
  "16",
  "17",
  "18",
  "19",
  "20",
  "21",
  "22",
  "23",
  "24",
  "25",
  "26",
  "27",
  "28",
  "29",
  "30",
  "31",
  "32",
  "33",
  "34",
  "35",
  "36",
  "37",
  "38",
  "39",
  "40",
  "41",
  "42",
  "43",
  "44",
  "45",
  "46",
  "47",
  "48",
  "49",
  "50",
  "51",
  "52",
  "53",
  "54",
  "55",
  "56",
  "57",
  "58",
  "59",
  "60",
  "61",
  "62",
  "63",
  "64",
  "65",
  "66",
  "67",
  "68",
  "69",
  "70",
  "71",
  "72",
  "73",
  "74",
  "75",
  "76",
  "77",
  "78",
  "79",
  "80",
  "81",
  "82",
  "83",
  "84",
  "85",
  "86",
  "87",
  "88",
  "89",
  "90",
  "91",
  "92",
  "93",
  "94",
  "95",
  "96",
  "97",
  "98",
  "99",
  "100",
  "101",
  "102",
  "103",
  "104",
  "105",
  "106",
  "107",
  "108",
  "109",
  "110",
  "111",
  "112",
  "113",
  "114",
  "115",
  "116",
  "117",
  "118",
  "119",
  "120",
  "121",
  "122",
  "123",
  "124",
  "125",
  "126",
  "127",
  "128",
  "129",
  "130",
  "131",
  "132",
  "133",
  "134",
  "135",
  "136",
  "137",
  "138",
  "139",
  "140",
  "141",
  "142",
  "143",
  "144",
  "145",
  "146",
  "147",
  "148",
  "149",
  "150",
  "151",
  "152",
  "153",
  "154",
  "155",
  "156",
  "157",
  "158",
  "159",
  "160",
  "161",
  "162",
  "163",
  "164",
  "165",
  "166",
  "167",
  "168",
  "169",
  "170",
  "171",
  "172",
  "173",
  "174",
  "175",
  "176",
  "177",
  "178",
  "179",
  "180",
  "181",
  "182",
  "183",
  "184",
  "185",
  "186",
  "187",
  "188",
  "189",
  "190",
  "191",
  "192",
  "193",
  "194",
  "195",
  "196",
  "197",
  "198",
  "199",
  "200"
];
var answers7 = ["Default", "Low", "Mid", "High", "Extra"];
var answers8 = [
  "mp_abandon",
  "mp_afghan",
  "mp_alpha",
  "mp_backlot",
  "mp_bloc",
  "mp_bloc_sh",
  "mp_bog_sh",
  "mp_boneyard",
  "mp_bravo",
  "mp_brecourt",
  "mp_broadcast",
  "mp_carentan",
  "mp_cargoship",
  "mp_cargoship_sh",
  "mp_checkpoint",
  "mp_citystreets",
  "mp_compact",
  "mp_complex",
  "mp_convoy",
  "mp_countdown",
  "mp_crash",
  "mp_crash_snow",
  "mp_crash_tropical",
  "mp_cross_fire",
  "mp_derail",
  "mp_dome",
  "mp_estate",
  "mp_estate_tropical",
  "mp_farm",
  "mp_favela",
  "mp_fav_tropical",
  "mp_firingrange",
  "mp_fuel2",
  "mp_hardhat",
  "mp_highrise",
  "mp_invasion",
  "mp_killhouse",
  "mp_nightshift",
  "mp_nuked",
  "mp_overgrown",
  "mp_paris",
  "mp_pipeline",
  "mp_plaza2",
  "mp_quarry",
  "mp_rundown",
  "mp_rust",
  "mp_rust_long",
  "mp_seatown",
  "mp_shipment",
  "mp_shipment_long",
  "mp_showdown",
  "mp_storm",
  "mp_storm_spring",
  "mp_strike",
  "mp_subbase",
  "mp_terminal",
  "mp_trailerpark",
  "mp_underground",
  "mp_underpass",
  "mp_vacant",
  "mp_village"
];
var answers9 = ["war", "dm", "dom", "koth", "sab", "sd", "arena", "dd", "ctf", "oneflag", "gtnw"];
var answers10 = ["Bots Mod", "None"];
Game.AddOption("Select Mod", "Select None if you wish to play on IW4x public servers without a LAN dedicated server", "Mod", answers10);
Game.AddOption(
  "Select Map",
  "abandon=carnival, alpha=lockdown, bloc_sh=forgotten city, boneyard=scrapyard, bravo=mission, brecourt=wasteland, carentan=chinatown, checkpoint=karachi, compact=salvage, complex=bailout, convoy=ambush, farm=downpour, nightshift=skidrow, plaza2=arkaden, storm_spring=chemical plant",
  "Map",
  answers8
);
Game.AddOption("Select Game Mode", "war=Team DM, dm=free for all, dom=domination, koth=headquarters, sab=sabotage, sd=search and destroy", "Mode", answers9);
Game.AddOption("Select the number of bots to be added", "Default will use the previous or default settings", "Bots", answers);
Game.AddOption("Select the bot skill level", "", "Skill", answers1);
Game.AddOption("Unlock all stats", "", "Unlock", answers2);
Game.AddOption("Choose your preferred graphic settings", "Default will use the previous or default settings", "Graphics", answers7);
Game.AddOption("Enable music only in the first instance?", "", "Mus", answers3);
Game.AddOption("For LAN and only for Guest PC, select the last 1-3 digits of the host IP", "", "lan", answers6);
Game.AddOption("Swap shoulder and trigger buttons (useful for Playstation controllers)", "Default will use the previous or default settings", "pscontrollers", answers5);
Game.AddOption("Select the FPS Cap the game will use", "", "FPS", answers4);
Game.FileSymlinkExclusions = [
  "d3d9.dll",
  "d3d9.ini",
  "Xinputplus.ini",
  "xinput1_4.dll",
  "xinput1_3.dll",
  "iw4x_config.cfg",
  "iw4x.dll",
  "guid.dat",
  "iw4x.stat",
  "nodes.dat",
  "settings_c.zip.iw4",
  "settings_s.zip.iw4",
  "iw4xsp_config.cfg"
];
Game.DirExclusions = ["miles", "userraw", "logs", "players"];
Game.UseForceBindIP = false;
Game.SymlinkGame = true;
Game.SymlinkExe = false;
Game.SymlinkFolders = false;
Game.KeepSymLinkOnExit = true;
Game.SupportsKeyboard = true;
Game.UseNucleusEnvironment = true;
Game.HandlerInterval = 100;
Game.ExecutableName = "iw4mp.exe";
Game.ExecutableToLaunch = "iw4x.exe";
Game.NeedsSteamEmulation = false;
Game.SteamID = "";
Game.GUID = "Call of Duty Modern Warfare 2";
Game.GameName = "Call of Duty Modern Warfare 2";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "IW4x: ";
Game.HasDynamicWindowTitle = false;
Game.HookFocus = true;
Game.FakeFocus = false;
Game.SendFakeFocusMsg = false;
Game.PreventWindowDeactivation = false;
Game.KeyboardPlayerSkipPreventWindowDeactivate = false;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.InjectHookXinput = false;
Game.BlockRawInput = false;
Game.Hook.CustomDllEnabled = false;
Game.Hook.UseAlpha8CustomDll = false;
Game.SetForegroundWindowElsewhere = true;
Game.KillProcessesOnClose = ["start", "Prompt", "Prompt2", "Prompt3", "connect", "F2 Host", "F2 Guest", "F3 Restart", "cmd", "JoyToKey"];
Game.DontResize = false;
Game.DontRemoveBorders = false;
Game.DontReposition = false;
Game.ResetWindows = false;
Game.ProcessChangesAtEnd = false;
Game.RefreshWindowAfterStart = false;
Game.HideTaskbar = false;
Game.Description =
  "Requires a copy of Call of Duty Modern Warfare 2, game files must be in English, Nucleus v2.1.2 and above, IW4x raw files (current version used is v0.1.9) and preferably the IW4x DLC map pack. You will need to extract both the IW4x raw files and DLC maps in the iw4x folder, located under the Call of Duty Modern Warfare 2 handler folder. Links and a more detailed guide can be found at https://hub.splitscreen.me/handler/esp2D3Wr49B3EBkbX. Setup your instances by assigning your desired number of controllers and/or mice&keyboards. Once done press next to choose the settings for your dedicated LAN server (i.e. map, game mode, number of bots, skills) and press play. Once your instances have finished resizing and repositioning, press F2 or press and hold the START button on your controller to connect all opened instances to the dedicated LAN server. If two or more instances are using mouse/keyboard, you will need to lock input by pressing the end key. Press the end key again to unlock the input. Please note that if the input is locked then F2/START button may not work so only lock input by pressing the end key once everyone is connected to the match. Once your instances are in the match, your can quickly restart the match by simply pressing F3 or by pressing and holding the SELECT button on your controller (keep in mind that F3 will not work if the instances are locked). Online play on IW4x servers also works, however you will need to select None under the select Mod option. To play over LAN, the guest PC will need to select the last 1-3 digits of the Host PC's IP address and press F2 once all the instances have finished positioning/resizing. Spec Ops mode is currently not supported.";

Game.SupportsMultipleKeyboardsAndMice = true;

Game.Play = function() {
  // Deprecated options
  Game.HookSetCursorPos = false;
  Game.HookGetCursorPos = false;
  Game.HookGetKeyState = false;
  Game.HookGetAsyncKeyState = false;
  Game.HookGetKeyboardState = false;
  Game.HookFilterRawInput = false;
  Game.HookFilterMouseMessages = false;
  Game.HookUseLegacyInput = false;
  Game.HookDontUpdateLegacyInMouseMsg = false;
  Game.HookMouseVisibility = false;
  Game.SendNormalMouseInput = false;
  Game.SendNormalKeyboardInput = false;
  Game.SendScrollWheel = false;
  Game.ForwardRawKeyboardInput = false;
  Game.ForwardRawMouseInput = false;
  Game.DrawFakeMouseCursor = false;
  Game.LockInputAtStart = false;
  Game.LockInputSuspendsExplorer = false;
  Game.LockInputToggleKey = 0x23;

  Game.ExecutableName = "iw4x.exe";

  Context.RunAdditionalFiles([Context.ScriptFolder + "\\start.exe"], false, 10);
  Context.RunAdditionalFiles([Context.ScriptFolder + "\\Prompt.exe"], false, 10);
  Context.RunAdditionalFiles([Context.ScriptFolder + "\\Prompt2.exe"], false, 10);
  Context.RunAdditionalFiles([Context.ScriptFolder + "\\Prompt3.exe"], false, 10);
  Context.RunAdditionalFiles([Context.ScriptFolder + "\\F3 Restart.exe"], false, 0);
  Context.RunAdditionalFiles([Context.ScriptFolder + "\\JoyToKey.exe"], false, 0);

  if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\logs\\crash.log"))) {
    System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\logs\\crash.log"));
  }

  var filePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods";
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods\\SpecialK";
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods\\SpecialK\\Global";
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\iw4x");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server");
  System.IO.Directory.CreateDirectory(filePath);

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedLobbyServer.bat")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedLobbyServer.bat");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Dedicated Server\\DedicatedLobbyServer.bat");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedLobbyServerLAN.bat")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedLobbyServerLAN.bat");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Dedicated Server\\DedicatedLobbyServerLAN.bat");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedServer.bat")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedServer.bat");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Dedicated Server\\DedicatedServer.bat");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedServerLAN.bat")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dedicated Server\\DedicatedServerLAN.bat");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Dedicated Server\\DedicatedServerLAN.bat");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw");
  System.IO.Directory.CreateDirectory(filePath);

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\LANPlaylist.info")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\LANPlaylist.info");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "userraw\\LANPlaylist.info");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\myplaylists.info")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\myplaylists.info");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "userraw\\myplaylists.info");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\partyserver.cfg")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\partyserver.cfg");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "userraw\\partyserver.cfg");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\partyserverlan.cfg")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\partyserverlan.cfg");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "userraw\\partyserverlan.cfg");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\server.cfg")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\server.cfg");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "userraw\\server.cfg");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\serverlan.cfg")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\serverlan.cfg");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "userraw\\serverlan.cfg");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mods");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players");
  System.IO.Directory.CreateDirectory(filePath);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.dll");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "d3d9.dll");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.ini");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "d3d9.ini");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\iw4x.dll");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "iw4x\\iw4x.dll");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\iw4x.exe");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "iw4x\\iw4x.exe");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "iw4x\\iw4x_config.cfg");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\DedicatedServerLAN.bat")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\DedicatedServerLAN.bat");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Dedicated Server\\DedicatedServerLAN.bat");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods\\SpecialK\\Global\\osd.ini");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "osd.ini");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
  var dict = [
    Context.FindLineNumberInTextFile(txtPath, "seta sys_configSum", Nucleus.SearchType.StartsWith) + '|seta sys_configSum ""',
    Context.FindLineNumberInTextFile(txtPath, "sys_configureGHz", Nucleus.SearchType.StartsWith) + '|sys_configureGHz ""',
    Context.FindLineNumberInTextFile(txtPath, "seta sys_gpu", Nucleus.SearchType.StartsWith) + '|seta sys_gpu ""',
    Context.FindLineNumberInTextFile(txtPath, "seta sys_sysMB", Nucleus.SearchType.StartsWith) + '|seta sys_sysMB ""'
  ];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\iw4x.bat";
  var lines = [
    "@ECHO OFF",
    "SET SrcRoot=" + Context.ScriptFolder + "\\iw4x\\zone\\",
    "SET TargetRoot=" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\zone\\",
    'FOR /D %%A IN ("%SrcRoot%*") DO (MKLINK /D "%TargetRoot%%%~NA" "%%~A")',
    'FOR %%A IN ("%SrcRoot%*") DO (MKLINK "%TargetRoot%%%~NXA" "%%~A")',
    "",
    "SET SrcRoot=" + Context.ScriptFolder + "\\iw4x\\main\\",
    "SET TargetRoot=" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\main\\",
    'FOR /D %%A IN ("%SrcRoot%*") DO (MKLINK /D "%TargetRoot%%%~NA" "%%~A")',
    'FOR %%A IN ("%SrcRoot%*") DO (MKLINK "%TargetRoot%%%~NXA" "%%~A")',
    "",
    "SET SrcRoot=" + Context.ScriptFolder + "\\iw4x\\iw4x\\",
    "SET TargetRoot=" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\iw4x\\",
    'FOR /D %%A IN ("%SrcRoot%*") DO (MKLINK /D "%TargetRoot%%%~NA" "%%~A")',
    'FOR %%A IN ("%SrcRoot%*") DO (MKLINK "%TargetRoot%%%~NXA" "%%~A")',
    "",
    "SET SrcRoot=" + Context.ScriptFolder + "\\mods\\",
    "SET TargetRoot=" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mods\\",
    'FOR /D %%A IN ("%SrcRoot%*") DO (MKLINK /D "%TargetRoot%%%~NA" "%%~A")',
    'FOR %%A IN ("%SrcRoot%*") DO (MKLINK "%TargetRoot%%%~NXA" "%%~A")',
    ""
  ];
  Context.WriteTextFile(Bat, lines);

  Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\iw4x.bat"], false, 0, true, false);

  var Unlock = Context.Options["Unlock"];
  if (Unlock == "No") {
  }
  if (Unlock == "Yes") {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x.stat");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "iw4x\\iw4x.stat");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  var FPS = Context.Options["FPS"];
  var Graphics = Context.Options["Graphics"];
  if (Graphics == "Low") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_useD3D9Ex", Nucleus.SearchType.StartsWith) + '|seta r_useD3D9Ex "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "3"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "3"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "3"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_rendererPreference", Nucleus.SearchType.StartsWith) + '|seta r_rendererPreference "Shader model 2.0"',
      Context.FindLineNumberInTextFile(txtPath, "seta snd_outputConfiguration", Nucleus.SearchType.StartsWith) + '|seta snd_outputConfiguration "Stereo"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  if (Graphics == "Mid") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_useD3D9Ex", Nucleus.SearchType.StartsWith) + '|seta r_useD3D9Ex "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_rendererPreference", Nucleus.SearchType.StartsWith) + '|seta r_rendererPreference "Shader model 2.0"',
      Context.FindLineNumberInTextFile(txtPath, "seta snd_outputConfiguration", Nucleus.SearchType.StartsWith) + '|seta snd_outputConfiguration "Stereo"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  if (Graphics == "High") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_useD3D9Ex", Nucleus.SearchType.StartsWith) + '|seta r_useD3D9Ex "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_rendererPreference", Nucleus.SearchType.StartsWith) + '|seta r_rendererPreference "Shader model 2.0"',
      Context.FindLineNumberInTextFile(txtPath, "seta snd_outputConfiguration", Nucleus.SearchType.StartsWith) + '|seta snd_outputConfiguration "Stereo"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  if (Graphics == "Extra") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "4"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_useD3D9Ex", Nucleus.SearchType.StartsWith) + '|seta r_useD3D9Ex "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_rendererPreference", Nucleus.SearchType.StartsWith) + '|seta r_rendererPreference "Shader model 2.0"',
      Context.FindLineNumberInTextFile(txtPath, "seta snd_outputConfiguration", Nucleus.SearchType.StartsWith) + '|seta snd_outputConfiguration "Stereo"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var Mus = Context.Options["Mus"];

  if (Mus == "Yes") {
    if (Context.PlayerID == 0) {
      var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles");
      System.IO.Directory.CreateDirectory(filePath);

      if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\milesEq.flt")) {
        var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\milesEq.flt");
        var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\milesEq.flt");
        System.IO.File.Copy(savePkgOrigin, savePath, true);
      }
      if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "miles\\mssds3d.flt")) {
        var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssds3d.flt");
        var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssds3d.flt");
        System.IO.File.Copy(savePkgOrigin, savePath, true);
      }
      if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssdsp.flt")) {
        var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssdsp.flt");
        var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssdsp.flt");
        System.IO.File.Copy(savePkgOrigin, savePath, true);
      }
      if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\msseax.flt")) {
        var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\msseax.flt");
        var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\msseax.flt");
        System.IO.File.Copy(savePkgOrigin, savePath, true);
      }
      if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssmp3.asi")) {
        var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssmp3.asi");
        var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssmp3.asi");
        System.IO.File.Copy(savePkgOrigin, savePath, true);
      }

      if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssvoice.asi")) {
        var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssvoice.asi");
        var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssvoice.asi");
        System.IO.File.Copy(savePkgOrigin, savePath, true);
      }
    } else {
      if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\milesEq.flt"))) {
        System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\milesEq.flt"));
      }
      if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssds3d.flt"))) {
        System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mssds3d.flt"));
      }
      if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\\\mssdsp.flt"))) {
        System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssdsp.flt"));
      }
      if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\msseax.flt"))) {
        System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\msseax.flt"));
      }
      if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssmp3.asi"))) {
        System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssmp3.asi"));
      }
      if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssvoice.asi"))) {
        System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssvoice.asi"));
      }
    }
  }

  if (Mus == "No") {
    var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles");
    System.IO.Directory.CreateDirectory(filePath);

    if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\milesEq.flt")) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\milesEq.flt");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\milesEq.flt");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }
    if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "miles\\mssds3d.flt")) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssds3d.flt");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssds3d.flt");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }
    if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssdsp.flt")) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssdsp.flt");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssdsp.flt");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }
    if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\msseax.flt")) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\msseax.flt");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\msseax.flt");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }
    if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssmp3.asi")) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssmp3.asi");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssmp3.asi");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }

    if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssvoice.asi")) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\miles\\mssvoice.asi");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "miles\\mssvoice.asi");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }
  }

  var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.ini";
  var dict = [Context.FindLineNumberInTextFile(txtPath, "SlotReassignment=", Nucleus.SearchType.StartsWith) + "|SlotReassignment=" + (Context.GamepadId - 1) + ""];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  var Mode = Context.Options["Mode"];
  var Map = Context.Options["Map"];
  var Mod = Context.Options["Mod"];

  var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\userraw\\serverlan.cfg";
  var dict = [
    Context.FindLineNumberInTextFile(txtPath, "set dedicated", Nucleus.SearchType.StartsWith) + '|set dedicated "1"',
    Context.FindLineNumberInTextFile(txtPath, "set sv_securityLevel", Nucleus.SearchType.StartsWith) + '|set sv_securityLevel "0"',
    Context.FindLineNumberInTextFile(txtPath, "set scr_teambalance", Nucleus.SearchType.StartsWith) + '|set scr_teambalance "0"',
    Context.FindLineNumberInTextFile(txtPath, "set sv_maprotation", Nucleus.SearchType.StartsWith) + '|set sv_maprotation "gametype ' + Mode + " map " + Map + '"'
  ];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  var Skill = Context.Options["Skill"];
  var Bots = Context.Options["Bots"];

  if (Bots == "Default") {
  }

  var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\DedicatedServerLAN.bat";
  var dict = [
    Context.FindLineNumberInTextFile(txtPath, "set LANMode=", Nucleus.SearchType.StartsWith) + "|set LANMode=1",
    Context.FindLineNumberInTextFile(txtPath, "set ModFolderName=", Nucleus.SearchType.StartsWith) + "|set ModFolderName=mods/bots"
  ];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  if (Bots >= 0) {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\DedicatedServerLAN.bat";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "set LANMode=", Nucleus.SearchType.StartsWith) + "|set LANMode=1",
      Context.FindLineNumberInTextFile(txtPath, "set ModFolderName=", Nucleus.SearchType.StartsWith) + "|set ModFolderName=mods/bots",
      Context.FindLineNumberInTextFile(txtPath, "start iw4x.exe", Nucleus.SearchType.StartsWith) +
        '|start iw4x.exe -dedicated +set fs_game "%ModFolderName%" +set bots_manage_fill "' +
        Bots +
        '" +set bots_skill "' +
        Skill +
        '" +bots_manage_fill_kick "1" +set bots_main_firstIsHost "1" +set sv_lanonly "%LANMode%" +set net_port "%GamePort%" +exec %ServerFilename% +set party_enable "0" +map_rotate'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var lan = Context.Options["lan"];

  if (Mod == "Bots Mod") {
    if (lan == "-") {
      var Args = (Context.Args = " +set fs_game mods/bots +r_fullscreen 0 ");
      Context.StartArguments = Args;

      Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2 Host.exe"], false, 10);

      if (Context.PlayerID == 0) {
        Context.RunAdditionalFiles([Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\DedicatedServerLAN.bat"], false, 10);
      }
    }
  }
  if (Mod == "None") {
    var Args = (Context.Args = " +r_fullscreen 0 ");
    Context.StartArguments = Args;
  }
  if (Mod == "Bots Mod") {
    if (lan >= 1) {
      var txtPath = Game.Folder + "\\Local IP.txt";
      var dict = ["192.168.1." + lan + "      "];
      Context.WriteTextFile(txtPath, dict);

      Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2 Guest.exe"], false, 10);
    }
  }

  var pscontrollers = Context.Options["pscontrollers"];
  if (pscontrollers == "Default") {
  }
  if (pscontrollers == "Yes") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_buttonConfig", Nucleus.SearchType.StartsWith) + '|seta gpad_buttonConfig "buttons_default"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+speed_throw"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+attack"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+smoke"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+frag"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var pscontrollers = Context.Options["pscontrollers"];
  if (pscontrollers == "No") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_buttonConfig", Nucleus.SearchType.StartsWith) + '|seta gpad_buttonConfig "buttons_default"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+smoke"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+frag"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+speed_throw"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+attack"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var FPS = Context.Options["FPS"];

  if (Context.AspectRatioDecimal < 1.2) {
    Game.DontReposition = true;
    Game.DontResize = true;
    Game.DontRemoveBorders = true;

    Game.Hook.ResWidth = Context.Width;
    Game.Hook.ResHeight = Context.Width / 1.33333;

    Context.HideDesktop();

    var FPS = Context.Options["FPS"];
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Width / 1.33333 + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Width / 1.33333 + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_displayMode", Nucleus.SearchType.StartsWith) + '|seta r_displayMode "windowed (no border)"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_aspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_aspectRatio "custom"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_customAspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_customAspectRatio "' + Context.AspectRatioDecimal + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta intro", Nucleus.SearchType.StartsWith) + '|seta intro "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_useD3D9Ex", Nucleus.SearchType.StartsWith) + '|seta r_useD3D9Ex "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "' + (Context.Height - Context.Width / 1.33333) / 2 + '"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    if (Context.PlayerID == 0) {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta vid_xpos", Nucleus.SearchType.StartsWith) + '|seta vid_xpos "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "' + (Context.Height - Context.Width / 1.33333) / 2 + '"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
    if (Context.PlayerID == 1) {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta vid_xpos", Nucleus.SearchType.StartsWith) + '|seta vid_xpos "' + Context.Width + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "' + (Context.Height - Context.Width / 1.33333) / 2 + '"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  } else {
    Game.DontReposition = false;
    Game.DontResize = false;
    Game.DontRemoveBorders = true;

    Game.Hook.ResWidth = Context.Width;
    Game.Hook.ResHeight = Context.Height;

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_displayMode", Nucleus.SearchType.StartsWith) + '|seta r_displayMode "windowed (no border)"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_aspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_aspectRatio "custom"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_customAspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_customAspectRatio "' + Context.AspectRatioDecimal + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
      Context.FindLineNumberInTextFile(txtPath, "seta intro", Nucleus.SearchType.StartsWith) + '|seta intro "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_useD3D9Ex", Nucleus.SearchType.StartsWith) + '|seta r_useD3D9Ex "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta vid_xpos", Nucleus.SearchType.StartsWith) + '|seta vid_xpos ""',
      Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos ""'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  if (Player.IsKeyboardPlayer) {
    Game.ProtoInput.InjectStartup = true;
    Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
    Game.ProtoInput.InjectRuntime_EasyHookMethod = false;
    Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;
    Game.ProtoInput.FindWindowHook = true;
    Game.ProtoInput.SetWindowPosHook = false;
    Game.ProtoInput.SetWindowStyleHook = false;
    Game.ProtoInput.RegisterRawInputHook = false;
    Game.ProtoInput.GetRawInputDataHook = true;
    Game.ProtoInput.MessageFilterHook = false;
    Game.ProtoInput.GetCursorPosHook = false;
    Game.ProtoInput.SetCursorPosHook = false;
    Game.ProtoInput.GetKeyStateHook = false;
    Game.ProtoInput.GetAsyncKeyStateHook = false;
    Game.ProtoInput.GetKeyboardStateHook = false;
    Game.ProtoInput.CursorVisibilityHook = false;
    Game.ProtoInput.ClipCursorHook = false;
    Game.ProtoInput.ClipCursorHookCreatesFakeClip = false;
    Game.ProtoInput.FocusHooks = false;
    Game.ProtoInput.DrawFakeCursor = false;
    Game.ProtoInput.RawInputFilter = false;
    Game.ProtoInput.MouseMoveFilter = false;
    Game.ProtoInput.MouseActivateFilter = false;
    Game.ProtoInput.WindowActivateFilter = false;
    Game.ProtoInput.WindowActvateAppFilter = false;
    Game.ProtoInput.MouseWheelFilter = false;
    Game.ProtoInput.MouseButtonFilter = false;
    Game.ProtoInput.KeyboardButtonFilter = true;
    Game.ProtoInput.SendMouseWheelMessages = true;
    Game.ProtoInput.SendMouseButtonMessages = true;
    Game.ProtoInput.SendMouseMovementMessages = true;
    Game.ProtoInput.SendKeyboardButtonMessages = true;
    Game.ProtoInput.EnableFocusMessageLoop = false;
    Game.ProtoInput.FocusLoopIntervalMilliseconds = 0;
    Game.ProtoInput.FocusLoop_WM_ACTIVATE = true;
    Game.ProtoInput.FocusLoop_WM_ACTIVATEAPP = true;
    Game.ProtoInput.FocusLoop_WM_NCACTIVATE = true;
    Game.ProtoInput.FocusLoop_WM_SETFOCUS = true;
    Game.ProtoInput.FocusLoop_WM_MOUSEACTIVATE = true;
    Game.ProtoInput.BlockedMessages = [];
    Game.ProtoInput.RenameHandlesHook = true;
    Game.ProtoInput.RenameHandles = ["iw4x_mutex"];
    Game.ProtoInput.RenameNamedPipes = [];

    if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.dll"))) {
      System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.dll"));
    }
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_enabled", Nucleus.SearchType.StartsWith) + '|seta gpad_enabled "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_lockon_enabled", Nucleus.SearchType.StartsWith) + '|seta gpad_lockon_enabled "0"',
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_slowdown_enabled", Nucleus.SearchType.StartsWith) + '|seta gpad_slowdown_enabled "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    Game.PauseBetweenProcessGrab = 20;
    Game.PauseBetweenStarts = 5;
  } else {
    Game.KillMutexType = "Mutant";
    Game.KillMutex = ["iw4x_mutex"];
    Game.PauseBetweenProcessGrab = 5;
    Game.PauseBetweenStarts = 10;
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\players\\iw4x_config.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_enabled", Nucleus.SearchType.StartsWith) + '|seta gpad_enabled "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_lockon_enabled", Nucleus.SearchType.StartsWith) + '|seta gpad_lockon_enabled "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_slowdown_enabled", Nucleus.SearchType.StartsWith) + '|seta gpad_slowdown_enabled "1"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  Game.ProtoInput.OnInputLocked = function() {
    if (Context.HasKeyboardPlayer) {
      for (var i = 0; i < PlayerList.Count; i++) {
        var player = PlayerList[i];
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyStateHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyboardStateHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetAsyncKeyStateHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.MessageFilterHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.RegisterRawInputHookID);

        ProtoInput.StartFocusMessageLoop(player.ProtoInputInstanceHandle, 0, true, true, true, true, true);
        System.Threading.Thread.Sleep(1000);
        ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, false);
        ProtoInput.StopFocusMessageLoop(player.ProtoInputInstanceHandle);

        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
        ProtoInput.EnableMessageBlock(player.ProtoInputInstanceHandle, 0x0008);
      }
    }
  };
  Game.ProtoInput.OnInputUnlocked = function() {
    for (var i = 0; i < PlayerList.Count; i++) {
      var player = PlayerList[i];
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.MessageFilterHookID);

      ProtoInput.SetDrawFakeCursor(player.ProtoInputInstanceHandle, false);
      ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, true);

      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
    }
  };
};