slayer_kch 11 Опубликовано 19 Августа 2010 Нужна помощь. Как выполнить проверку на убийство определённого мутанта,нужно для квеста. Суть квеста. Выдаётся задание на убийство матёрого кабана Идём убиваем, после убийства получаем другое задание вернутся и получить награду. Кабан creatures\spawn_sections_marsh.ltx [mar_boar_old]:boar_old $spawn = "monsters\bears\mar_boar_old" story_id = mar_boar_old custom_data = scripts\marsh\marsh_swm_add\mar_boar_old_logic.ltx логика scripts\marsh\mar_boar_old_logic.ltx [logic] suitable = {=check_npc_name(mar_boar_old)} true active = mob_walker@mar_boar_old monster_job = true on_death = death prior = 200 [mob_walker@mar_boar_old] path_walk = mar_boar_old_walk path_look = mar_boar_old_look combat_ignore_cond = false show_spot = false danger = danger aggressive = true target = story | actor [danger] ignore_distance = 0 [death] on_info = %+mar_boar_old_dead% Диалоги configs\gameplay\swm_dialogs.xml <dialog id="mar_boar_old_hunt_quest_start"> <dont_has_info>mar_boar_old_hunt_quest_done</dont_has_info> <dont_has_info>mar_boar_old_hunt_quest_give</dont_has_info> <phrase_list> <phrase id="0"> <text>mar_boar_old_hunt_quest_start_dialog_0</text> <next>1</next> </phrase> <phrase id="1"> <text>mar_boar_old_hunt_quest_start_dialog_1</text> <next>2</next> </phrase> <phrase id="2"> <text>mar_boar_old_hunt_quest_start_dialog_2</text> <next>3</next> </phrase> <phrase id="3"> <text>mar_boar_old_hunt_quest_start_dialog_3</text> <next>4</next> </phrase> <phrase id="4"> <text>mar_boar_old_hunt_quest_start_dialog_4</text> <next>5</next> </phrase> <phrase id="5"> <text>mar_boar_old_hunt_quest_start_dialog_5</text> <next>6</next> <next>61</next> </phrase> <phrase id="61"> <text>mar_boar_old_hunt_quest_start_dialog_61</text> <action>dialogs.break_dialog</action> </phrase> <phrase id="6"> <text>mar_boar_old_hunt_quest_start_dialog_6</text> <give_info>mar_boar_old_hunt_quest_give</give_info> <action>swm_dialogs.swm_mar_boar_old_hunt_quest_start</action> <action>swm_dialogs.spawn_swm_mar_boar_old_monsters</action> </phrase> </phrase_list> </dialog> <!---------------------------> <dialog id="mar_boar_old_hunt_quest_ubil"> <has_info>mar_boar_old_hunt_quest_give</has_info> <precondition>swm_dialogs.тут должна быть проверка на убийство кабана!!!</precondition> <phrase_list> <phrase id="0"> <text>mar_boar_old_hunt_quest_ubil_dialog_0</text> <next>1</next> </phrase> <phrase id="1"> <text>mar_boar_old_hunt_quest_ubil_dialog_1</text> <next>2</next> </phrase> <phrase id="2"> <text>mar_boar_old_hunt_quest_ubil_dialog_2</text> <next>3</next> </phrase> <phrase id="3"> <text>mar_boar_old_hunt_quest_ubil_dialog_3</text> <next>4</next> </phrase> <phrase id="4"> <text>mar_boar_old_hunt_quest_ubil_dialog_4</text> <action>dialogs.break_dialog</action> <give_info>mar_boar_old_hunt_quest_done</give_info> </phrase> </phrase_list> </dialog> Скрипты scripts\swm_dialogs.script --Запуск квеста у Следопыта на килл кабана------------------------------------------------- function swm_mar_boar_old_hunt_quest_start() task_manager.get_task_manager():give_task("mar_boar_old_hunt_quest_give") end --Спавн кабасика--------------------------------------------------------------------------------- function spawn_swm_mar_boar_old_monsters() alife():create("mar_boar_old",vector():set(-284.212738037109,1.50543403625488,23.1587047576904),6753,1087) end --Нужный скрипт на проверку убийства кабана !!!------------ misc\tm_swm.ltx ;--//Квест у Следопыта охота на вепря--------------------------------------------------- [mar_boar_old_hunt_quest_give] icon = ui_inGame2_Ohota_na_Burerov prior = 2 storyline = false title = {+mar_boar_old_dead} mar_boar_old_hunt_take_reward_name, mar_boar_old_hunt_kill_mar_boar_old_name descr = {+mar_boar_old_dead} mar_boar_old_hunt_take_reward_text, mar_boar_old_hunt_kill_mar_boar_old_text target = {+mar_boar_old_dead} mar_hunter_sledopyt, mar_boar_old condlist_0 = {+mar_boar_old_hunt_quest_done} complete Поделиться этим сообщением Ссылка на сообщение
slayer_kch 11 Опубликовано 30 Августа 2010 iDreD Спасибо за ответ но немного не то. Вот разобрался не надо никаких апдейтов в бинд сталкере и т д всё проще вот недостающее function is_has_mar_boar_old_dead(first_speaker, second_speaker) if has_alife_info("mar_boar_old_dead") and not has_alife_info("mar_boar_old_hunt_quest_done") then return false end return true end <dialog id="mar_boar_old_hunt_quest_start"> <dont_has_info>mar_boar_old_hunt_quest_give</dont_has_info> <phrase_list> <phrase id="0"> <text>mar_boar_old_hunt_quest_start_dialog_0</text> <next>1</next> </phrase> <phrase id="1"> <text>mar_boar_old_hunt_quest_start_dialog_1</text> <next>2</next> </phrase> <phrase id="2"> <text>mar_boar_old_hunt_quest_start_dialog_2</text> <next>3</next> </phrase> <phrase id="3"> <text>mar_boar_old_hunt_quest_start_dialog_3</text> <next>4</next> <next>41</next> </phrase> <phrase id="4"> <text>mar_boar_old_hunt_quest_start_dialog_4</text> <next>5</next> </phrase> <phrase id="41"> <text>mar_boar_old_hunt_quest_start_dialog_41</text> <action>dialogs.break_dialog</action> </phrase> <phrase id="5"> <text>mar_boar_old_hunt_quest_start_dialog_5</text> <next>6</next> </phrase> <phrase id="6"> <text>mar_boar_old_hunt_quest_start_dialog_6</text> <give_info>mar_boar_old_hunt_quest_give</give_info> <action>swm_dialogs.swm_mar_boar_old_hunt_quest_start</action> <action>swm_dialogs.spawn_swm_mar_boar_old_monsters</action> </phrase> </phrase_list> </dialog> <!---------------------------> <dialog id="mar_boar_old_hunt_quest_ubil"> <has_info>mar_boar_old_hunt_quest_give</has_info> <has_info>mar_boar_old_dead</has_info> <dont_has_info>mar_boar_old_hunt_quest_done</dont_has_info> <phrase_list> <phrase id="0"> <text>mar_boar_old_hunt_quest_ubil_dialog_0</text> <next>1</next> </phrase> <phrase id="1"> <text>mar_boar_old_hunt_quest_ubil_dialog_1</text> <next>2</next> </phrase> <phrase id="2"> <text>mar_boar_old_hunt_quest_ubil_dialog_2</text> <next>3</next> </phrase> <phrase id="3"> <text>mar_boar_old_hunt_quest_ubil_dialog_3</text> <action>swm_dialogs.actor_give_10000</action> <next>4</next> </phrase> <phrase id="4"> <text>mar_boar_old_hunt_quest_ubil_dialog_4</text> <action>dialogs.break_dialog</action> <give_info>mar_boar_old_hunt_quest_done</give_info> </phrase> </phrase_list> </dialog> Поделиться этим сообщением Ссылка на сообщение