#schedule maintenance and send them out
(else_try),
(get_party_ai_current_behavior,":cur_behavior",":cur_patrol"),
(eq,":cur_behavior",ai_bhvr_in_town),
(eq,":cur_object", ":cur_home_base"), #make sure it's not in the wrong town
(assign, reg22, ":cur_object"),
# (display_message,"@ship is at home base, scheduling maintenance"),
(call_script, "script_patrol_unit_maintenance", ":cur_patrol"),
(party_set_ai_behavior, ":cur_patrol", ai_bhvr_patrol_party), #send them on their way again.
(party_set_ai_object, ":cur_patrol", ":cur_home_base"),
# (display_message, "@sent patrol out after rendezvous"), #test
#in case they somehow ended up in the wrong town
(else_try),
(get_party_ai_current_behavior,":cur_behavior",":cur_patrol"),
(eq,":cur_behavior",ai_bhvr_in_town),
(neq,":cur_object", ":cur_home_base"), #they're in the wrong town, send em home
(party_set_ai_behavior, ":cur_patrol", ai_bhvr_travel_to_party),
(party_set_ai_object, ":cur_patrol", ":cur_home_base"),
(try_end),
]),