merged all creature AI code into one script