Finished PRC8 integration. Moved creature abilities to top hak. Setup tooling. Created release archive
135 lines
2.8 KiB
Plaintext
135 lines
2.8 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Custom User Defined Event
|
|
//:: FileName
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By:
|
|
//:: Created On:
|
|
//:://////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
ExecuteScript("prc_npc_userdef", OBJECT_SELF);
|
|
|
|
int nUser = GetUserDefinedEventNumber();
|
|
int nCounter;
|
|
object oMob;
|
|
object oPC;
|
|
object oPlayer;
|
|
object oFaction;
|
|
|
|
if(nUser == 1001) //HEARTBEAT
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1002) // PERCEIVE
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1003) // END OF COMBAT
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1004) // ON DIALOGUE
|
|
{
|
|
|
|
nCounter = GetListenPatternNumber();
|
|
if ((nCounter==50)||(nCounter==51))
|
|
{
|
|
//if (GetLocalInt(OBJECT_SELF,"turned")!=TRUE)
|
|
{
|
|
oPC=GetLastSpeaker();
|
|
SetPlotFlag(OBJECT_SELF,FALSE);
|
|
//ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(TRUE,TRUE),OBJECT_SELF);
|
|
ClearAllActions();
|
|
oPlayer=GetAttackTarget(OBJECT_SELF);
|
|
ClearPersonalReputation(GetAttackTarget(OBJECT_SELF));
|
|
oFaction=GetFirstFactionMember(oPlayer);
|
|
while (GetIsObjectValid(oFaction))
|
|
{
|
|
ClearPersonalReputation(oFaction);
|
|
oFaction=GetNextFactionMember(oPlayer);
|
|
}
|
|
|
|
ChangeToStandardFaction(OBJECT_SELF,STANDARD_FACTION_DEFENDER);
|
|
SetLocalInt(GetObjectByTag("Kethoth"),"golems",TRUE);
|
|
SetLocalInt(OBJECT_SELF,"turned",TRUE);
|
|
|
|
PlayAnimation(ANIMATION_FIREFORGET_TAUNT);
|
|
|
|
oMob=GetObjectByTag("Kethoth");
|
|
if (GetIsObjectValid(oMob))
|
|
{
|
|
|
|
|
|
oPlayer=GetFirstFactionMember(oPC);
|
|
while (GetIsObjectValid(oPlayer))
|
|
{
|
|
SetIsTemporaryFriend(oPlayer,OBJECT_SELF);
|
|
oPlayer=GetNextFactionMember(oPC);
|
|
}
|
|
SetIsTemporaryEnemy(oMob,OBJECT_SELF,TRUE,600.0);
|
|
if (GetObjectSeen(oMob,OBJECT_SELF))
|
|
|
|
{
|
|
ActionAttack(oMob);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
if (nCounter==52)
|
|
|
|
{
|
|
ClearAllActions();
|
|
SetPlotFlag(OBJECT_SELF,FALSE);
|
|
|
|
ChangeToStandardFaction(OBJECT_SELF,STANDARD_FACTION_HOSTILE);
|
|
PlayAnimation(ANIMATION_FIREFORGET_TAUNT);
|
|
|
|
oMob=GetObjectByTag("Kethoth");
|
|
if (GetIsObjectValid(oMob))
|
|
{
|
|
SetIsTemporaryFriend(oMob,OBJECT_SELF);
|
|
oPC=GetLastAttacker(oMob);
|
|
oPlayer=GetFirstFactionMember(oPC);
|
|
while (GetIsObjectValid(oPlayer))
|
|
{
|
|
SetIsTemporaryEnemy(oPlayer,OBJECT_SELF);
|
|
oPlayer=GetNextFactionMember(oPC);
|
|
}
|
|
|
|
ActionAttack(oPC);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
else if(nUser == 1005) // ATTACKED
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1006) // DAMAGED
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1007) // DEATH
|
|
{
|
|
|
|
}
|
|
else if(nUser == 1008) // DISTURBED
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|