Updated TLK for PRC8 update. Added placeable house blueprints. Updated NWNxEE. Full compile.
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name codi_ondamage
|
|
//::
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
NPC OnDamaged event script caller to run
|
|
CODI AI & PRC events.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Jaysyn
|
|
//:: Created On: 20240331
|
|
//:://////////////////////////////////////////////
|
|
|
|
|
|
void main()
|
|
{
|
|
int nTotalDamage = GetTotalDamageDealt();
|
|
int nFireDamage = 0;
|
|
|
|
string sResRef = GetResRef(OBJECT_SELF);
|
|
|
|
//--------------------------------------------------------------------------
|
|
// GZ: 2003-10-16
|
|
// Make Plot Creatures Ignore Attacks
|
|
//--------------------------------------------------------------------------
|
|
if (GetPlotFlag(OBJECT_SELF))
|
|
{
|
|
return;
|
|
}
|
|
|
|
//:: Handles healing from fire damage
|
|
if(sResRef == "BLEAKBORN001" || sResRef == "BLEAKBORN002")
|
|
{
|
|
if(GetDamageDealtByType(DAMAGE_TYPE_FIRE) != -1)
|
|
{
|
|
nFireDamage = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
|
|
//DelayCommand(0.0f, SpeakString("Fire Damage: " + IntToString(nFireDamage)));
|
|
}
|
|
|
|
effect eHeal = EffectTemporaryHitpoints(nFireDamage/3);
|
|
//DelayCommand(0.0f, SpeakString("Subdual damage healed: " + IntToString(nSubDmg)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, OBJECT_SELF, 0.0f);
|
|
|
|
}
|
|
|
|
//:: Execute the CODI AI NPC OnDamaged script
|
|
ExecuteScript("no_ai_dam", OBJECT_SELF);
|
|
|
|
//:: Execute the Default NPC OnDamaged script
|
|
//ExecuteScript("nw_c2_default6", OBJECT_SELF);
|
|
|
|
//:: Execute the PRC NPC OnDamaged script
|
|
ExecuteScript("prc_npc_damaged", OBJECT_SELF);
|
|
}
|