// Quest (<identifier>, <"Questgiver character name">, <number of dialog steps>)
//
// Conditions:
// 				ConditionVisitArea <"logic box name"> <number of player characters>
//				ConditionConquerLocation <location id>
//				ConditionKillType <"character name"> <count>
//				ConditionItems <equipment id> <count>
//
// Rewards:
//				RewardMoney	<100>
//				RewardItem	<equipment id> <count>
//				RewardJoin
//				RewardUnlockQuest <quest id>
//        RewardUnlockTrader <"trader name">
//				RewardAchievement <achievement id> (as in docs/jar_steam_achievements.odt or as in EAchievement+1)
//
// ReportFile <report file id>
//
// UnlockedByDefault  (quest is available from beginning)
// ActiveByDefault (quest is in log from beginning)
//
// TimeLimit	<Number of days>		(quest has to be solved in given time, default: no limit)
//
// SetDestinationNPC "Questtarget character name"
//

// Quests for Testing added by Peter
// Made Test Quest1 = Area Trigger, Made Test Quest 2 = Kill Slay, Made Q4 unlock Q3, Updated quest.xml to fit quests

Quest (1, "Father_Test", 2)
{
	ConditionVisitArea "QUEST_test" 1
		
	RewardMoney 10
	RewardUnlockQuest 2
	ReportFile 0
}


Quest (2, "Father_Test", 2)
{
	UnlockedByDefault
	ConditionKillType "q_Slay" 1
	//ConditionKillType "Father_Test" 1
	
	ReportFile 2

	RewardUnlockQuest 3
	
	RewardMoney 666
	RewardItem 100 2
	RewardItem 50 1
}


Quest (3, "Father_Test", 2)
{
	ConditionVisitArea "QUEST_test" 1
	
	RewardMoney 999
	RewardItem 100 20
	RewardItem 50 6
	RewardUnlockQuest 4
	
	TimeLimit	10
	ReportFile 1
}


Quest (4, "Father_Test", 2)
{
	ConditionConquerLocation 20
	RewardUnlockQuest 5
	
	TimeLimit 5
}

Quest (5, "Father_Test", 2)
{
	// 10 pornmas
	ConditionItems 814 10
	RewardJoin
	
	TimeLimit 20
}

//--------------------JA QUESTS--------------------------------

//Arulco Liberation
Quest (6, "", 1)
{
	MainQuest

	ActiveByDefault
	
	ConditionKillType "Deidranna" 1
	
	RewardAchievement 35
	
	ReportFile 0
}

//Secure Drassen Airport
Quest (7, "", 1)
{
	ActiveByDefault
	
	ConditionConquerLocation 52

 	SetDestinationNPC "Pablo"

 	RewardUnlockQuest 14
 	RewardUnlockQuest 200

	// RewardAchievement 27

}

//Find Miguel Cordonna Leader of Rebelgroup
Quest (8, "", 1)
{
	ActiveByDefault
	
	//A little bit cheaty here
	ConditionVisitArea "q_l_ov12_miguel" 1

	SetDestinationNPC "Miguel"
	
  //Unlock Kingpin Quest
	RewardUnlockQuest 12
	
}

//Father -> Find IRA
Quest (9, "Walker", 4)
{
	UnlockedByDefault
	
	ConditionVisitArea "q_l_drassencity_bar" 1 // NEEDS TO BE WHERE IRA IS LOCATED
	
 	SetDestinationNPC "Ira"
 	
 	//Unlock Ira follow up: Free Cambria Mine
  RewardUnlockQuest 10
 	
 	//Unlock kill Hillbillies Cannibals Father Quest at Drassen, same location as Skyrider quest
	RewardUnlockQuest 15
 	
 	//To liberate the mines you can buy some stuff at Herve
 	RewardUnlockTrader "Herve"
}


//Ira -> Capture Mine 
Quest (10, "Ira", 4)
{
	//Caputre Cambria Mine
	ConditionConquerLocation 46
	
	//Unlock Oswald Quest
	RewardUnlockQuest 16
	
	// Unlock Ira Follow Up
	RewardUnlockQuest 11
	
	RewardItem	828 1
	
	//Talk to Oswald after you conquered the mines
	SetDestinationNPC "Oswald"
}


//Ira Secure Water pump Station
Quest (11, "Ira", 3)
{
	//Capture Water Pump Station
	
	ConditionConquerLocation 51

	RewardJoin
}


Quest (12, "Miguel", 5)
{	
	ConditionVisitArea "q_l_sanmona_kingpin1" 1

	SetDestinationNPC "Kingpin"
	
	//Unlock Kingpin Quest
	RewardUnlockQuest 20
	
	//Unlock Oswalds Secret Stash Quest
	RewardUnlockQuest 17
	
	//Unlock Dimitri Quest
	RewardUnlockQuest 18		
	
}


Quest (13, "Vince", 4)
{
	//Sam_14
	ConditionConquerLocation 45
	//sam_station_03
	ConditionConquerLocation 7
	//Meduna Sam
	ConditionConquerLocation 1
	UnlockedByDefault
	
	RewardJoin
	RewardMoney 5000
	
	TimeLimit	30
}


Quest (14, "Skyrider", 6)
{
	//Quest Diamonds
	ConditionItems 801 4                      
	
	//UnlockedByDefault
	RewardItem	801 2
	RewardItem	193 1
}


Quest (15, "Walker", 4)
{	
	//Only conquer Location - Did crash otherwise
	
	ConditionConquerLocation 37
	
	RewardMoney 1418
}

//Free Alma and Grumm for all the mines

Quest (16, "Oswald", 2)
{	
	ConditionConquerLocation 27 // Free Alma
	ConditionConquerLocation 57 // Free Grumm
	
	// Replaced the $20,000 reward with AAC Honey Badger and 5 boxes of ammo
	RewardItem 7001 1
	RewardItem 914 100
}


//Oswald’s secret stash
Quest (17, "Miguel", 1)
{
	//Quest Diamonds Oswald
	ConditionItems 802 5
	
	//Miguel joins
	RewardJoin
}


//I don't like the drugs
Quest (18, "Dimitri", 3)
{
	//Conquer the Farm
	ConditionConquerLocation 38
	
	//Reward Dimitri recruit quest
	RewardUnlockQuest 19
}

Quest (19, "Dimitri", 3)
{
	//Conquer Drug Shippinh depot
	ConditionConquerLocation 42
	
	//Dimitri joins
	RewardJoin
}

//Poor people are poor customers -> Free Alma City
Quest (20, "Kingpin", 5)
{
	//San Mona City Location
	ConditionConquerLocation 34
	
	SetDestinationNPC "Iggy"
	
	RewardMoney	50000
	
	//Unlock Kingpin Quest to Balime
	RewardUnlockQuest 97
	
	//Iggy joins
	RewardJoin
	
	//Tonyshop in san mona unlocked (2 traders)
	RewardUnlockTrader "Tony"
	RewardUnlockTrader "Jessy"
}

//---Not included yet---  Could also be included on Free San Mona Quest or Free Balime Quest!
Quest (97, "Kingpin", 2)
{
	//Free Balime
	ConditionConquerLocation  61
	
	RewardMoney	75000
	
}


//---Not included yet---
Quest (95, "Kingpin", 3)
{
	ConditionVisitArea "q_l_sanmona_kingpin1" 1
	
	//UNLOCK TRADER - FUNCTION MISSING YET?
	//Give Key
	RewardItem 730 1
	
}

Quest (21, "Willis", 3)
{
	UnlockedByDefault

	ConditionVisitArea "q_l_grummindustrial_harbour" 1
 
 	SetDestinationNPC "Fredo"
 	
 	RewardUnlockQuest 22
 	RewardUnlockQuest 23
}

Quest (22, "Fredo", 2)
{
	ConditionItems 803 10
	
	SetDestinationNPC "Willis"
	
	TimeLimit	14
	
	//Rward Medkits and Bandages
	RewardItem 100 2
	RewardItem 101 3
	RewardItem 104 2
	RewardItem 105 5
	//After you brought medical supplies to the hospital, willis asks you to go to orta to stop the chemical weapons developement
	RewardUnlockQuest 26
	
	//Finding the medical supplies unlocks the nurse that trades medkits to you
	RewardUnlockTrader "Nurse"
}

Quest (23, "Carlos", 4)
{	
	//Conquer Looters Hideout 18
	ConditionConquerLocation 17
	
	//Conquer Looters Hideout 21
	ConditionConquerLocation 16
	
	//Conquer Looters Hideout 22
	ConditionConquerLocation 21
	RewardJoin
}

Quest (24, "Maddog", 3)
{
	UnlockedByDefault
	// Give knife and lockpit to recruit
	ConditionItems 182 1
	ConditionItems 7 1
	ConditionItems 160 1
	
	RewardJoin
}

Quest (25, "Matt", 4)
{
	UnlockedByDefault

	ConditionVisitArea "q_l_tixaprison_cellblock" 1
 
 	SetDestinationNPC "Dynamo"
 	//RewardJoin
 	RewardUnlockQuest 96
}

Quest (96, "Dynamo", 1)
{
	ConditionVisitArea "q_l_tixaprison_dynamoscell" 1
 
 	RewardJoin

}

Quest (40, "Shank", 1)
{
	UnlockedByDefault
  	//Unlocked by releasing Dynamo
	ConditionVisitArea "q_l_tixaprison_shank" 1
	
	SetDestinationNPC "Shank"
	
	RewardJoin
}

//Chemical Warfare
Quest (26, "Willis", 3)
{
	//Followup to Hospital Supply Quest
	//UnlockedByDefault
	ConditionVisitArea "q_l_ortalab_ernest" 1
	
	SetDestinationNPC "Ernest"
	RewardUnlockQuest 27
}

//Punishment: Pippin is crazy kill him
Quest (27, "Ernest", 3)
{
	ConditionKillType "Ernest" 1
	//After Dialog change faction
	SetDestinationNPC "Elliot"
	RewardUnlockQuest 28
	
	RewardAchievement 37
}

//You found Elliot, conquer the warehouse, find the report and return to Willis.
Quest (28, "Elliot", 3)
{
	//UnlockedByDefault
	//The secret report of chemical weapons research
	ConditionItems 804 1
	//Conquer the warehouse
	ConditionConquerLocation 29
	//Kill Elliot, initally important to get the key
	ConditionKillType "Elliot" 1
	
	//Time limit is only one day
	TimeLimit 1
	SetDestinationNPC "Willis"
	
	//RewardUnlockQuest 97 //Willis talks with you about the thread
}

Quest (29, "Rich Kid", 4)
{
	UnlockedByDefault
	// Epic Dahonkos limited edtion find them for the rich kiddie
	ConditionItems 702 1
	
	RewardMoney 150000
	
	RewardAchievement 39
}

Quest (30, "Eldin", 4)
{
	UnlockedByDefault
	//The Crown
	ConditionItems 805 1
	//The Ring
	ConditionItems 806 1
	
	//Rocketrifle and C4
	RewardItem 50 1
	RewardItem 912 10
	RewardItem 160 6
	
}

Quest (31, "Brenda", 3)
{
	UnlockedByDefault
	//Quest item lesbian porn mag
	ConditionItems 807 1
	
	//Rocketrifle and C4
	RewardItem 50 1
	RewardItem 912 10
	RewardItem 160 6
}

Quest (32, "Conrad", 4)
{
	UnlockedByDefault
	//Find military intel
	ConditionItems 835 5
	RewardJoin
}

//Child Labor: Go to Doreen at Drassen Factory
Quest (33, "Fatima", 4)
{
	ConditionVisitArea "q_l_drassencity_doreen" 1
	
	SetDestinationNPC "Doreen"
	RewardUnlockQuest 98
}

Quest (98, "Doreen", 2)
{
	ConditionKillType "Doreen" 1
	
	RewardAchievement 38
	
	SetDestinationNPC "Fatima"
	//Fatima gives you Food and Stuff
	RewardItem 730 1
	RewardItem 732 1
	RewardItem 733 1
	RewardItem 706 1
	RewardItem 809 720
	RewardItem 750 1
	RewardItem 841 1
}

Quest (34, "Carmen", 3)
{
	UnlockedByDefault
	ConditionKillType "Slay" 1

	RewardUnlockQuest 35
	RewardMoney 7500
	
	//ActiveByDefault
	ReportFile 1
	
}

Quest (35, "Carmen", 2)
{
	ConditionKillType "MOM" 1

	RewardUnlockQuest 36
	RewardMoney 10000
	
  //ActiveByDefault	
	ReportFile 2
}

Quest (36, "Carmen", 2)
{

	ConditionKillType "Impostor" 1

	RewardUnlockQuest 37
	RewardMoney 12500

	//ActiveByDefault
	ReportFile 3
}

Quest (37, "Carmen", 2)
{
	ConditionKillType "Eddie" 1

	RewardUnlockQuest 38
	RewardMoney 15000

	//ActiveByDefault	
	ReportFile 4
}

Quest (38, "Carmen", 2)
{
	ConditionKillType "T-Rex" 1

	RewardUnlockQuest 39
	RewardMoney 20000

	//ActiveByDefault	
	ReportFile 5
}

Quest (39, "Carmen", 2)
{
	ConditionKillType "Druggist" 1

	RewardUnlockQuest 35
	RewardMoney 50000
	
	//ActiveByDefault
	ReportFile 6
}


Quest (41, "Devin", 2)
{
	UnlockedByDefault
	//Condition items, several explosives
	//Two Mines
	ConditionItems 140 2
	//C4 fr
	ConditionItems 160 1
	//C4 Remote
	ConditionItems 161 2
	RewardJoin
}

Quest (42, "Hamous", 2)
{
	UnlockedByDefault
	//Conquer the beach
	ConditionConquerLocation 64
	RewardItem 747 1
	RewardJoin
}

//--------------------DLC2 EMBASSY QUESTS--------------------------------

//Kill Rygor
Quest (44, "", 1)
{
	//ActiveByDefault
	
	ConditionKillType "Rygor" 1
}

//Find Gaiden
Quest (45, "", 1)
{
	//ActiveByDefault
	
	ConditionVisitArea "q_l_dlc2_ambassador" 1
}

//Talk to Jamirez Mercenary
Quest (43, "Jamirez", 4)
{
	UnlockedByDefault
	//Condition item Military Docs
	ConditionItems 853 1
	RewardJoin
}

//Find Dropzones
Quest (46, "", 1)
{
	//ActiveByDefault
	
	ConditionVisitArea "q_l_dlc2_drop1" 1
	ConditionVisitArea "q_l_dlc2_drop2" 1
}

//Kill Rocketguys
Quest (50, "", 1)
{
	//ActiveByDefault
	
	ConditionKillType "Excia5" 5
}

//--------------------DLC1 BUNKER QUESTS--------------------------------

//Kill Silevic
Quest (47, "", 1)
{
	//ActiveByDefault
	
	ConditionKillType "Silevic" 1
}

//Find Fox
Quest (48, "Fox", 1)
{
	//ActiveByDefault
	
	ConditionVisitArea "q_l_dlc1_rescuefox" 1
	RewardJoin
}

//Find Dropzones
Quest (49, "", 1)
{
	//ActiveByDefault
	
	ConditionVisitArea "q_l_dlc1_drop1" 1
}

// =========================================================================
// ==                      COMBAT EVOLVED MOD QUESTS                      ==
// =========================================================================


// KEY TO YOUR DREAMS
// ==================
Quest (200, "Waldo", 1)
{
	// Key to the stash required
	ConditionItems 893 1

	// Unlocks shop
	RewardUnlockTrader "Waldo"
}

// DAMN YOU, ROMEO
// ===============
Quest (201, "Doreen", 2)
{
	UnlockedByDefault

	// Suicide note required
	ConditionItems 891 1

	// Unlocks Fatima's quest
	RewardUnlockQuest 33
}