101 lines
1.8 KiB
Plaintext
101 lines
1.8 KiB
Plaintext
|
//::////////////////////////////////////////////////
|
||
|
//:: Custom User Defined Event
|
||
|
//:: FileName
|
||
|
//:: Copyright (c) 2001 Bioware Corp.
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By:
|
||
|
//:: Created On:
|
||
|
//:://////////////////////////////////////////////
|
||
|
#include "NW_I0_GENERIC"
|
||
|
|
||
|
void main()
|
||
|
|
||
|
|
||
|
{
|
||
|
|
||
|
|
||
|
int nCounter;
|
||
|
int nUser = GetUserDefinedEventNumber();
|
||
|
object oPC;
|
||
|
|
||
|
if(nUser == 1001) //HEARTBEAT
|
||
|
{
|
||
|
if (!GetIsInCombat(OBJECT_SELF)&&!IsInConversation(OBJECT_SELF))
|
||
|
|
||
|
ActionUseSkill(SKILL_HIDE, OBJECT_SELF);
|
||
|
ActionUseSkill(SKILL_MOVE_SILENTLY, OBJECT_SELF);
|
||
|
}
|
||
|
else if(nUser == 1002) // PERCEIVE
|
||
|
{
|
||
|
object oObject=GetLastPerceived();
|
||
|
|
||
|
|
||
|
if (!GetIsInCombat(OBJECT_SELF)&&!IsInConversation(OBJECT_SELF)&&GetObjectSeen(oObject,OBJECT_SELF)&&GetIsPC(oObject)&&GetIsObjectValid(oObject))
|
||
|
|
||
|
{
|
||
|
if (GetRacialType(oObject)!=RACIAL_TYPE_HUMAN)
|
||
|
{
|
||
|
ActionUseSkill(SKILL_HIDE, OBJECT_SELF);
|
||
|
ActionUseSkill(SKILL_MOVE_SILENTLY, OBJECT_SELF);
|
||
|
|
||
|
}
|
||
|
|
||
|
else
|
||
|
|
||
|
{
|
||
|
ActionSpeakString("Human!");
|
||
|
SetIsTemporaryEnemy(oObject,OBJECT_SELF,TRUE,600.0);
|
||
|
DetermineCombatRound();
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
else if(nUser == 1003) // END OF COMBAT
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == 1004) // ON DIALOGUE
|
||
|
{
|
||
|
nCounter = GetListenPatternNumber();
|
||
|
if ((nCounter==50)||(nCounter==51)&&(!GetIsInCombat(OBJECT_SELF))&&(!IsInConversation(OBJECT_SELF)))
|
||
|
{
|
||
|
oPC=GetLastSpeaker();
|
||
|
if (GetObjectSeen(OBJECT_SELF,oPC))
|
||
|
{
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
ActionStartConversation(oPC,"jw_talindra_con");
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
else if(nUser == 1005) // ATTACKED
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == 1006) // DAMAGED
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == 1007) // DEATH
|
||
|
{
|
||
|
|
||
|
}
|
||
|
else if(nUser == 1008) // DISTURBED
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|