It's an example.
You have to call the AI(); since there's an infinite loop involved, I recommend having a set waitfor = 0 in the proc so any place where you call AI() does not wait for the response.
The ideal location to call it would be when a person enters a region; other ineffecient methods includes calling when NPCs are created at New() and when the player's Move()
For testing purposes, I recommend having AI procedure called at Zombie/New() to make sure that the AI works then work on making it efficient.
You have to call the AI(); since there's an infinite loop involved, I recommend having a set waitfor = 0 in the proc so any place where you call AI() does not wait for the response.
The ideal location to call it would be when a person enters a region; other ineffecient methods includes calling when NPCs are created at New() and when the player's Move()
For testing purposes, I recommend having AI procedure called at Zombie/New() to make sure that the AI works then work on making it efficient.