OfficersTick = function()
	if FieldGeneralLiveState0 then
		Utils.Do(FieldGeneral0, function(general)
			if not general.IsDead and general.IsInWorld then
				FieldGeneralHealth0 = general.Health
			elseif general.IsDead then
				FieldGeneralHealth0 = "Died"
			end
		end)
	else
		FieldGeneralHealth0 = "Died"
	end
	if FieldGeneralLiveState1 then
		Utils.Do(FieldGeneral1, function(general)
			if not general.IsDead and general.IsInWorld then
				FieldGeneralHealth1 = general.Health
			elseif general.IsDead then
				FieldGeneralHealth1 = "Died"
			end
		end)
	else
		FieldGeneralHealth1 = "Died"
	end
	if FieldGeneralLiveState2 then
		Utils.Do(FieldGeneral2, function(general)
			if not general.IsDead and general.IsInWorld then
				FieldGeneralHealth2 = general.Health
			elseif general.IsDead then
				FieldGeneralHealth2 = "Died"
			end
		end)
	else
		FieldGeneralHealth2 = "Died"
	end
	if FieldGeneralLiveState3 then
		Utils.Do(FieldGeneral3, function(general)
			if not general.IsDead and general.IsInWorld then
				FieldGeneralHealth3 = general.Health
			elseif general.IsDead then
				FieldGeneralHealth3 = "Died"
			end
		end)
	else
		FieldGeneralHealth3 = "Died"
	end
	Trigger.AfterDelay(1, function() OfficersTick() end)
end
InitOfficer = function()
	FieldGeneral0 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "gnrl" or g.Type == "gnrl.squad" or g.Type == "gnrl.colonel" or g.Type == "e7" or g.Type == "spy.england") and g.Owner == multi0 end)
	FieldGeneral1 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "gnrl" or g.Type == "gnrl.squad" or g.Type == "gnrl.colonel" or g.Type == "e7" or g.Type == "spy.england") and g.Owner == multi1 end)
	FieldGeneral2 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "gnrl" or g.Type == "gnrl.squad" or g.Type == "gnrl.colonel" or g.Type == "e7" or g.Type == "spy.england") and g.Owner == multi2 end)
	FieldGeneral3 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return (g.Type == "gnrl" or g.Type == "gnrl.squad" or g.Type == "gnrl.colonel" or g.Type == "e7" or g.Type == "spy.england") and g.Owner == multi3 end)
	Utils.Do(FieldGeneral0, function(general)
		FieldGeneralHealth0 = general.Health
		general.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi0.IsBot then
				if not general.IsDead and general.IsInWorld then
					general.GrantUpgrade("nocontrol")
					general.GrantUpgrade("autocontrol")
					general.GrantUpgrade("wandering")
					general.Stance = "AttackAnything"
					general.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(general, function()
			FieldGeneralLiveState0 = false
			Trigger.AfterDelay(Utils.RandomInteger(33, 44), function()
				multi0.MarkFailedObjective(SurviveStartLeaderObjective0)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1, 2)), function()
				if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
				else
					if (multi0.Faction == "allies" or multi0.Faction == "england" or multi0.Faction == "france" or multi0.Faction == "germany" or multi0.Faction == "greece" or multi0.Faction == "spain") then
						Media.PlayMovieInRadar("grvestne.vqa", nil)
					elseif (multi0.Faction == "soviet" or multi0.Faction == "russia" or multi0.Faction == "ukraine" or multi0.Faction == "turkey") then
						Media.PlayMovieInRadar("sovcemet.vqa", nil)
					end
				end
			end)
		end)
	end)
	Utils.Do(FieldGeneral1, function(general)
		FieldGeneralHealth1 = general.Health
		general.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi1.IsBot then
				if not general.IsDead and general.IsInWorld then
					general.GrantUpgrade("nocontrol")
					general.GrantUpgrade("autocontrol")
					general.GrantUpgrade("wandering")
					general.Stance = "AttackAnything"
					general.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(general, function()
			FieldGeneralLiveState1 = false
			Trigger.AfterDelay(Utils.RandomInteger(33, 44), function()
				multi1.MarkFailedObjective(SurviveStartLeaderObjective1)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1, 2)), function()
				if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
				else
					if (multi1.Faction == "allies" or multi1.Faction == "england" or multi1.Faction == "france" or multi1.Faction == "germany" or multi1.Faction == "greece" or multi1.Faction == "spain") then
						Media.PlayMovieInRadar("grvestne.vqa", nil)
					elseif (multi1.Faction == "soviet" or multi1.Faction == "russia" or multi1.Faction == "ukraine" or multi1.Faction == "turkey") then
						Media.PlayMovieInRadar("sovcemet.vqa", nil)
					end
				end
			end)
		end)
	end)
	Utils.Do(FieldGeneral2, function(general)
		FieldGeneralHealth2 = general.Health
		general.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi2.IsBot then
				if not general.IsDead and general.IsInWorld then
					general.GrantUpgrade("nocontrol")
					general.GrantUpgrade("autocontrol")
					general.GrantUpgrade("wandering")
					general.Stance = "AttackAnything"
					general.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(general, function() 
			FieldGeneralLiveState2 = false
			Trigger.AfterDelay(Utils.RandomInteger(33, 44), function()
				multi2.MarkFailedObjective(SurviveStartLeaderObjective2)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1, 2)), function()
				if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
				else
					if (multi2.Faction == "allies" or multi2.Faction == "england" or multi2.Faction == "france" or multi2.Faction == "germany" or multi2.Faction == "greece" or multi2.Faction == "spain") then
						Media.PlayMovieInRadar("grvestne.vqa", nil)
					elseif (multi2.Faction == "soviet" or multi2.Faction == "russia" or multi2.Faction == "ukraine" or multi2.Faction == "turkey") then
						Media.PlayMovieInRadar("sovcemet.vqa", nil)
					end
				end
			end)
		end)
	end)
	Utils.Do(FieldGeneral3, function(general)
		FieldGeneralHealth3 = general.Health
		general.GrantUpgrade("missionmarker.empty")
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function()
			if multi3.IsBot then
				if not general.IsDead and general.IsInWorld then
					general.GrantUpgrade("nocontrol")
					general.GrantUpgrade("autocontrol")
					general.GrantUpgrade("wandering")
					general.Stance = "AttackAnything"
					general.Scatter()
				end
			else
			end
		end)
		Trigger.OnKilled(general, function()
			FieldGeneralLiveState3 = false
			Trigger.AfterDelay(Utils.RandomInteger(33, 44), function()
				multi3.MarkFailedObjective(SurviveStartLeaderObjective3)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1, 2)), function()
				if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
				else
					if (multi3.Faction == "allies" or multi3.Faction == "england" or multi3.Faction == "france" or multi3.Faction == "germany" or multi3.Faction == "greece" or multi3.Faction == "spain") then
						Media.PlayMovieInRadar("grvestne.vqa", nil)
					elseif (multi3.Faction == "soviet" or multi3.Faction == "russia" or multi3.Faction == "ukraine" or multi3.Faction == "turkey") then
						Media.PlayMovieInRadar("sovcemet.vqa", nil)
					end
				end
			end)
		end)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2, 4)), function() FieldGeneralSpeech0() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2, 4)), function() FieldGeneralSpeech1() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2, 4)), function() FieldGeneralSpeech2() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2, 4)), function() FieldGeneralSpeech3() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(66, 99)), function() FieldGeneralDrinkCoffe0() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(66, 99)), function() FieldGeneralDrinkCoffe1() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(66, 99)), function() FieldGeneralDrinkCoffe2() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(66, 99)), function() FieldGeneralDrinkCoffe3() end)
end
FieldGeneralSpeech0 = function()
	if FieldGeneralLiveState0 then
		Utils.Do(FieldGeneral0, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation0) .. ", I'am the ", "-" .. tostring(Invocation0) .. ", My rank is ", "-" .. tostring(Invocation0) .. ", Me, a ", "-" .. tostring(Invocation0) .. ", Do, you know who i'am? \n -The " }) .. tostring(Rank0), general.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi0.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function() FieldGeneralSpeech0() end)
end
FieldGeneralSpeech1 = function()
	if FieldGeneralLiveState1 then
		Utils.Do(FieldGeneral1, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation1) .. ", I'am the ", "-" .. tostring(Invocation1) .. ", My rank is ", "-" .. tostring(Invocation1) .. ", Me, a ", "-" .. tostring(Invocation1) .. ", Do, you know who i'am? \n -The " }) .. tostring(Rank1), general.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi1.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function() FieldGeneralSpeech1() end)
end
FieldGeneralSpeech2 = function()
	if FieldGeneralLiveState2 then
		Utils.Do(FieldGeneral2, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation2) .. ", I'am the ", "-" .. tostring(Invocation2) .. ", My rank is ", "-" .. tostring(Invocation2) .. ", Me, a ", "-" .. tostring(Invocation2) .. ", Do, you know who i'am? \n -The " }) .. tostring(Rank2), general.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi2.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function() FieldGeneralSpeech2() end)
end
FieldGeneralSpeech3 = function()
	if FieldGeneralLiveState3 then
		Utils.Do(FieldGeneral3, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation3) .. ", I'am the ", "-" .. tostring(Invocation3) .. ", My rank is ", "-" .. tostring(Invocation3) .. ", Me, a ", "-" .. tostring(Invocation3) .. ", Do, you know who i'am? \n -The " }) .. tostring(Rank3), general.CenterPosition + WVec.New(Utils.Random({ -1, 1 }), Utils.Random({ -1, 1 }), Utils.Random({ -15, 15 })), Utils.RandomInteger(88, 122), multi3.Color)
			end
		end)
	end
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(22, 44)), function() FieldGeneralSpeech3() end)
end
FieldGeneralDrinkCoffe0 = function()
	local DrinkCoffeTime = DateTime.Seconds(Utils.RandomInteger(8, 16))
	if FieldGeneralLiveState0 then
		Utils.Do(FieldGeneral0, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("unitdisable", DrinkCoffeTime)
				general.GrantTimedUpgrade("coffe", DrinkCoffeTime)
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation0) .. ", i have " .. tostring(DrinkCoffeTime / 25) .. " minute coffe break!", "-" .. tostring(Invocation0) .. ", Pause operation for " .. tostring(DrinkCoffeTime / 25) .. "minute, while i refreshed....", "-" .. tostring(Invocation0) .. ", Stop commandig me until " .. tostring(DrinkCoffeTime / 25) .. " minute." }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(99, 111), Utils.Random({ HSLColor.Cyan, HSLColor.Gray, HSLColor.LightCyan, HSLColor.Brown }))
			end
			Trigger.AfterDelay(DrinkCoffeTime, function()
				if not general.IsDead and general.IsInWorld then
					general.Owner = multi0
					general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
					Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation0) .. ", I'm ready to war!", "-" .. tostring(Invocation0) .. ", I'm on duty!", "-" .. tostring(Invocation0) .. ", I'm here!" }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(88, 122), Utils.Random({ HSLColor.Green, HSLColor.LightGreen, HSLColor.DarkGreen }))
				end
			end)
		end)
	end
end
FieldGeneralDrinkCoffe1 = function()
	local DrinkCoffeTime = DateTime.Seconds(Utils.RandomInteger(8, 16))
	if FieldGeneralLiveState1 then
		Utils.Do(FieldGeneral1, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("unitdisable", DrinkCoffeTime)
				general.GrantTimedUpgrade("coffe", DrinkCoffeTime)
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation1) .. ", i have " .. tostring(DrinkCoffeTime / 25) .. " minute coffe break!", "-" .. tostring(Invocation1) .. ", Pause operation for " .. tostring(DrinkCoffeTime / 25) .. "minute, while i refreshed....", "-" .. tostring(Invocation1) .. ", Stop commandig me until " .. tostring(DrinkCoffeTime / 25) .. " minute." }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(99, 111), Utils.Random({ HSLColor.Cyan, HSLColor.Gray, HSLColor.LightCyan, HSLColor.Brown }))
			end
			Trigger.AfterDelay(DrinkCoffeTime, function()
				if not general.IsDead and general.IsInWorld then
					general.Owner = multi1
					general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
					Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation1) .. ", I'm ready to war!", "-" .. tostring(Invocation1) .. ", I'm on duty!", "-" .. tostring(Invocation1) .. ", I'm here!" }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(88, 122), Utils.Random({ HSLColor.Green, HSLColor.LightGreen, HSLColor.DarkGreen }))
				end
			end)
		end)
	end
end
FieldGeneralDrinkCoffe2 = function()
	local DrinkCoffeTime = DateTime.Seconds(Utils.RandomInteger(8, 16))
	if FieldGeneralLiveState2 then
		Utils.Do(FieldGeneral2, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("unitdisable", DrinkCoffeTime)
				general.GrantTimedUpgrade("coffe", DrinkCoffeTime)
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation2) .. ", i have " .. tostring(DrinkCoffeTime / 25) .. " minute coffe break!", "-" .. tostring(Invocation2) .. ", Pause operation for " .. tostring(DrinkCoffeTime / 25) .. "minute, while i refreshed....", "-" .. tostring(Invocation2) .. ", Stop commandig me until " .. tostring(DrinkCoffeTime / 25) .. " minute." }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(99, 111), Utils.Random({ HSLColor.Cyan, HSLColor.Gray, HSLColor.LightCyan, HSLColor.Brown }))
			end
			Trigger.AfterDelay(DrinkCoffeTime, function()
				if not general.IsDead and general.IsInWorld then
					general.Owner = multi2
					general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
					Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation2) .. ", I'm ready to war!", "-" .. tostring(Invocation2) .. ", I'm on duty!", "-" .. tostring(Invocation2) .. ", I'm here!" }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(88, 122), Utils.Random({ HSLColor.Green, HSLColor.LightGreen, HSLColor.DarkGreen }))
				end
			end)
		end)
	end
end
FieldGeneralDrinkCoffe3 = function()
	local DrinkCoffeTime = DateTime.Seconds(Utils.RandomInteger(8, 16))
	if FieldGeneralLiveState3 then
		Utils.Do(FieldGeneral3, function(general)
			if not general.IsDead and general.IsInWorld then
				general.GrantTimedUpgrade("unitdisable", DrinkCoffeTime)
				general.GrantTimedUpgrade("coffe", DrinkCoffeTime)
				general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
				Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation3) .. ", i have " .. tostring(DrinkCoffeTime / 25) .. " minute coffe break!", "-" .. tostring(Invocation3) .. ", Pause operation for " .. tostring(DrinkCoffeTime / 25) .. "minute, while i refreshed....", "-" .. tostring(Invocation3) .. ", Stop commandig me until " .. tostring(DrinkCoffeTime / 25) .. " minute." }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(99, 111), Utils.Random({ HSLColor.Cyan, HSLColor.Gray, HSLColor.LightCyan, HSLColor.Brown }))
			end
			Trigger.AfterDelay(DrinkCoffeTime, function()
				if not general.IsDead and general.IsInWorld then
					general.Owner = multi3
					general.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
					Media.FloatingText(Utils.Random({ "-" .. tostring(Invocation3) .. ", I'm ready to war!", "-" .. tostring(Invocation3) .. ", I'm on duty!", "-" .. tostring(Invocation3) .. ", I'm here!" }), general.CenterPosition + WVec.New(0, -1, 15), Utils.RandomInteger(88, 122), Utils.Random({ HSLColor.Green, HSLColor.LightGreen, HSLColor.DarkGreen }))
				end
			end)
		end)
	end
end

