95 lines
2.9 KiB
Plaintext
95 lines
2.9 KiB
Plaintext
// A series of scripts "pcbanner6-10" which is fired on the death of a Helm Banner
|
|
void main()
|
|
{
|
|
// Respawn Horde Banner
|
|
location loc = GetLocation(OBJECT_SELF);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "hordebanner007", loc, TRUE);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "unholylight", loc, TRUE);
|
|
DestroyObject(GetNearestObjectByTag("MagicSparksWhite"));
|
|
|
|
SoundObjectStop(GetObjectByTag("MagicCrystalGood7"));
|
|
SoundObjectPlay(GetObjectByTag("MagicPortalEvil7"));
|
|
|
|
// Respawn Outpost dependent creatures if not already alive
|
|
object oPrimaryNPC = GetObjectByTag("Henrick");
|
|
if(!(GetLocalInt(oPrimaryNPC, "nWarlordDead") == 1))
|
|
{
|
|
|
|
loc = GetLocation(GetObjectByTag("spawnwight7"));
|
|
|
|
object oCreature = GetObjectByTag("ms_spawnwight7");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "wightscout007", loc, TRUE);
|
|
}
|
|
|
|
oCreature = GetObjectByTag("ms_spawnghastscout7");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "ghastscout007", loc, TRUE);
|
|
}
|
|
|
|
// Calculate average PC level
|
|
int nChallenge = GetFactionAverageLevel(GetFirstPC());
|
|
|
|
int nCreatureFactor;
|
|
int nIdx;
|
|
|
|
|
|
// Spawn in 3 creatures
|
|
for (nIdx = 1; nIdx <= 2; nIdx++)
|
|
{
|
|
nCreatureFactor = (d20()+ nChallenge);
|
|
|
|
if(nCreatureFactor > 25)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawndevourer7"));
|
|
oCreature = GetObjectByTag("ms_spawndevourer7");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "skeldevour007", loc, TRUE);
|
|
}
|
|
}
|
|
|
|
else if(nCreatureFactor > 20)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwarmum7"));
|
|
oCreature = GetObjectByTag("ms_spawnwarmum7");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "warmum007", loc, TRUE);
|
|
}
|
|
}
|
|
else if(nCreatureFactor > 15)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwarr7"));
|
|
oCreature = GetObjectByTag("ms_spawnwarr7");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "skelwarr007", loc, TRUE);
|
|
}
|
|
}
|
|
else if(nCreatureFactor > 10)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnspectre7"));
|
|
oCreature = GetObjectByTag("ms_spawnspectre7");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "spectre007", loc, TRUE);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwraith7"));
|
|
oCreature = GetObjectByTag("ms_spawnwraith7");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "wraith007", loc, TRUE);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|