PWE_PRC8/_module/nss/drunk_he_sitchr.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

43 lines
1.4 KiB
Plaintext

/*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(5);
//Remember to rename Chair01 to the tag of your particular chair
oChair = GetNearestObjectByTag("SitChair_069", OBJECT_SELF, nChair);
switch(result){
case 0: ClearAllActions();
ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, 1.0, 3.0);
break;
case 1: ClearAllActions();
ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK, 1.0, 5.0);
break;
case 2: ClearAllActions();
ActionRandomWalk();
break;
case 3: ClearAllActions();
ActionSit(oChair);
break;
case 4: break;
}
}