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, "hordebanner006", loc, TRUE);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "unholylight", loc, TRUE);
|
|
DestroyObject(GetNearestObjectByTag("MagicSparksWhite"));
|
|
|
|
SoundObjectStop(GetObjectByTag("MagicCrystalGood6"));
|
|
SoundObjectPlay(GetObjectByTag("MagicPortalEvil6"));
|
|
|
|
// Respawn Outpost dependent creatures if not already alive
|
|
object oPrimaryNPC = GetObjectByTag("Henrick");
|
|
if(!(GetLocalInt(oPrimaryNPC, "nWarlordDead") == 1))
|
|
{
|
|
|
|
loc = GetLocation(GetObjectByTag("spawnwight6"));
|
|
|
|
object oCreature = GetObjectByTag("ms_spawnwight6");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "wightscout006", loc, TRUE);
|
|
}
|
|
|
|
oCreature = GetObjectByTag("ms_spawnghastscout6");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "ghastscout006", 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("spawndevourer6"));
|
|
oCreature = GetObjectByTag("ms_spawndevourer6");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "skeldevour006", loc, TRUE);
|
|
}
|
|
}
|
|
|
|
else if(nCreatureFactor > 20)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwarmum6"));
|
|
oCreature = GetObjectByTag("ms_spawnwarmum6");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "warmum006", loc, TRUE);
|
|
}
|
|
}
|
|
else if(nCreatureFactor > 15)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwarr6"));
|
|
oCreature = GetObjectByTag("ms_spawnwarr6");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "skelwarr006", loc, TRUE);
|
|
}
|
|
}
|
|
else if(nCreatureFactor > 10)
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnspectre6"));
|
|
oCreature = GetObjectByTag("ms_spawnspectre6");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "spectre006", loc, TRUE);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
loc = GetLocation(GetObjectByTag("spawnwraith6"));
|
|
oCreature = GetObjectByTag("ms_spawnwraith6");
|
|
if(!(GetCurrentHitPoints(oCreature) > 0))
|
|
{
|
|
CreateObject(OBJECT_TYPE_CREATURE, "wraith006", loc, TRUE);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|