[logic]
active = sr_idle@wait

[sr_idle@wait]
on_info = {+fplay_enot_dialog_end} sr_idle@quest_control_1 

[sr_idle@quest_control_1]
on_info = {=smart_terrain_empty(jup_a9)} sr_idle@quest_control_2 %=remove_squads(radar_a1_bandit_squad) =clear_smart_terrain(jup_a25) =clear_smart_terrain(jup_a27)%

[sr_idle@quest_control_2]
on_info = {=dist_between_actor_and_smart_ge(jup_a9:400)} sr_idle@quest_control_3 %=create_squad(jup_a9_bandit_squad:jup_a9) +jup_a9_under_enot_bandit =clear_smart_terrain(jup_a19)%

[sr_idle@quest_control_3]
on_game_timer  = 30 | {-enot_reward_seif} sr_idle@quest_control_4 %=send_message( radar_a1_lider_message:radar_a1_lider_bandit:radar_a1_lider_bandit_name:30000 ) =give_money_to_actor(30000)%
on_game_timer2 = 30 | {+enot_reward_seif} sr_idle@quest_control_4

[sr_idle@quest_control_4]
on_game_timer  = 30 | {=squad_exist(bar_a1_night_squad)} sr_idle@quest_control_5 %=remove_squads(bar_a1_night_squad)%
on_game_timer2 = 30 | {!squad_exist(bar_a1_night_squad)} sr_idle@nil %=create_squad(radar_a1_night_squad:radar_a1)%

[sr_idle@quest_control_5]
on_game_timer  = 30 | sr_idle@nil %=create_squad(radar_a1_night_squad:radar_a1)%

[sr_idle@nil]
