How do i make a AI OR ENEMY IN BLENDER 2.49?

How can i make a AI that if it see my charecter it will shot at it and fallow. and how can i fill it?

ok ill post some links:
this is a good one for basic knowledge, but the links don’t work outside of the wikepedia ones.