while true do
if GetCurrentPlayer()>1 then
if ((GetObjectPosition("hero name to be attacked")-GetObjectPosition("monster name that will attack"))<7) then
MakeHeroInteractWithObject("hero name","monster name");
end;
if ((GetObjectPosition("hero name to be attacked")-GetObjectPosition("another monster name"))<7) then
MakeHeroInteractWithObject("hero name","second monster name");
end;
...
...
end;
sleep(1);
end;