function red_lesnik_quest_have()
	local k = 0
	db.actor:iterate_inventory(function (dummy, item) 
		if item:section() == "mutant_psevdodog_tail" then 
			k = k + 1 
		end 
	end, nil)
	if k >= 10 then
		return true
	end
	return false
end

function red_lesnik_quest_reward(npc, gg)
	items.relocate_n_items_section(npc, "mutant_psevdodog_tail", "out", 10)
	dialogs.relocate_item_section(npc,"wpn_sks","in")
end

function red_kontroler_quest_die()
	local brainfucker = level_object_by_sid(152)
	if brainfucker and not brainfucker:alive() then
		red_kontroler_quest_tip()
		return true
	end
	return false
end

function red_kontroler_quest_tip()
	local tip = "Отлично, ребята. Порвали мозгодера, как карусель отмычку. Возвращайтесь в лагерь, а то скоро мутантов набежит. Теперь их никто не сдерживает у окраин леса."
	if not has_alife_info("red_kontroler_quest_die") then
		amk.send_tip(tip, "Джагер", 0, 5)
		db.actor:give_info_portion("red_kontroler_quest_die")
	end
end

function red_kontroler_quest_fail()
	local npc = level_object_by_sid(153)
	if (npc ~= nil) and (not npc:alive()) then
		return true
	end
	return false
end

function red_kontroler_quest_jager_grenade(gg, npc)
	dialogs.relocate_item_section(npc,"grenade_rgd5","in", 5)
end

function red_kontroler_quest_alligator_grenade(npc, gg)
	dialogs.relocate_item_section(npc,"grenade_f1","in", 2)
	dialogs.relocate_item_section(npc,"grenade_m61","in")
	dialogs.companion_start_following(npc, gg)
end

function red_kontroler_quest_reward(npc, gg)
	dialogs.relocate_item_section(npc,"vodka","in", 2)
	dialogs.relocate_money(npc,8000,"in")
	dialogs.companion_stop_following(npc, gg)
end

function podsumok_have2()
	if db.actor:object("podsumok") then
		return true
	end
	return false
end

function spawn_psevdopsy()
	amk.spawn_item("pseudodog_strong",vector():set(-57.973,-0.000,91.565), 24652, 3247, 15)
end
