52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
|
//::///////////////////////////////////////////////
|
||
|
//:: Name ds_ai_onpercept
|
||
|
//:: Copyright (c) 2022 Project RATDOG
|
||
|
//:://////////////////////////////////////////////
|
||
|
/*
|
||
|
NPC OnPerception event script caller to run
|
||
|
CODI AI & PRC events.
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////
|
||
|
//:: Created By: Jaysyn
|
||
|
//:: Created On: 20221201
|
||
|
//:://////////////////////////////////////////////
|
||
|
|
||
|
// Necromancy 101 /////////
|
||
|
#include "_inc_battlecry_"
|
||
|
////////////////////////////
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
//:: Declare major variables
|
||
|
object oPC = GetLastPerceived();
|
||
|
object oHelm = GetItemInSlot(INVENTORY_SLOT_HEAD, oPC);
|
||
|
object oMyHelm = GetItemInSlot(INVENTORY_SLOT_HEAD, OBJECT_SELF);
|
||
|
|
||
|
int nRiverVA = GetStringLeft(GetTag(OBJECT_SELF), 6) == "RB_VA_" ? TRUE : FALSE;
|
||
|
int nRiverUrik = GetStringLeft(GetTag(OBJECT_SELF), 8) == "RB_URIK_" ? TRUE : FALSE;
|
||
|
|
||
|
|
||
|
//:: Helm based faction handling for the River of Blood quest.
|
||
|
if(nRiverVA == TRUE || nRiverUrik == TRUE)
|
||
|
{
|
||
|
if (GetTag(oHelm) == GetTag(oMyHelm))
|
||
|
AdjustReputation(oPC, OBJECT_SELF, 100);
|
||
|
if (GetTag(oHelm) != GetTag(oMyHelm))
|
||
|
AdjustReputation(oPC, OBJECT_SELF, -100);
|
||
|
}
|
||
|
|
||
|
|
||
|
//:: Execute the CODI AI NPC OnPerception script
|
||
|
ExecuteScript("no_ai_per", OBJECT_SELF);
|
||
|
|
||
|
//:: Execute the default NPC OnPerception script
|
||
|
//ExecuteScript("nw_c2_default2", OBJECT_SELF);
|
||
|
|
||
|
//:: Execute the PRC NPC OnPerception script
|
||
|
ExecuteScript("prc_npc_percep", OBJECT_SELF);
|
||
|
|
||
|
// Necromancy 101 ///
|
||
|
DoBattleCry();
|
||
|
/////////////////////
|
||
|
}
|