("cf_replace_weapon_while_anim_is_active",
[
(store_script_param, ":agent_id", 1),
(agent_is_active,":agent_id"),
(agent_get_animation,":cur_anim",":agent_id",1), #if current animation is:
(this_or_next|eq,":cur_anim","anim_stand_staff"), # When player stands
(this_or_next|eq,":cur_anim","anim_turn_right_staff"), # When player turns right
(this_or_next|eq,":cur_anim","anim_turn_left_staff"), # When player turns left
(this_or_next|eq,":cur_anim","anim_walk_forward_staff"), # When player walks forward
(eq,":cur_anim","anim_walk_backward_staff"), # When player walks backward
(try_begin),
(agent_get_wielded_item,":item_id",":agent_id",0), #if agent has item
(this_or_next|is_between,":item_id","itm_french_mousquiton","itm_cannon_ball_dummy"), #item is a carbine or
(is_between,":item_id","itm_french_charleville","itm_french_art_off_sword"), #item is a musket
(agent_equip_item,":item_id","itm_flag_france_45e"), #give to the agent other item (flag for testing purposes)
(try_end)
]),