Using Behaviour Patterns To Generate Scripts For Computer Role-Playing Games