- 好友
- 2
- 在线时间
- 0 小时
- 最后登录
- 2024-7-22
扈从
- UID
- 3133967
- 第纳尔
- 604
- 精华
- 0
- 互助
- 5
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 23
- 注册时间
- 2020-2-5
鲜花( 13) 鸡蛋( 0)
|
本帖最后由 wxj2057605650 于 2020-4-21 23:15 编辑
求大佬帮忙分析一下酒馆和酒鬼战斗场景的原理
这个是酒馆战斗对话- #TAVERN DRUNK DIALOGS酒鬼
- [anyone, "start",
- [
- (eq, "$g_talk_troop", "trp_belligerent_drunk"),
- ],
- "What are you looking at?", "drunk_response", #你在看什么
- [
- (try_begin),
- (eq, "$g_main_attacker_agent", 0),
- (call_script, "script_activate_tavern_attackers"),
- (try_end),
- (mission_disable_talk),
- ]],
- [anyone, "start",
- [
- (eq, "$g_talk_troop", "trp_hired_assassin"),
- ],
- "Are you looking at me?", "drunk_response", #你在看我??
- [
- (try_begin),
- (eq, "$g_main_attacker_agent", 0),
- (call_script, "script_activate_tavern_attackers"),
- (try_end),
- (mission_disable_talk),
- ]],
- [anyone, "start",
- [
- (eq, "$g_talk_troop", "trp_hired_assassin"),
- (eq,1,0),
- ],
- "{!}Added to match dialog ids with translations.", "close_window",
- []],
-
-
-
-
-
-
-
-
-
-
-
-
-
- [anyone, "start", [
- (is_between, "$g_talk_troop", tavernkeepers_begin, tavernkeepers_end),
- (gt, "$g_main_attacker_agent", 0),
- (neg|agent_is_alive, "$g_main_attacker_agent"),
-
- (try_begin),
- (neg|agent_is_alive, "$g_main_attacker_agent"),
- (agent_get_troop_id, ":type", "$g_main_attacker_agent"),
- (eq, ":type", "trp_hired_assassin"),
-
- (str_store_string, s9, "str_strange_that_one_didnt_seem_like_your_ordenary_troublemaker_he_didnt_drink_all_that_much__he_just_stood_there_quietly_and_watched_the_door_you_may_wish_to_consider_whether_you_have_any_enemies_who_know_you_are_in_town_a_pity_that_blood_had_to_be_spilled_in_my_establishment"),
- (assign, "$g_main_attacker_agent", 0),
- (troop_add_gold, "trp_player", 50),
- (troop_add_item, "trp_player", "itm_sword_viking_1", 0),
-
- (else_try),
- #(display_message, "str_wielded_item_reg3"),
-
- (lt, "$g_attacker_drawn_weapon", "itm_tutorial_spear"),
- (str_store_string, s9, "str_you_never_let_him_draw_his_weapon_still_it_looked_like_he_was_going_to_kill_you_take_his_sword_and_purse_i_suppose_he_was_trouble_but_its_not_good_for_an_establishment_to_get_a_name_as_a_place_where_men_are_killed"),
- (assign, "$g_main_attacker_agent", 0),
- (troop_add_gold, "trp_player", 50),
- (troop_add_item, "trp_player", "itm_sword_viking_1", 0),
- (call_script, "script_troop_change_relation_with_troop", "trp_player", "$g_talk_troop", -1),
- (else_try),
- (neg|agent_is_alive, "$g_main_attacker_agent"),
- (str_store_string, s9, "str_well_id_say_that_he_started_it_that_entitles_you_to_his_sword_and_purse_i_suppose_have_a_drink_on_the_house_as_i_daresay_youve_saved_a_patron_or_two_a_broken_skull_still_i_hope_he_still_has_a_pulse_its_not_good_for_an_establishment_to_get_a_name_as_a_place_where_men_are_killed"),
- (assign, "$g_main_attacker_agent", 0),
- (troop_add_gold, "trp_player", 50),
- (troop_add_item, "trp_player", "itm_sword_viking_1", 0),
- (call_script, "script_troop_change_relation_with_troop", "trp_player", "$g_talk_troop", 1),
- (try_end),
- (troop_set_slot, "trp_hired_assassin", slot_troop_cur_center, -1),
- ],
- "{!}{s9}", "player_duel_response", [
- ]],
-
-
-
-
-
-
-
-
-
-
- [anyone, "start", [
- (is_between, "$g_talk_troop", tavernkeepers_begin, tavernkeepers_end),
- (gt, "$g_main_attacker_agent", 0),
- (try_begin),
- (get_player_agent_no, ":player_agent"),
- (agent_get_wielded_item, ":wielded_item", ":player_agent", 0),
- (is_between, ":wielded_item", "itm_darts", "itm_torch"),
- (neq, ":wielded_item", "itm_javelin_melee"),
- (neq, ":wielded_item", "itm_throwing_spear_melee"),
- (neq, ":wielded_item", "itm_jarid_melee"),
- (neq, ":wielded_item", "itm_light_throwing_axes_melee"),
- (neq, ":wielded_item", "itm_throwing_axes_melee"),
- (neq, ":wielded_item", "itm_heavy_throwing_axes_melee"),
- (str_store_string, s9, "str_stop_no_shooting_no_shooting"),
- (assign, ":default_item", -1),
- (troop_get_inventory_capacity, ":end_cond", "trp_player"),
- (try_for_range, ":i_slot", 0, ":end_cond"),
- (troop_get_inventory_slot, ":item_id", "trp_player", ":i_slot"),
-
- (is_between, ":item_id", weapons_begin, weapons_end),
- (neg|is_between, ":item_id", ranged_weapons_begin, ranged_weapons_end),
-
- (assign, ":default_item", ":item_id"),
- (assign, ":end_cond", 0), #break
- (try_end),
-
- (agent_set_wielded_item, ":player_agent", ":default_item"),
- (else_try),
- (str_store_string, s9, "str_em_ill_stay_out_of_this"),
- (try_end),
- ],
- "{!}{s9}", "close_window", [
- ]],
-
-
-
-
-
-
-
- [anyone, "drunk_fight_start", [],
- "I'll wipe that smirk right off your face!", "close_window", [
- (troop_set_slot, "trp_belligerent_drunk", slot_troop_cur_center, 0),
- ]],
-
-
-
-
-
-
-
-
-
-
- [anyone|plyr, "drunk_response",
- [
- (troop_slot_ge, "trp_player", slot_troop_renown, 150),
- ],
- "Do you have any idea who I am?", "drunk_player_high_renown", [
- ]],
- [anyone, "drunk_player_high_renown", [
- (eq, "$g_talk_troop", "trp_hired_assassin"),
- ],
- "Do I care?", "drunk_fight_start", [
- ]],
- [anyone|plyr, "drunk_player_high_renown", [],
- "I thought as much. Now, remove yourself from here", "close_window",
- [
- (assign, "$drunks_dont_pick_fights", 1),
- (troop_set_slot, "trp_belligerent_drunk", slot_troop_cur_center, 0),
-
- (call_script, "script_deactivate_tavern_attackers"),
-
- (assign, "$g_belligerent_drunk_leaving", "$g_main_attacker_agent"),
-
- (mission_enable_talk),
-
- (try_for_agents, ":agent"),
- (agent_is_alive, ":agent"),
- (agent_get_position, pos4, ":agent"),
- (agent_set_scripted_destination, ":agent", pos4),
- (try_end),
-
- (entry_point_get_position, pos1, 0),
- (agent_set_scripted_destination, "$g_main_attacker_agent", pos1),
-
- (assign, "$g_main_attacker_agent", 0),
- ]],
-
-
复制代码
我摸索了一下,猜测是给他们分组然后实现战斗,但具体添加到游戏就报错了,麻烦大佬们注释几个重要的语句,谢谢啦
求大佬们分析一下这个代码
万分感谢
|
|