3824 lines
121 KiB
Plaintext
3824 lines
121 KiB
Plaintext
|
|
------- GENERAL Functions --------
|
|
local HI = has_alife_info
|
|
local GI = give_info
|
|
local DI = disable_info
|
|
local spawn_squad = dialogs_brotherhood.spawn_squad
|
|
|
|
|
|
function NI(str)
|
|
return not (has_alife_info(str))
|
|
end
|
|
|
|
function on_game_start()
|
|
RegisterScriptCallback("actor_on_update",actor_on_update)
|
|
end
|
|
|
|
|
|
function actor_on_update()
|
|
scouting_esc_smart_terrain_7_11_init()
|
|
trigger_northern_rush_init()
|
|
help_alyosha_shyogolov_init()
|
|
---help_alyosha_shyogolov_2_init()
|
|
|
|
nr_bezsonik_init()
|
|
|
|
meet_gutalin_init()
|
|
nr_primankov_init()
|
|
nr_baltunov_init()
|
|
bh_starik_1_init()
|
|
---bh_like_rats_trap_init()
|
|
---nr_execution_yanov_init()
|
|
|
|
---bh_meet_shlitzer()
|
|
|
|
---print_pos()
|
|
---test_pos_reach()
|
|
end
|
|
|
|
function print_pos()
|
|
local se_obj_1 = get_story_se_object("quest_chimera_bait_brotherhood")
|
|
local obj_1 = se_obj_1 and level.object_by_id(se_obj_1.id)
|
|
if (obj_1) then
|
|
printf("Item Pos %s", obj_1:position())
|
|
printf("Item Lvid %s", obj_1:level_vertex_id())
|
|
printf("Item Gvid %s", obj_1:game_vertex_id())
|
|
|
|
end
|
|
|
|
|
|
end
|
|
|
|
function test_pos_reach()
|
|
local pos_1 = vector():set( 51.08812713623,2.2247929573059,158.54913330078 ) --- underground 4 (2 in init) from stairs under
|
|
local pos_2 = vector():set( 66.219718933105,1.74422955513,153.49101257324 ) --- underground 4 (2 in init) from stairs under
|
|
local pos_3 = vector():set( 66.016708374023,1.7425618171692,164.57917785645 ) --- underground 4 (2 in init) from stairs under
|
|
local dist_1 = 9.8
|
|
local dist_2 = 13
|
|
local dist_3 = 14
|
|
local knife = db.actor:item_in_slot(1)
|
|
local weapon_1 = db.actor:item_in_slot(2)
|
|
local weapon_2 = db.actor:item_in_slot(3)
|
|
local weapon_3 = db.actor:item_in_slot(4)
|
|
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
|
|
if knife and knife:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 1 knife"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_1 and weapon_1:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 1 weapon 1"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_2 and weapon_2:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 1 weapon 2"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_3 and weapon_3:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 1 weapon 3"), 1, "ecolog", 11000, 1)
|
|
else
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 1 10"), 1, "ecolog", 11000, 1)
|
|
end
|
|
|
|
end
|
|
if (db.actor:position():distance_to(pos_2) < dist_2) then
|
|
if knife and knife:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 2 knife"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_1 and weapon_1:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 2 weapon 1"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_2 and weapon_2:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 2 weapon 2"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_3 and weapon_3:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 2 weapon 3"), 1, "ecolog", 11000, 1)
|
|
else
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 2 10"), 1, "ecolog", 11000, 1)
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_3) < dist_3) then
|
|
if knife and knife:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 3 knife"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_1 and weapon_1:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 3 weapon 1"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_2 and weapon_2:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 3 weapon 2"), 1, "ecolog", 11000, 1)
|
|
elseif weapon_3 and weapon_3:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 3 weapon 3"), 1, "ecolog", 11000, 1)
|
|
else
|
|
news_manager.send_tip(db.actor, game.translate_string("Inside 3 10"), 1, "ecolog", 11000, 1)
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
function bh_icon_test()
|
|
dynamic_news_helper.send_tip(string.format(game.translate_string("C"), alife():actor():character_name()), "Sidorovich A", 5, 10, "ui_inGame2_sid", nil, "Sidorovich B")
|
|
---news_manager.send_tip(db.actor, string.format(game.translate_string("C"), alife():actor():character_name()), 0, "Sidorovich", 11000, "ui_inGame2_sid")
|
|
---dynamic_news_helper.send_tip(msg, se, 5, 10, npc_1:character_icon(), nil, "npc")
|
|
end
|
|
|
|
function test_dynamic_spawn3()
|
|
local pos_1 = vector():set( -150.18804931641,-7.0104246139526,-30.537698745728 ) --- Andrey Corpse
|
|
local pos_2 = vector():set( -168.97549438477,-4.5473079681396,-16.890596389771 ) --- Controller
|
|
local pos_3 = vector():set( -178.7262878418,-6.3177428245544,-35.88325881958 ) --- Snorks
|
|
local pos_4 = vector():set( -158.80000305176,-4.9637117385864,-49.565902709961 ) --- Snorks
|
|
|
|
|
|
if (db.actor:item_in_slot(9) ~= nil) and (db.actor:item_in_slot(9):section() == "device_flashlight") then
|
|
|
|
local torch = db.actor:item_in_slot(9)
|
|
|
|
if torch:get_state() == 3 then
|
|
news_manager.send_tip(db.actor, game.translate_string("ACTIVE"), 1, "ecolog", 11000, 1)
|
|
local actor_dir = device().cam_dir
|
|
|
|
local pos_1_dir = vec_sub(pos_1,db.actor:position())
|
|
local pos_2_dir = vec_sub(pos_2,db.actor:position())
|
|
local pos_3_dir = vec_sub(pos_3,db.actor:position())
|
|
local pos_4_dir = vec_sub(pos_4,db.actor:position())
|
|
local yaw1 = yaw_degree3d(actor_dir, pos_1_dir)
|
|
local yaw2 = yaw_degree3d(actor_dir, pos_2_dir)
|
|
local yaw3 = yaw_degree3d(actor_dir, pos_3_dir)
|
|
local yaw4 = yaw_degree3d(actor_dir, pos_4_dir)
|
|
--printf("YAW %s", tostring(yaw))
|
|
if yaw1 < 35 then
|
|
news_manager.send_tip(db.actor, game.translate_string("1"), 1, "ecolog", 11000, 1)
|
|
elseif yaw2 < 35 then
|
|
news_manager.send_tip(db.actor, game.translate_string("2"), 1, "ecolog", 11000, 1)
|
|
elseif yaw3 < 35 then
|
|
news_manager.send_tip(db.actor, game.translate_string("3"), 1, "ecolog", 11000, 1)
|
|
elseif yaw4 < 35 then
|
|
news_manager.send_tip(db.actor, game.translate_string("4"), 1, "ecolog", 11000, 1)
|
|
else
|
|
news_manager.send_tip(db.actor, game.translate_string("NONE"), 1, "ecolog", 11000, 1)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
function scouting_esc_smart_terrain_7_11_init()
|
|
if NI("scouting_esc_smart_terrain_7_11_done") then
|
|
local dist = 110
|
|
local smart = SIMBOARD.smarts_by_names["esc_smart_terrain_7_11"]
|
|
if smart and smart.online then
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
GI("scouting_esc_smart_terrain_7_11_done")
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function trigger_northern_rush_init()
|
|
if NI("trigger_northern_rush_init_done") then
|
|
if NI("atomic_crusader_start") then
|
|
if HI("bar_deactivate_radar_done") then
|
|
GI("northern_rush_dialogs_trigger_done")
|
|
nr_sorokin_init()
|
|
GI("trigger_northern_rush_init_done")
|
|
brotherhood_timer.market_share_beginning_1()
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
|
|
function nr_sorokin_init()
|
|
if (NI("nr_sorokin_init")) then
|
|
if not (get_story_se_object("nr_sorokin_squad")) then
|
|
local smart = SIMBOARD.smarts_by_names["bar_visitors"]
|
|
local squad = SIMBOARD:create_squad(smart,"nr_sorokin_squad")
|
|
end
|
|
if (get_story_se_object("nr_sorokin_squad")) then
|
|
GI("nr_sorokin_init")
|
|
end
|
|
end
|
|
end
|
|
|
|
function trigger_greed_and_betrayal_init()
|
|
local pos_1 = vector():set(129.0233001709,-1.4414930343628,39.330234527588 )
|
|
local pos_2 = vector():set(122.13143920898,-3.4335956573486,34.101249694824 )
|
|
local pos_3 = vector():set(130.765625,-4.8255987167358,22.945343017578 )
|
|
local pos_4 = vector():set(-168.56024169922,-0.0014378130435944,89.404853820801 )
|
|
if NI("trigger_greed_and betrayal_done") then
|
|
|
|
|
|
|
|
end
|
|
end
|
|
|
|
|
|
function help_alyosha_shyogolov_init()
|
|
if (NI("help_alyosha_shyogolov_init")) then
|
|
if level.name() == "l03_agroprom" then
|
|
if (NI("help_alyosha_shyogolov_random")) then
|
|
local dist = 200
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_5_3"]
|
|
if smart and smart.online then
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) > dist) then
|
|
if (math.random(75) < 25) then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_shyogolov_trouble_1_info"), 2, "ecolog", 11000, 1)
|
|
dialogs_brotherhood.give_alyosha_shyogolov_trouble_1()
|
|
news_manager.send_tip(db.actor, game.translate_string("st_shyogolov_trouble_2_info"), 25, "ecolog", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_shyogolov_trouble_3_info"), 50, "ecolog", 11000, 1)
|
|
GI("help_alyosha_shyogolov_init")
|
|
|
|
else
|
|
|
|
|
|
GI("help_alyosha_shyogolov_random")
|
|
brotherhood_timer.alyosha_shyogolov_help_random()
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function help_alyosha_shyogolov_2_init()
|
|
local dist = 200
|
|
|
|
local smart = SIMBOARD.smarts_by_names["jup_sim_13"]
|
|
local smart_2 = SIMBOARD.smarts_by_names["jup_a6"]
|
|
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
local smrt_2 = SIMBOARD.smarts[smart_2.id]
|
|
|
|
if NI("corruption_relocation_init") then
|
|
if HI("bar_deactivate_radar_done") then
|
|
dialogs_brotherhood.relocation_nr_ecologist_rydzyk_1()
|
|
dialogs_brotherhood.relocation_nr_ecologist_1()
|
|
dialogs_brotherhood.relocation_nr_ecologist_2()
|
|
|
|
GI("corruption_relocation_init")
|
|
end
|
|
end
|
|
|
|
|
|
if NI("help_alyosha_shyogolov_2_init") then
|
|
if HI("alyosha_shyogolov_0_done") then
|
|
|
|
if smart and smart.online and smart_2 and smart_2.online then
|
|
|
|
if smrt and (db.actor:position():distance_to(smart.position) > dist) and smrt_2 and (db.actor:position():distance_to(smart_2.position) > dist) then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_1"), 1, "ecolog", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_2"), 7, "bandit", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_3"), 12, "ecolog", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_4"), 16, "bandit", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_5"), 20, "ecolog", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_6"), 24, "bandit", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_7"), 28, "ecolog", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_8"), 32, "bandit", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_9"), 36, "ecolog", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_10"), 38, "bandit", 11000, 1)
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_11"), 40, "bandit", 11000, 1)
|
|
|
|
|
|
dialogs_brotherhood.give_alyosha_shyogolov_trouble_3()
|
|
|
|
GI("help_alyosha_shyogolov_2_init")
|
|
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
--- Brotherhood 1 and 2 ---
|
|
|
|
function task_status_functor.give_task_kill_pack_boars_1_status_f(tsk,task_id)
|
|
if (NI("task_kill_pack_boars_1_init")) then
|
|
if not (get_story_se_object("pack_boars_1")) then
|
|
local dist = 110
|
|
local smart = SIMBOARD.smarts_by_names["gar_smart_terrain_6_6"]
|
|
if smart and smart.online then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"gar_smart_terrain_6_6","true"})
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
|
|
local smart = SIMBOARD.smarts_by_names["gar_smart_terrain_6_6"]
|
|
local squad = SIMBOARD:create_squad(smart,"pack_boars_1")
|
|
|
|
GI("task_kill_pack_boars_1_init")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_task_kill_pack_snorks_1_status_f(tsk,task_id)
|
|
if (NI("task_kill_pack_snorks_1_init")) then
|
|
if not (get_story_se_object("pack_snorks_1")) then
|
|
local dist = 100
|
|
local smart = SIMBOARD.smarts_by_names["gar_smart_terrain_1_7"]
|
|
if smart and smart.online then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"gar_smart_terrain_1_7","true"})
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
|
|
local smart = SIMBOARD.smarts_by_names["gar_smart_terrain_1_7"]
|
|
local squad = SIMBOARD:create_squad(smart,"pack_snorks_1")
|
|
|
|
GI("task_kill_pack_snorks_1_init")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
--- Brotherhood 3 Vybegallo ---
|
|
|
|
function task_status_functor.give_task_kill_pack_dogs_1_status_f(tsk,task_id)
|
|
if (NI("task_kill_pack_dogs_1_init")) then
|
|
if not (get_story_se_object("pack_dogs_1")) then
|
|
local dist = 100
|
|
local smart = SIMBOARD.smarts_by_names["mar_smart_terrain_6_4"]
|
|
if smart and smart.online then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"mar_smart_terrain_6_4","true"})
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
|
|
local smart = SIMBOARD.smarts_by_names["mar_smart_terrain_6_4"]
|
|
local squad = SIMBOARD:create_squad(smart,"pack_dogs_1")
|
|
xr_effects.spawn_vybegallo_bag()
|
|
xr_effects.spawn_vybegallo_trail_1()
|
|
xr_effects.spawn_vybegallo_trail_2()
|
|
xr_effects.spawn_vybegallo_trail_3()
|
|
xr_effects.spawn_vybegallo_trail_4()
|
|
GI("task_kill_pack_dogs_1_init")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function xr_effects.spawn_vybegallo_bag()
|
|
local pos = vector():set( 93.233978271484,1.3431987762451,336.99731445313 )
|
|
local se_obj = alife_create( "quest_package_vybegallo", pos, 194271, 84 )
|
|
if ( not se_obj ) then
|
|
printe("!ERROR: unable to spawn quest_package_vybegallo" )
|
|
end
|
|
end
|
|
|
|
function xr_effects.spawn_vybegallo_trail_1()
|
|
local pos = vector():set( 94.755432128906,1.3435776233673,334.9592590332 )
|
|
local se_obj = alife_create( "conserva", pos, 195061, 84 )
|
|
if ( not se_obj ) then
|
|
printe("!ERROR: unable to spawn quest_package_vybegallo_trail_1" )
|
|
end
|
|
end
|
|
|
|
function xr_effects.spawn_vybegallo_trail_2()
|
|
local pos = vector():set( 98.814163208008,1.2621808052063,335.21612548828 )
|
|
local se_obj = alife_create( "conserva", pos, 197280, 84 )
|
|
if ( not se_obj ) then
|
|
printe("!ERROR: unable to spawn quest_package_vybegallo_trail_2" )
|
|
end
|
|
end
|
|
|
|
function xr_effects.spawn_vybegallo_trail_3()
|
|
local pos = vector():set( 102.38217163086,1.2957384586334,338.11456298828 )
|
|
local se_obj = alife_create( "conserva", pos, 199367, 84 )
|
|
if ( not se_obj ) then
|
|
printe("!ERROR: unable to spawn quest_package_vybegallo_trail_3" )
|
|
end
|
|
end
|
|
|
|
function xr_effects.spawn_vybegallo_trail_4()
|
|
local pos = vector():set( 105.27380371094,1.1134397983551,336.060546875 )
|
|
local se_obj = alife_create( "conserva", pos, 201262, 84 )
|
|
if ( not se_obj ) then
|
|
printe("!ERROR: unable to spawn quest_package_vybegallo_trail_4" )
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_alyosha_shyogolov_trouble_1_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
|
|
if (NI("alyosha_shyogolov_trouble_1_init")) then
|
|
|
|
if not (get_story_se_object("shyogolov_pack_snorks_1")) then
|
|
|
|
local dist = 100
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_5_3"]
|
|
if smart and smart.online then
|
|
|
|
xr_effects.clear_smart_terrain(nil,nil,{"agr_smart_terrain_5_3","true"})
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_5_3"]
|
|
local squad = SIMBOARD:create_squad(smart,"shyogolov_pack_snorks_1")
|
|
tsk.stage = 1
|
|
GI("alyosha_shyogolov_trouble_1_init")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
|
|
if HI("alyosha_shyogolov_1_go") then
|
|
|
|
local dist = 25
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_4_4"]
|
|
if smart and smart.online then
|
|
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
GI("alyosha_shyogolov_1_you_arrived")
|
|
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_alyosha_shyogolov_trouble_2_status_f(tsk,task_id)
|
|
local smart_1 = SIMBOARD.smarts_by_names["agr_smart_terrain_5_7"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local smart_2 = SIMBOARD.smarts_by_names["agr_smart_terrain_4_6"]
|
|
local smrt_2 = SIMBOARD.smarts[smart_2.id]
|
|
local smart_3 = SIMBOARD.smarts_by_names["mar_smart_terrain_7_3"]
|
|
local smrt_3 = SIMBOARD.smarts[smart_3.id]
|
|
local dist = 80
|
|
local npc = get_story_se_object("bh_mozgotlen_squad")
|
|
|
|
|
|
|
|
if (tsk.stage == 0) then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist) then
|
|
if NI("bh_mozgotlen_squad_1_init") then
|
|
local squad = SIMBOARD:create_squad(smart_1,"bh_mozgotlen_squad")
|
|
local squad = SIMBOARD:create_squad(smart_1,"bh_mozgotlen_squad_2")
|
|
GI("bh_mozgotlen_squad_1_init")
|
|
end
|
|
end
|
|
if smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist) then
|
|
if NI("bh_mozgotlen_squad_2_init") then
|
|
local squad = SIMBOARD:create_squad(smart_2,"bh_alyosha_zombie_squad_1")
|
|
GI("bh_mozgotlen_squad_2_init")
|
|
end
|
|
end
|
|
if smrt_3 and (db.actor:position():distance_to(smart_3.position) < dist) then
|
|
if NI("bh_mozgotlen_squad_3_init") then
|
|
local squad = SIMBOARD:create_squad(smart_3,"bh_alyosha_zombie_squad_2")
|
|
GI("bh_mozgotlen_squad_3_init")
|
|
end
|
|
end
|
|
if npc then
|
|
local commander = alife_object(npc:commander_id())
|
|
if NI("bh_mozgotlen_document_spawn") then
|
|
alife_create_item("bh_mozgotlen_documents", commander)
|
|
GI("bh_mozgotlen_document_spawn")
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
|
|
function task_status_functor.give_alyosha_shyogolov_trouble_3_status_f(tsk,task_id)
|
|
|
|
local smart = SIMBOARD.smarts_by_names["jup_sim_13"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
local dist = 20
|
|
|
|
if (tsk.stage == 0) then
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
if NI("alyosha_making_trouble_shout") then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_13"), 1, "ecolog", 11000, 1)
|
|
GI("alyosha_making_trouble_shout")
|
|
end
|
|
end
|
|
if NI("relocated_alyosha_shyogolov_1") then
|
|
dialogs_brotherhood.relocation_alyosha_1()
|
|
end
|
|
if HI("alyosha_shyogolov_retreat_1") then
|
|
tsk.stage = 1
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if NI("alyosha_shyogolov_bandit_init") then
|
|
local squad = SIMBOARD:create_squad(smart,"nr_bandits_1_squad")
|
|
local squad_2 = SIMBOARD:create_squad(smart,"nr_bandits_2_squad")
|
|
news_manager.send_tip(db.actor, game.translate_string("st_alyosha_making_trouble_12"), 5, "bandit", 11000, 1)
|
|
GI("alyosha_shyogolov_bandit_init")
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
|
|
if HI("nr_bandits_1_squad_dead") and HI("nr_bandits_2_squad_dead") then
|
|
|
|
GI("nr_bandits_squads_dead_1")
|
|
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_alyosha_shyogolov_trouble_4_status_f(tsk,task_id)
|
|
|
|
local dist = 40
|
|
local dist_2 = 100
|
|
|
|
local smart_1 = SIMBOARD.smarts_by_names["jup_a9"]
|
|
local smart_2 = SIMBOARD.smarts_by_names["jup_b47"]
|
|
|
|
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local smrt_2 = SIMBOARD.smarts[smart_2.id]
|
|
|
|
local spawn_squad = dialogs_brotherhood.spawn_squad
|
|
if (tsk.stage == 0) then ---- enables conversation with Erast, but needs better detecting if disguised or not
|
|
|
|
|
|
if db.actor:character_community() == "actor_ecolog" then
|
|
|
|
GI("nr_erast_enable_corruption_discussion")
|
|
else
|
|
DI("nr_erast_enable_corruption_discussion")
|
|
end
|
|
|
|
|
|
end
|
|
|
|
if (tsk.stage == 1) then ---- clear the smarts
|
|
news_manager.send_tip(db.actor, game.translate_string("Stage1"), 1, "ecolog", 11000, 1)
|
|
if smart_1 and smart_1.online and smart_2 and smart_2.online then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist) then
|
|
news_manager.send_tip(db.actor, game.translate_string("Stage 1.1"), 1, "ecolog", 11000, 1)
|
|
xr_effects.clear_smart_terrain(nil,nil,{"jup_a9","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"jup_b47","true"})
|
|
|
|
tsk.stage = 2
|
|
return
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
if (tsk.stage == 2) then ---- teleport NPCs
|
|
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist) then
|
|
news_manager.send_tip(db.actor, game.translate_string("Stage 2"), 1, "ecolog", 11000, 1)
|
|
if NI("relocated_alyosha_shyogolov_2") then
|
|
|
|
dialogs_brotherhood.relocation_alyosha_2()
|
|
|
|
|
|
end
|
|
if HI("teleport_erast") then
|
|
if NI("erast_fandorin_relocation_1") then
|
|
dialogs_brotherhood.relocation_erast_fandorin_1()
|
|
tsk.stage = 3
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 3) then ---- spring the ambush
|
|
if HI("nr_ambush_init") then
|
|
if NI("spawn_amry_test_1") then
|
|
|
|
|
|
local squad_1 = SIMBOARD:create_squad(smart_2,"nr_ambush_squad_1")
|
|
local squad_2 = SIMBOARD:create_squad(smart_2,"nr_ambush_squad_3")
|
|
local squad_3 = SIMBOARD:create_squad(smart_1,"nr_ambush_squad_2")
|
|
|
|
local pos_1 = vector():set( 355.57171630859,27.977787017822,-239.86022949219 )
|
|
local pos_2 = vector():set( 378.29794311523,27.978296279907,-235.07585144043 )
|
|
local pos_3 = vector():set( 314.48291015625,34.592678070068,-237.58148193359 )
|
|
local pos_4 = vector():set( 331.10369873047,34.258598327637,-270.34857177734 )
|
|
local pos_5 = vector():set( 316.77917480469,34.714248657227,-237.42193603516 )
|
|
|
|
|
|
local se_squad_1 = spawn_squad("nr_ambush_squad_4", pos_1, 1281744, 4694)
|
|
local se_squad_2 = spawn_squad("nr_ambush_squad_5", pos_2, 1314488, 4787)
|
|
local se_squad_3 = spawn_squad("nr_ambush_squad_6", pos_3, 1221970, 4694)
|
|
local se_squad_4 = spawn_squad("nr_ambush_squad_7", pos_4, 1245499, 4694)
|
|
local se_squad_5 = spawn_squad("nr_ambush_squad_8", pos_5, 1225743, 4694)
|
|
|
|
dialogs_brotherhood.change_faction_erast_1()
|
|
|
|
|
|
if NI("relocated_alyosha_shyogolov_3") then
|
|
|
|
dialogs_brotherhood.relocation_alyosha_3()
|
|
CreateTimeEvent("nr_blank_1","nr_blank_1", 1, nr_corruption_self_1)
|
|
end
|
|
|
|
GI("spawn_amry_test_1")
|
|
tsk.stage = 4
|
|
end
|
|
end
|
|
if HI("nr_ambush_coward_init") then ---- if the player tries to run away before finishing the dialogue
|
|
|
|
local dist_4 = 3
|
|
local pos = vector():set( 337.31549072266,26.735898971558,-255.1216583252 )
|
|
|
|
if NI("spawn_amry_test_1") then
|
|
|
|
if (db.actor:position():distance_to(pos) > dist_4) then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("nr_corruption_coward_1"), 0, "army", 11000, 1)
|
|
|
|
local squad_1 = SIMBOARD:create_squad(smart_2,"nr_ambush_squad_1")
|
|
local squad_2 = SIMBOARD:create_squad(smart_2,"nr_ambush_squad_3")
|
|
local squad_3 = SIMBOARD:create_squad(smart_1,"nr_ambush_squad_2")
|
|
|
|
local pos_1 = vector():set( 355.57171630859,27.977787017822,-239.86022949219 )
|
|
local pos_2 = vector():set( 378.29794311523,27.978296279907,-235.07585144043 )
|
|
local pos_3 = vector():set( 314.48291015625,34.592678070068,-237.58148193359 )
|
|
local pos_4 = vector():set( 331.10369873047,34.258598327637,-270.34857177734 )
|
|
local pos_5 = vector():set( 316.77917480469,34.714248657227,-237.42193603516 )
|
|
|
|
|
|
local se_squad_1 = spawn_squad("nr_ambush_squad_4", pos_1, 1281744, 4694)
|
|
local se_squad_2 = spawn_squad("nr_ambush_squad_5", pos_2, 1314488, 4787)
|
|
local se_squad_3 = spawn_squad("nr_ambush_squad_6", pos_3, 1221970, 4694)
|
|
local se_squad_4 = spawn_squad("nr_ambush_squad_7", pos_4, 1245499, 4694)
|
|
local se_squad_5 = spawn_squad("nr_ambush_squad_8", pos_5, 1225743, 4694)
|
|
|
|
dialogs_brotherhood.change_faction_erast_1()
|
|
|
|
|
|
if NI("relocated_alyosha_shyogolov_3") then
|
|
|
|
CreateTimeEvent("nr_blank_1","nr_blank_1", 1, nr_corruption_self_1)
|
|
dialogs_brotherhood.relocation_alyosha_3()
|
|
|
|
end
|
|
|
|
|
|
GI("spawn_amry_test_1")
|
|
tsk.stage = 4
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 4) then ---- flee and clean the mess
|
|
|
|
|
|
|
|
if smrt_2 and (db.actor:position():distance_to(smart_2.position) > dist_2) then
|
|
if NI("nr_ambush_cleaned") then
|
|
dialogs_brotherhood.nr_ambush_release()
|
|
|
|
if NI("nr_corruption_self_init") then
|
|
|
|
if HI("erast_fandorin_dead") then
|
|
news_manager.send_tip(db.actor, string.format(game.translate_string("nr_corruption_army_1"), alife():actor():character_name()), 0, "army", 11000, 1)
|
|
elseif NI("erast_fandorin_dead") then
|
|
news_manager.send_tip(db.actor, string.format(game.translate_string("nr_corruption_army_0"), alife():actor():character_name()), 0, "army", 11000, 1)
|
|
dialogs_brotherhood.relocation_erast_fandorin_2()
|
|
dialogs_brotherhood.change_faction_erast_2()
|
|
end
|
|
|
|
CreateTimeEvent("nr_blank_2","nr_blank_2", 5, nr_corruption_self_2)
|
|
|
|
CreateTimeEvent("nr_blank_3","nr_blank_3", 10, nr_corruption_self_3)
|
|
|
|
CreateTimeEvent("nr_blank_4","nr_blank_4", 15, nr_corruption_self_4)
|
|
|
|
CreateTimeEvent("nr_blank_5","nr_blank_5", 20, nr_corruption_self_5)
|
|
|
|
CreateTimeEvent("nr_blank_6","nr_blank_6", 25, nr_corruption_self_6)
|
|
|
|
GI("nr_corruption_self_init")
|
|
end
|
|
GI("nr_ambush_cleaned")
|
|
return
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
function nr_corruption_self_1()
|
|
if NI("nr_corruption_self_1")then
|
|
actor_menu.set_msg(1, game.translate_string("nr_corruption_self_1"), 4)
|
|
GI("nr_corruption_self_1")
|
|
return true
|
|
end
|
|
end
|
|
function nr_corruption_self_2()
|
|
if NI("nr_corruption_self_2")then
|
|
actor_menu.set_msg(1, game.translate_string("nr_corruption_self_2"), 4)
|
|
GI("nr_corruption_self_2")
|
|
return true
|
|
end
|
|
end
|
|
function nr_corruption_self_3()
|
|
if NI("nr_corruption_self_3")then
|
|
actor_menu.set_msg(1, game.translate_string("nr_corruption_self_3"), 4)
|
|
GI("nr_corruption_self_3")
|
|
return true
|
|
end
|
|
end
|
|
function nr_corruption_self_4()
|
|
if NI("nr_corruption_self_4")then
|
|
actor_menu.set_msg(1, game.translate_string("nr_corruption_self_4"), 4)
|
|
dialogs_brotherhood.give_alyosha_shyogolov_trouble_5()
|
|
GI("alyosha_shyogolov_trouble_4_done")
|
|
GI("nr_corruption_self_4")
|
|
return true
|
|
end
|
|
end
|
|
function nr_corruption_self_5()
|
|
if NI("nr_corruption_self_5")then
|
|
actor_menu.set_msg(1, game.translate_string("nr_corruption_self_5"), 4)
|
|
GI("nr_corruption_self_5")
|
|
return true
|
|
end
|
|
end
|
|
function nr_corruption_self_6()
|
|
if NI("nr_corruption_self_6")then
|
|
actor_menu.set_msg(1, game.translate_string("nr_corruption_self_6"), 4)
|
|
GI("nr_corruption_self_6")
|
|
return true
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_alyosha_shyogolov_trouble_5_status_f(tsk,task_id)
|
|
|
|
if (gameplay_disguise.is_disguise ~= nil) then
|
|
if db.actor:character_community() == "actor_ecolog" then
|
|
|
|
db.actor:set_community_goodwill("ecolog", 2000)
|
|
end
|
|
else
|
|
|
|
db.actor:set_community_goodwill("army", 2000)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
---- Vybegallo ----
|
|
function task_status_functor.give_vybegallo_satisfied_man_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
if (NI("task_kill_satisfied_man_init")) then
|
|
if not (get_story_se_object("satisfied_man")) then
|
|
local dist = 27
|
|
local smart = SIMBOARD.smarts_by_names["agr_u_bloodsucker_2"]
|
|
if smart and smart.online then
|
|
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
|
|
local smart = SIMBOARD.smarts_by_names["agr_u_bloodsucker_2"]
|
|
local squad = SIMBOARD:create_squad(smart,"satisfied_man")
|
|
|
|
GI("task_kill_satisfied_man_init")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
end
|
|
end
|
|
|
|
--- Brotherhood 4 ---
|
|
function task_status_functor.give_task_kill_pack_snorks_2_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
if (NI("task_kill_pack_snorks_2_init")) then
|
|
if not (get_story_se_object("pack_snorks_2")) then
|
|
local dist = 100
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_7_5"]
|
|
if smart and smart.online then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"agr_smart_terrain_7_5","true"})
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_7_5"]
|
|
local squad = SIMBOARD:create_squad(smart,"pack_snorks_2")
|
|
tsk.stage = 1
|
|
GI("task_kill_pack_snorks_1_init")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if HI("pack_snorks_2_dead") then
|
|
local dist = 50
|
|
local smart = SIMBOARD.smarts_by_names["gar_smart_terrain_3_5"]
|
|
if smart and smart.online then
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
GI("butcher_ilya_back_home")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
---- Cordon
|
|
|
|
|
|
--- Railway Assault ---
|
|
|
|
function task_status_functor.give_sidorovich_railway_assault_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
if HI("assault_csky_leader_esc_5_7_start_dialog_done") then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_4_9","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_5_9","true"})
|
|
if (NI("railway_assault_stalker_init")) then
|
|
|
|
if not (get_story_se_object("stalker_assault_esc_5_9")) then
|
|
|
|
local smart = SIMBOARD.smarts_by_names["esc_smart_terrain_4_9"]
|
|
local squad = SIMBOARD:create_squad(smart,"stalker_assault_esc_5_9")
|
|
local squad_2 = SIMBOARD:create_squad(smart,"stalker_assault_esc_5_9_leader")
|
|
GI("railway_assault_stalker_init")
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
|
|
local dist = 75
|
|
local smart = SIMBOARD.smarts_by_names["esc_smart_terrain_6_8"]
|
|
if smart and smart.online then
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
if (NI("railway_assault_bandit_ref_init")) then
|
|
if not (get_story_se_object("bandit_reinforcment_esc_6_8")) then
|
|
|
|
local smart_2 = SIMBOARD.smarts_by_names["esc_smart_terrain_7_11"]
|
|
local squad = SIMBOARD:create_squad(smart_2,"bandit_reinforcment_esc_6_8")
|
|
GI("railway_assault_bandit_ref_init")
|
|
tsk.stage = 2
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if HI("bandit_guards_esc_6_8_dead") and HI("bandit_reinforcment_esc_6_8_dead") then
|
|
GI("esc_railbridge_taken")
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
function task_status_functor.give_sidorovich_railway_assault_2_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
local dist = 150
|
|
local smart = SIMBOARD.smarts_by_names["esc_smart_terrain_7_11"]
|
|
if smart and smart.online then
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_7_11","true"})
|
|
if NI("bandit_reinforcment_esc_7_11") then
|
|
local smart = SIMBOARD.smarts_by_names["esc_smart_terrain_7_11"]
|
|
local squad = SIMBOARD:create_squad(smart,"bandit_reinforcment_esc_7_11")
|
|
GI("bandit_reinforcment_esc_7_11")
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
local dist = 50
|
|
local smart = SIMBOARD.smarts_by_names["esc_smart_terrain_7_11"]
|
|
if smart and smart.online then
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_4_9","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_5_9","true"})
|
|
tsk.stage = 2
|
|
return
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if NI("railway_assault_stalker_init") then
|
|
local smart = SIMBOARD.smarts_by_names["esc_smart_terrain_4_9"]
|
|
local squad = SIMBOARD:create_squad(smart,"stalker_assault_esc_5_9")
|
|
local squad_2 = SIMBOARD:create_squad(smart,"stalker_assault_esc_5_9_leader")
|
|
GI("railway_assault_stalker_init")
|
|
GI("esc_railway_assault_go")
|
|
dialogs_brotherhood.send_railway_assault_message_1()
|
|
tsk.stage = 3
|
|
return
|
|
end
|
|
end
|
|
if (tsk.stage == 3) then
|
|
if HI("bandit_guards_esc_6_8_dead") and HI("bandit_reinforcment_esc_7_11_dead") then
|
|
GI("esc_railbridge_taken")
|
|
end
|
|
end
|
|
end
|
|
|
|
--- Shlitzer
|
|
function bh_meet_shlitzer()
|
|
|
|
|
|
if NI("bh_shlitzer_init_done") then
|
|
|
|
|
|
local pos_1 = vector():set( -236.48327636719,-19.751678466797,-131.93586730957 ) --- meet shlitzer
|
|
local pos_2 = vector():set( -240.43469238281,-20.030139923096,-157.60787963867 ) --- go to house
|
|
local pos_6 = vector():set( -124.4213104248,-30.051345825195,-373.82867431641 ) --- guard house/Badger spawn
|
|
local dist_1 = 10
|
|
local dist_2 = 1
|
|
local npc = get_story_se_object("bh_shlitzer_squad")
|
|
|
|
|
|
|
|
if HI("esc_railway_assault_done") then
|
|
|
|
|
|
|
|
if NI("bh_shlitzer_spawn_done") then
|
|
local se_squad = spawn_squad("bh_shlitzer_squad", pos_1, 21333, 508)
|
|
|
|
GI("bh_shlitzer_spawn_done")
|
|
end
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
|
|
if NI("bh_shlitzer_greeting") then
|
|
actor_menu.set_msg(1, game.translate_string("bh_shlitzer_greeting"), 10)
|
|
GI("bh_shlitzer_greeting")
|
|
end
|
|
end
|
|
if npc and (npc.position:distance_to(pos_2) < dist_2) then
|
|
|
|
GI("bh_shlitzer_init_done")
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_shlitzer_smuggling_1_status_f(tsk,task_id)
|
|
|
|
|
|
--- item states
|
|
--- state 0 = using
|
|
--- state 1 = putting out
|
|
--- state 2 = putting in
|
|
--- state 3 = not using
|
|
|
|
local hrs = level.get_time_hours()
|
|
|
|
|
|
local pos_3 = vector():set( -150.56283569336,-30.771974563599,-277.30380249023 ) --- jeep wreackage
|
|
local pos_4 = vector():set( -168.28816223145,-25.436302185059,-352.47952270508 ) --- guard tower
|
|
local pos_5 = vector():set( -241.95616149902,-30.707180023193,-353.70162963867 ) --- fence
|
|
local pos_6 = vector():set( -124.4213104248,-30.051345825195,-373.82867431641 ) --- guard house
|
|
|
|
local dist_1 = 6
|
|
local dist_2 = 2
|
|
local npc = get_story_se_object("bh_badger_squad")
|
|
local commander = alife_object(npc:commander_id())
|
|
if (hrs >= 23) or (hrs < 5) then
|
|
|
|
GI("bh_badger_guard_dutz_on")
|
|
|
|
else
|
|
|
|
DI("bh_badger_guard_dutz_on")
|
|
|
|
end
|
|
|
|
|
|
|
|
if (tsk.stage == 0) then
|
|
|
|
if (hrs >= 0) and (hrs < 4) then
|
|
|
|
if (db.actor:position():distance_to(pos_3) < dist_1) then
|
|
|
|
if (db.actor:item_in_slot(9) ~= nil) and (db.actor:item_in_slot(9):section() == "device_flashlight") then
|
|
|
|
local torch = db.actor:item_in_slot(9)
|
|
|
|
if torch:get_state() == 3 then
|
|
|
|
GI("bh_shlitzer_smuggling_start")
|
|
|
|
end
|
|
|
|
if HI("bh_shlitzer_smuggling_start") and NI("bh_shlitzer_smuggling_1") and torch:get_state() == 0 then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_bh_shlitzer_smuggling_1"), nil, "communication", 6000)
|
|
|
|
CreateTimeEvent("bh_shlitzer_smuggling_init","bh_shlitzer_smuggling_init", 7,bh_shlitzer_smuggling_init_timer)
|
|
GI("bh_shlitzer_smuggling_1")
|
|
end
|
|
if HI("bh_shlitzer_smuggling_1") and NI("bh_shlitzer_smuggling_2") then
|
|
if torch:get_state() == 3 or torch:get_state() == 2 then
|
|
|
|
GI("bh_shlitzer_smuggling_2")
|
|
end
|
|
end
|
|
if HI("bh_shlitzer_smuggling_2") and NI("bh_shlitzer_smuggling_3") and torch:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_bh_shlitzer_smuggling_2"), nil, "communication", 6000)
|
|
GI("bh_shlitzer_smuggling_3")
|
|
end
|
|
if HI("bh_shlitzer_smuggling_3") and NI("bh_shlitzer_smuggling_4") then
|
|
if torch:get_state() == 3 or torch:get_state() == 2 then
|
|
|
|
GI("bh_shlitzer_smuggling_4")
|
|
end
|
|
end
|
|
if HI("bh_shlitzer_smuggling_4") and NI("bh_shlitzer_smuggling_done") and torch:get_state() == 0 then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_bh_shlitzer_smuggling_3"), nil, "communication", 6000)
|
|
GI("bh_shlitzer_smuggling_done")
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
|
|
if (db.actor:position():distance_to(pos_5) < dist_2) and npc and (npc.position:distance_to(pos_5) < dist_2) then
|
|
if NI("bh_badger_greeting_1") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_badger_start_0"), 10)
|
|
CreateTimeEvent("bh_badger_greeting_2_init","bh_badger_greeting_2_init", 4,bh_badger_greeting_2_init_timer)
|
|
CreateTimeEvent("bh_badger_greeting_3_init","bh_badger_greeting_3_init", 8,bh_badger_greeting_3_init_timer)
|
|
GI("bh_badger_greeting_1")
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
function bh_shlitzer_smuggling_init_timer()
|
|
if NI("bh_shlitzer_smuggling_done") then
|
|
DI("bh_shlitzer_smuggling_start")
|
|
DI("bh_shlitzer_smuggling_1")
|
|
DI("bh_shlitzer_smuggling_2")
|
|
DI("bh_shlitzer_smuggling_3")
|
|
DI("bh_shlitzer_smuggling_4")
|
|
news_manager.send_tip(db.actor, game.translate_string("st_bh_shlitzer_smuggling_4"), nil, "communication", 6000)
|
|
return true
|
|
end
|
|
|
|
return true
|
|
end
|
|
|
|
function bh_badger_greeting_2_init_timer()
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_badger_start_1"), 10)
|
|
local se_item = alife_create_item("quest_package_shlitzer", db.actor)
|
|
return true
|
|
end
|
|
function bh_badger_greeting_3_init_timer()
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_badger_start_2"), 10)
|
|
GI("bh_badger_deal_done")
|
|
return true
|
|
end
|
|
|
|
function task_status_functor.give_shlitzer_smuggling_2_status_f(tsk,task_id)
|
|
|
|
local smart_1 = SIMBOARD.smarts_by_names["esc_smart_terrain_6_6"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local dist_1 = 70
|
|
local dist_2 = 2
|
|
local npc = get_story_se_object("bh_ironchain_squad")
|
|
|
|
if (tsk.stage == 0) then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_1) then
|
|
if NI("bh_ironchain_init") then
|
|
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_6_6","true"})
|
|
|
|
|
|
local squad = SIMBOARD:create_squad(smart_1,"bh_ironchain_squad")
|
|
local squad_2 = SIMBOARD:create_squad(smart_1,"bh_ironchain_2_squad")
|
|
|
|
GI("bh_ironchain_init")
|
|
tsk.stage = 1
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if HI("bh_ironchain_deal_start") and NI("bh_ironchain_deal_done") then
|
|
if (npc.position:distance_to(db.actor:position()) > dist_2) then
|
|
if NI("bh_ironchain_deal_gone_wrong") then
|
|
GI("bh_ironchain_deal_gone_wrong")
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_ironchain_deal_gone_wrong"), 10)
|
|
dialogs_brotherhood.change_faction_bh_ironchain()
|
|
end
|
|
end
|
|
end
|
|
if HI("bh_ironchain_deal_done") then
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if NI("bh_ironchain_2_squad_dead") and NI("bh_ironchain_squad_dead") then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) > dist_1) then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_6_6","true"})
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_shlitzer_smuggling_3_status_f(tsk,task_id)
|
|
|
|
local hrs = level.get_time_hours()
|
|
|
|
local pos_2 = vector():set( -240.43469238281,-20.030139923096,-157.60787963867 ) --- go to house
|
|
local pos_3 = vector():set( -150.56283569336,-30.771974563599,-277.30380249023 ) --- jeep wreackage
|
|
local pos_4 = vector():set( -168.28816223145,-25.436302185059,-352.47952270508 ) --- guard tower
|
|
local pos_5 = vector():set( -241.95616149902,-30.707180023193,-353.70162963867 ) --- fence
|
|
local pos_6 = vector():set( -124.4213104248,-30.051345825195,-373.82867431641 ) --- guard house
|
|
|
|
local dist_1 = 6
|
|
local dist_2 = 2
|
|
local dist_3 = 30
|
|
|
|
|
|
if (hrs >= 23) or (hrs < 5) then
|
|
|
|
GI("bh_badger_guard_dutz_on")
|
|
|
|
else
|
|
|
|
DI("bh_badger_guard_dutz_on")
|
|
|
|
end
|
|
|
|
if (tsk.stage == 0) then
|
|
|
|
if (hrs >= 0) and (hrs < 4) then
|
|
|
|
if (db.actor:position():distance_to(pos_3) < dist_1) then
|
|
|
|
if (db.actor:item_in_slot(9) ~= nil) and (db.actor:item_in_slot(9):section() == "device_flashlight") then
|
|
|
|
local torch = db.actor:item_in_slot(9)
|
|
|
|
if torch:get_state() == 3 then
|
|
|
|
GI("bh_shlitzer_smuggling_start")
|
|
|
|
end
|
|
|
|
if HI("bh_shlitzer_smuggling_start") and NI("bh_shlitzer_smuggling_1") and torch:get_state() == 0 then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_bh_shlitzer_smuggling_1"), nil, "communication", 6000)
|
|
|
|
CreateTimeEvent("bh_shlitzer_smuggling_init","bh_shlitzer_smuggling_init", 7,bh_shlitzer_smuggling_init_timer)
|
|
GI("bh_shlitzer_smuggling_1")
|
|
end
|
|
if HI("bh_shlitzer_smuggling_1") and NI("bh_shlitzer_smuggling_2") then
|
|
if torch:get_state() == 3 or torch:get_state() == 2 then
|
|
|
|
GI("bh_shlitzer_smuggling_2")
|
|
end
|
|
end
|
|
if HI("bh_shlitzer_smuggling_2") and NI("bh_shlitzer_smuggling_3") and torch:get_state() == 0 then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_bh_shlitzer_smuggling_2"), nil, "communication", 6000)
|
|
GI("bh_shlitzer_smuggling_3")
|
|
end
|
|
if HI("bh_shlitzer_smuggling_3") and NI("bh_shlitzer_smuggling_4") then
|
|
if torch:get_state() == 3 or torch:get_state() == 2 then
|
|
|
|
GI("bh_shlitzer_smuggling_4")
|
|
end
|
|
end
|
|
if HI("bh_shlitzer_smuggling_4") and NI("bh_shlitzer_smuggling_done") and torch:get_state() == 0 then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_bh_shlitzer_smuggling_3"), nil, "communication", 6000)
|
|
GI("bh_shlitzer_smuggling_done")
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if HI("bh_badger_squad_dead") then
|
|
if (db.actor:character_community() == "actor_stalker") then
|
|
|
|
tsk.stage = 2
|
|
|
|
elseif (db.actor:character_community() == "actor_bandit") or (db.actor:character_community() == "actor_renegade") then
|
|
tsk.stage = 2
|
|
elseif (db.actor:character_community() == "actor_ecolog") or (db.actor:character_community() == "actor_dolg") or (db.actor:character_community() == "actor_army") then
|
|
tsk.stage = 2
|
|
elseif (db.actor:character_community() == "actor_monolith") or (db.actor:character_community() == "actor_freedom") or (db.actor:character_community() == "actor_killer") then
|
|
tsk.stage = 2
|
|
else
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if HI("bh_badger_squad_dead") and (db.actor:position():distance_to(pos_5) > dist_3) then
|
|
|
|
if NI("castor_pollox_relocation_init") then
|
|
dialogs_brotherhood.relocation_pollox_and_castor()
|
|
end
|
|
|
|
if HI("castor_pollox_relocation_init") and NI("bh_army_lockdown_init") then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_2_14","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_3_7","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_5_2","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_9_10","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_6_8","true"})
|
|
GI("bh_army_lockdown_init")
|
|
end
|
|
if HI("bh_army_lockdown_init") and NI("bh_army_lockdown_init_2") then
|
|
|
|
local squad = SIMBOARD:create_squad("esc_smart_terrain_9_10","bh_lockdown_9_10_squad")
|
|
local squad_2 = SIMBOARD:create_squad("esc_smart_terrain_5_2","bh_lockdown_5_2_squad")
|
|
local squad_3 = SIMBOARD:create_squad("esc_smart_terrain_3_7","bh_lockdown_3_7_squad")
|
|
local squad_4 = SIMBOARD:create_squad("esc_smart_terrain_3_7","bh_lockdown_3_7_squad_2")
|
|
local squad_5 = SIMBOARD:create_squad("esc_smart_terrain_2_14","bh_lockdown_2_14_squad")
|
|
local squad_6 = SIMBOARD:create_squad("esc_smart_terrain_6_8","bh_lockdown_6_8_squad")
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
if (tsk.stage == 3) then
|
|
|
|
|
|
end
|
|
|
|
news_manager.send_tip(db.actor, string.format(game.translate_string("st_bh_shlitzer_sidorovich_0"), alife():actor():character_name()), 0, "stalker", 11000, 1)
|
|
---send_tip(actor, news_id, timeout, sender, showtime, sender_id)
|
|
end
|
|
--- Dolg Hunter ---
|
|
|
|
function task_status_functor.give_dolg_bloodsucker_village_2_status_f(tsk,task_id)
|
|
local npc_1 = get_story_object("dolg_vadim_bloodsucker")
|
|
local npc_2 = get_story_object("dolg_sasha_bloodsucker")
|
|
local npc_3 = get_story_object("dolg_sergey_bloodsucker")
|
|
|
|
local dist_2 = 30
|
|
|
|
local smart_1 = SIMBOARD.smarts_by_names["mil_smart_terrain_4_2"]
|
|
local smart_2 = SIMBOARD.smarts_by_names["mil_smart_terrain_4_3"]
|
|
local smart_3 = SIMBOARD.smarts_by_names["mil_smart_terrain_2_10"]
|
|
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local smrt_2 = SIMBOARD.smarts[smart_2.id]
|
|
local smrt_3 = SIMBOARD.smarts[smart_3.id]
|
|
|
|
local hrs = level.get_time_hours()
|
|
if (tsk.stage == 0) then
|
|
if smart_1 and smart_1.online and smart_2 and smart_2.online and smart_3 and smart_3.online then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_2) then
|
|
|
|
if NI("bloodsucker_village_1_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_1,"pack_bloodsuckers_dolg_1")
|
|
GI("bloodsucker_village_1_spawned")
|
|
|
|
return
|
|
end
|
|
|
|
elseif smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist_2) then
|
|
|
|
if NI("bloodsucker_village_2_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_2,"pack_bloodsuckers_dolg_2")
|
|
GI("bloodsucker_village_2_spawned")
|
|
|
|
return
|
|
end
|
|
elseif smrt_3 and (db.actor:position():distance_to(smart_3.position) < dist_2) then
|
|
|
|
if NI("bloodsucker_village_3_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_3,"pack_bloodsuckers_dolg_3")
|
|
GI("bloodsucker_village_3_spawned")
|
|
|
|
return
|
|
end
|
|
|
|
end
|
|
end
|
|
if npc_1 and npc_1:object("killer_patch") and npc_2 and npc_2:object("killer_patch") and npc_3 and npc_3:object("killer_patch") then
|
|
|
|
if (hrs >= 5) and (hrs < 21) then
|
|
give_info("bloodsucker_raid_has_killer_patch_fail")
|
|
news_manager.send_tip(db.actor, game.translate_string("st_freedom_voronin_bloodsucker_news_0"), 0, "freedom", 11000, 1)
|
|
|
|
else
|
|
give_info("bloodsucker_raid_has_killer_patch_done")
|
|
|
|
return
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_dolg_bloodsucker_village_1_status_f(tsk,task_id)
|
|
|
|
local dist = 500
|
|
local dist_2 = 30
|
|
|
|
local smart_1 = SIMBOARD.smarts_by_names["mil_smart_terrain_4_2"]
|
|
local smart_2 = SIMBOARD.smarts_by_names["mil_smart_terrain_4_3"]
|
|
local smart_3 = SIMBOARD.smarts_by_names["mil_smart_terrain_2_10"]
|
|
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local smrt_2 = SIMBOARD.smarts[smart_2.id]
|
|
local smrt_3 = SIMBOARD.smarts[smart_3.id]
|
|
|
|
local hrs = level.get_time_hours()
|
|
|
|
if (tsk.stage == 0) then
|
|
if smart_1 and smart_1.online and smart_2 and smart_2.online and smart_3 and smart_3.online then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist) then
|
|
|
|
xr_effects.clear_smart_terrain(nil,nil,{"mil_smart_terrain_4_2","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"mil_smart_terrain_4_3","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"mil_smart_terrain_2_10","true"})
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_2) then
|
|
|
|
if NI("bloodsucker_village_1_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_1,"pack_bloodsuckers_dolg_1")
|
|
GI("bloodsucker_village_1_spawned")
|
|
|
|
return
|
|
end
|
|
|
|
elseif smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist_2) then
|
|
|
|
if NI("bloodsucker_village_2_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_2,"pack_bloodsuckers_dolg_2")
|
|
GI("bloodsucker_village_2_spawned")
|
|
|
|
return
|
|
end
|
|
elseif smrt_3 and (db.actor:position():distance_to(smart_3.position) < dist_2) then
|
|
|
|
if NI("bloodsucker_village_3_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_3,"pack_bloodsuckers_dolg_3")
|
|
GI("bloodsucker_village_3_spawned")
|
|
|
|
return
|
|
end
|
|
|
|
end
|
|
if HI("bloodsucker_village_1_spawned") and HI("bloodsucker_village_2_spawned") and HI("bloodsucker_village_3_spawned") then
|
|
|
|
tsk.stage = 2
|
|
return
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if HI("pack_bloodsuckers_dolg_1_dead") and HI("pack_bloodsuckers_dolg_2_dead") and HI("pack_bloodsuckers_dolg_3_dead") then
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
give_info("pack_bloodsuckers_dolg_1_all_dead")
|
|
return
|
|
else
|
|
give_info("give_dolg_bloodsucker_village_1_out_of_time")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_dolg_bloodsucker_village_3_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
|
|
local dist = 50
|
|
local smart = SIMBOARD.smarts_by_names["mil_smart_terrain_7_4"]
|
|
if smart and smart.online then
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
if NI("dolg_artyom_bloodsucker_0_done") then
|
|
if (NI("dolg_ilya_bloodsucker_init")) then
|
|
if not (get_story_se_object("dolg_ilya_bloodsucker_squad")) then
|
|
|
|
local smart_2 = SIMBOARD.smarts_by_names["mil_smart_terrain_8_3"]
|
|
local squad = SIMBOARD:create_squad(smart_2,"dolg_ilya_bloodsucker_og_squad")
|
|
local squad_2 = SIMBOARD:create_squad(smart_2,"dolg_ilya_bloodsucker_squad")
|
|
GI("dolg_ilya_bloodsucker_init")
|
|
return
|
|
end
|
|
end
|
|
else
|
|
if (NI("dolg_ilya_bloodsucker_init")) then
|
|
if not (get_story_se_object("dolg_ilya_bloodsucker_2_squad")) then
|
|
|
|
local smart_2 = SIMBOARD.smarts_by_names["mil_smart_terrain_8_3"]
|
|
local squad = SIMBOARD:create_squad(smart_2,"dolg_ilya_bloodsucker_og_squad")
|
|
local squad_2 = SIMBOARD:create_squad(smart_2,"dolg_ilya_bloodsucker_2_squad")
|
|
GI("dolg_ilya_bloodsucker_init")
|
|
return
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
----- Bellerophon Quests -----
|
|
|
|
function task_status_functor.give_task_bellerophon_chimera_1_status_f(tsk,task_id)
|
|
local dist = 10
|
|
local dist_2 = 25
|
|
|
|
local pos_1 = vector():set(33.515865325928,0.076751172542572,-39.296714782715 )
|
|
local pos_2 = vector():set(25.73078918457,0.046717882156372,19.807271957397 )
|
|
local pos_3 = vector():set(-14.096794128418,0.13558429479599,5.6727747917175 )
|
|
local pos_4 = vector():set(-10.063064575195,0.11458736658096,-24.969347000122 )
|
|
local pos_5 = vector():set(13.057991981506,0.042427986860275,-55.789348602295 )
|
|
|
|
local smart_1 = SIMBOARD.smarts_by_names["yan_smart_terrain_6_4"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
|
|
local hrs = level.get_time_hours()
|
|
|
|
if (tsk.stage == 0) then
|
|
if level.name() == "l08_yantar" then
|
|
|
|
if NI("relocation_bellerophon_1") then
|
|
dialogs_brotherhood.relocation_bellerophon_1()
|
|
end
|
|
if HI("bellerophon_7_done") then
|
|
tsk.stage = 1
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
if (tsk.stage == 1) then
|
|
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
if (db.actor:position():distance_to(pos_1) < dist) then
|
|
if NI("bellerophon_chimera_spawn_1") then
|
|
local se_squad = spawn_squad("bellerophon_chimera_1", pos_4, 62058, 2217)
|
|
|
|
GI("bellerophon_chimera_spawn_1")
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_2) < dist) then
|
|
if NI("bellerophon_chimera_spawn_1") then
|
|
local se_squad = spawn_squad("bellerophon_chimera_1", pos_3, 60051, 2193)
|
|
|
|
GI("bellerophon_chimera_spawn_1")
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_5) < dist) then
|
|
if NI("bellerophon_chimera_spawn_1") then
|
|
local se_squad = spawn_squad("bellerophon_chimera_1", pos_4, 62058, 2217)
|
|
|
|
GI("bellerophon_chimera_spawn_1")
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if HI("bellerophon_chimera_1_dead") then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_2) then
|
|
|
|
GI("bellerophon_back_buncker_1")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
---- Trapper Quests ----
|
|
|
|
function task_status_functor.give_task_trapper_chimera_1_status_f(tsk,task_id)
|
|
|
|
local se_obj = get_story_se_object("quest_chimera_bait_brotherhood")
|
|
local obj = se_obj and level.object_by_id(se_obj.id)
|
|
local dist_1 = 2
|
|
local dist_2 = 5
|
|
local dist_3 = 100
|
|
local smart_1 = SIMBOARD.smarts_by_names["jup_sim_21"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local smart_2 = SIMBOARD.smarts_by_names["jup_b46"]
|
|
local smrt_2 = SIMBOARD.smarts[smart_2.id]
|
|
local pos = vector():set( -189.52851867676,3.3515679836273,394.25390625 )
|
|
local hrs = level.get_time_hours()
|
|
|
|
if (tsk.stage == 0) then
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_2.position) < dist_3) then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"jup_b46","true"})
|
|
xr_effects.clear_smart_terrain(nil,nil,{"jup_sim_21","true"})
|
|
if (obj) then
|
|
if (obj:position():distance_to(pos) < dist_2) then
|
|
if NI("trapper_chimera_1_init") then
|
|
CreateTimeEvent("nr_trapper_blank_1","nr_trapper_blank_1", 10, nr_trapper_chimera_1_spawn)
|
|
tsk.stage = 1
|
|
GI("trapper_chimera_1_init")
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos) < dist_1) then
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
actor_menu.set_msg(1, game.translate_string("nr_trapper_chimera_1_info"), 1)
|
|
else
|
|
actor_menu.set_msg(1, game.translate_string("nr_trapper_chimera_2_info"), 1)
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
return
|
|
end
|
|
end
|
|
|
|
|
|
function nr_trapper_chimera_1_spawn()
|
|
local smart_1 = SIMBOARD.smarts_by_names["jup_sim_21"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
if NI("trapper_chimera_1_init_timed") then
|
|
local squad = SIMBOARD:create_squad(smart_1,"trapper_chimera_1")
|
|
GI("trapper_chimera_1_init_timed")
|
|
return true
|
|
end
|
|
|
|
end
|
|
|
|
|
|
function task_status_functor.give_task_trapper_chimera_2_status_f(tsk,task_id)
|
|
|
|
local se_obj_1 = get_story_se_object("quest_chimera_bait_brotherhood")
|
|
local se_obj_2 = get_story_se_object("radio_micro_quest")
|
|
|
|
local npc = get_story_se_object("trapper_chimera_2")
|
|
local squad_1 = get_story_se_object("jup_b205_monster_04_squad")
|
|
|
|
|
|
|
|
|
|
local obj_1 = se_obj_1 and level.object_by_id(se_obj_1.id)
|
|
local obj_2 = se_obj_2 and level.object_by_id(se_obj_2.id)
|
|
|
|
local dist_1 = 2
|
|
local dist_2 = 5
|
|
local dist_3 = 50
|
|
|
|
local pos_1 = vector():set( -381.40188598633,2.6410093307495,2.5957698822021 )
|
|
local pos_2 = vector():set( -290.74948120117,7.8559045791626,-3.1653161048889 )
|
|
|
|
local smart_1 = SIMBOARD.smarts_by_names["jup_b205_smart_terrain_tushkano"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
|
|
local hrs = level.get_time_hours()
|
|
|
|
|
|
|
|
if (tsk.stage == 0) then
|
|
|
|
if (db.actor:position():distance_to(pos_2) < dist_1) then
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
actor_menu.set_msg(1, game.translate_string("nr_trapper_chimera_1_info"), 1)
|
|
else
|
|
actor_menu.set_msg(1, game.translate_string("nr_trapper_chimera_2_info"), 1)
|
|
end
|
|
end
|
|
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_3) then --- releases the burer
|
|
|
|
if (squad_1) then
|
|
alife_release(squad_1)
|
|
end
|
|
|
|
end
|
|
if (obj_1) then
|
|
if (obj_1:position():distance_to(pos_2) < dist_2) then
|
|
|
|
if NI("trapper_chimera_2_init") then
|
|
|
|
|
|
CreateTimeEvent("nr_trapper_blank_2","nr_trapper_blank_2", 10, nr_trapper_chimera_2_bait)
|
|
tsk.stage = 1
|
|
GI("trapper_chimera_2_init")
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 1) then
|
|
|
|
if (npc.position:distance_to(pos_2) < dist_2) then
|
|
|
|
if NI("trapper_chimera_3_init") then
|
|
|
|
alife_release_id(obj_1:id()) --- destroy the bait
|
|
|
|
CreateTimeEvent("nr_trapper_blank_3","nr_trapper_blank_3", 45, nr_trapper_chimera_3_bait)
|
|
tsk.stage = 2
|
|
GI("trapper_chimera_3_init")
|
|
end
|
|
end
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
|
|
actor_menu.set_msg(1, game.translate_string("nr_trapper_chimera_1_info"), 1)
|
|
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
|
|
actor_menu.set_msg(1, game.translate_string("nr_trapper_chimera_1_info"), 1)
|
|
|
|
end
|
|
if (obj_2) then
|
|
if (obj_2:position():distance_to(pos_1) < dist_2) then
|
|
|
|
GI("trapper_chimera_record_in_place")
|
|
|
|
if NI("trapper_chimera_2_dead") then
|
|
if (npc.position:distance_to(pos_1) < dist_2) then
|
|
GI("trapper_chimera_record_set")
|
|
tsk.stage = 3
|
|
|
|
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 3) then
|
|
if HI("trapper_chimera_2_recording_done") then
|
|
if (obj_2:position():distance_to(pos_1) < dist_2) and (npc.position:distance_to(pos_1) < dist_2) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_trapper_chimera_2_recording_done"), 0, "stalker", 11000, 1)
|
|
GI("trapper_chimera_2_recording_done_success")
|
|
tsk.stage = 4
|
|
else
|
|
news_manager.send_tip(db.actor, game.translate_string("st_trapper_chimera_recover_failed"), 0, "stalker", 11000, 1)
|
|
tsk.stage = 0
|
|
dialogs_brotherhood.reset_trapper_chimera_2()
|
|
alife_release_id(obj_2:id()) --- destroy the recorder
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 4) then
|
|
|
|
|
|
end
|
|
if HI("trapper_chimera_10_done") then
|
|
if npc then
|
|
|
|
local commander = alife_object(npc:commander_id())
|
|
|
|
if commander and commander:alive() then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_trapper_chimera_2_chimera_back"), 0, "stalker", 11000, 1)
|
|
DI("trapper_chimera_10_done")
|
|
DI("trapper_chimera_2_dead")
|
|
GI("trapper_chimera_2_back")
|
|
dialogs_brotherhood.reset_trapper_chimera_2()
|
|
|
|
if NI("trapper_chimera_2_recording_done_success") then
|
|
tsk.stage = 0
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function nr_trapper_chimera_2_bait()
|
|
|
|
if NI("trapper_chimera_2_init_timed") then
|
|
|
|
GI("trapper_chimera_2_bait_active")
|
|
GI("trapper_chimera_2_init_timed")
|
|
return true
|
|
end
|
|
|
|
end
|
|
function nr_trapper_chimera_3_bait()
|
|
|
|
if NI("trapper_chimera_3_init_timed") then
|
|
|
|
DI("trapper_chimera_2_bait_active")
|
|
GI("trapper_chimera_3_init_timed")
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function task_status_functor.give_task_trapper_missing_hunter_1_status_f(tsk,task_id)
|
|
|
|
local pos_1 = vector():set( 365.19027709961,-5.8573417663574,362.37469482422 ) --- Lesun corpse
|
|
local pos_2 = vector():set( 383.57675170898,-5.8499975204468,382.04071044922 ) --- Bloodsucker 1
|
|
local pos_3 = vector():set( 362.181640625,-4.8819522857666,386.53329467773 ) --- Bloodsucker 2
|
|
|
|
local dist_1 = 2
|
|
|
|
if (tsk.stage == 0) then
|
|
|
|
if NI("trapper_missing_hunter_1_init") then
|
|
|
|
local se_squad = spawn_squad("nr_trapper_missing_hunter_1_squad", pos_1, 1296707, 4756)
|
|
xr_effects.kill_squad(nil,nil,{"nr_trapper_missing_hunter_1_squad"})
|
|
|
|
GI("trapper_missing_hunter_1_init")
|
|
|
|
tsk.stage = 1
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 1) then
|
|
|
|
if level.name() == "jupiter" then
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
|
|
if NI("trapper_missing_hunter_1_mutant_init") then
|
|
local se_squad_2 = spawn_squad("pack_trapper_bloodsucker_1", pos_2, 1322932, 4811)
|
|
local se_squad_3 = spawn_squad("pack_trapper_bloodsucker_2", pos_3, 1292260, 4756)
|
|
|
|
GI("trapper_missing_hunter_1_mutant_init")
|
|
|
|
end
|
|
end
|
|
end
|
|
if HI("pack_trapper_bloodsucker_1_dead") and HI("pack_trapper_bloodsucker_2_dead") then
|
|
GI("give_task_trapper_missing_hunter_1_all")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
function task_status_functor.give_task_trapper_missing_hunter_2_status_f(tsk,task_id)
|
|
|
|
local pos_1 = vector():set( 423.30490112305,9.9538507461548,-86.548324584961 ) --- trigger
|
|
local pos_2 = vector():set( 414.94821166992,9.8523788452148,-120.08416748047 ) --- Fasan corpse
|
|
local pos_3 = vector():set( 423.58679199219,9.9551553726196,-72.242469787598 ) --- Burer 1
|
|
local pos_4 = vector():set( 416.53118896484,9.8503370285034,-110.60095214844 ) --- Pseudogiant
|
|
local pos_5 = vector():set( 391.01727294922,4.4709033966064,-114.56340026855 ) --- Burer 2
|
|
local smart_1 = SIMBOARD.smarts_by_names["jup_b208"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local dist_1 = 2
|
|
local dist_2 = 30
|
|
|
|
if (tsk.stage == 0) then
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_2) then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"jup_b208","true"})
|
|
tsk.stage = 1
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if level.name() == "jupiter" then
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
if NI("trapper_missing_hunter_2_init") then
|
|
|
|
local se_squad = spawn_squad("nr_trapper_missing_hunter_2_squad", pos_2, 1371645, 4823)
|
|
xr_effects.kill_squad(nil,nil,{"nr_trapper_missing_hunter_2_squad"})
|
|
|
|
GI("trapper_missing_hunter_2_init")
|
|
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 2) then
|
|
if NI("trapper_missing_hunter_2_mutant_init") then
|
|
local se_squad_3 = spawn_squad("pack_trapper_burer_1", pos_3, 1384994, 4825)
|
|
local se_squad_4 = spawn_squad("pack_trapper_gigant_1", pos_4, 1374021, 4823)
|
|
local se_squad_5 = spawn_squad("pack_trapper_burer_2", pos_5, 1333053, 4677)
|
|
GI("trapper_missing_hunter_2_mutant_init")
|
|
|
|
|
|
end
|
|
if HI("pack_trapper_burer_1_dead") and HI("pack_trapper_burer_2_dead") and HI("pack_trapper_gigant_1_dead") then
|
|
GI("give_task_trapper_missing_hunter_2_mutants_dead")
|
|
end
|
|
if (db.actor:position():distance_to(pos_2) < dist_1) then
|
|
|
|
GI("give_task_trapper_missing_hunter_2_found")
|
|
|
|
end
|
|
|
|
if HI("give_task_trapper_missing_hunter_2_mutants_dead") and HI("give_task_trapper_missing_hunter_2_found") then
|
|
GI("give_task_trapper_missing_hunter_2_all")
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
function task_status_functor.give_task_trapper_missing_hunter_3_status_f(tsk,task_id)
|
|
|
|
local pos_1 = vector():set( -317.50521850586,-3.5592434406281,181.98251342773 ) --- Andrey Corpse
|
|
local pos_2 = vector():set( -354.77172851563,-0.72435384988785,173.37098693848 ) --- Controller
|
|
local pos_3 = vector():set( -306.46594238281,-1.8311321735382,171.57833862305 ) --- Snorks
|
|
|
|
|
|
local dist_1 = 2
|
|
|
|
if (tsk.stage == 0) then
|
|
if level.name() == "jupiter" then
|
|
|
|
if NI("trapper_missing_hunter_3_init") then
|
|
|
|
local se_squad = spawn_squad("nr_trapper_missing_hunter_3_squad", pos_1, 177898, 4527)
|
|
xr_effects.kill_squad(nil,nil,{"nr_trapper_missing_hunter_3_squad"})
|
|
|
|
GI("trapper_missing_hunter_3_init")
|
|
|
|
tsk.stage = 1
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 1) then
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
if NI("trapper_missing_hunter_3_mutant_init") then
|
|
local se_squad_3 = spawn_squad("pack_trapper_controller_1", pos_2, 116265, 4527)
|
|
local se_squad_4 = spawn_squad("pack_trapper_snorks_1", pos_3, 196742, 4742)
|
|
|
|
GI("trapper_missing_hunter_3_mutant_init")
|
|
|
|
|
|
end
|
|
end
|
|
if HI("pack_trapper_controller_1_dead") and HI("pack_trapper_snorks_1_dead") then
|
|
GI("give_task_trapper_missing_hunter_3_mutants_dead")
|
|
end
|
|
|
|
|
|
end
|
|
|
|
end
|
|
---- Legendary Hunt -----
|
|
|
|
--- Calydonian Boar ---
|
|
|
|
|
|
function task_status_functor.give_hunt_legendary_2_status_f(tsk,task_id)
|
|
|
|
local dist = 60
|
|
local dist_2 = 50
|
|
local dist_3 = 75
|
|
local dist_4 = 300
|
|
local dist_5 = 15
|
|
local smart_1 = SIMBOARD.smarts_by_names["mar_smart_terrain_7_7"]
|
|
local smart_2 = SIMBOARD.smarts_by_names["mar_smart_terrain_6_7"]
|
|
local smart_3 = SIMBOARD.smarts_by_names["mar_smart_terrain_4_7"]
|
|
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local smrt_2 = SIMBOARD.smarts[smart_2.id]
|
|
local smrt_3 = SIMBOARD.smarts[smart_3.id]
|
|
|
|
|
|
|
|
if (tsk.stage == 0) then
|
|
printe("Control Boar 1")
|
|
|
|
|
|
if smart_1 and smart_1.online and smart_2 and smart_2.online and smart_3 and smart_3.online then
|
|
printe("Control Boar 2")
|
|
|
|
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist) then
|
|
if NI("legendary_pack_boars_1_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_1,"legendary_pack_boars_1")
|
|
GI("legendary_pack_boars_1_spawned")
|
|
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
|
|
elseif smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist) then
|
|
|
|
if NI("legendary_pack_boars_2_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_2,"legendary_pack_boars_2")
|
|
GI("legendary_pack_boars_2_spawned")
|
|
|
|
tsk.stage = 2
|
|
return
|
|
end
|
|
|
|
elseif smrt_3 and (db.actor:position():distance_to(smart_3.position) < dist) then
|
|
|
|
if NI("legendary_pack_boars_3_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_3,"legendary_pack_boars_3")
|
|
GI("legendary_pack_boars_3_spawned")
|
|
|
|
tsk.stage = 3
|
|
return
|
|
end
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if (tsk.stage == 1) then --- smart_1 already spawned
|
|
|
|
if HI("legendary_pack_boars_1_dead") then
|
|
|
|
if smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_2_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_2,"legendary_pack_boars_2")
|
|
GI("legendary_pack_boars_2_spawned")
|
|
|
|
tsk.stage = 4
|
|
return
|
|
end
|
|
|
|
elseif smrt_3 and (db.actor:position():distance_to(smart_3.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_3_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_3,"legendary_pack_boars_3")
|
|
GI("legendary_pack_boars_3_spawned")
|
|
|
|
tsk.stage = 5
|
|
return
|
|
end
|
|
|
|
end
|
|
|
|
elseif (db.actor:position():distance_to(smart_1.position) > dist_4) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 2) then --- smart_2 already spawned
|
|
|
|
if HI("legendary_pack_boars_2_dead") then
|
|
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_2_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_1,"legendary_pack_boars_1")
|
|
GI("legendary_pack_boars_1_spawned")
|
|
|
|
tsk.stage = 4
|
|
return
|
|
end
|
|
|
|
elseif smrt_3 and (db.actor:position():distance_to(smart_3.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_3_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_3,"legendary_pack_boars_3")
|
|
GI("legendary_pack_boars_3_spawned")
|
|
|
|
tsk.stage = 6
|
|
return
|
|
end
|
|
|
|
end
|
|
|
|
elseif (db.actor:position():distance_to(smart_1.position) > dist_4) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if (tsk.stage == 3) then --- smart_3 already spawned
|
|
|
|
if HI("legendary_pack_boars_3_dead") then
|
|
|
|
if smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_2_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_2,"legendary_pack_boars_2")
|
|
GI("legendary_pack_boars_2_spawned")
|
|
|
|
tsk.stage = 6
|
|
return
|
|
end
|
|
|
|
elseif smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_1_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_1,"legendary_pack_boars_1")
|
|
GI("legendary_pack_boars_1_spawned")
|
|
|
|
tsk.stage = 5
|
|
return
|
|
end
|
|
|
|
end
|
|
|
|
elseif (db.actor:position():distance_to(smart_1.position) > dist_4) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if (tsk.stage == 4) then --- smart_1 and smart_2 spawned
|
|
|
|
if HI("legendary_pack_boars_1_dead") and HI("legendary_pack_boars_2_dead") then
|
|
|
|
if smrt_3 and (db.actor:position():distance_to(smart_3.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_3_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_3,"legendary_pack_boars_3")
|
|
GI("legendary_pack_boars_3_spawned")
|
|
|
|
tsk.stage = 7
|
|
return
|
|
end
|
|
end
|
|
|
|
elseif (db.actor:position():distance_to(smart_1.position) > dist_4) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 5) then --- smart_1 and smart_3 spawned
|
|
|
|
if HI("legendary_pack_boars_1_dead") and HI("legendary_pack_boars_3_dead") then
|
|
|
|
if smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_2_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_2,"legendary_pack_boars_2")
|
|
GI("legendary_pack_boars_2_spawned")
|
|
|
|
tsk.stage = 7
|
|
return
|
|
end
|
|
end
|
|
elseif (db.actor:position():distance_to(smart_1.position) > dist_4) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 6) then --- smart_2 and smart_3 spawned
|
|
|
|
if HI("legendary_pack_boars_2_dead") and HI("legendary_pack_boars_3_dead") then
|
|
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_2) then
|
|
|
|
if NI("legendary_pack_boars_1_spawned") then
|
|
|
|
local squad = SIMBOARD:create_squad(smart_1,"legendary_pack_boars_1")
|
|
GI("legendary_pack_boars_1_spawned")
|
|
|
|
tsk.stage = 7
|
|
return
|
|
end
|
|
end
|
|
elseif (db.actor:position():distance_to(smart_1.position) > dist_4) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
end
|
|
if (tsk.stage == 7) then --- smart_1 and smart_2 and smart_3 spawned
|
|
|
|
|
|
if HI("legendary_pack_boars_2_dead") and HI("legendary_pack_boars_1_dead") and HI("legendary_pack_boars_3_dead") then
|
|
if NI("legendary_boar_calydonian_spawned") then
|
|
|
|
dialogs_brotherhood.pseudo_dynamic_spawn_legendary_1()
|
|
tsk.stage = 8
|
|
return
|
|
end
|
|
|
|
local npc = get_story_se_object("legendary_pack_boars_calydonian")
|
|
elseif npc and (npc.position:distance_to(db.actor:position()) > dist_3) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 8) then --- when the guard of the Calydonian boar dies spawn reinforcment
|
|
|
|
if HI("legendary_pack_boars_calydonian_guard_dead") and NI("legendary_pack_boars_calydonian_dead") then
|
|
|
|
if NI("legendary_boar_reinforcment_1_spawned") then
|
|
dialogs_brotherhood.pseudo_dynamic_spawn_legendary_1()
|
|
tsk.stage = 9
|
|
return
|
|
end
|
|
|
|
local npc = get_story_se_object("legendary_pack_boars_calydonian")
|
|
elseif npc and (npc.position:distance_to(db.actor:position()) > dist_3) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
|
|
elseif HI("legendary_pack_boars_calydonian_dead") then
|
|
tsk.stage = 12
|
|
news_manager.send_tip(db.actor, game.translate_string("Calydonian Boar is dead"), 0, "stalker", 11000, 1)
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 9) then --- when the reinforcment_1 of the Calydonian boar dies spawn reinforcment_2
|
|
|
|
if HI("legendary_pack_boars_reinf_1_dead") and NI("legendary_pack_boars_calydonian_dead") then
|
|
|
|
if NI("legendary_boar_reinforcment_2_spawned") then
|
|
dialogs_brotherhood.pseudo_dynamic_spawn_legendary_1()
|
|
tsk.stage = 10
|
|
return
|
|
end
|
|
|
|
local npc = get_story_se_object("legendary_pack_boars_calydonian")
|
|
elseif npc and (npc.position:distance_to(db.actor:position()) > dist_3) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
|
|
elseif HI("legendary_pack_boars_calydonian_dead") then
|
|
tsk.stage = 12
|
|
news_manager.send_tip(db.actor, game.translate_string("Calydonian Boar is dead"), 0, "stalker", 11000, 1)
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 10) then --- when the reinforcment_2 of the Calydonian boar dies spawn reinforcment_3
|
|
|
|
if HI("legendary_pack_boars_reinf_2_dead") and NI("legendary_pack_boars_calydonian_dead") then
|
|
|
|
if NI("legendary_boar_reinforcment_3_spawned") then
|
|
dialogs_brotherhood.pseudo_dynamic_spawn_legendary_1()
|
|
tsk.stage = 11
|
|
return
|
|
end
|
|
|
|
local npc = get_story_se_object("legendary_pack_boars_calydonian")
|
|
elseif npc and (npc.position:distance_to(db.actor:position()) > dist_3) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
|
|
elseif HI("legendary_pack_boars_calydonian_dead") then
|
|
tsk.stage = 12
|
|
news_manager.send_tip(db.actor, game.translate_string("Calydonian Boar is dead"), 0, "stalker", 11000, 1)
|
|
|
|
end
|
|
end
|
|
|
|
if (tsk.stage == 11) then --- when the reinforcment_3 of the Calydonian boar dies no reinforcment
|
|
|
|
if HI("legendary_pack_boars_calydonian_dead") then
|
|
tsk.stage = 12
|
|
news_manager.send_tip(db.actor, game.translate_string("Calydonian Boar is dead"), 0, "stalker", 11000, 1)
|
|
|
|
local npc = get_story_se_object("legendary_pack_boars_calydonian")
|
|
elseif npc and (npc.position:distance_to(db.actor:position()) > dist_3) then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_calydonian_boar_fleed_1"), 0, "communication", 11000, 1)
|
|
GI("player_fled_from_calydonian_boar")
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if (tsk.stage == 12) then --- when the Calydonian boar dies
|
|
|
|
return
|
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function task_status_functor.give_hunt_legendary_1_status_f(tsk,task_id)
|
|
|
|
local dist = 70
|
|
local dist_2 = 15
|
|
local dist_3 = 30
|
|
local spawn_squad = dialogs_brotherhood.spawn_squad
|
|
local smart = SIMBOARD.smarts_by_names["red_smart_terrain_monsters"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
local hrs = level.get_time_hours()
|
|
|
|
|
|
|
|
local pos_1 = vector():set( 186.6668548584,0.79058438539505,90.37654876709 )
|
|
local pos_2 = vector():set( 255.88650512695,-0.52286732196808,63.478019714355 )
|
|
local pos_3 = vector():set( 221.20915222168,1.4110627174377,24.584827423096 )
|
|
local pos_4 = vector():set( 238.7276763916,2.0450139045715,96.016990661621 )
|
|
|
|
if (tsk.stage == 0) then
|
|
|
|
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
|
|
if smart and smart.online then
|
|
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
if NI("forester_news_legendary_1") then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_forester_legendary_1_info"), 0, "stalker", 11000, 1)
|
|
|
|
GI("forester_news_legendary_1")
|
|
end
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist_2) then
|
|
|
|
if db.actor:item_in_slot(7) ~= nil and db.actor:item_in_slot(7):section() == "trenchcoat_green_outfit_brotherhood_forester" then
|
|
|
|
if (NI("hunt_vlad_drakul_1_init")) then
|
|
|
|
|
|
local se_squad_1 = spawn_squad("legendary_bloodsucker_1", pos_1, 122161, 2775)
|
|
local se_squad_2 = spawn_squad("legendary_bloodsucker_2", pos_2, 153543, 2842)
|
|
local se_squad_3 = spawn_squad("legendary_bloodsucker_3", pos_3, 138640, 2829)
|
|
local se_squad_4 = spawn_squad("legendary_bloodsucker_4", pos_4, 146467, 2850)
|
|
|
|
GI("hunt_vlad_drakul_1_init")
|
|
tsk.stage = 1
|
|
return
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
|
|
if HI("legendary_bloodsucker_1_dead") and HI("legendary_bloodsucker_2_dead") and HI("legendary_bloodsucker_3_dead") and HI("legendary_bloodsucker_4_dead") then
|
|
|
|
if (hrs >= 21) or (hrs < 5) then
|
|
|
|
|
|
|
|
if smart and smart.online then
|
|
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist_3) then
|
|
|
|
if db.actor:item_in_slot(7) ~= nil and db.actor:item_in_slot(7):section() == "trenchcoat_green_outfit_brotherhood_forester" then
|
|
|
|
if (NI("hunt_vlad_drakul_2_init")) then
|
|
|
|
if NI("forester_news_legendary_2") then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_forester_legendary_2_info"), 0, "stalker", 11000, 1)
|
|
GI("forester_news_legendary_2")
|
|
end
|
|
|
|
local se_squad_5 = spawn_squad("legendary_bloodsucker_v", pos_2, 153543, 2842)
|
|
local se_squad_6 = spawn_squad("legendary_bloodsucker_5", pos_1, 122161, 2775)
|
|
local se_squad_7 = spawn_squad("legendary_bloodsucker_d", pos_4, 146467, 2850)
|
|
local se_squad_8 = spawn_squad("legendary_bloodsucker_6", pos_3, 138640, 2829)
|
|
|
|
GI("hunt_vlad_drakul_2_init")
|
|
tsk.stage = 2
|
|
return
|
|
|
|
end
|
|
end
|
|
|
|
elseif smrt and (db.actor:position():distance_to(smart.position) > dist_3) then
|
|
|
|
if NI("forester_news_legendary_4") then
|
|
|
|
news_manager.send_tip(db.actor, game.translate_string("st_forester_legendary_4_info"), 0, "stalker", 11000, 1)
|
|
GI("forester_news_legendary_4")
|
|
end
|
|
end
|
|
end
|
|
|
|
else
|
|
if NI("forester_news_legendary_3") then
|
|
news_manager.send_tip(db.actor, game.translate_string("st_forester_legendary_3_info"), 0, "stalker", 11000, 1)
|
|
GI("forester_news_legendary_3")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if HI("legendary_bloodsucker_d_dead") and HI("legendary_bloodsucker_v_dead") then
|
|
GI("legendary_bloodsucker_vlad_drakul_dead")
|
|
end
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_rescue_orion_quest_status_f(tsk,task_id)
|
|
|
|
local pos_1 = vector():set(26.031335830688,-8.2342977523804,143.26322937012 )
|
|
local pos_2 = vector():set(16.905651092529,-8.2306518554688,122.2557220459 )
|
|
local pos_3 = vector():set(14.258852958679,-8.2303371429443,123.04223632813 )
|
|
|
|
local pos_5 = vector():set(84.709777832031,-16.126983642578,66.559776306152 )
|
|
|
|
local pos_6 = vector():set(87.101875305176,-16.129384994507,64.91136932373 )
|
|
local pos_7 = vector():set(71.884750366211,-16.126708984375,94.465553283691 )
|
|
local pos_8 = vector():set(29.322734832764,-8.2383699417114,100.76599121094 )
|
|
local pos_9 = vector():set(47.349697113037,-8.2361946105957,103.71166992188 )
|
|
local pos_10 = vector():set(29.101696014404,-8.2312469482422,80.914306640625 )
|
|
|
|
local pos_11 = vector():set(18.270523071289,-8.2423601150513,66.437576293945 )
|
|
local pos_12 = vector():set(45.599113464355,4.2125010490417,12.874862670898 )
|
|
local pos_13 = vector():set(41.886127471924,3.7325174808502,2.285183429718 )
|
|
local pos_14 = vector():set(10.946595191956,-8.2365570068359,90.858016967773 )
|
|
local pos_15 = vector():set(108.85188293457,-11.439143180847,52.803562164307 )
|
|
|
|
local pos_16 = vector():set(108.54220581055,-7.7326726913452,38.519180297852)
|
|
local pos_17 = vector():set(103.87827301025,-7.6534037590027,38.086296081543 )
|
|
local pos_18 = vector():set(113.21655273438,-7.7315864562988,38.295310974121 )
|
|
|
|
local pos_20 = vector():set(79.766120910645,-7.9560108184814,-18.753499984741 )
|
|
|
|
local pos_21 = vector():set(112.30296325684,-7.7722730636597,-52.072357177734)
|
|
local pos_22 = vector():set(138.6630859375,-7.7427062988281,-24.461986541748 )
|
|
local pos_23 = vector():set(112.4231262207,-6.9253225326538,-34.570152282715 )
|
|
local pos_24 = vector():set(110.73091888428,-7.9594664573669,5.9682545661926 )
|
|
local pos_25 = vector():set(108.39345550537,-7.7746415138245,1.4874260425568 )
|
|
|
|
local pos_26 = vector():set(116.1070022583,-6.9230275154114,-0.30516818165779 )
|
|
local pos_27 = vector():set(110.04892730713,-7.7252421379089,13.748426437378 )
|
|
|
|
local pos_4 = vector():set(13.428091049194,-8.23570728302,100.07263183594 )
|
|
local pos_19 = vector():set(8.1462268829346,-8.2311153411865,98.834182739258 )
|
|
|
|
|
|
local spawn_squad = dialogs_brotherhood.spawn_squad
|
|
local smart = SIMBOARD.smarts_by_names["agr_u_monsters"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
|
|
local dist_1 = 4
|
|
local dist_2 = 2
|
|
local dist_3 = 1
|
|
|
|
|
|
if (tsk.stage == 0) then
|
|
|
|
if level.name() == "l03u_agr_underground" then --spawns common mutants if on the Agroprom Underground level
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then
|
|
if NI("orion_spawn_2") then
|
|
local se_squad_2 = spawn_squad("pack_agru_mutants_1", pos_2, 2056, 3673)
|
|
|
|
GI("orion_spawn_2")
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_4) < dist_2) then
|
|
if NI("orion_spawn_19") then
|
|
if HI("orion_spawn_2") then
|
|
local se_squad_19 = spawn_squad("pack_agru_mutants_2", pos_19, 1040, 3622)
|
|
|
|
GI("orion_spawn_19")
|
|
end
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_7) < dist_2) then
|
|
if NI("orion_spawn_5") then
|
|
local se_squad_5 = spawn_squad("pack_agru_mutants_3", pos_5, 6716, 3650)
|
|
|
|
GI("orion_spawn_5")
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_8) < dist_1) then
|
|
if NI("orion_spawn_9") then
|
|
local se_squad_9 = spawn_squad("pack_agru_mutants_2", pos_9, 4195, 3629)
|
|
|
|
GI("orion_spawn_9")
|
|
end
|
|
if NI("orion_spawn_10") then
|
|
local se_squad_10 = spawn_squad("pack_agru_mutants_2", pos_10, 2714, 3658)
|
|
|
|
GI("orion_spawn_10")
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_11) < dist_1) then
|
|
if NI("orion_spawn_10") then
|
|
local se_squad_10 = spawn_squad("pack_agru_mutants_2", pos_10, 2714, 3658)
|
|
|
|
GI("orion_spawn_10")
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_12) < dist_2) then
|
|
if NI("orion_spawn_13") then
|
|
local se_squad_13 = spawn_squad("pack_agru_mutants_2", pos_13, 3585, 3716)
|
|
|
|
GI("orion_spawn_13")
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_14) < dist_1) then
|
|
if NI("orion_spawn_2") then
|
|
local se_squad_2 = spawn_squad("pack_agru_mutants_1", pos_2, 2056, 3673)
|
|
|
|
GI("orion_spawn_2")
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_15) < dist_2) then
|
|
if NI("agru_orion_mutants_1_init") then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"agr_u_monsters","true"})
|
|
local se_squad_16 = spawn_squad("pack_agru_mutants_1", pos_16, 8598, 3727)
|
|
GI("agru_orion_mutants_1_init")
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if (NI("give_task_kill_controller_1_init")) then
|
|
if (db.actor:position():distance_to(pos_27) < dist_2) then --trigger for Burer and Orion spawn
|
|
if NI("orion_spawn_27") then
|
|
local se_squad_20 = spawn_squad("pack_agru_burer_1", pos_20, 6338, 3727)
|
|
local se_squad_21 = spawn_squad("pack_agru_burer_2", pos_21, 9143, 3724)
|
|
local se_squad_22 = spawn_squad("pack_agru_burer_3", pos_22, 11555, 3727)
|
|
|
|
GI("orion_spawn_27")
|
|
end
|
|
tsk.stage = 2
|
|
GI("give_task_kill_controller_1_init")
|
|
return
|
|
|
|
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
if HI("pack_agru_burer_1_dead") and HI("pack_agru_burer_2_dead") and HI("pack_agru_burer_3_dead")then
|
|
if (db.actor:position():distance_to(pos_23) < dist_3) then
|
|
if NI("orion_spawn_24") then
|
|
local se_squad_24 = spawn_squad("pack_agru_controller_1", pos_24, 8967, 3727)
|
|
local se_squad_25 = spawn_squad("pack_agru_burer_1", pos_25, 8552, 3727)
|
|
local se_squad_26 = spawn_squad("pack_agru_burer_1", pos_26, 9760, 3727)
|
|
GI("orion_spawn_24")
|
|
end
|
|
end
|
|
|
|
end
|
|
if HI("brotherhood_agru_controller_dead") then
|
|
DI("agr_snork_infestion")
|
|
return
|
|
end
|
|
|
|
|
|
end
|
|
end
|
|
|
|
function task_status_functor.give_rpg_missile_in_the_sky_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
printe("Control RPG in the sky running")
|
|
if level.name() == "l01_escape" then
|
|
printe("Control RPG in the sky on level")
|
|
if (is_empty(db.heli)) then
|
|
printe("Control RPG in the sky spawning heli")
|
|
local pos = vector():set( -25.020586013794,-12.214082717896,-117.88251495361 )
|
|
local heli_se = alife_create("helicopter",pos,268396,555)
|
|
tsk.stage = 1
|
|
else
|
|
printe("Control RPG in the sky heli already spawned")
|
|
tsk.stage = 1
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
printe("Control RPG in the sky task stage 1")
|
|
|
|
end
|
|
end
|
|
|
|
------ Northern Rush -----
|
|
|
|
---- Fanatic ----
|
|
|
|
function task_status_functor.give_task_fanat_rookie_training_1_status_f(tsk,task_id)
|
|
|
|
|
|
|
|
local npc = get_story_se_object("nr_iliaz_squad")
|
|
local squad_1 = get_story_se_object("nr_iliaz_boar_squad")
|
|
|
|
|
|
|
|
local dist_1 = 2
|
|
local dist_2 = 10
|
|
local dist_3 = 50
|
|
local dist_4 = 25
|
|
local dist_5 = 3
|
|
|
|
local pos_1 = vector():set( -207.83670043945,-6.3246264457703,-17.561170578003 )
|
|
local pos_2 = vector():set( -222.81701660156,-9.301365852356,-13.697906494141 )
|
|
local pos_3 = vector():set( -235.4893951416,-13.486360549927,-14.958400726318 )
|
|
local pos_4 = vector():set( -223.73385620117,-19.864381790161,-163.76029968262 )
|
|
|
|
local smart_1 = SIMBOARD.smarts_by_names["esc_smart_terrain_5_12"]
|
|
local smrt_1 = SIMBOARD.smarts[smart_1.id]
|
|
local smart_2 = SIMBOARD.smarts_by_names["esc_smart_terrain_2_12"]
|
|
local smrt_2 = SIMBOARD.smarts[smart_1.id]
|
|
|
|
|
|
|
|
|
|
if (tsk.stage == 0) then
|
|
if NI("nr_iliaz_squad_init") then
|
|
local se_squad = spawn_squad("nr_iliaz_squad", pos_4, 31839, 454)
|
|
GI("nr_iliaz_squad_init")
|
|
end
|
|
|
|
if HI("nr_iliaz_0_done") then
|
|
tsk.stage = 1
|
|
end
|
|
|
|
end
|
|
if (tsk.stage == 1) then
|
|
|
|
if smrt_1 and (db.actor:position():distance_to(smart_1.position) < dist_3) then ---clears boar smart and spawns the boars
|
|
if NI("nr_iliaz_boar_squad_init") then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"esc_smart_terrain_5_12","true"})
|
|
|
|
|
|
GI("nr_iliaz_boar_squad_init")
|
|
end
|
|
if HI("nr_iliaz_boar_squad_init") and NI("nr_iliaz_boar_spawn") then
|
|
local squad = SIMBOARD:create_squad(smart_1,"nr_iliaz_boar_squad")
|
|
GI("nr_iliaz_boar_spawn")
|
|
end
|
|
end
|
|
|
|
if HI("nr_iliaz_1_done") then
|
|
tsk.stage = 2
|
|
return
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_2) then
|
|
|
|
GI("nr_iliaz_arrived_1")
|
|
|
|
end
|
|
|
|
|
|
if (npc.position:distance_to(pos_1) < dist_1) then
|
|
|
|
GI("nr_ilyaz_point_1")
|
|
end
|
|
if (npc.position:distance_to(pos_2) < dist_1) then
|
|
|
|
CreateTimeEvent("nr_ilyaz_blank_1","nr_ilyaz_blank_1", 5, nr_ilyaz_1_init)
|
|
GI("nr_ilyaz_point_2")
|
|
tsk.stage = 3
|
|
end
|
|
|
|
|
|
end
|
|
if (tsk.stage == 3) then
|
|
if (npc.position:distance_to(pos_2) < dist_1) then
|
|
|
|
end
|
|
if (npc.position:distance_to(pos_1) < dist_5) then
|
|
tsk.stage = 4
|
|
GI("nr_ilyaz_artifact_back")
|
|
end
|
|
|
|
end
|
|
if (tsk.stage == 4) then
|
|
|
|
if smrt_2 and (db.actor:position():distance_to(smart_2.position) < dist_4) then
|
|
GI("nr_iliaz_arrived_2")
|
|
DI("nr_ilyaz_artfiact_hunt_1")
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
function nr_ilyaz_1_init()
|
|
|
|
if NI("nr_ilyaz_1_init_timed") then
|
|
|
|
DI("nr_ilyaz_point_1")
|
|
GI("nr_ilyaz_1_init_timed")
|
|
return true
|
|
end
|
|
|
|
end
|
|
|
|
---- Scamlok ----
|
|
function task_status_functor.give_task_join_scamlok_1_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
|
|
|
|
local dist = 25
|
|
local smart = SIMBOARD.smarts_by_names["jup_a6"]
|
|
if smart and smart.online then
|
|
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
GI("nr_fool_you_arrived")
|
|
|
|
return
|
|
end
|
|
end
|
|
end
|
|
if HI("nr_hawaiian_scamlok_0_done") or HI("barkeep_confirm_scam") then
|
|
GI("give_task_join_scamlok_1_done")
|
|
end
|
|
|
|
end
|
|
|
|
|
|
function task_status_functor.give_task_escort_sorokin_1_status_f(tsk,task_id)
|
|
if (tsk.stage == 0) then
|
|
|
|
|
|
local dist = 25
|
|
local smart = SIMBOARD.smarts_by_names["jup_a6"]
|
|
if smart and smart.online then
|
|
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
GI("sorokin_1_you_arrived")
|
|
|
|
return
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
----- Bezsonik ----
|
|
function nr_bezsonik_init()
|
|
local dist = 3
|
|
local dist_2 = 15
|
|
local hrs = level.get_time_hours()
|
|
local smart = SIMBOARD.smarts_by_names["mil_smart_terrain_7_12"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
local pos_1 = vector():set( -6.8887801170349,-6.1277666091919,65.943511962891 )
|
|
local pos_2 = vector():set( -6.7903175354004,-6.0532302856445,44.868602752686 )
|
|
local pos_3 = vector():set( -6.7579164505005,-6.1126184463501,86.457405090332 )
|
|
local pos_4 = vector():set( 4.3408036231995,-8.8730173110962,3.7783288955688 )
|
|
|
|
if (NI("nr_bezsonik_init")) then
|
|
if level.name() == "l07_military" then
|
|
if (hrs >= 20) and (hrs < 24) then
|
|
if (NI("nr_bezsonik_init_random")) then
|
|
if (db.actor:position():distance_to(pos_1) < dist) then
|
|
GI("bezsonik_1")
|
|
|
|
end
|
|
if HI("bezsonik_1") and (db.actor:position():distance_to(pos_2) < dist) then
|
|
|
|
if (math.random(50) < 25) then
|
|
if NI("nr_bezsonik_init") then
|
|
local squad = SIMBOARD:create_squad(smart,"nr_bezsonik_squad")
|
|
GI("nr_bezsonik_init")
|
|
end
|
|
else
|
|
brotherhood_timer.bezsonik_init_random()
|
|
GI("nr_bezsonik_init_random")
|
|
DI("bezsonik_1")
|
|
end
|
|
|
|
end
|
|
|
|
if HI("bezsonik_1") and (db.actor:position():distance_to(pos_3) < dist) then
|
|
|
|
DI("bezsonik_1")
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if HI("nr_bezsonik_init") then
|
|
if (db.actor:position():distance_to(pos_4) < dist_2) then
|
|
if NI("nr_bezsonik_shout") then
|
|
actor_menu.set_msg(1, game.translate_string("nr_bezsonik_info"), 10)
|
|
GI("nr_bezsonik_shout")
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
function task_status_functor.give_task_bezsonik_1_status_f(tsk,task_id)
|
|
|
|
local smart = SIMBOARD.smarts_by_names["mil_smart_terrain_8_3"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
local hrs = level.get_time_hours()
|
|
|
|
|
|
if (tsk.stage == 0) then
|
|
|
|
|
|
local dist = 80
|
|
|
|
if smart and smart.online then
|
|
|
|
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist) then
|
|
xr_effects.clear_smart_terrain(nil,nil,{"mil_smart_terrain_8_3","true"})
|
|
tsk.stage = 1
|
|
return
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 1) then
|
|
if NI("bezsonik_dogs_init") then
|
|
local squad = SIMBOARD:create_squad(smart,"pack_dogs_bezsonik_1")
|
|
GI("bezsonik_dogs_init")
|
|
end
|
|
if HI("pack_dogs_bezsonik_1_dead") then
|
|
if (hrs >= 20) or (hrs < 3) then
|
|
GI("bezsonik_dogs_sleep")
|
|
tsk.stage = 2
|
|
else
|
|
GI("bezsonik_dogs_nosleep")
|
|
tsk.stage = 2
|
|
end
|
|
end
|
|
end
|
|
if (tsk.stage == 2) then
|
|
|
|
return
|
|
end
|
|
end
|
|
|
|
|
|
|
|
---- Butcher Trouble ----
|
|
|
|
function butcher_troubble_init()
|
|
local dist = 3
|
|
local dist_2 = 5
|
|
local dist_3 = 2
|
|
|
|
local pos_1 = vector():set( -113.33467102051,0.59587639570236,8.8507452011108 )
|
|
local pos_2 = vector():set( -105.58847045898,0.96052712202072,4.7404828071594 )
|
|
local pos_3 = vector():set( -98.773048400879,0.71849876642227,-1.2279287576675 )
|
|
local pos_4 = vector():set( -98.735130310059,0.7244935631752,-3.1979916095734 )
|
|
local pos_5 = vector():set( -82.451950073242,0.96916776895523,3.7255098819733 )
|
|
local pos_6 = vector():set( -91.589393615723,0.96841841936111,3.613053560257 )
|
|
local pos_7 = vector():set( -70.399047851563,0.96921545267105,4.7191781997681 )
|
|
local pos_8 = vector():set( -107.49711608887,1.0145883560181,14.611536026001 )
|
|
local pos_9 = vector():set( -142.93444824219,0.62204450368881,9.111102104187 )
|
|
|
|
if (NI("butcher_troubble_init")) then
|
|
if level.name() == "l02_garbage" then
|
|
|
|
if (NI("butcher_troubble_init_random")) then
|
|
if (db.actor:position():distance_to(pos_1) < dist) then --- approach from west
|
|
GI("butcher_troubble_1")
|
|
|
|
end
|
|
if HI("butcher_troubble_1") and (db.actor:position():distance_to(pos_2) < dist) then
|
|
|
|
if (math.random(24) < 25) then
|
|
if NI("butcher_troubble_init") then
|
|
local se_squad_1 = spawn_squad("butcher_tug_1_squad", pos_3, 101729, 726)
|
|
local se_squad_2 = spawn_squad("butcher_tug_2_squad", pos_4, 101727, 726)
|
|
GI("butcher_troubble_init")
|
|
end
|
|
else
|
|
brotherhood_timer.butcher_troubble_init_random()
|
|
GI("butcher_troubble_init_random")
|
|
DI("butcher_troubble_1")
|
|
end
|
|
|
|
end
|
|
|
|
if HI("butcher_troubble_1") and (db.actor:position():distance_to(pos_8) < dist_2) then
|
|
|
|
DI("butcher_troubble_1")
|
|
|
|
end
|
|
if HI("butcher_troubble_1") and (db.actor:position():distance_to(pos_9) < dist_2) then
|
|
|
|
DI("butcher_troubble_1")
|
|
|
|
end
|
|
|
|
if (db.actor:position():distance_to(pos_5) < dist) then --- approach from east
|
|
GI("butcher_troubble_2")
|
|
|
|
end
|
|
if HI("butcher_troubble_2") and (db.actor:position():distance_to(pos_6) < dist) then
|
|
|
|
if (math.random(24) < 25) then
|
|
if NI("butcher_troubble_init") then
|
|
local se_squad_1 = spawn_squad("butcher_tug_1_squad", pos_3, 101729, 726)
|
|
local se_squad_2 = spawn_squad("butcher_tug_2_squad", pos_4, 101727, 726)
|
|
GI("butcher_troubble_init")
|
|
end
|
|
else
|
|
brotherhood_timer.butcher_troubble_init_random()
|
|
GI("butcher_troubble_init_random")
|
|
DI("butcher_troubble_2")
|
|
end
|
|
|
|
end
|
|
|
|
if HI("butcher_troubble_2") and (db.actor:position():distance_to(pos_7) < dist_2) then
|
|
|
|
DI("butcher_troubble_2")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
if HI("butcher_troubble_init") then
|
|
|
|
if NI("butcher_troubble_shout") then
|
|
actor_menu.set_msg(1, game.translate_string("butcher_troubble_info_1"), 4)
|
|
GI("butcher_troubble_shout")
|
|
end
|
|
if (db.actor:position():distance_to(pos_3) < dist_3) then --- interrupt the conversation
|
|
|
|
GI("butcher_troubble_interrupt")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
---- Gutalin ----
|
|
local brotherhood_artifact_table = {
|
|
|
|
"af_dragon_eye",
|
|
"af_ameba_mica",
|
|
"af_ameba_slime",
|
|
"af_ameba_slug",
|
|
"af_baloon",
|
|
"af_blood",
|
|
"af_compass",
|
|
"af_cristall",
|
|
"af_cristall_flower",
|
|
"af_drops",
|
|
"af_dummy_battery",
|
|
"af_dummy_dummy",
|
|
"af_dummy_glassbeads",
|
|
"af_dummy_pellicle",
|
|
"af_dummy_spring",
|
|
"af_electra_flash",
|
|
"af_electra_moonlight",
|
|
"af_electra_sparkler",
|
|
"af_eye",
|
|
"af_fire",
|
|
"af_fireball",
|
|
"af_fuzz_kolobok",
|
|
"af_glass",
|
|
"af_gold_fish",
|
|
"af_gravi",
|
|
"af_ice",
|
|
"af_medusa",
|
|
"af_mincer_meat",
|
|
"af_night_star",
|
|
"af_oasis_heart",
|
|
"af_quest_b14_twisted",
|
|
"af_rusty_kristall",
|
|
"af_rusty_sea",
|
|
"af_rusty_thorn",
|
|
"af_soul",
|
|
"af_vyvert",
|
|
"jup_b1_half_artifact",
|
|
"af_monolith",
|
|
"af_cocoon",
|
|
"af_cell",
|
|
"af_fountain",
|
|
"af_spaika",
|
|
"af_signet",
|
|
"af_repei",
|
|
"af_bat",
|
|
"af_sun",
|
|
"af_ear",
|
|
"af_chelust",
|
|
"af_atom",
|
|
"af_lighthouse",
|
|
"af_fire_loop",
|
|
"af_zhelch",
|
|
"af_sandstone",
|
|
"af_kislushka",
|
|
"af_black_angel",
|
|
"af_grapes",
|
|
"af_skull_miser",
|
|
"af_star_phantom",
|
|
"af_medallion",
|
|
"af_peas",
|
|
"af_generator",
|
|
"af_fonar",
|
|
"af_tapeworm",
|
|
"af_moh",
|
|
"af_serofim",
|
|
"af_elektron",
|
|
"af_kogot",
|
|
"af_ball",
|
|
"af_black_spray",
|
|
"af_bracelet",
|
|
"af_empty",
|
|
"af_full_empty",
|
|
"af_itcher",
|
|
"af_lobster_eyes",
|
|
"af_pin",
|
|
"af_ring",
|
|
"af_sponge",
|
|
"af_death_lamp",
|
|
"af_misery_bread_lead_box",
|
|
"af_medusa_lead_box",
|
|
"af_cristall_flower_lead_box",
|
|
"af_night_star_lead_box",
|
|
"af_vyvert_lead_box",
|
|
"af_gravi_lead_box",
|
|
"af_gold_fish_lead_box",
|
|
"af_cristall_lead_box",
|
|
"af_fireball_lead_box",
|
|
"af_dummy_glassbeads_lead_box",
|
|
"af_eye_lead_box",
|
|
"af_fire_lead_box",
|
|
"af_blood_lead_box",
|
|
"af_mincer_meat_lead_box",
|
|
"af_soul_lead_box",
|
|
"af_fuzz_kolobok_lead_box",
|
|
"af_baloon_lead_box",
|
|
"af_glass_lead_box",
|
|
"af_electra_sparkler_lead_box",
|
|
"af_electra_flash_lead_box",
|
|
"af_electra_moonlight_lead_box",
|
|
"af_dummy_battery_lead_box",
|
|
"af_dummy_dummy_lead_box",
|
|
"af_ice_lead_box",
|
|
"af_compass_lead_box",
|
|
"af_oasis_heart_lead_box",
|
|
"jup_b1_half_artifact_lead_box",
|
|
"af_quest_b14_twisted_lead_box",
|
|
"af_black_spray_lead_box",
|
|
"af_bracelet_lead_box",
|
|
"af_death_lamp_lead_box",
|
|
"af_empty_lead_box",
|
|
"af_full_empty_lead_box",
|
|
"af_itcher_lead_box",
|
|
"af_lobster_eyes_lead_box",
|
|
"af_pin_lead_box",
|
|
"af_ring_lead_box",
|
|
"af_sponge_lead_box",
|
|
}
|
|
|
|
|
|
function meet_gutalin_init()
|
|
local dist = 3
|
|
local dist_2 = 12
|
|
local dist_3 = 20
|
|
local dist_4 = 1
|
|
|
|
local pos_1 = vector():set( 225.18710327148,-0.011421859264374,13.123934745789 )
|
|
local pos_2 = vector():set( 224.59652709961,-0.01020672917366,17.893041610718 )
|
|
local pos_3 = vector():set( 223.60771179199,-0.010213196277618,-3.2195067405701 )
|
|
local pos_4 = vector():set( 239.3835144043,-0.011857271194458,3.8250217437744 )
|
|
local pos_5 = vector():set( 215.75396728516,-0.0045666992664337,44.321727752686 )
|
|
|
|
local pos_6 = vector():set( -206.23277282715,-19.894157409668,-136.4208984375 )
|
|
|
|
local npc = get_story_se_object("bh_gutalin_squad")
|
|
|
|
local smart = SIMBOARD.smarts_by_names["bar_visitors"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
|
|
|
|
|
|
if NI("meet_gutalin_done") then
|
|
|
|
if (NI("meet_gutalin_init")) then --- meeting Gutalin
|
|
|
|
if level.name() == "l05_bar" then
|
|
|
|
if (NI("meet_gutalin_init_random")) then
|
|
if (db.actor:position():distance_to(pos_1) < dist) then --- initial point
|
|
GI("meet_gutalin_init_1")
|
|
|
|
end
|
|
if HI("meet_gutalin_init_1") and (db.actor:position():distance_to(pos_2) < dist) then --- trigger meeting
|
|
|
|
if (math.random(100) < 25) then
|
|
if NI("meet_gutalin_init") then
|
|
|
|
local se_squad_1 = spawn_squad("bh_gutalin_squad", pos_5, 54199, 1764)
|
|
GI("meet_gutalin_init")
|
|
end
|
|
else
|
|
brotherhood_timer.meet_gutalin_init_random()
|
|
GI("meet_gutalin_init_random")
|
|
DI("meet_gutalin_init_1")
|
|
end
|
|
|
|
end
|
|
|
|
if HI("meet_gutalin_init_1") and (db.actor:position():distance_to(pos_3) < dist) then --- wipe
|
|
|
|
DI("meet_gutalin_init_1")
|
|
|
|
end
|
|
if HI("meet_gutalin_init_1") and (db.actor:position():distance_to(pos_4) < dist) then --- wipe
|
|
|
|
DI("meet_gutalin_init_1")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
if HI("meet_gutalin_init") then
|
|
if npc then
|
|
if (npc.position:distance_to(db.actor:position()) < dist_2) then
|
|
|
|
if NI("meet_gutalin_shout") then
|
|
actor_menu.set_msg(1, game.translate_string("meet_gutalin_info_1"), 4)
|
|
GI("meet_gutalin_shout")
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
if HI("bh_gutalin_start_dialog_done") and NI("bh_gutalin_relocation_init") then --- teleport Gutalin to Cordon
|
|
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist_3) then
|
|
|
|
dialogs_brotherhood.relocation_bh_gutalin()
|
|
|
|
end
|
|
end
|
|
|
|
if HI("bh_gutalin_relocation_init") and (level.name() == "l01_escape") then
|
|
if npc then
|
|
if (npc.position:distance_to(db.actor:position()) < dist_2) and (npc.position:distance_to(pos_6) < dist_4) then
|
|
|
|
|
|
|
|
|
|
if NI("meet_gutalin_preaching") then
|
|
local rand = math.random(1,4)
|
|
|
|
if (rand == 1) then
|
|
|
|
actor_menu.set_msg(1, game.translate_string("meet_gutalin_info_2"), 8)
|
|
GI("meet_gutalin_preaching")
|
|
CreateTimeEvent("bh_gutalin_blank_1","bh_gutalin_blank_1", 14, bh_gutalin_1_init)
|
|
|
|
elseif (rand == 2) then
|
|
actor_menu.set_msg(1, game.translate_string("meet_gutalin_info_3"), 8)
|
|
GI("meet_gutalin_preaching")
|
|
CreateTimeEvent("bh_gutalin_blank_1","bh_gutalin_blank_1", 14, bh_gutalin_1_init)
|
|
|
|
elseif (rand == 3) then
|
|
actor_menu.set_msg(1, game.translate_string("meet_gutalin_info_4"), 8)
|
|
GI("meet_gutalin_preaching")
|
|
CreateTimeEvent("bh_gutalin_blank_1","bh_gutalin_blank_1", 14, bh_gutalin_1_init)
|
|
|
|
elseif (rand == 4) then
|
|
actor_menu.set_msg(1, game.translate_string("meet_gutalin_info_5"), 8)
|
|
GI("meet_gutalin_preaching")
|
|
CreateTimeEvent("bh_gutalin_blank_1","bh_gutalin_blank_1", 14, bh_gutalin_1_init)
|
|
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
function bh_gutalin_1_init()
|
|
|
|
DI("meet_gutalin_preaching")
|
|
return true
|
|
|
|
end
|
|
|
|
function task_status_functor.give_task_bh_gutalin_1_status_f(tsk,task_id)
|
|
|
|
local npc = get_story_object("bh_gutalin")
|
|
local squad = get_story_se_object("bh_gutalin_squad")
|
|
local hrs = level.get_time_hours()
|
|
local dist_1 = 3
|
|
local pos_1 = vector():set( -84.095733642578,-6.1258764266968,-19.095394134521 )
|
|
|
|
|
|
|
|
if (hrs >= 22) then
|
|
if npc then
|
|
for i, v in ipairs(brotherhood_artifact_table) do
|
|
|
|
if npc:object(v) ~= nil then
|
|
GI("bh_gutalin_treasure")
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if squad and (squad.position:distance_to(pos_1) < dist_1) then
|
|
|
|
CreateTimeEvent("bh_gutalin_burry_treasure_1","bh_gutalin_burry_treasure_1", 6, bh_gutalin_burry_treasure_1)
|
|
|
|
end
|
|
if HI("bh_gutalin_squad_dead") then
|
|
GI("meet_gutalin_done")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
function bh_gutalin_burry_treasure_1()
|
|
local npc = get_story_object("bh_gutalin")
|
|
|
|
for i, v in ipairs(brotherhood_artifact_table) do
|
|
item = npc:object(v)
|
|
if item then
|
|
npc:drop_item(item)
|
|
end
|
|
end
|
|
|
|
DI("bh_gutalin_treasure")
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
---- random events
|
|
|
|
--- Controller ambush
|
|
|
|
function nr_primankov_init()
|
|
|
|
local smart = SIMBOARD.smarts_by_names["jup_b203"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
|
|
local dist_1 = 25
|
|
local dist_2 = 15
|
|
local dist_3 = 1
|
|
|
|
local pos_1 = vector():set( -190.61285400391,0.75813418626785,-278.00579833984 )
|
|
local pos_2 = vector():set( -188.34548950195,0.96719044446945,-272.51498413086 )
|
|
local pos_3 = vector():set( -184.74633789063,0.75744158029556,-284.82553100586 )
|
|
|
|
if NI("nr_primankov_init") then
|
|
|
|
if level.name() == "jupiter" then
|
|
|
|
if NI("market_share_block_random_quest") then
|
|
|
|
if smart and smart.online then
|
|
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist_1) then
|
|
|
|
if NI("nr_primankov_random") then
|
|
|
|
if NI("nr_primakov_spawn_1") then
|
|
|
|
if (math.random(75) < 25) then
|
|
|
|
xr_effects.clear_smart_terrain(nil,nil,{"jup_b203","true"})
|
|
local se_squad_1 = spawn_squad("controller_victim_1_squad", pos_3, 403174, 4704)
|
|
GI("nr_primakov_spawn_1")
|
|
|
|
|
|
else
|
|
|
|
brotherhood_timer.nr_primakov_random()
|
|
GI("nr_primankov_random")
|
|
end
|
|
end
|
|
end
|
|
|
|
if HI("nr_primakov_spawn_1") then
|
|
|
|
if NI("nr_primakov_ambush") then
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then --- trigger ambush
|
|
|
|
dialogs_brotherhood.nr_primakov_turn()
|
|
local se_squad_2 = spawn_squad("pack_random_controller_1", pos_2, 397277, 4704)
|
|
GI("nr_primakov_ambush")
|
|
GI("nr_primankov_init")
|
|
end
|
|
end
|
|
if NI("nr_primakov_ambush") then --- cry for help
|
|
|
|
if NI("nr_primakov_help") then
|
|
|
|
local rand = math.random(1,4)
|
|
|
|
if (rand == 1) then
|
|
|
|
actor_menu.set_msg(1, game.translate_string("nr_primakov_help_1"), 8)
|
|
GI("nr_primakov_help")
|
|
CreateTimeEvent("nr_primakov_help","nr_primakov_help", 8, nr_primakov_help_init)
|
|
|
|
elseif (rand == 2) then
|
|
actor_menu.set_msg(1, game.translate_string("nr_primakov_help_2"), 8)
|
|
GI("nr_primakov_help")
|
|
CreateTimeEvent("nr_primakov_help","nr_primakov_help", 8, nr_primakov_help_init)
|
|
|
|
elseif (rand == 3) then
|
|
actor_menu.set_msg(1, game.translate_string("nr_primakov_help_3"), 8)
|
|
GI("nr_primakov_help")
|
|
CreateTimeEvent("nr_primakov_help","nr_primakov_help", 8, nr_primakov_help_init)
|
|
|
|
elseif (rand == 4) then
|
|
actor_menu.set_msg(1, game.translate_string("nr_primakov_help_4"), 8)
|
|
GI("nr_primakov_help")
|
|
CreateTimeEvent("nr_primakov_help","nr_primakov_help", 8, nr_primakov_help_init)
|
|
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function nr_primakov_help_init()
|
|
|
|
DI("nr_primakov_help")
|
|
return true
|
|
|
|
end
|
|
|
|
--- Jupiter execution
|
|
|
|
function nr_execution_yanov_init()
|
|
|
|
local smart = SIMBOARD.smarts_by_names["jup_a6"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
|
|
local dist_1 = 25
|
|
local dist_2 = 15
|
|
local dist_3 = 15
|
|
|
|
local pos_1 = vector():set( -53.964504241943,3.5118420124054,160.3719329834 ) --- convict 1
|
|
--local pos_1 = vector():set( -55.452903747559,3.5291602611542,160.1261138916 ) --- convict 1 old pos
|
|
local pos_2 = vector():set( -58.915637969971,3.6456756591797,159.9506072998 ) --- convict 2
|
|
local pos_3 = vector():set( -53.715953826904,3.45143699646,167.76420593262 ) --- executioner 1
|
|
local pos_4 = vector():set( -56.438800811768,3.4529418945313,168.19071960449 ) --- executioner 2
|
|
local pos_5 = vector():set( -47.242031097412,3.4872958660126,161.45401000977 ) --- executioner 3
|
|
|
|
if NI("nr_execution_yanov_init") then
|
|
|
|
if level.name() == "jupiter" then
|
|
|
|
if NI("nr_execution_yanov_init_spawn") then
|
|
|
|
--local se_squad_1 = spawn_squad("nr_dead_convict_1_squad", pos_1, 627190, 4494) --old pos
|
|
local se_squad_1 = spawn_squad("nr_dead_convict_1_squad", pos_1, 629310, 4494)
|
|
local se_squad_3 = spawn_squad("nr_executioner_1_squad", pos_3, 629320, 4494)
|
|
local se_squad_4 = spawn_squad("nr_executioner_2_squad", pos_4, 624937, 4494)
|
|
local se_squad_5 = spawn_squad("nr_executioner_3_squad", pos_5, 640837, 4494)
|
|
GI("nr_execution_yanov_init_spawn")
|
|
|
|
end
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then --- init execution
|
|
if NI("nr_execution_yanov_1_init") then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_execution_0"), 8)
|
|
CreateTimeEvent("nr_execution_yanov_st_1","nr_execution_yanov_st_1", 4,nr_execution_yanov_dialogue_1)
|
|
CreateTimeEvent("nr_execution_yanov_st_2","nr_execution_yanov_st_2", 8,nr_execution_yanov_dialogue_2)
|
|
CreateTimeEvent("nr_execution_yanov_st_3","nr_execution_yanov_st_3", 12,nr_execution_yanov_dialogue_3)
|
|
CreateTimeEvent("nr_execution_yanov_st_4","nr_execution_yanov_st_4", 14,nr_execution_yanov_dialogue_4)
|
|
CreateTimeEvent("nr_execution_yanov_st_5","nr_execution_yanov_st_5", 18,nr_execution_yanov_dialogue_5)
|
|
CreateTimeEvent("nr_execution_yanov_st_6","nr_execution_yanov_st_6", 20,nr_execution_yanov_dialogue_6)
|
|
|
|
---CreateTimeEvent("nr_execution_yanov_1","nr_execution_yanov_1", 20.5, nr_execution_yanov_1_execute)
|
|
|
|
GI("nr_execution_yanov_1_init")
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
function nr_execution_yanov_1_execute()
|
|
GI("nr_execution_firing_1")
|
|
-- dialogs_brotherhood.nr_dead_convict_1_turn()
|
|
return true
|
|
end
|
|
|
|
|
|
function nr_execution_yanov_dialogue_1()
|
|
|
|
local pos_1 = vector():set( -53.964504241943,3.5118420124054,160.3719329834 ) --- convict 1
|
|
local dist_3 = 20
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_execution_1"), 8)
|
|
end
|
|
return true
|
|
end
|
|
function nr_execution_yanov_dialogue_2()
|
|
local pos_1 = vector():set( -53.964504241943,3.5118420124054,160.3719329834 ) --- convict 1
|
|
local dist_3 = 20
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_execution_2"), 8)
|
|
end
|
|
return true
|
|
end
|
|
function nr_execution_yanov_dialogue_3()
|
|
local pos_1 = vector():set( -53.964504241943,3.5118420124054,160.3719329834 ) --- convict 1
|
|
local dist_3 = 20
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_execution_3"), 8)
|
|
end
|
|
return true
|
|
end
|
|
function nr_execution_yanov_dialogue_4()
|
|
local pos_1 = vector():set( -53.964504241943,3.5118420124054,160.3719329834 ) --- convict 1
|
|
local dist_3 = 20
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_execution_4"), 8)
|
|
end
|
|
return true
|
|
end
|
|
function nr_execution_yanov_dialogue_5()
|
|
local pos_1 = vector():set( -53.964504241943,3.5118420124054,160.3719329834 ) --- convict 1
|
|
local dist_3 = 20
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_execution_5"), 8)
|
|
end
|
|
return true
|
|
end
|
|
function nr_execution_yanov_dialogue_6()
|
|
local pos_1 = vector():set( -53.964504241943,3.5118420124054,160.3719329834 ) --- convict 1
|
|
local dist_3 = 20
|
|
if (db.actor:position():distance_to(pos_1) < dist_3) then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_execution_6"), 8)
|
|
end
|
|
GI("nr_execution_firing_1")
|
|
return true
|
|
end
|
|
|
|
function task_status_functor.give_task_nr_strange_meat_status_f(tsk,task_id)
|
|
|
|
--- pos Lyoshik
|
|
local pos_1 = vector():set( 15.033114433289,-7.2893815040588,20.447532653809 )
|
|
|
|
if NI("nr_strange_meat_spawn_init") then --- spawn NPCs
|
|
|
|
local se_squad_1 = spawn_squad("nr_lyoshik_squad", pos_1, 305953, 2165)
|
|
|
|
GI("nr_strange_meat_spawn_init")
|
|
|
|
end
|
|
|
|
|
|
end
|
|
|
|
--- Sasha Baltunov
|
|
|
|
|
|
function nr_baltunov_init()
|
|
local pos_1 = vector():set( 133.56050109863,-4.825080871582,27.625020980835 ) --- trigger
|
|
local pos_2 = vector():set( 122.6502456665,-4.3441872596741,31.141521453857 ) --- spawn
|
|
local pos_3 = vector():set( 125.42021179199,-4.3464636802673,28.191061019897 ) --- speech
|
|
local pos_4 = vector():set( 127.67053985596,-4.8243117332458,23.232620239258 ) ---bar
|
|
local pos_5 = vector():set( 115.9564666748,-0.0015365779399872,49.205066680908 ) ---murder
|
|
local dist_1 = 3
|
|
local dist_2 = 2
|
|
local dist_3 = 50
|
|
local npc = get_story_se_object("nr_sasha_baltunov_squad")
|
|
local smart = SIMBOARD.smarts_by_names["bar_visitors"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
|
|
if NI("nr_baltunov_init") then
|
|
if level.name() == "l05_bar" then
|
|
if (NI("nr_baltunov_init_random")) then
|
|
if (db.actor:position():distance_to(pos_1) < dist_1) then --- trigger spawn
|
|
if (math.random(100) < 10) then
|
|
if NI("nr_baltunov_spawn") then
|
|
|
|
local se_squad_1 = spawn_squad("nr_sasha_baltunov_squad", pos_2, 34993, 1740)
|
|
GI("nr_baltunov_spawn")
|
|
GI("nr_baltunov_init_random")
|
|
end
|
|
else
|
|
brotherhood_timer.nr_baltunov_init_random()
|
|
GI("nr_baltunov_init_random")
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
if npc and (npc.position:distance_to(pos_3) < dist_2) then
|
|
if NI("nr_baltunov_init_speech") then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_sahsa_baltun_round_1"), 8)
|
|
CreateTimeEvent("nr_baltunov_init_1","nr_baltunov_init_1", 4, nr_baltunov_round_init)
|
|
GI("nr_baltunov_init_speech")
|
|
|
|
end
|
|
end
|
|
|
|
if HI("nr_sasha_baltunov_1_job_init") then
|
|
if smrt and (db.actor:position():distance_to(smart.position) > dist_3) then
|
|
if NI("nr_baltunov_init_murder") then
|
|
|
|
xr_effects.spawn_nr_sasha_baltun_murder_weapon()
|
|
dialogs_brotherhood.relocation_nr_sasha_baltun_murder()
|
|
dialogs_brotherhood.nr_sasha_baltun_murder()
|
|
end
|
|
end
|
|
end
|
|
|
|
if HI("nr_baltunov_init_murder") then
|
|
if (db.actor:position():distance_to(pos_5) < dist_1) then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_sahsa_baltun_murder_1"), 8)
|
|
GI("nr_baltunov_init")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function nr_baltunov_round_init()
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_sahsa_baltun_round_2"), 8)
|
|
GI("nr_sasha_baltunov_1_job_init")
|
|
return true
|
|
end
|
|
|
|
function xr_effects.spawn_nr_sasha_baltun_murder_weapon()
|
|
local pos = vector():set( 116.98554229736,-0.0014335215091705,49.7780418396 )
|
|
local se_obj = alife_create( "wpn_knife2", pos, 34072, 1759 )
|
|
if ( not se_obj ) then
|
|
printe("!ERROR: unable to spawn murder weapon" )
|
|
end
|
|
end
|
|
|
|
function bh_starik_1_init()
|
|
|
|
if NI("nr_starik_1_init") then
|
|
|
|
if level.name() == "k00_marsh" then
|
|
local pos_1 = vector():set( -41.169841766357,-1.2703860998154,268.60656738281 ) --- bandit 1
|
|
local pos_2 = vector():set( -43.523834228516,-1.2712132930756,268.31134033203 ) --- badnit 2
|
|
local pos_3 = vector():set( -42.306156158447,-0.81166511774063,267.18487548828 ) --- Corpse
|
|
local pos_4 = vector():set( -41.992389678955,1.0363459587097,276.58703613281 ) --- trigger
|
|
|
|
local dist_1 = 10
|
|
local dist_2 = 2
|
|
|
|
if (NI("nr_starik_1_init_random")) then
|
|
if (db.actor:position():distance_to(pos_4) < dist_1) then --- trigger spawn
|
|
if (math.random(65) < 25) then
|
|
if NI("nr_starik_1_spawn") then
|
|
|
|
local se_squad_1 = spawn_squad("nr_starik_murder_bandit_1_squad", pos_1, 121773, 76)
|
|
local se_squad_2 = spawn_squad("nr_starik_murder_bandit_2_squad", pos_2, 120618, 76)
|
|
local se_squad_3 = spawn_squad("nr_starik_murdered_squad", pos_3, 121371, 76)
|
|
xr_effects.kill_squad(nil,nil,{"nr_starik_murdered_squad"})
|
|
xr_effects.spawn_nr_starik_murdered_stash()
|
|
GI("nr_starik_1_spawn")
|
|
GI("nr_starik_1_init_random")
|
|
end
|
|
else
|
|
brotherhood_timer.nr_starik_1_init_random()
|
|
GI("nr_starik_1_init_random")
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
end
|
|
if HI("nr_starik_1_spawn") then
|
|
if NI("nr_starik_1_talk_init") then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_starik_murder_1"), 8)
|
|
CreateTimeEvent("nr_starik_1_talk_init_1","nr_starik_1_talk_init_1", 4, nr_starik_1_talk_init_1)
|
|
CreateTimeEvent("nr_starik_1_talk_init_2","nr_starik_1_talk_init_2", 8, nr_starik_1_talk_init_2)
|
|
CreateTimeEvent("nr_starik_1_talk_init_3","nr_starik_1_talk_init_3", 12, nr_starik_1_talk_init_3)
|
|
CreateTimeEvent("nr_starik_1_talk_init_4","nr_starik_1_talk_init_4", 16, nr_starik_1_talk_init_4)
|
|
GI("nr_starik_1_talk_init")
|
|
end
|
|
end
|
|
if NI("nr_starik_1_interrupted") then
|
|
if (db.actor:position():distance_to(pos_4) < dist_2) then --- trigger spawn
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_starik_murder_interrupted"), 8)
|
|
GI("nr_starik_1_interrupted")
|
|
GI("nr_starik_1_init")
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
function nr_starik_1_talk_init_1()
|
|
local dist_1 = 10
|
|
local pos_4 = vector():set( -41.992389678955,1.0363459587097,276.58703613281 ) --- trigger
|
|
if (db.actor:position():distance_to(pos_4) < dist_1) then --- trigger spawn
|
|
if NI("nr_starik_1_interrupted") then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_starik_murder_2"), 8)
|
|
end
|
|
end
|
|
return true
|
|
end
|
|
function nr_starik_1_talk_init_2()
|
|
local dist_1 = 10
|
|
local pos_4 = vector():set( -41.992389678955,1.0363459587097,276.58703613281 ) --- trigger
|
|
if (db.actor:position():distance_to(pos_4) < dist_1) then --- trigger spawn
|
|
if NI("nr_starik_1_interrupted") then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_starik_murder_3"), 8)
|
|
end
|
|
end
|
|
return true
|
|
end
|
|
function nr_starik_1_talk_init_3()
|
|
local dist_1 = 10
|
|
local pos_4 = vector():set( -41.992389678955,1.0363459587097,276.58703613281 ) --- trigger
|
|
if (db.actor:position():distance_to(pos_4) < dist_1) then --- trigger spawn
|
|
if NI("nr_starik_1_interrupted") then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_starik_murder_4"), 8)
|
|
end
|
|
end
|
|
return true
|
|
end
|
|
function nr_starik_1_talk_init_4()
|
|
local dist_1 = 10
|
|
local pos_4 = vector():set( -41.992389678955,1.0363459587097,276.58703613281 ) --- trigger
|
|
if (db.actor:position():distance_to(pos_4) < dist_1) then --- trigger spawn
|
|
if NI("nr_starik_1_interrupted") then
|
|
actor_menu.set_msg(1, game.translate_string("st_nr_starik_murder_5"), 8)
|
|
end
|
|
end
|
|
return true
|
|
end
|
|
|
|
function xr_effects.spawn_nr_starik_murdered_stash()
|
|
local pos = vector():set( 350.34912109375,8.1314964294434,-74.197410583496 )
|
|
local se_obj_1 = alife_create( "wpn_colt1911", pos, 366421, 45 )
|
|
local se_obj_2 = alife_create( "itm_advancedkit", pos, 366421, 45 )
|
|
local se_obj_3 = alife_create( "detector_advanced", pos, 366421, 45 )
|
|
local se_obj_4 = alife_create( "adrenalin", pos, 366421, 45 )
|
|
if ( not se_obj_1 ) or ( not se_obj_2 ) or ( not se_obj_3 ) or ( not se_obj_4 ) then
|
|
printe("!ERROR: unable to spawn starik stash" )
|
|
end
|
|
|
|
if se_obj_1 then
|
|
CreateTimeEvent("comradecatilina", "waiting_for_the_game_object", 0, function(id)
|
|
local obj = level.object_by_id(id)
|
|
if obj then
|
|
obj:set_condition(1 - (math.random(25, 45)/100))
|
|
return true
|
|
end
|
|
end, se_obj_1.id)
|
|
else
|
|
printf("!ERROR | Failed to spawn my_section !")
|
|
end
|
|
end
|
|
|
|
|
|
function bh_like_rats_trap_init()
|
|
|
|
|
|
if NI("bh_like_rats_trap_init") then
|
|
|
|
local pos_1 = vector():set( -39.03401184082,-0.0018443763256073,43.549373626709 ) --- above ground 1
|
|
local pos_2 = vector():set( -75.507743835449,1.7313983440399,8.8472261428833 ) --- above ground 2
|
|
local pos_3 = vector():set( 76.103713989258,3.7150104045868,128.13946533203 ) --- underground 1
|
|
local pos_4 = vector():set( 35.715763092041,-8.2353734970093,157.6732635498 ) --- underground 2
|
|
|
|
local dist_1 = 150
|
|
local dist_2 = 5
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_4_4"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
|
|
local knife = db.actor:item_in_slot(1)
|
|
local weapon_1 = db.actor:item_in_slot(2)
|
|
local weapon_2 = db.actor:item_in_slot(3)
|
|
local weapon_3 = db.actor:item_in_slot(4)
|
|
|
|
if level.name() == "l03_agroprom" then --- if first meeting Naruchnik
|
|
news_manager.send_tip(db.actor, game.translate_string("RATS 1"), 0, "stalker", 11000, 1)
|
|
if smart and smart.online then
|
|
if smrt and (db.actor:position():distance_to(smart.position) < dist_1) then
|
|
news_manager.send_tip(db.actor, game.translate_string("RATS 2"), 0, "stalker", 11000, 1)
|
|
if NI("bh_rat_guards_spawn") then
|
|
news_manager.send_tip(db.actor, game.translate_string("RATS Spawn"), 0, "stalker", 11000, 1)
|
|
local squad_1 = SIMBOARD:create_squad(smart,"bh_rat_guards_1_squad")
|
|
local squad_2 = SIMBOARD:create_squad(smart,"bh_rat_guards_2_squad")
|
|
GI("bh_rat_guards_spawn")
|
|
end
|
|
end
|
|
end
|
|
if (db.actor:position():distance_to(pos_1) < dist_2) then
|
|
if NI("give_like_rats_trap_1_init") then
|
|
if NI("bh_rats_trap_guards_shout") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_0"), 8)
|
|
CreateTimeEvent("bh_rats_trap_guards_shout_1","bh_rats_trap_guards_shout_1", 4, bh_rats_trap_guards_shout_1)
|
|
end
|
|
dialogs_brotherhood.give_like_rats_trap_1()
|
|
GI("give_like_rats_trap_1_init")
|
|
GI("bh_like_rats_trap_init")
|
|
end
|
|
elseif (db.actor:position():distance_to(pos_2) < dist_2) then
|
|
if NI("give_like_rats_trap_1_init") then
|
|
if NI("bh_rats_trap_guards_shout") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_0"), 8)
|
|
CreateTimeEvent("bh_rats_trap_guards_shout_1","bh_rats_trap_guards_shout_1", 4, bh_rats_trap_guards_shout_1)
|
|
end
|
|
dialogs_brotherhood.give_like_rats_trap_1()
|
|
GI("give_like_rats_trap_1_init")
|
|
GI("bh_like_rats_trap_init")
|
|
end
|
|
end
|
|
|
|
end
|
|
if level.name() == "l03u_agr_underground" then --- if first meeting the bandits
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_2) then
|
|
if NI("give_like_rats_trap_1_init") then
|
|
if NI("bh_rats_trap_bandits_shout") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_2"), 8)
|
|
CreateTimeEvent("bh_rats_trap_bandits_shout_1","bh_rats_trap_bandits_shout_1", 4, bh_rats_trap_bandits_shout_1)
|
|
end
|
|
dialogs_brotherhood.give_like_rats_trap_1()
|
|
GI("give_like_rats_trap_1_init")
|
|
GI("bh_like_rats_trap_init")
|
|
end
|
|
elseif (db.actor:position():distance_to(pos_2) < dist_2) then
|
|
if NI("give_like_rats_trap_1_init") then
|
|
if NI("bh_rats_trap_bandits_shout") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_2"), 8)
|
|
CreateTimeEvent("bh_rats_trap_bandits_shout_1","bh_rats_trap_bandits_shout_1", 4, bh_rats_trap_bandits_shout_1)
|
|
end
|
|
dialogs_brotherhood.give_like_rats_trap_1()
|
|
GI("give_like_rats_trap_1_init")
|
|
GI("bh_like_rats_trap_init")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
function bh_rats_trap_bandits_shout_1()
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_3"), 8)
|
|
return true
|
|
end
|
|
function bh_rats_trap_guards_shout_1()
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_1"), 8)
|
|
return true
|
|
end
|
|
|
|
function task_status_functor.give_like_rats_trap_1_status_f(tsk,task_id)
|
|
|
|
local pos_1 = vector():set( 76.488876342773,4.210268497467,180.86875915527 ) --- under ground 1 from couloir
|
|
local pos_2 = vector():set( 38.165634155273,1.7712228298187,158.65428161621 ) --- under ground 2 from stairs
|
|
local pos_3 = vector():set( 76.103713989258,3.7150104045868,128.13946533203 ) --- underground 3 (1 in init) from electro
|
|
local pos_4 = vector():set( 35.715763092041,-8.2353734970093,157.6732635498 ) --- underground 4 (2 in init) from stairs under
|
|
|
|
local dist_1 = 150
|
|
local dist_2 = 5
|
|
local smart = SIMBOARD.smarts_by_names["agr_smart_terrain_4_4"]
|
|
local smrt = SIMBOARD.smarts[smart.id]
|
|
|
|
if (tsk.stage == 0) then
|
|
if NI("bh_rat_guards_spawn") then
|
|
local squad_1 = SIMBOARD:create_squad(smart,"bh_rat_guards_1_squad")
|
|
local squad_2 = SIMBOARD:create_squad(smart,"bh_rat_guards_2_squad")
|
|
GI("bh_rat_guards_spawn")
|
|
end
|
|
if level.name() == "l03u_agr_underground" then --- if first meeting the bandits
|
|
|
|
if (db.actor:position():distance_to(pos_1) < dist_2) then
|
|
if NI("give_like_rats_trap_2_init") then
|
|
if NI("bh_rats_trap_bandits_shout_2") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_2"), 8)
|
|
CreateTimeEvent("bh_rats_trap_bandits_shout_2","bh_rats_trap_bandits_shout_2", 4, bh_rats_trap_bandits_shout_1)
|
|
end
|
|
|
|
GI("give_like_rats_trap_2_init")
|
|
|
|
end
|
|
elseif (db.actor:position():distance_to(pos_2) < dist_2) then
|
|
if NI("give_like_rats_trap_2_init") then
|
|
if NI("bh_rats_trap_bandits_shout_2") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_2"), 8)
|
|
CreateTimeEvent("bh_rats_trap_bandits_shout_2","bh_rats_trap_bandits_shout_2", 4, bh_rats_trap_bandits_shout_1)
|
|
end
|
|
|
|
GI("give_like_rats_trap_2_init")
|
|
|
|
end
|
|
elseif (db.actor:position():distance_to(pos_3) < dist_2) then
|
|
if NI("give_like_rats_trap_2_init") then
|
|
if NI("bh_rats_trap_bandits_shout_2") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_2"), 8)
|
|
CreateTimeEvent("bh_rats_trap_bandits_shout_2","bh_rats_trap_bandits_shout_2", 4, bh_rats_trap_bandits_shout_1)
|
|
end
|
|
|
|
GI("give_like_rats_trap_2_init")
|
|
|
|
end
|
|
elseif (db.actor:position():distance_to(pos_4) < dist_2) then
|
|
if NI("give_like_rats_trap_2_init") then
|
|
if NI("bh_rats_trap_bandits_shout_2") then
|
|
actor_menu.set_msg(1, game.translate_string("st_bh_like_rats_in_trap_2"), 8)
|
|
CreateTimeEvent("bh_rats_trap_bandits_shout_2","bh_rats_trap_bandits_shout_2", 4, bh_rats_trap_bandits_shout_1)
|
|
end
|
|
|
|
GI("give_like_rats_trap_2_init")
|
|
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
|
|
end |