It already check if they are inside the area, but this script is bugged atm, I need to do some changes. And you can delete the other spells you don't want to cast.
The best option is to put those attacks at the targeting engine, now you can set any target setting with setsettings function so this script became useless.