Spawner, Creature & Item work

Spawner work.  Creatures & placeables in Kobold cave now respawn.  Placeables in Forest of Hope: South now respawn.  Fixed up a few more items & creatures.
This commit is contained in:
Jaysyn904
2022-12-07 00:12:34 -05:00
parent 16a00a66f5
commit cc1ba32b9c
101 changed files with 9683 additions and 98621 deletions

View File

@@ -184,7 +184,7 @@ string SpawnGroup(object oSpawn, string sTemplate)
case 1:
sRetTemplate = "RA_BRIGAND001";
break;
case 2:
case 2:
sRetTemplate = "RA_BRIGAND001";
break;
case 3:
@@ -360,7 +360,7 @@ string SpawnGroup(object oSpawn, string sTemplate)
}
}
//
//:: Kobolds
if (sTemplate == "kobolds")
{
@@ -387,7 +387,7 @@ string SpawnGroup(object oSpawn, string sTemplate)
}
}
//:: Kobolds
// Giant Ants
if (sTemplate == "giantants")
{
@@ -458,6 +458,50 @@ string SpawnGroup(object oSpawn, string sTemplate)
}
//
//:: Vorlak & his Kobolds
if (sTemplate == "vorlaks_kobolds")
{
int nIsBossSpawned = GetLocalInt(oSpawn, "IsBossSpawned");
Debug("NESS: nIsBossSpawned :: oSpawn -> " + GetName(oSpawn));
Debug("NESS: nIsBossSPawned :: Value -> " + IntToString(nIsBossSpawned));
if (nIsBossSpawned == TRUE)
{
// Find the Boss
object oBoss = GetChildByTag(oSpawn, "OGRE_VORLAK");
Debug("NESS: oBoss -> " + (GetIsObjectValid(oBoss) ? GetName(oBoss) : "OBJECT_INVALID"));
// Check if Boss is Alive
if (oBoss != OBJECT_INVALID && GetIsDead(oBoss) == FALSE)
{
Debug("NESS: oBoss is valid and alive, assigning templatle 'ra_koboldwar001'");
// He's alive, spawn a Peon to keep him Company
sRetTemplate = "ra_koboldwar001";
}
else
{
Debug("NESS: oBoss is either invalid or dead, deactivating camp");
// He's dead, Deactivate Camp!
SetLocalInt(oSpawn, "SpawnDeactivated", TRUE);
}
}
else
{
Debug("NESS: Boss does not exist, assiging template 'OGRE_VORLAK'");
// No Boss, so Let's Spawn Him
sRetTemplate = "OGRE_VORLAK";
SetLocalInt(oSpawn, "IsBossSpawned", TRUE);
}
}
//:: Vorlak & his Kobolds
// Goblins and Boss
if (sTemplate == "gobsnboss")
{

View File

@@ -222,6 +222,29 @@ int SpawnCheckCustom(object oSpawn)
}
//:: Checks for stage 98 or lower (Drusilla's not dead) for the "Vengeful Druid quest" */
//:: Checks for non-completion of "The Outcasts" quest
if (nSpawnCheckCustom == 53)
{
//:: Initialize major variables
object oArea = GetArea(OBJECT_SELF);
object oPC = GetFirstObjectInArea(oArea);
//:: Cycle through PCs in Area
while (oPC != OBJECT_INVALID)
{
//:: Check quest stage
if ( RetrieveQuestState("outcasts", oPC) <= 3 )
{
nProcessSpawn = TRUE;
//SendMessageToPC(oPC, "Spawn Processed");
SetLocalInt(oSpawn, "SpawnProcessed", TRUE);
}
oPC = GetNextObjectInArea(oArea);
}
}
//:: Checks for non-completion of "The Outcasts" quest
// -------------------------------------------
// Only Make Modifications Between These Lines

View File

@@ -4,7 +4,7 @@
// void main (){}
#include "pqj_inc"
int ParseFlagValue(string sName, string sFlag, int nDigits, int nDefault);
int ParseSubFlagValue(string sName, string sFlag, int nDigits, string sSubFlag, int nSubDigits, int nDefault);
@@ -143,12 +143,26 @@ int SpawnCheckPCs(object oSpawn)
}
}
//
//:: Checks for non-completion of "The Outcasts" quest.
if (nCheckPCs == 5)
{
//:: Check Journal Quest Entry
int nQuest = RetrieveQuestState("outcasts", oPC);
if (nQuest <= 2)
{
//:: Quest Entry is less than 3, Spawn!
nProcessSpawn = TRUE;
}
}
//:: Checks for non-completion of "The Outcasts" quest.
//:: #52 - Spawn if Drusilla isn't dead
if (nCheckPCs == 52)
{
// Check Journal Quest Entry
int nQuest = GetLocalInt(oPC, "VengefulDruid");
int nQuest = RetrieveQuestState("VengefulDruid", oPC);
if (nQuest <= 89)
{
// Quest Entry is less to or equal to 89, Spawn!