("cf_gun_fire", [
(store_trigger_param_1, ":agent_id"),
#(agent_get_player_id,":player",":agent_id"), #not needed, you already have the agent id and nothing below uses the player id
#(try_begin), #not needed, the script is marked as cf...or remove the cf
(multiplayer_is_server),
#(try_begin), #not needed regardless, you don't have any client-side processing below, so it should just stop reading if it isn't the server
#(multiplayer_get_my_player, ":player"), #none of the following are necessary...or really doing anything.
#(ge, ":player", 0),
#(get_player_agent_no, ":player"),
#(try_begin), #none of these try blocks are needed because you don't have a single else_try or anything getting processed outside of the try block
(agent_get_look_position, pos1, ":agent_id"), #use the agent_id passed to the script, not ":player"
(position_move_z, pos1, 165, 0),
(position_move_y, pos1, 50, 0),
(position_rotate_x, pos1,0),
(init_position,pos2),
(copy_position, pos2, pos1),
(set_fixed_point_multiplier, 100),
#(try_begin),
(store_random_in_range,":randomX",-3,3),
(store_random_in_range,":randomZ",-3,3),
(position_rotate_x, pos2,":randomX"),
(position_rotate_z, pos2,":randomZ"),
(spawn_missile, ":agent_id", pos2, 2000, "itm_crossbow", "itm_yellow_paintball_shot"), #use the agent_id passed to the script, not ":player"
#(try_end),
#(try_end),
#(try_end),
#(try_end),
]),