("fireball_spell", [
(store_script_param, ":agent_id", 1),
(set_fixed_point_multiplier, 100),
(agent_get_look_position, pos2, ":agent_id"),
(copy_position, pos7, pos2),
(init_position, pos6),
(agent_get_bone_position, pos6, ":agent_id", 18, 1),
(position_get_z, ":hand_z",pos6),
(position_set_z,pos7,":hand_z"),
(position_move_y, pos7, 300),
(particle_system_burst, "psys_flamethrower", pos7, 3),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(position_move_y, pos7, 100),
(particle_system_burst, "psys_flamethrower", pos7, 10),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(position_move_y, pos7, 100),
(particle_system_burst, "psys_flamethrower", pos7, 10),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(position_move_y, pos7, 100),
(particle_system_burst, "psys_flamethrower", pos7, 10),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(position_move_y, pos7, 100),
(particle_system_burst, "psys_flamethrower", pos7, 10),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(position_move_y, pos7, 100),
(particle_system_burst, "psys_flamethrower", pos7, 10),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(position_move_y, pos7, 100),
(particle_system_burst, "psys_flamethrower", pos7, 10),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(position_move_y, pos7, 100),
(particle_system_burst, "psys_flamethrower", pos7, 10),#do a single burst only, adjust the particle system accordingly, 100 is max burst btw
(assign, ":ray_length", 1000),#10 meters, adjust the paricle life and emit speed accordingly
(position_move_z, pos2, -90, 1),#pre applied center of body adjustment
(try_for_agents, ":agent", pos2, ":ray_length"),
(neg|agent_is_ally,":agent"),
(agent_is_alive, ":agent"),
(agent_is_human, ":agent"),
(agent_get_position, pos3, ":agent"),
(position_transform_position_to_local, pos4, pos2, pos3),
(position_get_x, ":val", pos4),
(is_between, ":val", -250, 250),#horizontal body size
(position_get_y, ":val", pos4),
(is_between, ":val", 0, ":ray_length"),#check forward only
(position_get_z, ":val", pos4),
(is_between, ":val", -500, 500),#vertical body size
(agent_deliver_damage_to_agent,":agent_id",":agent"),
(try_end),
]),