local nagrad = {
	level_nagrada_fox_outfit = {
		"militaryspec_outfit",
		"military_outfit",
		"specops_outfit",
		"outfit_soldier_m1",
		"outfit_specnaz_m1"
	},
	level_nagrada_fox_weapon = {
		"wpn_ak74",
		"wpn_ak74m",
		"wpn_abakan",
		"wpn_ak105",
		"wpn_aks74",
		"wpn_ak104"
	}
}

local nagrada = {
	level_medkit_scientic_fox_outfit = {
		"scientist_suit_white",
		"merc_scientific_outfit",
		"scientific_outfit",
		"nebo_scientific_outfit",
		"monolit_scientific_outfit",
		"dolg_scientific_outfit",
		"protection_outfit",
		"freedom_scientific_outfit",
		"monolit_scientific_outfit",
		"scientific_lastday_outfit",
		"seva_scient_outfit"
	},
	level_medkit_scientic_fox_weapon = {
		"wpn_sr25_mk11_mod0_sk1",
		"wpn_vint14",
		"wpn_hk417_sk1",
		"wpn_svt40",
		"wpn_fn_fal",
		"wpn_galil",
		"wpn_scar_mk17",
		"wpn_g3",
		"wpn_rem700"
	}
}

function add_abakan(first_speaker, second_speaker)
	got("wpn_aks74")
end
function add_mp5(first_speaker, second_speaker)
	got("wpn_mp5")
end
function give_10conserva(first_speaker, second_speaker)
	lost("conserva",10)
end
function give_5kolbasa(first_speaker, second_speaker)
	lost("kolbasa",5)
end
function give_3kolbasa(first_speaker, second_speaker)
	lost("kolbasa",3)
end
function kolbasa3_have()
  	return has("kolbasa",3) 
end
function kolbasa5_have()
  	return has("kolbasa",5) 
end
function conserva10_have()
  	return has("conserva",10) 
end
function give_3conserva(first_speaker, second_speaker)
	lost("conserva",3)
end
function give_2kolbasa(first_speaker, second_speaker)
	lost("kolbasa",2)
end
function give_2drink(first_speaker, second_speaker)
	lost("energy_drink",2)
end
function give_3drink(first_speaker, second_speaker)
	lost("energy_drink",3)
end
function give_5bread(first_speaker, second_speaker)
	lost("bread",5)
end
function give_10bread(first_speaker, second_speaker)
	lost("bread",5)
end
function conserva3_have()
  	return has("conserva",3) 
end
function kolbasa2_have()
  	return has("kolbasa",2) 
end
function drink2_have()
  	return has("energy_drink",2) 
end
function drink3_have()
  	return has("energy_drink",3) 
end
function bread5_have()
  	return has("bread",5) 
end
function bread10_have()
  	return has("bread",5) 
end
function has_soldiers_bribe(actor, npc)
	return has("vodka",1)
end
function give_soldiers_bribe(actor, npc)
	lost("vodka",1)
	archievements.acv_count_event("acv_bribe", 20, "acv_bribe")
end
function have_krysyk_goods()
  	return has("af_electra_moonlight",3) and
		has("af_dummy_glassbeads",1)
end
function give_krysyk_goods()
	lost("af_electra_moonlight",3)
	lost("af_dummy_glassbeads",1)
end
function give_pda_krysyka()
	lost("pda_krysyka",1)
end
function have_pda_krysyka()
  	return has("pda_krysyka",1)
end
function give_borov_11()
	lost("scaintist_docs",1)
	lost("inventory_sakbox_05",1)
end
function have_borov_11()
  	return has("scaintist_docs",1) and
		has("inventory_sakbox_05",1)
end
function add_wpn_svd(first_speaker, second_speaker)
	got("wpn_svd")
end
function add_wpn_sig(first_speaker, second_speaker)
	got("wpn_tmp")
end
function add_wpn_svu(first_speaker, second_speaker)
	got("wpn_svu")
end
function add_wpn_vintorez(first_speaker, second_speaker)
	got("wpn_vintorez")
end
function add_dolg_scientific_outfit(first_speaker, second_speaker)
	got("dolg_scientific_outfit")
end
function add_militaryspec_outfit(first_speaker, second_speaker)
	got("militaryspec_outfit")
end
function add_dolg_black_exoskeleton(first_speaker, second_speaker)
	got("dolg_black_exoskeleton")
end
function add_4ammo_vog_25s(first_speaker, second_speaker)
	got("ammo_vog-25",4)
end
function add_3ammo_vog_25p(first_speaker, second_speaker)
	got("ammo_vog-25p",3)
end
function add_2ammo_762x54_7h1(first_speaker, second_speaker)
	got("ammo_7.62x54_7h1",2)
end
function add_2ammo_762x54_ap(first_speaker, second_speaker)
	got("ammo_7.62x54_ap",1)
end
function add_1ammo_762x54_7h14(first_speaker, second_speaker)
	got("ammo_7.62x54_7h14",2)
end
function add_2ammo_762x54_7h14(first_speaker, second_speaker)
	got("ammo_7.62x54_7h14",2)
end
function add_1ammo_762x54_ap(first_speaker, second_speaker)
	got("ammo_7.62x54_ap",1)
end
function add_3ammo_7_62_fmj(first_speaker, second_speaker)
	got("ammo_7.62x39_fmj",3)
end
function add_2ammo_762x39_ap(first_speaker, second_speaker)
	got("ammo_7.62x39_ap",2)
end
function add_2antirad(first_speaker, second_speaker)
	got("antirad",2)
end
function add_3antirad(first_speaker, second_speaker)
	got("antirad",3)
end
function add_1medkit_scientic(first_speaker, second_speaker)
	got("medkit_scientic",1)
end
function add_2medkit_scientic(first_speaker, second_speaker)
	got("medkit_scientic",2)
end
function add_3medkit_army(first_speaker, second_speaker)
	got("medkit_army",3)
end
function add_2medkit_army(first_speaker, second_speaker)
	got("medkit_army",2)
end
function add_medkit_army(first_speaker, second_speaker)
	got("medkit_army",1)
end
function add_ammo_f1(first_speaker, second_speaker)
	got("grenade_f1",1)
end
function add_ammo_f2(first_speaker, second_speaker)
	got("grenade_f1",2)
end
function add_ammo_rgd1(first_speaker, second_speaker)
	got("grenade_rgd5",1)
end
function add_ammo_9x19_ap(first_speaker, second_speaker)
	got("ammo_9x19_pbp")
end
function add_ammo_762x54r(first_speaker, second_speaker)
	got("ammo_7.62x54r")
end
function add_ammo_5_7x28_ss1902(first_speaker, second_speaker)
	got("ammo_5.7x28_ss190",2)
end
function add_military_outfit(first_speaker, second_speaker)
	got("military_outfit")
end
function add_wpn_abakan_m1(first_speaker, second_speaker)
	got("wpn_abakan_m1")
end
function add_wpn_akm_sk2(first_speaker, second_speaker)
	got("wpn_akm_sk2")
end
function add_wpn_abakan(first_speaker, second_speaker)
	got("wpn_abakan")
end
function add_wpn_pkm(first_speaker, second_speaker)
	got("wpn_pkm")
end
function add_wpn_gauss(first_speaker, second_speaker)
	got("wpn_gauss")
end
function add_wpn_spas12(first_speaker, second_speaker)
	got("wpn_spas12")
end
function add_p90(first_speaker, second_speaker)
	got("wpn_p90")
end
function add_fn2000(first_speaker, second_speaker)
	got("wpn_fn2000")
end
function add_2ammo_12x76_zhekan(first_speaker, second_speaker)
	got("ammo_12x76_zhekan",2)
end
function add_3ammo_12x76_dart(first_speaker, second_speaker)
	got("ammo_12x76_dart",3)
end
function add_5ammo_12x70_buck(first_speaker, second_speaker)
	got("ammo_12x70_buck",5)
end
function add_protection_outfit(first_speaker, second_speaker)
	got("protection_outfit")
end
function add_ammo_super_gauss(first_speaker, second_speaker)
	got("ammo_super_gauss",3)
end
function add_ammo_gauss(first_speaker, second_speaker)
	got("ammo_gauss")
end
function take_fox_spot()
	sak.add_spot_of_docent(5)
end
function take_shustryi_spot()
	sak.add_spot_of_docent(4)
end
function take_wolf_spot()
	sak.add_spot_of_docent(6)
end
function take_provodnik_spot()
	sak.add_spot_of_docent(92)
end
function take_yrik_spot() 
	sak.add_spot_of_docent(104)
end
function take_bes_spot() 
	sak.add_spot_of_docent(107)
end
function take_krot_spot() 
	sak.add_spot_of_docent(302)
end
function take_krisyk_spot() 
	sak.add_spot_of_docent(9508)
end
function give_docent_5pda(first_speaker, second_speaker)
	lost("device_pda_npc",5)
end
function give_2mica(first_speaker, second_speaker)
	lost("af_ameba_mica",2)
end
function give_3mica(first_speaker, second_speaker)
	lost("af_ameba_mica",3)
end
function docent_5pda_have()
  	return has("device_pda_npc",5)
end
function docent_have_have()
	if has_info("sak_gold_fish_have") or has_info("sak_find_seif_have") or has_info("sak_repair_box_have") or has_info("sak_reward_outfit_have") then
		return true
	else
		return false
	end 
end
function give_medkit_scientic(first_speaker, second_speaker)
	lost("medkit_scientic", 1)
end
function medkit_scientic_have()
	return has("medkit_scientic",1)
end
function give_medkit_army(first_speaker, second_speaker)
	lost("medkit_army", 1)
end
function medkit_army_have()
	return has("medkit_army",1)
end
function give_2medkit(first_speaker, second_speaker)
	lost("medkit",2)
end
function medkit2_have()
	return has("medkit",2)
end
function medkit_have()
	return has("medkit",1)
end
function give_antirad(first_speaker, second_speaker)
	lost("antirad",2)
end
function antirad_have()
	return has("antirad",2)
end
function give_fuzz_kolobok(first_speaker, second_speaker)
	lost("af_fuzz_kolobok", 1)
end
function fuzz_kolobok_have()
	return has("af_fuzz_kolobok",1)
end
function give_dummy_3glassbeads(first_speaker, second_speaker)
	lost("af_dummy_glassbeads",3)
end
function dummy_3glassbeads_have()
	return has("af_dummy_glassbeads",3)
end
function give_dummy_pellicle(first_speaker, second_speaker)
	lost("af_dummy_pellicle", 1)
end
function dummy_pellicle_have()
	return has("af_dummy_pellicle",1)
end
function give_dummy_battery(first_speaker, second_speaker)
	lost("af_dummy_battery", 1)
end
function dummy_battery_have()
	return has("af_dummy_battery",1)
end
function give_dummy_dummy(first_speaker, second_speaker)
	lost("af_dummy_dummy", 1)
end
function dummy_dummy_have()
	return has("af_dummy_dummy",1)
end
function give_dummy_spring(first_speaker, second_speaker)
	lost("af_dummy_spring", 1)
end
function dummy_spring_have()
	return has("af_dummy_spring",1)
end
function give_3rusty_sea_urchin(first_speaker, second_speaker)
	lost("af_rusty_sea-urchin", 3)
end
function rusty_sea_urchin_3have()
	return has("af_rusty_sea-urchin",3)
end
function give_2rusty_sea_urchin(first_speaker, second_speaker)
	lost("af_rusty_sea-urchin", 2)
end
function rusty_sea_urchin_2have()
	return has("af_rusty_sea-urchin",2)
end
function give_rusty_kristall(first_speaker, second_speaker)
	lost("af_rusty_kristall", 1)
end
function rusty_kristall_have()
	return has("af_rusty_kristall",1)
end
function give_rusty_thorn(first_speaker, second_speaker)
	lost("af_rusty_thorn", 1)
end
function rusty_thorn_have()
	return has("af_rusty_thorn",1)
end
function give_ameba_slug(first_speaker, second_speaker)
	lost("af_ameba_slug", 1)
end
function ameba_slug_have()
	return has("af_ameba_slug",1)
end
function give_ameba_slime(first_speaker, second_speaker)
	lost("af_ameba_slime", 1)
end
function ameba_slime_have()
	return has("af_ameba_slime",1)
end
function give_2fireball(first_speaker, second_speaker)
	lost("af_fireball",2) 
end
function fireball2_have()
	return has("af_fireball",2)
end
function give_fireball(first_speaker, second_speaker)
	lost("af_fireball", 1)
end
function fireball_have()
	return has("af_fireball",1)
end
function give_night_star(first_speaker, second_speaker)
	lost("af_night_star", 1)
end
function night_star_have()
	return has("af_night_star",1)
end
function give_electra_sparkler(first_speaker, second_speaker)
	lost("af_electra_sparkler", 1)
end
function electra_sparkler_have()
	return has("af_electra_sparkler",1)
end 
function fox_pay_money(actor, npc)
	got_treasure("esc_secret_truck_goods")
end
function give_vodka()
	lost("vodka", 1)
end
function give_2vodka()
	lost("vodka",2)
end
function give_3vodka()
	lost("vodka",3)
end
function give_6vodka()
	lost("vodka",6)
end
function give_7vodka()
	lost("vodka",7)
end
function give_8vodka()
	lost("vodka",8)
end
function give_10vodka()
	lost("vodka",10)
end
function give_20vodka()
	lost("vodka",20)
end
function give_15vodka()
	lost("vodka",15)
end
function give_40vodka()
	lost("vodka",40)
end
function have_vodka()
	return has("vodka",1)
end
function have_2vodka()
	return has("vodka",2)
end
function have_3vodka()
	return has("vodka",3)
end
function have_6vodka()
	return has("vodka",6)
end
function have_7vodka()
	return has("vodka",7)
end
function have_8vodka()
	return has("vodka",8)
end
function have_10vodka()
	return has("vodka",10)
end
function have_15vodka()
	return has("vodka",15)
end
function have_20vodka()
	return has("vodka",20)
end
function have_40vodka()
	return has("vodka",40)
end
function give_drops(first_speaker, second_speaker)
	lost("af_drops", 1)
end
function drops_have()
	return has("af_drops",1)
end
function give_blood(first_speaker, second_speaker)
	lost("af_blood", 1)
end
function blood_have()
	return has("af_blood",1)
end
function give_electra_flash(first_speaker, second_speaker)
	lost("af_electra_flash", 1)
end
function electra_flash_have()
	return has("af_electra_flash",1)
end
function give_mincer_meat()
	lost("af_mincer_meat", 1)
end
function mincer_meat_have()
	return has("af_mincer_meat",1)
end
function sidor_give_mincer_meat()
	lost("af_mincer_meat",2)
end
function sidor_mincer_meat_have()
	return has("af_mincer_meat",2)
end
function give_vyvert(first_speaker, second_speaker)
	lost("af_vyvert", 1)
end
function vyvert_have()
	return has("af_vyvert",1)
end
function give_cristall_flower(first_speaker, second_speaker)
	lost("af_cristall_flower", 1)
end
function cristall_flower_have()
	return has("af_cristall_flower",1)
end
function give_medusa(first_speaker, second_speaker)
	lost("af_medusa", 1)
end
function medusa_have()
	return has("af_medusa",1)
end
function give_10medusa(first_speaker, second_speaker)
	lost("af_medusa", 10)
end
function medusa10_have()
	return has("af_medusa",10)
end
function give_7medusa(first_speaker, second_speaker)
	lost("af_medusa", 7)
end
function medusa7_have()
	return has("af_medusa",7)
end
function give_gravi(first_speaker, second_speaker)
	lost("af_gravi", 1)
end
function gravi_have()
	return has("af_gravi",1)
end
function add_5vodka()
	got("vodka",3)
end
function add_6vodka()
	got("energy_drink",5)
end
function add_vodka(first_speaker, second_speaker)
	got("vodka")
end
function add_2vodka(first_speaker, second_speaker)
	got("vodka",2)
end
function add_medkit(first_speaker, second_speaker)
	got("medkit")
end
function add_3medkit(first_speaker, second_speaker)
	got("medkit",3)
end
function add_5medkit(first_speaker, second_speaker)
	got("medkit",5)
end
function add_10medkit(first_speaker, second_speaker)
	got("medkit",3)
end
function add_saiga(first_speaker, second_speaker)
	got("wpn_saiga12")
end
function add_groza(first_speaker, second_speaker)
	got("wpn_groza")
end
function add_val(first_speaker, second_speaker)
	got("wpn_val")
end
function add_wpn_ak47(first_speaker, second_speaker)
	got("wpn_ak47")
end
function add_toz(first_speaker, second_speaker)
	got("wpn_toz34")
end
function add_3ammo_9x39_pab9(first_speaker, second_speaker)
	got("ammo_9x39_pab9",3)
end
function add_2ammo_9x39_sp5(first_speaker, second_speaker)
	got("ammo_9x39_sp5",2)
end
function add_1ammo_9x39_ap(first_speaker, second_speaker)
	got("ammo_9x39_ap",1)
end
function add_2ammo_556x45_ss190(first_speaker, second_speaker)
	got("ammo_5.56x45_ss190",2)
end
function add_ammo_556x45_ap(first_speaker, second_speaker)
	got("ammo_5.56x45_ap")
end
function add_ammo_556x45_gd(first_speaker, second_speaker)
	got("ammo_5.56x45_gd")
end
function add_ammo_545x39_ap(first_speaker, second_speaker)
	got("ammo_5.45x39_ap")
end
function add_3ammo_545x39_ap(first_speaker, second_speaker)
	got("ammo_5.45x39_ap",3)
end
function add_5ammo_5_45_fmj(first_speaker, second_speaker)
	got("ammo_5.45x39_fmj",5)
end
function add_ammo_5_45_fmj(first_speaker, second_speaker)
	got("ammo_5.45x39_fmj")
end
function add_ammo_5_45_fmj2(first_speaker, second_speaker)
	got("ammo_5.45x39_fmj",2)
end
function add_ammo_7_62_fmj2(first_speaker, second_speaker)
	got("ammo_7.62x39_fmj",2)
end
function add_ammo_7_62_ap3(first_speaker, second_speaker)
	got("ammo_7.62x39_ap",3)
end
function add_ammo_7_62_ap(first_speaker, second_speaker)
	got("ammo_7.62x54_ap")
end
function add_ammo_7_62_ap2(first_speaker, second_speaker)
	got("ammo_7.62x54_ap",2)
end
function add_ammo_rgd2(first_speaker, second_speaker)
	got("grenade_rgd5",2)
end
function add_ammo_rgd3(first_speaker, second_speaker)
	got("grenade_rgd5",3)
end
function add_ammo_rgd5(first_speaker, second_speaker)
	got("grenade_rgd5",5)
end
function add_ammo_12x70_buck3(first_speaker, second_speaker)
	got("ammo_12x70_buck",3)
end
function add_ammo_410_buck3(first_speaker, second_speaker)
	got("ammo_410_buck",3)
end
function add_5ammo_9x18_pmm(first_speaker, second_speaker)
	got("ammo_9x18_pmm",5)
end
function add_wpn_ak74(first_speaker, second_speaker)
	got("wpn_ak74m")
end
function give_strelok_pda() 
	lost("strelok_pda",1)
	local obj = server_object("aes2_teleport_0020")
	if obj then
		level_map_spot(obj.id, "level_changer3","to_pripyat")
	end
end
function strelok_pda_have()
	return has("strelok_pda",1)
end

function give_bar_ivancov_playboy() 
	lost("playboy10",1) 
end
function bar_ivancov_playboy_have()
	return has("playboy10",1)
end
function strelok_pda2_have()
	return has("af_medusa_green",1)
end
function give_strelok_pda2(first_speaker, second_speaker) 
	lost("af_medusa_green",1) 
end
function give_chimera_kogot(first_speaker, second_speaker) 
	lost("part_chimera_kogot",7) 
end
function chimera_kogot_have()
	return has("part_chimera_kogot",7)
end
function give_five_teil(first_speaker, second_speaker) 
	lost("part_dog_tail",5)
	got("wpn_walther_pp") 
end
function five_teil_have()
	return has("part_dog_tail",5)
end
function escape_lager_volk_document_have()
	return has("sak_document2",1)
end
function give_sescape_lager_volk_document(first_speaker, second_speaker)
	lost("sak_document2", 1)
	second_speaker:set_relation(game_object.friend, first_speaker)
end
function take_agr_saiga(first_speaker, second_speaker)
	got("wpn_ppsh41_sk2")
	got("ammo_7.62x25_ps")
	got("ammo_7.62x25_p",2)
end
function give_yan_scientist_teleport_01(first_speaker, second_speaker)
	got("sak_resiver_yantar")
end
function mil_volk_resiver_have()
	return has("sak_resiver",1)
end
function give_mil_volk_resiver(first_speaker, second_speaker)
	lost("sak_resiver", 1)
end
function life_heart_final()
	got("wpn_k98_m1")
	got("ammo_93x64_ap")
	got("ammo_93x64_sp")
end
function notebook_have()
	return has("notebook",1)
end
function give_notebook(first_speaker, second_speaker)
	lost("notebook", 1)
end
function give_doktor_book(first_speaker, second_speaker)
	lost("sak_book4", 1)
end
function dummy_battery_red_have()
	return has("af_dummy_battery_red",1)
end
function give_dummy_battery_red(first_speaker, second_speaker)
	lost("af_dummy_battery_red", 1)
end
function dummy_pellicle_red_have()
	return has("af_dummy_pellicle_red",1)
end
function give_dummy_pellicle_red(first_speaker, second_speaker)
	lost("af_dummy_pellicle_red", 1)
end
function simbiont_have()
	return has("af_simbion",1)
end
function give_simbiont(first_speaker, second_speaker)
	lost("af_simbion", 1)
end
function dummy_spring_red_have()
	return has("af_dummy_spring_red",1)
end
function give_dummy_spring_red(first_speaker, second_speaker)
	lost("af_dummy_spring_red", 1)
end
function take_dummy_spring_red(first_speaker, second_speaker)
	got("af_dummy_spring_red")
end
function take_soul(first_speaker, second_speaker)
	got("af_soul")
end
function diplomat_have()
	return has("diplomat",1)
end
function give_diplomat(first_speaker, second_speaker)
	lost("diplomat", 1)
end
function take_mica(first_speaker, second_speaker)
	got("af_ameba_mica")
end
function take_kristall(first_speaker, second_speaker)
	got("af_cristall")
end
function take_sescape_lager_volk_ak(first_speaker, second_speaker)
	got("wpn_ak74u")
end
function esc_petruha_toz_have()
	return has_good("wpn_toz34")
end
function give_esc_petruha_toz(first_speaker, second_speaker)
	lost_good("wpn_toz34")
	local npc = story_object(9)
	create_parent("wpn_toz34",1,npc)
	second_speaker:set_relation(game_object.friend, first_speaker)
end
function give_yan_kruglov_green_art(first_speaker, second_speaker)
	lost("af_blood_green", 1)
end
function take_new_decoder(first_speaker, second_speaker)
	got("detector_elite_sak")
end
function take_playboy(first_speaker, second_speaker)
	got("playboy")
end
function yan_kruglov_green_art_have()
	return has("af_blood_green",1)
end
function give_playboy(first_speaker, second_speaker)
	lost("playboy", 1)
end
function give_esc_shustryi_medusa(first_speaker, second_speaker)
	lost("af_medusa", 1)
	second_speaker:set_relation(game_object.friend, first_speaker)
end
function esc_shustryi_medusa_have()
	return has("af_medusa",1)
end
function gar_dram_novice_mp5_m1_have()
	return has("wpn_mp5_m1",1)
end
function give_gar_dram_novice_mp5_m1(first_speaker, second_speaker)
	lost("wpn_mp5_m1")
	second_speaker:set_relation(game_object.friend, first_speaker)
end
function gar_dram_novice_burer_hand_have()
	return has("part_burer_hand",1)
end
function give_gar_dram_novice_burer_hand(first_speaker, second_speaker)
	lost("part_burer_hand", 1)
end
function gar_hellcar_outfit_have()
	return has_good("stalker_outfit_m3",1)
end
function give_gar_hellcar_outfit(first_speaker, second_speaker)
	lost("stalker_outfit_m3", 1)
	second_speaker:set_relation(game_object.friend, first_speaker)
end
function agr_krot_PDA_have()
	return has("agroprom_pda",1)
end
function give_agr_krot_PDA(first_speaker, second_speaker)
	lost("agroprom_pda", 1)
	second_speaker:set_relation(game_object.friend, first_speaker)
end

function gar_dolg_flesh_eye_have()
	return has("part_flesh_eye",4)
end

function give_gar_dolg_flesh_eye(first_speaker, second_speaker)
	lost("part_flesh_eye",4)
	got("wpn_m1891_30")
	got("ammo_7.62x54_7h14")
	second_speaker:set_relation(game_object.friend, first_speaker)
end

function gar_dolg_krovosos_jaw_have()
	return has("part_krovosos_jaw",3)
end

function give_gar_dolg_krovosos_jaw(first_speaker, second_speaker)
	lost("part_krovosos_jaw",3)
end

function gar_dolg_psevdodog_tail_have()
	return has("part_psevdodog_tail",5)
end

function give_gar_dolg_psevdodog_tail(first_speaker, second_speaker)
	lost("part_psevdodog_tail",5)
	got("af_babka_3")
end

function bar_dolg_base_guard_art_have()
	return has("af_vyvert_green",1)
end

function give_bar_dolg_base_guard_art(first_speaker, second_speaker)
	lost("af_vyvert_green",1)
	got("wpn_toz194")
	second_speaker:set_relation(game_object.friend, first_speaker)
end

function esc_bridge_vodka_have()
	return has("vodka",10)
end
function give_esc_bridge_vodka()
	lost("vodka",10)
end
function give_esc_bridge_ammo()
	got("ammo_5.45x39_ap",3)
	create("a_inventory_box2",xyz(-153.092,4.285,-161.030),84363,669)
end

-- Лису теперь можно собрать и армейские аптечки и даже научные
function esc_fox_medkit_have()
	return has("medkit",10) or has("medkit_army",10) or has("medkit_scientic",10)
end
-- Если принесли простые
function esc_fox_medkit_simple_have()
	return has("medkit",10)
end
-- Если принесли армейские
function esc_fox_medkit_army_have()
	return has("medkit_army",10)
end
-- Если принесли научные
function esc_fox_medkit_scientic_have()
	return has("medkit_scientic",10)
end
-- Отдадим простые аптечки
function give_esc_fox_medkit()
	lost("medkit",10)
end
-- Отдадим армейские аптечки
function give_esc_fox_medkit_army()
	lost("medkit_army",10)
end
-- Отдадим научные аптечки
function give_esc_fox_medkit_scientic()
	lost("medkit_scientic",10)
end

-- Спавним хабар Лиса на Агро, в зелёный ящик под опорой
function nagrada_for_medkit_army()
	local box=story_object(5084)
        create_parent(table.random(nagrad.level_nagrada_fox_outfit),1,box)
        create_parent(table.random(nagrad.level_nagrada_fox_weapon),1,box)
	create_parent("ammo_5.45x39_fmj",3,box)
	create_parent("ammo_5.45x39_ap",3,box)
	create_parent("ammo_vog-25",5,box)
	create_parent("conserva",5,box)
	create_parent("sigaret",3,box)
	create_parent("grenade_f1",3,box)
	create_parent("af_dummy_battery",2,box)
	map_spot(box.id, "crlc_big", "lis_for_medkit")
end

-- Спавним хабар Лиса на Янтаре, в полузакопанный сейф на болотце
function nagrada_for_medkit_scientic()
	local box=story_object(5230)
        create_parent(table.random(nagrada.level_medkit_scientic_fox_outfit),1,box)
        create_parent(table.random(nagrada.level_medkit_scientic_fox_weapon),1,box)
	create_parent("af_dummy_pellicle_red",1,box)
	create_parent("af_dummy_battery_red",1,box)
	create_parent("af_dummy_spring_red",1,box)
	create_parent("grenade_sg",2,box)
	create_parent("grenade_fb",2,box)
	map_spot(box.id, "crlc_big", "lis_for_medkit")
end

-- Спавним хабар Лиса на Кордоне, в рюкзаке радиактивного грузовика
function fox_got_treasure()
	local box=story_object(5018)
	create_parent("grenade_rgd5",2,box)
	create_parent("ammo_5.45x39_fmj",2,box)
	create_parent("af_blood",1,box)
	create_parent("vodka",2,box)
	map_spot(box.id, "crlc_big", "lis_for_medkit")
end

local skryga_flash={
    {position={x=-155.303,y=2.585,z=-147.307},gv=668,lv=82011}, -- агро
    {position={x=178.989,y=-6.318,z=-13.815},gv=2835,lv=633171}, -- атп
    {position={x=-2.813,y=-4.932,z=191.281},gv=2195,lv=97948} -- припять
}
function take_mil_Svoboda_trader_ammo()
    local a = table.random(skryga_flash)
    local obj = create("pda_flash", xyz(a.position.x,a.position.y,a.position.z), a.lv, a.gv)
	map_spot(obj.id, "treasure", "Data for the Miser")
	sms("Received a tip on the cache", nil, nil, 10000)
end
function give_mil_Svoboda_trader_ammo()
	lost("flash_pda", 1)
	find_and_release("pda_flash")
end
function mil_Svoboda_trader_ammo_have()
	return has("flash_pda",1)
end

function give_ratcatcher_food(first_speaker, second_speaker)
	lost("bread",20)
	lost("conserva",20)
	lost("kolbasa",20)
	lost("vodka",5)
	second_speaker:set_relation(game_object.friend, first_speaker)
end

function give_mil_Svoboda_trader_plan()
	lost("sak_plan")
end

function ratcatcher_food_have()
  	return has("bread",20) and
		has("conserva",20) and
		has("vodka",5) and
		has("kolbasa",20)
end
function tushkano_have()
  	return has("part_face_tushkano",10) and has("vodka",10)
end
function give_tushkano()
	lost("part_face_tushkano",10)
	lost("vodka",10)
end
function mil_Svoboda_trader_plan_have()
  	return has("sak_plan",1)
end

function mil_Svoboda_trader_outfit_have()
	return has("soldier_outfit",2)
end
function give_mil_Svoboda_trader_outfit()
	lost("soldier_outfit",1)
end

function take_val_pula_ammo()
	local obj = create("inventory_sakbox_01",xyz(425.64059448242,-1.473007440567,-356.72933959961),949196,4604)
	map_spot(obj.id, "crlc_big", "Ammo box")
	sms("info_recieved_0", nil, nil, 10000)
	create("leshyi_bandit1",xyz(-169.91064453125,-0.48540258407593,516.37658691406),209183,4411)
	create("leshyi_bandit4",xyz(-193.64691162109,0.14150196313858,522.28588867188),184608,4419)
	create("leshyi_bandit5",xyz(-176.10781860352,-0.43567386269569,518.54431152344),202521,4410)
	create("leshyi_bandit4",xyz(368.4963684082,20.140529632568,290.14410400391),844889,4674)
	create("leshyi_bandit5",xyz(423.19866943359,20.119470596313,291.28909301758),946612,4672)
	create("leshyi_bandit1",xyz(409.63070678711,-1.6749272346497,-436.9787902832),918861,4599)
	create("leshyi_bandit2",xyz(404.61724853516,-1.6680451631546,-402.85852050781),909776,4598)
	create("leshyi_bandit3",xyz(439.57180786133,-1.3724257946014,-438.21969604492),971379,4612)
	create("leshyi_bandit4",xyz(459.00155639648,-1.6718363761902,-432.56509399414),999540,4612)
	create("leshyi_bandit5",xyz(426.89739990234,-1.3681112527847,-451.50762939453),951351,4611)
	create("leshyi_bandit4",xyz(383.74826049805,-1.6417664289474,-423.78561401367),871419,4600)
	create("leshyi_bandit5",xyz(349.13314819336,-2.3026041984558,-411.86865234375),813788,4614)
end
function give_gar_hellcar_ammo()
	lost("inventory_sakbox_01")
end
function val_pula_ammo_have()
  	return has("inventory_sakbox_01")
end

function give_ratcatcher_order(first_speaker, second_speaker)
	lost("rad_document7",1)
	got("af_dummy_battery_red")
end
function ratcatcher_order_have()
  	return has("rad_document7",1)
end

function val_escort_PDA_have()
	return has("und_pda")
end
function give_val_escort_PDA(first_speaker, second_speaker)
	lost("und_pda")
	find_and_release("borov_bandit")
	second_speaker:set_relation(game_object.friend, first_speaker)
end

function bar_dolg_petrenko_gaussgan_have()
	return has("prototip_gp",1)
end
function give_bar_dolg_petrenko_gaussgan(first_speaker, second_speaker)
	lost("prototip_gp",1)
	second_speaker:set_relation(game_object.friend, first_speaker)
end

function bar_dolg_petrenko_electra_flash_have(task, info)
    if has_info("petrenko_foto_embrion1") and has_info("petrenko_foto_embrion2") then
		return give_info("bar_dolg_petrenko_electra_flash_have")
	end
	return false
end

function take_bar_dolg_petrenko_exo(first_speaker, second_speaker)
	got("inventory_sakbox_05")
end

function give_yan_scientist_exo()
	lost("inventory_sakbox_05", 1)
	got("exo_outfit",2)
end

function give_bar_dolg_petrenko_exo()
	lost_good("exo_outfit",2)
end

function yan_scientist_exo_have()
  	return has("inventory_sakbox_05",1)
end

function bar_dolg_petrenko_exo_have()
  	return has_good("exo_outfit",2)
end

function take_sak_repair_box(first_speaker, second_speaker)
	got("inventory_sakbox_05")
end

function give_esc_trader_sak_repair(first_speaker, second_speaker)
	lost("inventory_sakbox_05", 1)
	got("inventory_sakbox_02")
end

function give_sak_repair_box(first_speaker, second_speaker)
	lost("inventory_sakbox_02", 1)
	got("strelok_outfit")
end

function esc_trader_repair_box_have()
  	return has("inventory_sakbox_05",1)
end

function sak_repair_box_have()
  	return has("inventory_sakbox_02",1)
end

function sak_find_seif_have()
	return has("inventory_sakbox_03",1)
end

function give_sak_find_seif(first_speaker, second_speaker)
	sak.give_seif("inventory_sakbox_03")
end

function sak_gold_fish_have()
	return has("af_gold_fish",1)
end
function give_sak_gold_fish()
	lost("af_gold_fish",1)
end

local sak_flash={
    {position={x=113.71061706543,y=-4.2031671047211,z=15.797422409058},gv=1239,lv=33617},
    {position={x=226.57833862305,y=-4.6954984664917,z=132.79847717285},gv=1198,lv=57240},
    {position={x=112.56023406982,y=0.65228396654129,z=73.371795654297},gv=1225,lv=33195},
    {position={x=154.7790222168,y=0.98368340730667,z=70.509704589844},gv=1180,lv=41037}
}
function sak_reward_outfit_start()
    local a = table.random(sak_flash)
    local obj = create("disk_flash", xyz(a.position.x,a.position.y,a.position.z), a.lv, a.gv)
	map_spot (obj.id, "treasure", "Data for Syaka")
    sms("Received a tip on the cache", nil, nil, 10000)
end
function disk_flash_delete()
	find_and_release("disk_flash")
end

function sak_have_start()
	if has_info("sak_gold_fish_start") or has_info("sak_find_seif_start") or has_info("sak_repair_box_start") or has_info("sak_reward_outfit_start") then
		return true
	else
		return false
	end 
end
function sak_have_have()
	if has_info("sak_gold_fish_have") or has_info("sak_find_seif_have") or has_info("sak_repair_box_have") or has_info("sak_reward_outfit_have") then
		return true
	else
		return false
	end 
end
function yan_scientist_books_have()
	return has("sak_book1",1) and
		has("sak_book2",1) and
		has("sak_book3",1) and
		has("sak_book_warlab",1)
end
function give_yan_scientist_books(first_speaker, second_speaker)
	lost("sak_book1",1)
	lost("sak_book2",1)
	lost("sak_book3",1)
	lost("sak_book_warlab",1)
	got("wpn_sw40p")
end

local kruglov_flash={
    {position={x=-202.36734008789,y=8.6811647415161,z=-95.96573638916},gv=8358,lv=4318},
    {position={x=-195.90536499023,y=0.63225102424622,z=-117.80755615234},gv=8360,lv=6157},
    {position={x=-7.8252086639404,y=6.2286696434021,z=-101.51150512695},gv=8319,lv=105499}
}
function take_yan_kruglov_art()
    local a = table.random(kruglov_flash)
    local obj = create("notebook_flash", xyz(a.position.x,a.position.y,a.position.z), a.lv, a.gv)
	map_spot (obj.id, "treasure", "Data for Kruglov")
    sms("Received a tip on the cache", nil, nil, 10000)
	create("naemnik_regular",xyz(-197.25839233398,-0.2752131819725,-118.94032287598),5746,8361)
	create("naemnik_veteran",xyz(-210.36204528809,-0.27349296212196,-116.29890441895),1608,8361)
	create("pri_arhara_naemnik1",xyz(-211.54818725586,7.8260989189148,-123.11186981201),1402,8352)
	create("naemnik_veteran",xyz(-206.44514465332,7.7749028205872,-97.380996704102),3052,8358)
	create("naemnik_regular",xyz(-6.2344565391541,5.313169002533,-102.19235229492),105498,8319)
	create_car("auto_turret_2",xyz(-160.25909423828,9.7915897369385,-59.703681945801),21207,8344, "scripts\\technics\\turret.ltx")
	create_car("auto_turret_2",xyz(-210.7353515625,7.8228154182434,-101.52906799316),1682,8358, "scripts\\technics\\turret.ltx")
end
function give_yan_kruglov_art()
	lost("flash_notebook", 1)
	find_and_release("notebook_flash")
end
function yan_kruglov_art_have()
	return has("flash_notebook",1)
end

local ivancov_flash={
    {position={x=-179.88851928711,y=4.7785663604736,z=-276.82165527344},gv=3364,lv=50992}, -- болота
    {position={x=-164.2699432373,y=2.7191691398621,z=-279.33911132813},gv=3372,lv=61216}, -- болота
    {position={x=-17.256162643433,y=-6.3255214691162,z=-28.58948135376},gv=1593,lv=288143} -- ас
}
function take_bar_ivancov_rg6()
    local a = table.random(ivancov_flash)
    local obj = create("computer_flash", xyz(a.position.x,a.position.y,a.position.z), a.lv, a.gv)
	map_spot (obj.id, "treasure", "Data for Ivantsov")
    sms("Џолучена наводка на тайник", nil, nil, 10000)
end
function give_bar_ivancov_rg6(first_speaker, second_speaker)
	lost("flash_computer", 1)
	second_speaker:set_relation(game_object.friend, first_speaker)
	find_and_release("computer_flash")
end
function bar_ivancov_rg6_have()
	return has("flash_computer",1)
end

function take_blockpost_case()
	got("quest_case_01")
end
function give_blockpost_case()
	lost("quest_case_01",1)
	got("wpn_fort17",1)
end
function blockpost_case_have()
  	return has("quest_case_01",1)
end

function esc_find_groza_have()
	return has("karta_provodnik",1)
end
function give_find_groza(first_speaker, second_speaker)
	lost( "karta_provodnik")
	find_and_release("a_inventory_box55")
	second_speaker:set_relation(game_object.friend, first_speaker)
end

function give_find_dinamit()
	lost("dynamite", 1)
end
function mil_lukash_find_dinamit_have()
  	return has("dynamite",1)
end
function give_find_case()
	lost("quest_case_06", 1)	
end
function yan_scientist_find_case_have()
  	return has("quest_case_06",1)
end

function actor_has_money_30000()
  return has_money(30000)
end
function actor_has_money_40000()
  return has_money(50000)
end
function actor_has_money_100000()
  return has_money(100000)
end
function actor_has_money_50000()
  return has_money(50000)
end
function actor_has_money_75000()
  return has_money(75000)
end
function actor_has_money_150000()
  return has_money(150000)
end
function actor_has_money_400000()
  return has_money(400000)
end
function give_money_100000(t1,t2) 
  lost_money(100000)
end

function give_money_150000(t1,t2) 
  lost_money(150000)
end

function give_money_400000(t1,t2) 
  lost_money(400000)
end

function give_money_30000(t1,t2)
  lost_money(30000)
end

function give_money_50000(t1,t2)
  lost_money(50000)
end

function give_money_75000(t1,t2)
  lost_money(75000)
end

function give_money_40000(t1,t2)
  lost_money(50000)
end

function soul_have()
	return has("af_soul",1)
end
function soul_2have()
	return has("af_soul",2)
end
function soul3_have()
	return has("af_soul",3)
end
function kristall_have()
	return has("af_cristall",1)
end
function kristall2_have()
	return has("af_cristall",2)
end
function moonlight_have()
	return has("af_electra_moonlight",1)
end
function mica2_have()
	return has("af_ameba_mica",2)
end
function mica3_have()
	return has("af_ameba_mica",3)
end
function mica_have()
	return has("af_ameba_mica",1)
end
function actor_2500_have()
	return has_money(2500)
end
function actor_9000_have()
	return has_money(9000)
end
function actor_20000_have()
	return has_money(20000)
end
function actor_5000_have()
	return has_money(5000)
end
function actor_15000_have()
	return has_money(15000)
end
function actor_10000_have()
	return has_money(10000)
end
function actor_30000_have()
	return has_money(30000)
end
function give_soul(first_speaker, second_speaker)
	lost("af_soul", 1)
end
function give_2soul(first_speaker, second_speaker)
	lost("af_soul", 2)
end
function give_3soul(first_speaker, second_speaker)
	lost("af_soul", 3)
end
function give_kristall(first_speaker, second_speaker)
	lost("af_cristall", 1)
end
function give_2kristall(first_speaker, second_speaker)
	lost("af_cristall", 2)
end
function give_moonlight(first_speaker, second_speaker)
	lost("af_electra_moonlight", 1)
end
function give_mica(first_speaker, second_speaker)
	lost("af_ameba_mica", 1)
end
function give_2500_money(t1,t2) 
  lost_money(2500)
end
function give_10000_money(t1,t2) 
  lost_money(10000)
end
function give_15000_money(t1,t2) 
  lost_money(15000)
end
function give_5000_money(t1,t2) 
  lost_money(5000)
end
function give_20000_money(t1,t2) 
  lost_money(20000)
end
function give_9000_money(t1,t2) 
  lost_money(9000)
end
function give_30000_money(t1,t2) 
  lost_money(30000)
end

-- Лимит диалогов. Сидор 30 раз
function trade_sidor_not_enough()
	local value = get_value("trade_sidor_enough", 0)
	return value < 30000
end
function trade_sidor_enough()
	local value = get_value("trade_sidor_enough", 0)
	return value == 30000
end
function trade_sidor_count()
	local value = get_value("trade_sidor_enough", 0)+1
	set_value("trade_sidor_enough", value)
	local text_sms = string.extformat(translate("sms_trade_sidor_enough"), value, 30000)
	sms(text_sms, 1, "sidor", 3000)
end

-- Лимит диалогов. Бармен 30 раз
function trade_barman_not_enough()
	local value = get_value("trade_barman_enough", 0)
	return value < 30000
end
function trade_barman_enough()
	local value = get_value("trade_barman_enough", 0)
	return value == 30000
end
function trade_barman_count()
	local value = get_value("trade_barman_enough", 0)+1
	set_value("trade_barman_enough", value)
	local text_sms = string.extformat(translate("sms_trade_barman_enough"), value, 30000)
	sms(text_sms, 1, "barman", 3000)
end

-- Лимит диалогов. Петренко 30 раз
function trade_petrenko_not_enough()
	local value = get_value("trade_petrenko_enough", 0)
	return value < 30000
end
function trade_petrenko_enough()
	local value = get_value("trade_petrenko_enough", 0)
	return value == 30000
end
function trade_petrenko_count()
	local value = get_value("trade_petrenko_enough", 0)+1
	set_value("trade_petrenko_enough", value)
	local text_sms = string.extformat(translate("sms_trade_petrenko_enough"), value, 30000)
	sms(text_sms, 1, "petrenko", 3000)
end

-- Лимит диалогов. Сахаров 30 раз
function trade_sakharov_not_enough()
	local value = get_value("trade_sakharov_enough", 0)
	return value < 30000
end
function trade_sakharov_enough()
	local value = get_value("trade_sakharov_enough", 0)
	return value == 30000
end
function trade_sakharov_count()
	local value = get_value("trade_sakharov_enough", 0)+1
	set_value("trade_sakharov_enough", value)
	local text_sms = string.extformat(translate("sms_trade_sakharov_enough"), value, 30000)
	sms(text_sms, 1, "saharov", 3000)
end

-- Лимит диалогов. Сяк 25 раз
function trade_sak_not_enough()
	local value = get_value("trade_sak_enough", 0)
	return value < 25000
end
function trade_sak_enough()
	local value = get_value("trade_sak_enough", 0)
	return value == 25000
end
function trade_sak_count()
	local value = get_value("trade_sak_enough", 0)+1
	set_value("trade_sak_enough", value)
	local text_sms = string.extformat(translate("sms_trade_sak_enough"), value, 25000)
	sms(text_sms, 1, "sak", 3000)
end

-- Лимит диалогов. Доктор 30 раз
function trade_doktor_not_enough()
	local value = get_value("trade_doktor_enough", 0)
	return value < 30000
end
function trade_doktor_enough()
	local value = get_value("trade_doktor_enough", 0)
	return value == 30000
end
function trade_doktor_count()
	local value = get_value("trade_doktor_enough", 0)+1
	set_value("trade_doktor_enough", value)
	local text_sms = string.extformat(translate("sms_trade_doktor_enough"), value, 30000)
	sms(text_sms, 1, "doctor", 3000)
end

-- Лимит диалогов. Скряга 30 раз
function trade_skraga_not_enough()
	local value = get_value("trade_skraga_enough", 0)
	return value < 30000
end
function trade_skraga_enough()
	local value = get_value("trade_skraga_enough", 0)
	return value == 30000
end
function trade_skraga_count()
	local value = get_value("trade_skraga_enough", 0)+1
	set_value("trade_skraga_enough", value)
	local text_sms = string.extformat(translate("sms_trade_skraga_enough"), value, 30000)
	sms(text_sms, 1, "skraga", 3000)
end

-- Лимит диалогов. Жила 50 раз
function trade_jlob_not_enough()
	local value = get_value("trade_jlob_enough", 0)
	return value < 50000
end
function trade_jlob_enough()
	local value = get_value("trade_jlob_enough", 0)
	return value == 50000
end
function trade_jlob_count()
	local value = get_value("trade_jlob_enough", 0)+1
	set_value("trade_jlob_enough", value)
	local text_sms = string.extformat(translate("sms_trade_jlob_enough"), value, 50000)
	sms(text_sms, 1, "gila", 3000)
end

-- Лимит диалогов. Кузнецов 25 раз
function trade_kuznezov_not_enough()
	local value = get_value("trade_kuznezov_enough", 0)
	return value < 25000
end
function trade_kuznezov_enough()
	local value = get_value("trade_kuznezov_enough", 0)
	return value == 25000
end
function trade_kuznezov_count()
	local value = get_value("trade_kuznezov_enough", 0)+1
	set_value("trade_kuznezov_enough", value)
	local text_sms = string.extformat(translate("sms_trade_kuznezov_enough"), value, 25000)
	sms(text_sms, 1, "kuznecov", 3000)
end

-- Лимит диалогов. Шерстюк 25 раз
function trade_sherstyk_not_enough()
	local value = get_value("trade_sherstyk_enough", 0)
	return value < 25000
end
function trade_sherstyk_enough()
	local value = get_value("trade_sherstyk_enough", 0)
	return value == 25000
end
function trade_sherstyk_count()
	local value = get_value("trade_sherstyk_enough", 0)+1
	set_value("trade_sherstyk_enough", value)
	local text_sms = string.extformat(translate("sms_trade_sherstyk_enough"), value, 25000)
	sms(text_sms, 1, "sherstuk", 3000)
end

-- Лимит диалогов. Дэн 75 раз
function trade_dan_not_enough()
	local value = get_value("trade_dan_enough", 0)
	return value < 75000
end
function trade_dan_enough()
	local value = get_value("trade_dan_enough", 0)
	return value == 75000
end
function trade_dan_count()
	local value = get_value("trade_dan_enough", 0)+1
	set_value("trade_dan_enough", value)
	local text_sms = string.extformat(translate("sms_trade_dan_enough"), value, 75000)
	sms(text_sms, 1, "dan", 3000)
end

function actor_has_pda_100()
	return has("device_pda_npc",100)
end
function lost_pda_100()
	lost("device_pda_npc",100)
end

-- Лимит диалогов. Сепатор 60 раз по дроби 12-го калибра
function sepator_not_enough()
	local value = get_value("sepator_enough", 0)
	return value < 60000
end
function sepator_enough()
	local value = get_value("sepator_enough", 0)
	return value == 60000
end
function sepator_count()
	local value = get_value("sepator_enough", 0)+1
	set_value("sepator_enough", value)
	local text_sms = string.extformat(translate("sms_sepator_enough"), value, 60000)
	sms(text_sms, 1, "default", 3000)
end

-- Обмен у Хана
function yachik_edy_have()
  	return has("yachik_edy",1) 
end
function yachik_edy_lost()
	lost("yachik_edy",1)
end

function han_9x18_fmj(first_speaker, second_speaker)
	got("ammo_9x18_fmj",5)
end
function han_9x19_fmj(first_speaker, second_speaker)
	got("ammo_9x19_fmj",4)
end
function han_1143x23_hydro(first_speaker, second_speaker)
	got("ammo_11.43x23_hydro",3)
end
function han_12x70_buck(first_speaker, second_speaker)
	got("ammo_12x70_buck",2)
end
function han_12x70_kart(first_speaker, second_speaker)
	got("ammo_12x70_kart",1)
end

-- Обмен у Пирогова
function add_5bandage(first_speaker, second_speaker)
	got("bandage",5)
end
function add_5money_loot(first_speaker, second_speaker)
	got("money_loot",5)
end
function add_1suvorotka(first_speaker, second_speaker)
	got("suvorotka",1)
end


local itemElector 
function is_complete_zapchasti() 
	if itemElector==nil then 	
		itemElector=safe_ItemElector.GetItemElectorClass()
	end
	local mparts=container:get("mparts", {})
	local need_count=5
	local current_count=0
	db.actor:iterate_inventory_bool(function (item) --цикл будет до тех пор пока функция будет возвращать true
		if itemElector:is_mpart(item) then
			current_count=current_count+1
			table.insert(mparts,item:id())
		end
		return not (current_count>=need_count) --до тех пор пока не наберем нужное количество запчастей монстров, либо не закончатся итемы
	end)
	local complete = current_count>=need_count
	if not complete then
		mparts={}
		container:remove("mparts")
	end
	return complete --если набрали нужное - квест завершен
end 

-- Забираем запчасти
function give_parts_questor()
	local clean_mparts=function()
		mparts={}
		container:remove("mparts")
	end
	local mparts=container:get("mparts", {})
	if table.size(mparts)~=5 then --если итемов в предыдущей функции не насобирали 5-ть штук
		clean_mparts()--заодно почистим хранилище
		return --просто выйдем, вроде как по логике не должны сюда попасть если не 5-ть... но мало ли.
	end
	for index,id in pairs(mparts) do
		local lobj=level_object(id)
		if lobj then --запчасть есть
			release(lobj) --заберем ее , даже если она и не у актора в рюкзаке
		else
			--а вот тут надо бы ругаться на игрока, куда дел запчасть?
			clean_mparts()
			return
		end
	end
	clean_mparts()
end
