Made sure Halloween skeletons are equipping their weapon

Made sure Halloween skeletons are equipping their weapon.  Cleaned extra script calls in NPC AI.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-10-28 16:42:06 -04:00
parent d9e8a25bbf
commit c929e2ff75
40 changed files with 455 additions and 539 deletions

View File

@@ -30,12 +30,8 @@ void main()
object oSkelly;
object oPC = GetFirstObjectInArea(oArea);
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
//ExecuteScript("prc_npc_spawn", OBJECT_SELF); -NOT NEEDED
//: Don't spawn skeletons from skeletons or commoners
if (GetResRef(OBJECT_SELF) == "pa_skeleton" || nCommoner > 0)
return;
//:: Get average PC level for area
//:: Cycle through PCs in Area
@@ -77,9 +73,9 @@ void main()
//:: Spawn Skeleton.
eVFX = EffectVisualEffect(VFX_IMP_EVIL_HELP);
oSkelly = CreateObject(OBJECT_TYPE_CREATURE, "nw_skeleton", GetLocation(OBJECT_SELF));
LevelMob(oSkelly, nAveragePCLevel);
DelayCommand(0.1f, ActionDoLevelUp(oSkelly, nAveragePCLevel));
//:: Assign Weapon
//:: Assign Weapon
int nResult = d6(1);
int nStackSize = 1; // Create 1 items;
string sItem;
@@ -113,7 +109,7 @@ void main()
//:: Apply VFX & Attack
AssignCommand(oSkelly, DetermineCombatRound(OBJECT_SELF));
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly);
}
}
@@ -124,8 +120,8 @@ void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot)
{
if (GetItemInSlot(nSlot) != oItem)
{
ClearAllActions();
ActionEquipItem(oItem, nSlot);
DelayCommand(1.0, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
//ClearAllActions();
AssignCommand(oNPC, ActionEquipItem(oItem, nSlot));
DelayCommand(0.3, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
}
}