Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
125
_module/nss/jw_chourm_usd.nss
Normal file
125
_module/nss/jw_chourm_usd.nss
Normal file
@@ -0,0 +1,125 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Custom User Defined Event
|
||||
//:: FileName
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By:
|
||||
//:: Created On:
|
||||
//::///////////////////////////////////////////////
|
||||
|
||||
#include "NW_I0_GENERIC"
|
||||
|
||||
void main()
|
||||
{
|
||||
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
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user