How to attack during script?

When walking to the training place the bot should kill monsters when being attacked. I cant find the checkbox like “attack back” "protect during way ",…
Any idea where it is?

There’s no option to do this. A plugin exists which can clear areas for FGW which may work for you.

I am dying on my way to the training place. Because “auto walk” runs through mobs
So the only way is record my own script? hm

Yes.