Added updated ProjectQ troll chief model. Created encounter table for Great Northern Desert. Created or imported several pnp creature UTCs: vampire spawn, spectre, mohrg, basilisk, monstrous scorpions, air & earth elementals, ankhegs. Created pnp attacks for vampire & spectre. Full compile. Co-Authored-By: Draygoth <65428430+Draygoth@users.noreply.github.com>
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name ra_ai_heartbeat
|
|
//:: Copyright (c) 2022 Project RATDOG
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
NPC Heartbeat event script caller to run CODI
|
|
AI & PRC events.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Jaysyn
|
|
//:: Created On: 20221201
|
|
//:://////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
object oNPC = OBJECT_SELF;
|
|
object oAttacker;
|
|
string sResRef = GetResRef(oNPC);
|
|
|
|
//:: Equips best armor
|
|
if ((!GetIsInCombat(oNPC) && (GetItemInSlot(INVENTORY_SLOT_CHEST) == OBJECT_INVALID)))
|
|
DelayCommand(0.5f, ActionEquipMostEffectiveArmor());
|
|
|
|
//:: Handles Vampire's Gaseous form death.
|
|
if(sResRef == "ra_vamp_gas_form")
|
|
{
|
|
//:: Get nearest alive PC.
|
|
oAttacker = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oNPC, 1, CREATURE_TYPE_IS_ALIVE, TRUE);
|
|
|
|
//:: Set destroyable.
|
|
SetIsDestroyable(TRUE, FALSE, FALSE);
|
|
|
|
//:: Remove plot/immoral/lootable flags JUST in case.
|
|
SetPlotFlag(oNPC, FALSE);
|
|
SetImmortal(oNPC, FALSE);
|
|
SetLootable(oNPC, FALSE);
|
|
|
|
//:: Clear Actions & run away
|
|
ClearAllActions();
|
|
ActionMoveAwayFromObject(oAttacker, TRUE, 300.0f);
|
|
|
|
//:: Destroy ourselves after fleeing the scene
|
|
DelayCommand(10.0f, DestroyObject(oNPC));
|
|
}
|
|
|
|
//:: Execute the CODI NPC OnHeartbeat script
|
|
ExecuteScript("no_ai_hrt", oNPC);
|
|
|
|
//:: Execute the default NPC OnHeartbeat script
|
|
//ExecuteScript("nw_c2_default1", oNPC);
|
|
|
|
//:: Execute the PRC NPC OnHeartbeat script
|
|
ExecuteScript("prc_npc_hb", oNPC);
|
|
}
|