-- СБЕЖАВШИЕ
-- Спавн лежачих зомби в фейковом состоянии
function set_fake_dist(obj_id,dist)
	level.client_spawn_manager():add(obj_id, 0, 
		function (idist, id, obj)
			if obj then
				obj:set_fake_death_dist(idist)
			end
		end
	, dist)
end
function hor_npc_spawn()
	say([[zwuk\shepot]])
	timer("battle", 0, {"marsh", 36, 1})
end
function hor_mistery1()
	db.actor.power = -1.0
	level.add_pp_effector("total_recall.ppe", 2003, true)
end
function hor_mistery2()
	level.remove_pp_effector(2003)
	level.add_pp_effector("deadcity_wake.ppe", 2000, false)
	say([[zwuk\black_smoke]])
	give_info("actor_cant_move")
end
function hor_mistery3()
	disable_info("actor_cant_move")
	db.actor.psy_health = -0.45
	local sobj=create("zombie_hell13",xyz(-11.253,0.668,420.63),134015,3393)
	set_fake_dist(sobj.id,5)
	local sobj=create("zombie_hell12",xyz(-21.932,1.103,412.734),129826,3393)
	set_fake_dist(sobj.id,5)
	local sobj=create("zombie_hell11",xyz(-26.84,0.972,400.03),127106,3393)
	set_fake_dist(sobj.id,5)
	local sobj=create("zombie_hell10",xyz(-27.244,0.785,387.612),126702,3393)
	set_fake_dist(sobj.id,5)
	create("esc_arhara_stalker_zombied",xyz(-8.7782077789307,0.77673399448395,432.03582763672),135240,3393)
	create("esc_arhara_stalker_zombied1",xyz(-18.946931838989,1.1313854455948,417.04510498047),131057,3393)
	create("voen_zombied1",xyz(-30.023006439209,1.2007337808609,423.13232421875),131057,3393)
	create("yan_zombied_respawn_1",xyz(-41.444496154785,0.9503276348114,433.05166625977),119173,3393)
	create("yan_zombied_respawn_2",xyz(-38.226104736328,0.8453928232193,453.63150024414),120706,3393)
	create("yan_zombied_respawn_3",xyz(-27.816192626953,1.0855697393417,456.80587768555),126338,3393)
	create("rad_zombied_respawn_1",xyz(-9.0127992630005,1.0691374540329,451.19839477539),126336,3393)
	create("rad_zombied_respawn_2",xyz(2.1374750137329,0.98274719715118,440.37200927734),140419,3459)
	create("rad_zombied_respawn_3",xyz(-9.0830049514771,1.0141178369522,468.87203979492),136724,3393)
	create("hor_npc",xyz(3.3656179904938,1.1488684415817,465.74649047852),142204,3459)
	map_spot(sobj.id, "crlc_small", "Polecat")
	create("psyonik",xyz(-27.426,0.63,383.915),126696,3393)
end

function hamster_kuznec5_start()
	if has_info("atp_propusk_shurup_done") then
		koiot_npc_spawn()
	end
end
function hamster_kuznec5_check()
	if has_info("hamster_kuznec5_start") then
		koiot_npc_spawn()
	end
end
function koiot_npc_spawn()
	local obj = create("koiot_npc",xyz(-24.974,0.097,107.244),93378,8266)
	map_spot(obj.id, "crlc_small", "Coyote")
	create("kuznec_koloda",obj.position, obj.m_level_vertex_id, obj.m_game_vertex_id, obj.id)
	create("leshyi_bandit1",xyz(54.077,0.011,108.868),137552,8233)
	create("leshyi_bandit2",xyz(38.712,3.072,103.715),129795,8232)
	create("leshyi_bandit3",xyz(31.919,0.307,125.678),126851,8232)
	create("leshyi_bandit4",xyz(2.029,0.114,107.464),111466,8230)
	create("leshyi_bandit5",xyz(-19.798,1.609,85.028),97862,8217)
	create("leshyi_bandit1",xyz(-22.758,0.162,128.181),95025,8265)
	create("leshyi_bandit2",xyz(-40.576,0.454,123.988),81352,8265)
	create("leshyi_bandit4",xyz(-31.155,-0.006,150.615),88322,8225)
	create("leshyi_bandit5",xyz(-54.298,0.272,158.342),70855,8385)
end
function hor_npc_dead()
	sms("%c[sender]"..translate("name_mechenii")..":\\n%c[sms_red]"..translate("sms_strelok_hor_npc_dead1_0"), 20, "meceniy", 10000, nil, [[sms\strelok\hor_npc_dead1]])
	sms("%c[sender]"..translate("name_kuznetsov")..":\\n%c[sms_red]"..translate("sms_kuznecov_hor_npc_dead_2_0"), 30, "kuznecov", 10000, nil, [[sms\kuznecov\hor_npc_dead_2]])
end
function koiot_npc_dead()
	sms("%c[sender]"..translate("name_mechenii")..":\\n%c[sms_red]"..translate("sms_strelok_koiot_npc_dead1_0"), 55, "meceniy", 10000, nil, [[sms\strelok\koiot_npc_dead1]])
	sms("%c[sender]"..translate("name_kuznetsov")..":\\n%c[sms_red]"..translate("sms_kuznecov_koiot_npc_dead_2_0"), 65, "kuznecov", 10000, nil, [[sms\kuznecov\koiot_npc_dead_2]])
end
function hamster_kuznec5_done()
	got("wpn_aek971_m1",1)
end