print("Missions loaded")

gofile("mission_text.lua");


--states
--0 unreleased, can't see at jobs
--1 released, shows up at jobs
--2 active, on map
--3 failed
--4 completed
--5 rereleased 
--6 reactive
--7 waiting

--a town index of -2 makes the mission show up everywhere

--only once means you can not activate it again
--permanent means it never goes inactive (like a town)

--setup missions
--map, text, command, mtext, locX, locY, radius, state, townIndex, prereq1, prereq2, mustStop, onlyOnce, permanent, renewDays, stageNote, boardNote

--misBUY = addMission(map_Marker, "The Demo is over", "setMissionState(misBUY, 1)", "In order to continue you must buy the Game!",  0, 0, 1, 1, -2, -1, -1, false, true, false, 0, -1, true);


townJuarez = addMission(map_Blank, "C. Juarez", "gofile(\"town/town_truckstop.lua\")", mtextJuarez,      -58, 222, 8, 2, -1, -1, -1, false, false, true, 0, -1, false);
townJanos = addMission(map_Blank, "Janos", "gofile(\"town/town_bluestown.lua\")", mtextJanos,         -204, 135, 8, 2, -1, -1, -1, false, false, true, 0, -1, false);
townSueco = addMission(map_Blank, "El Sueco", "gofile(\"town/town_western.lua\")", mtextSueco,      -67, 56, 8, 2, -1, -1, -1, false, false, true, 0, -1, false);
townBuena = addMission(map_Blank, "Buenaventura", "gofile(\"town/town_mallmart.lua\")", mtextBuena, -154, 56, 8, 2, -1, -1, -1, false, false, true, 0, -1, false);
--townJuarez = addCity(map_Blank, "C. Juarez", "gofile(\"town/town_truckstop.lua\")", mtextJuarez, -58, 222, 8);
--townJanos = addCity(map_Blank, "Janos", "gofile(\"town/town_bluestown.lua\")", mtextJanos, -204, 135, 8);
--townSueco = addCity(map_Blank, "El Sueco", "gofile(\"town/town_western.lua\")", mtextSueco, -67, 56, 8);
--townBuena = addCity(map_Blank, "Buenaventura", "gofile(\"town/town_mallmart.lua\")", mtextBuena, -154, 56, 8);

townMadera = addMission(map_Blank, "Madera", "gofile(\"town/town_rivertown.lua\")", mtextMadera,      -166, -69, 5, 2, -1, -1, -1, false, false, true, 0, -1, false);
townChihuahua = addMission(map_Blank, "Chihuahua", "gofile(\"town/town_bricktown.lua\")", mtextChihuahua,       -39, -110, 8, 2, -1, -1, -1, false, false, true, 0, -1, false);
townEmoc = addMission(map_Blank, "Cuauhtemoc", "gofile(\"town/town_onehorse.lua\")", mtextEmoc,     -102, -155, 5, 2, -1, -1, -1, false, false, true, 0, -1, false);
--townMadera = addCity(map_Blank, "Madera", "gofile(\"town/town_rivertown.lua\")", mtextMadera,      -166, -69, 5);
--townChihuahua = addCity(map_Blank, "Chihuahua", "gofile(\"town/town_bricktown.lua\")", mtextChihuahua,       -39, -110, 8);
--townEmoc = addCity(map_Blank, "Cuauhtemoc", "gofile(\"town/town_onehorse.lua\")", mtextEmoc,     -102, -155, 5, 2);

townSordo = addMission(map_Marker, "El Sordo's", "gofile(\"town/town_bar.lua\")", mtextSordo,       14, -95, 6, 0, -1, -1, -1, false, false, true, 0, -1, false);
--townSordo = addHiddenCity(map_Marker, "El Sordo's", "gofile(\"town/town_bar.lua\")", mtextSordo,       14, -95, 6);

townOjinaga = addMission(map_Blank, "Ojinaga", "gofile(\"town/town_seaside.lua\")", mtextOjinaga,      108, 10, 5, 2, -1, -1, -1, false, false, true, 0, -1, false);
townCamargo = addMission(map_Blank, "C. Camargo", "gofile(\"town/town_polco.lua\")", mtextCamargo,     53, -225, 5, 2, -1, -1, -1, false, false, true, 0, -1, false);
townPerla = addMission(map_Blank, "La Perla", "gofile(\"town/town_villa.lua\")", mtextPerla,         165, -169, 5, 2, -1, -1, -1, false, false, true, 0, -1, false);
--townOjinaga = addCity(map_Blank, "Ojinaga", "gofile(\"town/town_seaside.lua\")", mtextOjinaga,      108, 10, 5);
--townCamargo = addCity(map_Blank, "C. Camargo", "gofile(\"town/town_polco.lua\")", mtextCamargo,     53, -225, 5, 2);
--townPerla = addCity(map_Blank, "La Perla", "gofile(\"town/town_villa.lua\")", mtextPerla,         165, -169, 5, 2);

townPedro = addMission(map_Marker, "Pedro's Den", "gofile(\"town/town_den.lua\")", mtextPedro,       -35, 133, 6, 0, -1, -1, -1, false, false, true, 0, -1, false);
--townPedro = addHiddenCity(map_Marker, "Pedro's Den", "gofile(\"town/town_den.lua\")", mtextPedro,       -35, 133, 6);

misTSnote = addMission(map_Marker, "Note: Bandidos Attacking!", "print(\"note\")", mtxtTSnote,  0, 0, 1, 1, towntruck, -1, -1, false, true, false, 0, -1, true);
misRail1 = addMission(map_Marker, "Job: Bandidos at the Railyard", "gofile(\"mission/mission_railyard1.lua\")", mtxtTSRail1,  -126, 220, 5, 1, towntruck, misTSnote, -1, false, true, false, 0, -1, false);
misRuins1 = addMission(map_Marker, "Job: Bandidos at the Ruins", "gofile(\"mission/mission_ruins1.lua\")", mtxtTSRuins1,  -186, 178, 5, 1, towntruck, misTSnote, -1, false, true, false, 0, -1, false);
misRuins2 = addMission(map_Marker, "Job: Oh no! more Bandidos!", "gofile(\"mission/mission_ruins2.lua\")", mtxtTSRuins2,  -186, 178, 5, 1, towntruck, misRail1, misRuins1, false, true, false, 0, -1, false);
misTSend = addMission(map_Marker, "Note: La Toro", "print(\"note\")", mtxtTSend,  0, 0, 1, 1, towntruck, misRuins2, -1, false, true, false, 0, -1, true);

misWestnote = addMission(map_Marker, "Note: La Toro in Town", "print(\"note\")", mtxtWestnote,  0, 0, 1, 1, townwestern, misRuins2, -1, false, true, false, 0, -1, true);
misTrack1 = addMission(map_Marker, "Finding La Toro", "gofile(\"mission/mission_racetrack1.lua\")", mtxtWestTrack1,  -97, 118, 5, 1, townwestern, misWestnote, -1, false, true, false, 0, -1, false);
misTrack2 = addMission(map_Marker, "La Toro Showdown", "gofile(\"mission/mission_racetrack2.lua\")", mtxtWestTrack2,  -97, 118, 5, 1, townwestern, misTrack1, -1, false, true, false, 0, -1, false);
misWestend = addMission(map_Marker, "Note: La Toro's Map", "print(\"note\")", mtxtWestend,  0, 0, 1, 1, townwestern, misTrack2, -1, false, true, false, 0, -1, true);

misOHnote = addMission(map_Marker, "Note: Help Reading the Map", "print(\"note\")", mtxtOHnote,  0, 0, 1, 1, townonehorse, misTrack2, -1, false, true, false, 0, -1, true);
misMine1 = addMission(map_Marker, "Job: Claim Jumpers", "gofile(\"mission/mission_mine1.lua\")", mtxtOHMine1,  -169, -33.6, 5, 1, townonehorse, misOHnote, -1, false, true, false, 0, -1, false);
misDrivein1 = addMission(map_Marker, "Job: Gold Hub Caps", "gofile(\"mission/mission_drivein1.lua\")", mtxtOHDrivein1,  -89, -35, 5, 1, townonehorse, misOHnote, -1, false, true, false, 0, -1, false);
misGhost1 = addMission(map_Marker, "The Four's Garage", "gofile(\"mission/mission_ghosttown1.lua\")", mtxtOHGhost1,  -45, -177.6, 5, 1, townonehorse, misMine1, misDrivein1, false, true, false, 0, -1, false);
misOHTally = addMission(map_Marker, "Note: Mechanic Girl", "print(\"note\")", mtxtOHTally,  0, 0, 1, 1, townonehorse, misGhost1, -1, false, true, false, 0, -1, true);
misOHend = addMission(map_Marker, "Note: Location of Tito", "print(\"note\")", mtxtOHend,  0, 0, 1, 1, townonehorse, misGhost1, -1, false, true, false, 0, -1, true);


misTitoGang = addMission(map_Bandit, "Tito's Gang", "print(\"LinkedMission\")", mtxtBTTitogang, -49.7, -4.6, 11, 1, townbrick, -2, misGhost1, false, true, false, 0, -1, false);
misDrivein2 = addMission(map_Marker, "Tito Showdown", "gofile(\"mission/mission_drivein2.lua\")", mtxtBTDrivein2,  -89, -35, 5, 1, townbrick, misTitoGang, -2, false, true, false, 0, -1, false);
misBTend = addMission(map_Marker, "Note: El Sordo's", "print(\"note\")", mtxtBTend,  0, 0, 1, 1, townbrick, misDrivein2, -2, false, true, false, 0, -1, true);


misESnote = addMission(map_Marker, "Note: Santos's Children", "print(\"note\")", mtxtESnote,  0, 0, 1, 1, townbar, -2, -1, false, true, false, 0, -1, true);
misSoccer1 = addMission(map_Marker, "Job: Collecting a debt", "gofile(\"mission/mission_soccer1.lua\")", mtxtESSoccer1,  29, -211.4, 5, 1, townbar, misESnote, -2, false, true, false, 0, -1, false);
misRefinery1 = addMission(map_Marker, "Job: Collecting another debt", "gofile(\"mission/mission_refinery1.lua\")", mtxtESRefinery1,  41, 52, 5, 1, townbar, misESnote, -2, false, true, false, 0, -1, false);
misESkids = addMission(map_Marker, "Note: Location of Kids", "minStage(7)", mtxtESkids,  0, 0, 1, 1, townbar, misSoccer1, misRefinery1, false, true, false, 0, -1, true);
misESCar = addMission(map_Marker, "Note: Santos's Car", "print(\"note\")", mtxtEScar,  0, 0, 1, 1, townbar, misSoccer1, misRefinery1, false, true, false, 0, -1, true);

misArenaInfo =  addMission(map_Marker, "Note:Arena Challenge", "print(\"note\")", mtxtArenaIntro,  0, 0, 1, 1, townpolco, misSoccer1, -2, false, true, false, 0, -1, true);
misArenaRepairs =  addMission(map_Marker, "Note:Arena Repairs", "print(\"note\")", mtxtArenaNote,  0, 0, 1, 1, townpolco, misArenaInfo, -2, false, true, false, 0, -1, true);
misArena1 = addMission(map_Marker, "Arena Challenge", "gofile(\"mission/mission_soccerArena1.lua\")", mtxtArenaEnter,  29, -211.4, 5, 1, townpolco, misArenaInfo, -1, false, false, false, 10, -1, false);
misArena2 = addMission(map_Marker, "Arena Challenge2", "gofile(\"mission/mission_soccerArena2.lua\")", mtxtArenaEnter,  29, -211.4, 5, 0, -1, -2, -1, false, true, false, 0, -1, false);
misArena3 = addMission(map_Marker, "Arena Challenge3", "gofile(\"mission/mission_soccerArena3.lua\")", mtxtArenaEnter,  29, -211.4, 5, 0, -1, -2, -1, false, true, false, 0, -1, false);
misArena4 = addMission(map_Marker, "Arena Challenge4", "gofile(\"mission/mission_soccerArena4.lua\")", mtxtArenaEnter,  29, -211.4, 5, 0, -1, -2, -1, false, true, false, 0, -1, false);
misArena5 = addMission(map_Marker, "Arena Challenge5", "gofile(\"mission/mission_soccerArena5.lua\")", mtxtArenaEnter,  29, -211.4, 5, 0, -1, -2, -1, false, true, false, 0, -1, false);


misWarehouse1 = addMission(map_Marker, "Save the Children", "gofile(\"mission/mission_warehouse1.lua\")", mtxtSSWarehouse1,  78, -21, 5, 1, townseaside, misESkids, -2, false, true, false, 0, -1, false);
misSSend = addMission(map_Marker, "Note:Whistler", "print(\"note\")", mtxtSSend,  0, 0, 1, 1, townseaside, misWarehouse1, -1, false, true, false, 0, -1, true);


misWhistlerMen = addMission(map_Bandit, "Whistler's Men", "print(\"LinkedMission\")", mtxtVillaMen, 119, -207, 11, 1, townvilla, misWarehouse1, -2, false, true, false, 0, -1, false);
misFair1 = addMission(map_Marker, "Whistler Showdown", "gofile(\"mission/mission_fair1.lua\")", mtxtVillaFair,  189, -77, 5, 1, townvilla, misWhistlerMen, -2, false, true, false, 0, -1, false);

misDennote = addMission(map_Marker, "Note: Priest Left Town", "print(\"note\")", mtxtDennote,  0, 0, 1, 1, townden, -1, -1, false, true, false, 0, -1, true);
misRefinery2 = addMission(map_Marker, "Priest's First Hideout", "gofile(\"mission/mission_refinery2.lua\")", mtxtDenRefinery2,  41, 52, 5, 1, townden, misDennote, -2, false, true, false, 0, -1, false);
misMine2 = addMission(map_Marker, "Priest's Second Hideout", "gofile(\"mission/mission_mine2.lua\")", mtxtDenRefinery2,  -169, -33.6, 5, 1, townden, misDennote, -2, false, true, false, 0, -1, false);
misGhost2 = addMission(map_Marker, "Priest's Third Hideout", "gofile(\"mission/mission_ghosttown2.lua\")", mtxtDenGhost2,  -45, -177.6, 5, 1, townden, misDennote, -2, false, true, false, 0, -1, false);

misBoneyard1 = addMission(map_Marker, "Priest is Waiting for you", "gofile(\"mission/mission_boneyard1.lua\")", mtxtDenBoneyard1,  88, -116, 5, 1, townden, misMine2, misGhost2, false, true, false, 0, -1, false);


misEvilRoberto = addMission(map_Bandit, "Job: Evil Roberto", "print(\"LinkedMission\")", mtextRoberto, -64, 150, 11, 1, towntruck, misRuins2, -1, false, true, false, 0, -1, false);

misEvilEmilio = addMission(map_Bandit, "Job: Evil Emilo", "print(\"LinkedMission\")", mtextEmilio, -152, 186, 11, 1, townmall, -1, -1, false, false, false, 1, -1, false);
misEvilJuan = addMission(map_Bandit, "Job: Evil Juan", "print(\"LinkedMission\")", mtextJuan, -175, 116, 11, 1, townmall, misEvilEmilio, -1, false, false, false, 2, -1, false);
misEvilJesus = addMission(map_Bandit, "Job: Evil Jesus", "print(\"LinkedMission\")", mtextJesus, -104, 74, 11, 1, townmall, misEvilJuan, -1, false, false, false, 3, -1, false);



misdswag = addMission(map_Package, "Job: Deliver Swag", "gofile(\"mission/mission_deliverSwag.lua\")", mtextSwag, -43, 175, 5, 1, townwestern, -1, -1, false, false, false, 2, -1, false);

misdfireworks = addMission(map_Package, "Job: Deliver Fireworks", "gofile(\"mission/mission_deliverFireworks.lua\")", mtextFireworks, -14, 82, 5, 1, townbluestown, -1, -1, false, false, false, 1, -1, false);
misdtequlia = addMission(map_Package, "Job: Deliver Tequila", "gofile(\"mission/mission_deliverTequlia.lua\")", mtextTequlia, -9, 70, 5, 1, townbluestown, misdfireworks, -1, false, false, false, 2, -1, false);
misdpills = addMission(map_Package, "Job: Deliver Pills", "gofile(\"mission/mission_deliverPills.lua\")", mtextPills, -38, 187, 5, 1, townbluestown, misdtequlia, -1, false, false, false, 3, -1, false);

misdparty = addMission(map_Package, "Job: Deliver Party Supplies", "gofile(\"mission/mission_deliverParty.lua\")", mtextParty, -39, -92, 5, 1, townonehorse, -1, -1, false, false, false, 3, -1, false);

misWfirepower = addMission(map_Marker, "A little extra fire power", "print(\"note\")", mtextFirePower,  0, 0, 1, 1, townrivertown, -1, -1, false, true, false, 0, -1, true);
misGrenadeChase = addMission(map_Bandit, "FirePower: Mountain Smuggler", "print(\"LinkedMission\")", mtextFPMS, -207, -4.5, 11, 1, townrivertown, misWfirepower, -1, false, true, false, 0, -1, false);
misGreandeTQ = addMission(map_Package, "FirePower: Deliver Tequila", "gofile(\"mission/mission_FPdeliverTequlia.lua\")", mtextFPTQ, -166, -134, 5, 1, townrivertown, misWfirepower, -1, false, true, false, 0, -1, false);
misdGrenade = addMission(map_Marker, "Location of grenade launcher", "gofile(\"mission/mission_getGrenade.lua\")", mtextGrenade, -214, -77, 5, 1, townrivertown, misGrenadeChase, misGreandeTQ, false, true, false, 0, -1, false);
misEvilPiranha = addMission(map_Bandit, "Las Piranhas", "print(\"LinkedMission\")", mtextPiranhas, -102, -88, 11, 1, townrivertown, -1, -1, false, false, false, 3, -1, false);
misEvilCalamares = addMission(map_Bandit, "Los Calamares", "print(\"LinkedMission\")", mtextCalamares, -143, -123, 11, 1, townrivertown, misEvilPiranha, -1, false, false, false, 3, -1, false);


misWspeed = addMission(map_Marker, "Speed! man Speed!", "print(\"note\")", mtextSpeed,  0, 0, 1, 1, townden, -1, -1, false, true, false, 0, -1, true);
misJATOParts = addMission(map_Package, "Speed: Deliver Car Parts", "gofile(\"mission/mission_JATOdeliverCarParts.lua\")", mtextJATOParts, -15, 133, 5, 1, townden, misWspeed, -1, false, true, false, 0, -1, false);
misJATORuins = addMission(map_Marker, "Speed: Speak Now or just go in Shooting", "gofile(\"mission/mission_ruinsJATO.lua\")", mtextJATOPyramid,  -186, 178, 5, 1, townden, misWspeed, -1, false, true, false, 0, -1, false);
misWJato = addMission(map_Marker, "Location of the JATO", "gofile(\"mission/mission_getJATO.lua\")", mtextJATO, 0, 129, 5, 1, townden, misJATOParts, misJATORuins, false, false, false, 3, -1, false);
misWJatoNote1 = addMission(map_Marker, "JATO note on Turning", "print(\"note\")", mtextJATOnote1,  0, 0, 1, 1, townden, misJATOParts, misJATORuins, false, true, false, 0, -1, true);
misWJatoNote2 = addMission(map_Marker, "JATO note on Defense", "print(\"note\")", mtextJATOnote2,  0, 0, 1, 1, townden, misJATOParts, misJATORuins, false, true, false, 0, -1, true);

misWRC = addMission(map_Marker, "Not Just for Kids anymore", "print(\"note\")", mtextLittleBuddy,  0, 0, 1, 1, townvilla, misWarehouse1, -1, false, true, false, 0, -1, true);
misRCPills = addMission(map_Package, "Car Bombs: Deliver Pills", "gofile(\"mission/mission_RCdeliverPills.lua\")", mtextRCPills, 182, -81, 5, 1, townvilla, misWRC, -1, false, true, false, 0, -1, false);
misRCRail = addMission(map_Marker, "Car Bombs: Stolen Files", "gofile(\"mission/mission_railyardRC.lua\")", mtextRCRailYard,  -126, 220, 5, 1, townvilla, misWRC, -1, false, true, false, 0, -1, false);
misWRCbombs = addMission(map_Marker, "Location of the RC car bombs", "gofile(\"mission/mission_getRC.lua\")", mtextRCcarbombs, 180, -204, 5, 1, townvilla, misRCRail, misRCPills, false, true, false, 0, -1, false);
misWRCnote1 = addMission(map_Marker, "How to use RC car Bombs", "print(\"note\")", mtextRCnote1,  0, 0, 1, 1, townvilla, misRCRail, misRCPills, false, true, false, 0, -1, true);


misStageNote0 = addMission(map_StageGangStart, "Stage Note 0", "print(\"Stage Note0\")", mtextStage0, -59, 223, 5, 2, -1, -1, -1, true, false, true, 0, 0, false);
misStageNote1 = addMission(map_StageLaToro, "Stage Note 1", "print(\"Stage Note1\")", mtextStage0, -67, 56, 5, 2, -1, -1, -1, true, false, true, 0, 1, false);
misStageNote2 = addMission(map_StageMapLead, "Stage Note 2", "print(\"Stage Note2\")", mtextStage0, -127, -143, 5, 2, -1, -1, -1, true, false, true, 0, 2, false);
misStageNote3 = addMission(map_StageTito, "Stage Note 3", "print(\"Stage Note3\")", mtextStage0, -34, -141, 5, 2, -1, -1, -1, true, false, true, 0, 3, false);
misStageNote7 = addMission(map_StageFriend, "Stage Note 7", "print(\"Stage Note6\")", mtextStage0, 88, 30, 5, 2, -1, -1, -1, true, false, true, 0, 7, false);
misStageNote8 = addMission(map_StageWhistler, "Stage Note 8", "print(\"Stage Note7\")", mtextStage0, 166, -162, 5, 2, -1, -1, -1, true, false, true, 0, 8, false);

mapNoteRail = addMission(map_railyard, "railyard", "print(\"Map Railyard\")", mtextStage0, -126, 216, 2.5, 2, -1, misRail1, -1, true, false, true, 0, -2, false);
mapNotePyramid = addMission(map_pyramid, "Pyramid", "print(\"Map Pyramid\")", mtextStage0, -197, 171, 2.5, 2, -1, misRuins1, -1, true, false, true, 0, -2, false);
mapNoteRace = addMission(map_race, "Raceway", "print(\"Map Raceway\")", mtextStage0, -94, 111.6, 2.5, 2, -1, misTrack1, -1, true, false, true, 0, -2, false);

mapNoteMine = addMission(map_mine, "Mine", "print(\"Map Mine\")", mtextStage0, -169, -41, 2.5, 2, -1, misMine1, -1, true, false, true, 0, -2, false);
mapNoteDrivein = addMission(map_drivein, "DriveIn", "print(\"Map Drive in\")", mtextStage0, -78, -36, 2.5, 2, -1, misDrivein1, -1, true, false, true, 0, -2, false);
mapNoteGhosttown = addMission(map_ghosttown, "GhostTown", "print(\"Map Ghost Town\")", mtextStage0, -50, -189.6, 2.5, 2, -1, misGhost1, -1, true, false, true, 0, -2, false);

mapNotesoccer = addMission(map_soccer, "soccer field", "print(\"Map Soccer\")", mtextStage0, 28, -222, 2.5, 2, -1, misSoccer1, -1, true, false, true, 0, -2, false);
mapNoteboneyard = addMission(map_boneyard, "Bone yard", "print(\"Map Bone yard\")", mtextStage0, 95.5, -123, 2.5, 2, -1, misBoneyard1, -1, true, false, true, 0, -2, false);
mapNotefair = addMission(map_fairgrounds, "Fair", "print(\"Map Fair\")", mtextStage0, 202, -81, 2.5, 2, -1, misFair1, -1, true, false, true, 0, -2, false);

mapNotewarehouse = addMission(map_warehouse, "Warehouse", "print(\"Map Warehouse\")", mtextStage0, 93.3, -19, 2.5, 2, -1, misWarehouse1, -1, true, false, true, 0, -2, false);
mapNoterefinery = addMission(map_refinery, "Refinery", "print(\"Map Refinery\")", mtextStage0, 48, 49, 2.5, 2, -1, misRefinery1, -1, true, false, true, 0, -2, false);

mapNotePedro = addMission(map_pedro, "Pedro", "print(\"Map Pedro\")", mtextStage0, -35, 133, 2.5, 2, -1, townPedro, -1, true, false, true, 0, -2, false);
mapNoteElSordo = addMission(map_elsordo, "ElSordo", "print(\"Map ELSordo\")", mtextStage0, 14, -95, 2.5, 2, -1, townSordo, -1, true, false, true, 0, -2, false);



