Battledale_PRC8/_module/nss/jw_chourm_usd.nss
Jaysyn904 e5b3f6ad61 Finished PRC8 integration
Finished PRC8 integration.  Moved creature abilities to top hak.  Setup tooling.  Created release archive
2024-03-12 21:27:23 -04:00

128 lines
2.0 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Custom User Defined Event
//:: FileName
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:
//::///////////////////////////////////////////////
#include "NW_I0_GENERIC"
void main()
{
ExecuteScript("prc_npc_userdef", OBJECT_SELF);
int nUser = GetUserDefinedEventNumber();
if(nUser == 1001) //HEARTBEAT
{
////one in 5 chance of changing behaviour
int nRandom=Random(15);
object oChair;
int nCounter=1;
int nFoundchair=0;
if ((!IsInConversation(OBJECT_SELF))&&(!GetIsInCombat(OBJECT_SELF)))
{
if (nRandom==1)
{
nRandom=Random(5);
ClearAllActions();
switch (nRandom)
{
case 0:
oChair =GetNearestObjectByTag ("Couch", OBJECT_SELF);
if (GetIsObjectValid(GetSittingCreature(oChair)))
{ break;}
else
{
ActionMoveToObject(oChair,0);
ActionSit(oChair);
break;
}
case 1:
WalkWayPoints(FALSE,6.0);
break;
case 2:
ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT);
ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_RIGHT);
ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE);
break;
case 3:
ClearAllActions();
break;
case 4:
ActionMoveToObject(GetNearestObjectByTag("jw_oven"),0,0.1);
ActionInteractObject(GetObjectByTag("jw_oven"));
ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0,2.0);
ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_BORED);
oChair =GetNearestObjectByTag ("Couch", OBJECT_SELF);
if (GetIsObjectValid(GetSittingCreature(oChair)))
{ break;}
else
{
ActionMoveToObject(oChair,0);
ActionSit(oChair);
break;
}
}
///ended switch
}
}
}
else if(nUser == 1002) // PERCEIVE
{
}
else if(nUser == 1003) // END OF COMBAT
{
}
else if(nUser == 1004) // ON DIALOGUE
{
}
else if(nUser == 1005) // ATTACKED
{
}
else if(nUser == 1006) // DAMAGED
{
}
else if(nUser == 1007) // DEATH
{
}
else if(nUser == 1008) // DISTURBED
{
}
}