[logic]
active = sr_idle@wait

[sr_idle@wait]
on_info = {+lim_bubble_damages_dialog_1_end} sr_idle@quest_control_1 %=remove_squads(lim_b2_baloon_squad:lim_b2_bandit_squad)%

[sr_idle@quest_control_1]
on_info  = {+baloon_vintar_qwest_fail} sr_idle@quest_control_2 %=remove_npc(bar_a8_proveren_1) =remove_npc(bar_a8_proveren_2) =remove_npc(bar_a8_proveren_3)%
on_info2 = {+vintar_on_base_sherkhan}  sr_idle@quest_control_3 %=remove_npc(bar_a8_proveren_1) =remove_npc(bar_a8_proveren_2) =remove_npc(bar_a8_proveren_3)%

[sr_idle@quest_control_2]
on_game_timer  = 100 | {=actor_right_pos_jup(50)} sr_idle@quest_control_4 %=send_message(  degtyrev_message_3:jup_stalker_dectyrev:jup_stalker_dectyrev_name:30000 ) =create_squad(jup_a7_degtyrev_squad:jup_a7)%
on_game_timer2 = 100 | {!actor_right_pos_jup(50)} sr_idle@quest_control_4 %=send_message(  degtyrev_message_2:jup_stalker_dectyrev:jup_stalker_dectyrev_name:30000 ) =create_squad(jup_b24_degtyrev_squad:jup_b24)%

[sr_idle@quest_control_3]
on_game_timer = 100 | sr_idle@quest_control_4 %=send_message(  degtyrev_message_2:jup_stalker_dectyrev:jup_stalker_dectyrev_name:30000 )  =create_squad(jup_b24_degtyrev_squad:jup_b24)%

[sr_idle@quest_control_4]
on_game_timer   = 30 | {+vintar_on_base_sherkhan}  sr_idle@quest_control_5 %=give_task( degtyrev_qwest_3 ) =spawn_ids_objects(bar_toolkit_3:jup_toolkit_1:redlim_toolkit_2)%
on_game_timer2  = 30 | {+baloon_vintar_qwest_fail} sr_idle@quest_control_5 %=give_task( degtyrev_qwest_3 )%

[sr_idle@quest_control_5]
on_info = {+jup_degtyarev_thunder_dialog_end} sr_idle@quest_control_6 %=disable_ui =run_postprocess(fade_to_black_9_sec) +level_fallout__stop%

[sr_idle@quest_control_6]
on_game_timer = 72 | sr_idle@quest_control_7 %=run_postprocess(black:3009:true) =clear_smart_terrain(jup_b13)%

[sr_idle@quest_control_7]
on_info  = {=dist_between_actor_and_smart_le(jup_a7:150)}  sr_idle@quest_control_8 %=remove_squad(jup_a7_degtyrev_squad)  =clear_smart_terrain(jup_b14)%
on_info2 = {=dist_between_actor_and_smart_le(jup_b24:150)} sr_idle@quest_control_8 %=remove_squad(jup_b24_degtyrev_squad) =clear_smart_terrain(jup_b14)%

[sr_idle@quest_control_8]
on_game_timer = 8 | sr_idle@quest_control_9 %=teleport_actor(jup_a14_actor_1_walk:jup_a14_actor_1_look) =clear_smart_terrain(jup_b15)%

[sr_idle@quest_control_9]
on_game_timer = 20 | sr_idle@quest_control_10 %=stop_postprocess(3009)%

[sr_idle@quest_control_10]
on_game_timer  = 30 | sr_idle@quest_control_11 %=run_postprocess(fade_to_black_9_sec)%

[sr_idle@quest_control_11]
on_game_timer = 72 | sr_idle@quest_control_12 %=run_postprocess(black:3009:true) =teleport_actor(jup_a14_actor_2_walk:jup_a14_actor_2_look)%

[sr_idle@quest_control_12]
on_game_timer = 10 | sr_idle@quest_control_13 %=stop_postprocess(3009)%

[sr_idle@quest_control_13]
on_game_timer  = 30 | sr_idle@quest_control_14 %=run_postprocess(fade_to_black_9_sec)%

[sr_idle@quest_control_14]
on_game_timer = 72 | sr_idle@quest_control_15 %=run_postprocess(black:3009:true) =teleport_actor(jup_a14_actor_3_walk:jup_a14_actor_3_look)%

[sr_idle@quest_control_15]
on_game_timer = 10 | sr_idle@quest_control_16 %=stop_postprocess(3009) =enable_ui -stop_jup_a14_attack +jup_a14_start_attack%

[sr_idle@quest_control_16]
on_info = {=actor_has_item(jup_razrab_case) +jup_a14_agent_squad_dead +jup_a14_agent_1_squad_dead +jup_a14_razrab_squad_dead} sr_idle@quest_control_17 %-level_surge_stop =create_squad(jup_a14_degtyrev_squad:jup_a14)%

[sr_idle@quest_control_17]
on_game_timer  = 20 | sr_idle@quest_control_18 %+talk_with_degtyrev_jup_a14 =create_squad_member(jup_a18_baloon_bandit:jup_a1_sherkchan_squad) -level_fallout__stop%

[sr_idle@quest_control_18]
on_info  = {+jup_klava_medallion_dialog_end} sr_idle@quest_control_24
on_info2 = {+jup_aspirant_scientific_question_dialog_yes} sr_idle@quest_control_19 %=remove_squad(jup_a12_shtern_squad) =set_squads_neutral_to_actor(jup_a12_agent_squad:jup_a12_agent_1_squad) =create_squad(jup_a31_agent_squad:jup_a31) =create_squad(jup_a31_agent_1_squad:jup_a31)%

[sr_idle@quest_control_19]
on_info = {+jup_a31_agent_squad_dead +jup_a31_agent_1_squad_dead} sr_idle@quest_control_20 %=spawn_ids_objects(jup_bunker_door_restr:jup_device_case_one:jup_device_case_two) +guard_bunker_squad_dead%

[sr_idle@quest_control_20]
on_info  = {=actor_has_item(jup_device_case_one) -actor_has_device_case_one} %+actor_has_device_case_one%
on_info2 = {=actor_has_item(jup_device_case_two) -actor_has_device_case_two} %+actor_has_device_case_two%
on_info3 = {+actor_has_device_case_one =dist_between_actor_and_smart_ge(jup_a12:50)} sr_idle@quest_control_21 %+close_all_jup_a6_doors%

[sr_idle@quest_control_21]
on_info  = {+jup_klava_medallion_dialog_end} sr_idle@quest_control_24
on_info2 = {+jup_bubble_scientific_question_dialog_end} sr_idle@quest_control_22 %=create_squad(jup_a14_lena_squad:jup_a14)%

[sr_idle@quest_control_22]
on_info = {=squad_exist(jup_a14_lena_squad)} sr_idle@quest_control_23 %+jup_a14_lena_squad_exist%

[sr_idle@quest_control_23]
on_info = {+jup_bubble_scientific_question_dialog_1_end} sr_idle@quest_control_24

[sr_idle@quest_control_24]
on_game_timer  = 100 | sr_idle@quest_control_25 %=send_message( makdm_message_1:bar_a1_proveren_3:bar_a1_proveren_3_name:30000 ) +makdm_message_1_sended%

[sr_idle@quest_control_25]
on_game_timer  = 20 | sr_idle@quest_control_26 %=give_task( makdm_qwest_1 )%

[sr_idle@quest_control_26]
on_info  = {+bar_makdm_emerald_wind_dialog_no} sr_idle@quest_control_43
on_info2 = {+bar_makdm_emerald_wind_dialog_1_no} sr_idle@quest_control_43
on_info3 = {=actor_in_zone(jup_sniper_grad_restr) =is_sherkhan_day} sr_idle@quest_control_27_1 %=disable_ui =run_postprocess(black:3009:true) =forward_game_time(1) =add_cs_text(wait_one_hour)%
on_info4 = {=actor_in_zone(jup_sniper_grad_restr) !is_sherkhan_day} sr_idle@quest_control_27_1 %=disable_ui =run_postprocess(black:3009:true) =set_game_time(06:00) =add_cs_text(wait_all_night)%

[sr_idle@quest_control_27_1]
on_game_timer  = 10 | sr_idle@quest_control_27_2 %=teleport_actor(jup_a4_actor_1_walk:jup_a4_actor_1_look) =remove_all_monsters%

[sr_idle@quest_control_27_2]
on_game_timer  = 30 | sr_idle@quest_control_27_3 %=actor_look(jup_a4_smuggler_4_walk) =set_weather( af3_slight_clear_5:true ) =del_cs_text =stop_postprocess(3009)%

[sr_idle@quest_control_27_3]
on_game_timer  = 10 | sr_idle@quest_control_27 %=create_squad(jup_a4_stalker_squad:jup_a4) +spawn_jup_a4_stalker_squad%

[sr_idle@quest_control_27]
on_info = {+jup_a4_stalker_dialog} sr_idle@quest_control_28 %=remove_all_monsters%

[sr_idle@quest_control_28]
on_game_timer  = 100 | sr_idle@quest_control_29 %=enable_ui =remove_all_monsters%

[sr_idle@quest_control_29]
on_game_timer  = 40 | sr_idle@quest_control_30 %+attack_jup_a4_stalker_squad =set_squads_enemies(jup_a4_stalker_squad:jup_a4_lena_squad)%

[sr_idle@quest_control_30]
on_info = {+jup_a2_start_sprint} sr_idle@quest_control_31 %=disable_ui_only%

[sr_idle@quest_control_31]
on_game_timer  = 10 | {=npc_is_moving( jup_max_stalker )} sr_idle@quest_control_32 %=actor_look(jup_a2_max_2_walk)%

[sr_idle@quest_control_32]
on_info = {+jup_a2_max_destroy} sr_idle@quest_control_33 %=enable_ui =send_message( smuggler_lena_message_2:jup_smuggler_lena:jup_smuggler_lena_name:30000 )%

[sr_idle@quest_control_33]
on_game_timer  = 30 | sr_idle@quest_control_34 %+smuggler_lena_message_2%

[sr_idle@quest_control_34]
on_info = {+jup_lena_emerald_wind_dialog_3_end} sr_idle@quest_control_35 %=disable_ui_only =run_postprocess(blink) =teleport_actor(jup_a15_actor_walk:jup_a15_actor_look) =remove_all_monsters%

[sr_idle@quest_control_35]
on_info = {+jup_a15_smuggler_destroy} sr_idle@quest_control_36 %=enable_ui%

[sr_idle@quest_control_36]
on_game_timer  = 50 | {+bridge_up} sr_idle@quest_control_37 %=create_squad(jup_a24_voyak_card_squad:jup_a24)%
on_game_timer2 = 50 | {-bridge_up} sr_idle@quest_control_37 %=create_squad(jup_a24_voyak_squad:jup_a24)%

[sr_idle@quest_control_37]
on_info  = {=squad_exist(jup_a24_voyak_card_squad)} sr_idle@quest_control_38 %=set_squads_enemy_to_actor(jup_a24_voyak_card_squad)%
on_info2 = {=squad_exist(jup_a24_voyak_squad)} sr_idle@quest_control_38 %=set_squads_enemy_to_actor(jup_a24_voyak_squad)%

[sr_idle@quest_control_38]
on_info  = {=actor_has_item(container_1)} sr_idle@quest_control_39 %+actor_has_container_1 =actor_is_thinking( thoughts_in_my_head_17 )%

[sr_idle@quest_control_39]
on_info = {=dist_actor_to_obj_le(jup_max_stalker:20)} sr_idle@quest_control_40 %+actor_finded_jup_max_stalker%

[sr_idle@quest_control_40]
on_info = {+jup_maks_emerald_wind_dialog_end} sr_idle@quest_control_41 %=disable_ui_only =run_postprocess(blink) =teleport_actor(jup_a27_actor_walk:jup_a27_actor_look) =remove_all_monsters +jup_a27_actor_teleport%

[sr_idle@quest_control_41]
on_info = {+jup_a27_find_max_treasure} sr_idle@quest_control_41_1 %=enable_ui%

[sr_idle@quest_control_41_1]
on_info = sr_idle@quest_control_42 %=actor_is_thinking( thoughts_in_my_head_19 ) =spawn_ids_objects(jup_max_inv_box_01:jup_max_inv_box_02)%

[sr_idle@quest_control_42]
on_info = {=actor_has_items(flask_3:flask_2)} sr_idle@quest_control_43 %+actor_has_all_flasks%

[sr_idle@quest_control_43]
on_info = {=actor_has_items(lim_teleport_access_card)} sr_idle@quest_control_44 %+actor_has_lim_teleport_card%

[sr_idle@quest_control_44]
on_info  = {+bar_tim_road_to_abyss_dialog_jup} sr_idle@quest_control_45
on_info2 = {+actor_has_modules_tools} sr_idle@quest_control_46
on_info3 = {+bar_forest_road_to_abyss_dialog_no} sr_idle@quest_control_46

[sr_idle@quest_control_45]
on_info = {=actor_has_item(special_tools)} sr_idle@quest_control_46 %+actor_has_modules_tools%

[sr_idle@quest_control_46]
on_info  = {+all_fores_tools_done} sr_idle@nil
on_info2 = {+jup_lena_dirty_job_dial_money} sr_idle@quest_control_47
on_info3 = {+jup_lena_dirty_job_dial_forest} sr_idle@nil
on_info4 = {+radar_actor_must_go_lena} sr_idle@quest_control_46_1
on_info5 = {+jup_lena_dirty_job_dial_task} sr_idle@quest_control_46_1

[sr_idle@quest_control_46_1]
on_info  = {+jup_lena_dirty_job_1_dial_money =story_object_exist(shron_lena_tools)} sr_idle@quest_control_47 %=control_lena_shron%
on_info2 = {+jup_lena_shurup_dead_dialog_end} sr_idle@nil
on_info3 = {+jup_lena_dirty_job_1_dial_forest_one} sr_idle@nil
on_info4 = {+jup_lena_dirty_job_1_dial_forest_two} sr_idle@nil
on_info5 = {-play_sound_in_my_head_18 +jup_a24_shurup_squad_dead} %+play_sound_in_my_head_18 =actor_is_thinking( thoughts_in_my_head_18 )%

[sr_idle@quest_control_47]
on_info = {=actor_has_items(block_tracking_abt7:plata_nvs2:ibp_05k:plata_krgm:program_block_pb44:gpsf_block:control_block_cb55)} sr_idle@nil %+all_fores_tools_done%

[sr_idle@nil]
