Improved bot script architecture.

Bot responds to being attacked from somewhere out of sight