Fixed missing Factions on Animated Statues

Fixed missing Factions on Animated Statues.  Added XP to next level for lvl 40+ characters.  Added Dragon AI for CODI Core AI.  Tweaked Beholders & some Dragons to use CODI Core AI.  Fixed CODI Core NPC onSPawn script to run PRC scripts properly.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-10-30 13:07:27 -04:00
parent c929e2ff75
commit 6aa1491726
59 changed files with 2788 additions and 783 deletions

View File

@@ -13,6 +13,16 @@
void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot);
void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot)
{
if (GetItemInSlot(nSlot) != oItem)
{
//ClearAllActions();
AssignCommand(oNPC, ActionEquipItem(oItem, nSlot));
DelayCommand(0.5, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
}
}
void main()
{
//:: Initialize Major Variables
@@ -30,8 +40,6 @@ void main()
object oSkelly;
object oPC = GetFirstObjectInArea(oArea);
//ExecuteScript("prc_npc_spawn", OBJECT_SELF); -NOT NEEDED
//:: Get average PC level for area
//:: Cycle through PCs in Area
@@ -67,15 +75,19 @@ void main()
(sMonthDay == "10/31") ||
(sMonthDay == "11/01"))
{
//: Don't spawn skeletons from skeletons or commoners
if (GetResRef(OBJECT_SELF) == "pa_skeleton" || GetResRef(OBJECT_SELF) == "nw_skeleton" || nCommoner > 0)
return;
//:: 33% chance to spawn
if ( Random(100) < 33 )
{
//:: Spawn Skeleton.
eVFX = EffectVisualEffect(VFX_IMP_EVIL_HELP);
oSkelly = CreateObject(OBJECT_TYPE_CREATURE, "nw_skeleton", GetLocation(OBJECT_SELF));
DelayCommand(0.1f, ActionDoLevelUp(oSkelly, nAveragePCLevel));
DelayCommand(0.0, ActionDoLevelUp(oSkelly, nAveragePCLevel));
//:: Assign Weapon
//:: Assign Weapon
int nResult = d6(1);
int nStackSize = 1; // Create 1 items;
string sItem;
@@ -109,19 +121,8 @@ void main()
//:: Apply VFX & Attack
AssignCommand(oSkelly, DetermineCombatRound(OBJECT_SELF));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly);
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly));
}
}
}
void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot)
{
if (GetItemInSlot(nSlot) != oItem)
{
//ClearAllActions();
AssignCommand(oNPC, ActionEquipItem(oItem, nSlot));
DelayCommand(0.3, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
}
}
}
}