NPC behaviors like walking or sitting are defined in a .charScript file, which is then attached to the RootTemplate of the character using that script.

Aureus' script might be a good example to look at- he does a variety of different actions.