I need help with my ai

https://flowlab.io/game/play/1359264

My ai int working well, how do i make it so it jumps only when its close to a block and shoot only when it close to me

To make it jump only when its close to a block, use raycasts set to any.
To start shooting when your close, use a proximity set to the player.