HellStalkerDog 0 Опубликовано 3 Января 2012 помогите квест делал на основе нового персонажа заспауниного через скрипт. ему задание добавил, а оно не даётся хотя звук соответствующий просходит, вот файлы помогите http://rghost.ru/35720215 Поделиться этим сообщением Ссылка на сообщение
HellStalkerDog 0 Опубликовано 7 Января 2012 помогите пожалуйста. При создании квеста новому нпс в тч на кардоне. квест не выдаёться см скрины так вот почему так происходит. <dialog id="esc_unik_npc_qest"> <dont_has_info>esc_unik_npc_start</dont_has_info> <phrase_list> <phrase id="0"> <text>esc_unik_npc_qest_0</text> <next>1</next> </phrase> <phrase id="1"> <text>esc_unik_npc_qest_1</text> <next>2</next> </phrase> <phrase id="2"> <text>esc_unik_npc_qest_2</text> <next>3</next> </phrase> <phrase id="3"> <text>esc_unik_npc_qest_3</text> <next>4</next> </phrase> <phrase id="4"> <text>esc_unik_npc_qest_4</text> <next>5</next> </phrase> <phrase id="5"> <text>esc_unik_npc_qest_5</text> <next>6</next> </phrase> <phrase id="6"> <text>esc_unik_npc_qest_6</text> <next>7</next> </phrase> <phrase id="7"> <text>esc_unik_npc_qest_7</text> <next>8</next> <next>9</next> </phrase> <phrase id="8"> <text>esc_unik_npc_qest_8</text> <give_info>esc_unik_npc_start</give_info> <action>new_life.spawn_ak74u</action> </phrase> <phrase id="9"> <text>esc_unik_npc_qest_9</text> <action>dialogs.break_dialog</action> </phrase> <phrase id="10"> <text>esc_unik_npc_qest_10</text> </phrase> </phrase_list> </dialog> <dialog id="esc_unik_npc_completed"> <precondition>new_life.escape_ak74u_have</precondition> <has_info>escape_ak74u_have</has_info> <dont_has_info>escape_ак74u_done</dont_has_info> <phrase_list> <phrase id="0"> <text>esc_unik_npc_completed_0</text> <next>1</next> </phrase> <phrase id="1"> <text>esc_unik_npc_completed_1</text> <next>2</next> </phrase> <phrase id="2"> <text>esc_unik_npc_completed_2</text> <give_info>escape_ak74u_done</give_info> <action>new_life.give_ak74u</action> <next>3</next> </phrase> <phrase id="3"> <text>esc_unik_npc_completed_3</text> <action>new_life.complete_quest</action> </phrase> </phrase_list> </dialog> <game_information_portions> <info_portion id="storyline_actor_start"> <task>storyline_eliminate_gunslinger</task> <action>esc_unik_npc.esc_unik_npc</action> </info_portion> <!---------------------------------------esc_unik_npc-----------------------------------------------------> <specific_character id="esc_unik_npc" team_default = "1"> <name>esc_unik_npc</name> <icon>ui_npc_u_stalker_neytral_rukzak_3</icon> <bio>esc_wolf_bio</bio> <class>trader</class> <community>trader</community> <terrain_sect>stalker_terrain</terrain_sect> <rank>367</rank> <reputation>-60</reputation> <money min="60000" max="200000" infinitive="0"/> <snd_config>characters_voice\human_01\stalker\</snd_config> <crouch_type>-1</crouch_type> <visual>actors\neytral\stalker_neytral_rukzak_3</visual> <supplies> [spawn] \n wpn_vintorez \n ammo_9x39_pab9 \n #include "gameplay\character_food.xml" </supplies> #include "gameplay\character_criticals_3.xml" <actor_dialog>esc_unik_npc_qest</actor_dialog> <actor_dialog>esc_unik_npc_completed</actor_dialog> <actor_dialog>dm_help_wounded_medkit_dialog</actor_dialog> </specific_character> <game_task id="escape_ak74u"> <title>Найти потерянный Калаш</title> <objective> <text>Найти потерянный Калаш</text> <icon>ui_iconsTotal_weapons</icon> <infoportion_complete>escape_ak74u_done</infoportion_complete> <article>tex_escape_ak74u</article> </objective> <objective> <text>Найти Калаш</text> <function_complete>new_life.escape_ak74u_have()</function_complete> <infoportion_set_complete>escape_ak74u_have</infoportion_set_complete> </objective> <objective> <text>Принести Калаш Живому</text> <map_location_type hint="Живой">blue_location</map_location_type> <object_story_id>esc_unik_npc</object_story_id> <infoportion_complete>escape_ak74u_done</infoportion_complete> </objective> </game_task> <info_portion id="esc_unik_npc_start"> <task>escape_ak74u</task> </info_portion> <info_portion id="escape_ak74u_have"></info_portion> <info_portion id="escape_ak74u_done"></info_portion> function spawn_ak74u() amk.spawn_item("wpn_gauss",vector():set(-223.36528015137,-19.629007559478,-132.66230773926),30990,62) -- спавн ak74u в тоннеле на кордоне end function escape_ak74u_have() return sak.have_item_namber("wpn_ak74u",1) ~= false -- проверка на нахождение предмета в рюкзаке end function give_ak74u(first_speaker, second_speaker) -- передача предмета sak.out_item_namber("wpn_ak74u", 1) end function complete_quest(first_speaker, second_speaker) -- получение награды dialogs.relocate_money(second_speaker, 5000, "in") end local items_count=0 local itemin=nil function have_item_namber(itm,need_namber) local actor=db.actor items_count=0 itemin=itm actor:iterate_inventory(cheking_item,actor) if items_count>=need_namber then return true else return false end end function cheking_item(actor,item) local items=item:section() if items==itemin then items_count=items_count+1 end end function create_items(npc,section,number) for i=1,number do alife():create(section, npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()) end end local reloc_params={} local stalk function out_item_namber(itm_section,need_number) reloc_params.itm_section=itm_section reloc_params.itm_cnt=need_number reloc_params.itm_cnt_found=0 db.actor:iterate_inventory(checkout_items_count,db.actor) reloc_params.itm_cnt_found=0 if reloc_params.itm_cnt_found<=reloc_params.itm_cnt then db.actor:iterate_inventory(out_items_count,db.actor) end news_manager.relocate_item(db.actor, "out", itm_section) reloc_params={} end function relocate_item_namber(stalker,itm_section,need_number) stalk=stalker reloc_params.itm_section=itm_section reloc_params.itm_cnt=need_number reloc_params.itm_cnt_found=0 db.actor:iterate_inventory(checkout_items_count,db.actor) reloc_params.itm_cnt_found=0 if reloc_params.itm_cnt_found<=reloc_params.itm_cnt then db.actor:iterate_inventory(reloc_items_count,db.actor) end news_manager.relocate_item(db.actor, "out", itm_section) reloc_params={} end function checkout_items_count(actor,item) if item.section and item:section()==reloc_params.itm_section then reloc_params.itm_cnt_found = reloc_params.itm_cnt_found + 1 end end function reloc_items_count(actor,item) if item.section and item:section()==reloc_params.itm_section and reloc_params.itm_cnt_found<reloc_params.itm_cnt then db.actor:transfer_item(item, stalk) reloc_params.itm_cnt_found = reloc_params.itm_cnt_found + 1 end end function out_items_count(actor,item) if item.section and item:section()==reloc_params.itm_section and reloc_params.itm_cnt_found<reloc_params.itm_cnt then amk.remove_item_from_inventory(item, actor) reloc_params.itm_cnt_found = reloc_params.itm_cnt_found + 1 end end function spawn_item(spawn_item, pos, gv,lv) if gv==nil then gv=db.actor:game_vertex_id() end if lv==nil then lv=db.actor:level_vertex_id() end return alife():create(spawn_item, pos, lv, gv) end function remove_item_from_inventory(remove_item,npc) if npc==nil then npc=db.actor end if remove_item~=nil then -- npc:mark_item_dropped(remove_item) alife():release(alife():object(remove_item:id()), true) return true end return false end так вот помогите пожалуйста игра тени чернобыля версия 1.0006 Поделиться этим сообщением Ссылка на сообщение