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, "hordebanner010", loc, TRUE);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "unholylight", loc, TRUE);
|
|
DestroyObject(GetNearestObjectByTag("MagicSparksWhite"));
|
|
|
|
SoundObjectStop(GetObjectByTag("MagicCrystalGood10"));
|
|
SoundObjectPlay(GetObjectByTag("MagicPortalEvil10"));
|
|
|
|
// Respawn Outpost dependent creatures if not already alive
|
|
object oPrimaryNPC = GetObjectByTag("Henrick");
|
|
if(!(GetLocalInt(oPrimaryNPC, "nWarlordDead") == 1))
|
|
{
|
|
|
|
loc = GetLocation(GetObjectByTag("spawnwight10"));
|
|
|
|
object oCreature = GetObjectByTag("ms_spawnwight10");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "wightscout010", loc, TRUE);
|
|
}
|
|
|
|
oCreature = GetObjectByTag("ms_spawnghastscout10");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "ghastscout010", 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("spawndevourer10"));
|
|
oCreature = GetObjectByTag("ms_spawndevourer10");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "skeldevour010", loc, TRUE);
|
|
}
|
|
}
|
|
|
|
else if(nCreatureFactor > 20)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwarmum10"));
|
|
oCreature = GetObjectByTag("ms_spawnwarmum10");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "warmum010", loc, TRUE);
|
|
}
|
|
}
|
|
else if(nCreatureFactor > 15)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwarr10"));
|
|
oCreature = GetObjectByTag("ms_spawnwarr10");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "skelwarr010", loc, TRUE);
|
|
}
|
|
}
|
|
else if(nCreatureFactor > 10)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnspectre10"));
|
|
oCreature = GetObjectByTag("ms_spawnspectre10");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "spectre010", loc, TRUE);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwraith10"));
|
|
oCreature = GetObjectByTag("ms_spawnwraith10");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "wraith010", loc, TRUE);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|