/*Tavern Wanderer
  patron_heart
  Author: Torque
  June 24, 2002
  torquewrench72@yahoo.com*/

/************************************************************
Put this script in a tavern patron's OnHeartbeat
to make him perform a random action every 6 sec.
Remember to rename Chair01 to whatever the tag is
for the chair you want him to sit in. You will have to
rename this script and the chair for each NPC you want
to run it. Or they will try to sit in the same chair.
You can easily add more actions by increasing the number in
Random() and adding case statements
************************************************************/

#include "NW_I0_GENERIC"

void main()
{   int result = 0;
    int nChair = 1;
    object oChair;
    result = Random(1);
    //Remember to rename Chair01 to the tag of your particular chair
    oChair = GetNearestObjectByTag("SitChair_067", OBJECT_SELF, nChair);
    switch(result){
        case 0: ClearAllActions();
                ActionSit(oChair);
                break;
        }
}