2023-08-13 18:26:11 -05:00
|
|
|
//::///////////////////////////////////////////////
|
|
|
|
//:: npc_sit_stay
|
|
|
|
//:://////////////////////////////////////////////
|
|
|
|
/*Goes on the OnSpawn and OnConversation script of the NPC that you want to stay <span class="highlight">seated</span>*/
|
2023-09-03 21:12:26 -05:00
|
|
|
#include "nw_i0_spells"
|
2023-08-13 18:26:11 -05:00
|
|
|
#include "NW_I0_GENERIC"
|
2023-09-09 19:56:22 -05:00
|
|
|
#include "x0_i0_anims"
|
2023-08-13 18:26:11 -05:00
|
|
|
void main()
|
|
|
|
{
|
|
|
|
ClearAllActions();
|
2023-09-09 19:56:22 -05:00
|
|
|
SetAILevel (OBJECT_SELF, AI_LEVEL_HIGH);
|
2023-08-13 18:26:11 -05:00
|
|
|
string sSittableTagName = "Woodenbench";
|
2023-09-11 17:11:52 -05:00
|
|
|
object oChair = GetRandomObjectByTag(sSittableTagName, 120.0);
|
2023-09-09 19:56:22 -05:00
|
|
|
ActionForceMoveToObject (oChair, FALSE, 1.0f, 120.0);
|
2023-08-13 18:26:11 -05:00
|
|
|
ActionSit(oChair);
|
2023-09-09 19:56:22 -05:00
|
|
|
int nTime = Random(210) + 90;
|
|
|
|
float fTime = IntToFloat(nTime);
|
|
|
|
DelayCommand(fTime, ExecuteScript("npc_sit_woodenbe", OBJECT_SELF));
|
|
|
|
|
2023-08-13 18:26:11 -05:00
|
|
|
}
|
|
|
|
|