Sanderling Bot help

i’m having trouble understanding where i need to put the code for the bot, i’ve tried to get the bot to choose a specific combat site, but if i dont ignore the ones that i dont want it to do, it just chooses the one at the top

Codee

also looking to find where i can change it to warp off when a neut enters system, it just spam clicks the sun icon, and for it to turn on the shield booster.

would be awesome if anyone could help thanks