

--[[-----------------------------------------------------------
 File          : in_out_items_for_kvests.script
 Description   : Функции для получения наград за квесты и передачи предметов.Также для проверки наличия предметов.
 Copyright     : 2010 © Stalk15
 Authors       : Stalk15
 Last update   : 22.07.2010 
--]]-----------------------------------------------------------

--/ Отдаем интсрумент улучшения на Болотах и получаем награду
function give_instrcal_march_leks(first_speaker, second_speaker)
	dialogs.relocate_item_section(second_speaker, "instrumcal", "out")
end

function give_instrrem_march_leks(first_speaker, second_speaker)
	dialogs.relocate_item_section(second_speaker, "instrumrem", "out")
end

function give_nagrada_kvest_searh_instr (trader, actor)
    dialogs.relocate_item_section(trader, "toz34_u_s", "in")
end

function give_nagrada_kvest_searh_instr_2 (first_speaker, second_speaker)
	dialogs.relocate_money(first_speaker, 10000, "in")
end

function give_nagrada_kvest_searh_instr_for_sko (first_speaker, second_speaker)
	dialogs.relocate_money(first_speaker, 15000, "in")
end
----------------------------
--/ПРоверяем наличие Форта
function have_fort_m1(first_speaker, second_speaker)
 	return first_speaker:object("wpn_fort_m1") ~= nil
end

--/Отдаем форт Волку
function give_fort_m1_to_wolf(first_speaker, second_speaker)
	dialogs.relocate_item_section(second_speaker, "wpn_fort_m1", "out")
end

function give_nagrada_kvest_search_fort_for_wolf (first_speaker, second_speaker)
	dialogs.relocate_money(first_speaker, 15000, "in")
end

--/Убили Крота ...
function give_nagrada_kvest_kill_krot_for_mil (trader, actor)
    dialogs.relocate_item_section(trader, "specops_outfit", "in")
end

--/Нашли нубу рюкзак
function give_nagrada_kvest_help_noobychu(actor, npc)
    treasure_manager.get_treasure_manager():give_treasure("esc_secret_vorpal")
end

--/Нашли доки на МГ
function give_doc_1_doc_2_to_sahar(first_speaker, second_speaker)
	dialogs.relocate_item_section(second_speaker, "doc_1", "out")
	dialogs.relocate_item_section(second_speaker, "doc_2", "out")
end

function give_nagrada_kvest_search_docs_on_dead_city (trader, actor)
  for i=1,5 do 
    dialogs.relocate_item_section(trader, "medkit_scientic", "in")
      dialogs.relocate_item_section(trader, "antirad", "in")
	end
    dialogs.relocate_item_section(trader, "scientific_outfit", "in")
end



function give_habar_ot_irbis (actor, trader)
    	dialogs.relocate_item_section(trader, "ammo_5.56x45_he", "in", 10)
      	dialogs.relocate_item_section(trader, "grenade_m61", "in", 10)
    	dialogs.relocate_item_section(trader, "proseva", "in")
end




--/Отдаем 4 документа ирбису
function give_4_docs_to_irbis(first_speaker, second_speaker)
	dialogs.relocate_item_section(second_speaker, "doc_5", "out")
	dialogs.relocate_item_section(second_speaker, "doc_7", "out")
end

--/Получаем мини-хабар от Саурона
function give_habar_ot_sauron_to_actor (trader, actor)
  for i=1,5 do 
    dialogs.relocate_item_section(trader, "medkit_army", "in")
      dialogs.relocate_item_section(trader, "5.56х45", "in")
	end
    dialogs.relocate_item_section(trader, "wpn_36", "in")
end

--/Отдаем Бродяге итемы
function give_items_to_brodyaga(first_speaker, second_speaker)
  for i=1,5 do
	dialogs.relocate_item_section(second_speaker, "medkit_army", "out")
	   dialogs.relocate_item_section(second_speaker, "5.56х45", "out")
	  end
	dialogs.relocate_item_section(second_speaker, "wpn_36", "out")
end

--/Принемаем итемы от пригоршни, при взятии квеста "Найти Додж"
function give_items_ot_prigor_to_actor (trader, actor)
  for i=1,8 do 
      dialogs.relocate_item_section(trader, "antirad", "in")
	end
	   for i=1,4 do 
         dialogs.relocate_item_section(trader, "medkit_scientic", "in")
     end
end

--/Нашли "Додж"
function give_nagrada_za_dodge (trader, actor)
  for i=1,7 do 
      dialogs.relocate_item_section(trader, "vodka", "in")
	    dialogs.relocate_item_section(trader, "ammo5.56x45_ap", "in")
	  end
     dialogs.relocate_item_section(trader, "exo_outfit", "in")
end

--/Отдаем гаусс
function give_gauss_m1_to_lex(first_speaker, second_speaker)
	dialogs.relocate_item_section(second_speaker, "wpn_gauss_m1", "out")
end

--/Принемаем хабар от Алекандра
function give_habar_ot_alexana (trader, actor)
  for i=1,5 do 
    dialogs.relocate_item_section(trader, "ammo_5.7x28_ss190", "in")
      dialogs.relocate_item_section(trader, "ammo_5.56x45_he", "in")
	    dialogs.relocate_item_section(trader, "ammo_5.45x39_ap", "in")
		  dialogs.relocate_item_section(trader, "ammo_9x39_ap", "in")
		     dialogs.relocate_item_section(trader, "ammo_7.62x54_ap", "in")
			   dialogs.relocate_item_section(trader, "ammo_11.43x23_hydro", "in")
			     dialogs.relocate_item_section(trader, "army_fast", "in")
	        end
	            for i=1,10 do 
                    dialogs.relocate_item_section(trader, "medkit_scientic", "in")
                dialogs.relocate_item_section(trader, "antirad", "in")
	        dialogs.relocate_item_section(trader, "zhgut", "in")
	  end
end

--/Принесли документы Александру
function give_nagrada_ot_alexana_kvest_tashit_doc_9_to_alexan (trader, actor)
    dialogs.relocate_item_section(trader, "af_med", "in")
	dialogs.relocate_money(first_speaker, 60000, "in")
end

------------------------------------------------------------------------

function has_money_on_shurup_patrons(actor, npc)
	return actor:money() >= 3000
end

function give_money_on_shurup_patrons(actor, npc)
	dialogs.relocate_money(npc, 3000, "out")
end

--function dont_has_money_on_shurup_patrons(first_speaker, second_speaker)
--  	return not has_money_on_shurup_patrons(first_speaker, second_speaker)
--end

















