I believe there are flags that you can set something like nowander or stayarea or sentinel.
Nowander - Only moves when attacked.
Stayarea - Will wonder, but stays in area.
Sentinel - Doesn't move no matter what
If you want to see more flags and all around stuff pertaining to mobiles look at the mobiles.txt that is in areadocs that came with AFKMud.