178 lines
6.2 KiB
Plaintext
178 lines
6.2 KiB
Plaintext
location lTarget;
|
|
object oSpawn;
|
|
object oTarget;
|
|
//Put this script OnDeath
|
|
#include "nw_i0_generic"
|
|
void main()
|
|
{
|
|
object oPC = GetLastKiller();
|
|
|
|
while (GetIsObjectValid(GetMaster(oPC)))
|
|
{
|
|
oPC=GetMaster(oPC);
|
|
}
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
//Start variable checks for spawns
|
|
if (GetLocalInt(OBJECT_SELF, "DRAGON1")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DRAGON_SPAWN_01");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "anc_red_dragon", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DRAGON2")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DRAGON_SPAWN_02");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "anc_red_dragon", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DRAGON3")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DRAGON_SPAWN_03");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "anc_red_dragon", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DRAGON4")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DRAGON_SPAWN_04");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "anc_red_dragon", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "TANARRI1")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_TANARRI_SPAWN_01");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "tanar_ri", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "TANARRI2")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_TANARRI_SPAWN_02");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "tanar_ri", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "TANARRI3")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_TANARRI_SPAWN_03");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "tanar_ri", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "TANARRI4")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_TANARRI_SPAWN_04");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "tanar_ri", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "BLADE1")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_BLADE_SPAWN_01");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "dancing_blade", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "BLADE2")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_BLADE_SPAWN_02");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "dancing_blade", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "BLADE3")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_BLADE_SPAWN_03");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "dancing_blade", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "BLADE4")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_BLADE_SPAWN_04");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "dancing_blade", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DOOMMAGE1")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DOOMMAGE_SPAWN_01");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "doom_mage", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DOOMMAGE2")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DOOMMAGE_SPAWN_02");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "doom_mage", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DOOMMAGE3")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DOOMMAGE_SPAWN_03");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "doom_mage", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DOOMMAGE4")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DOOMMAGE_SPAWN_04");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "doom_mage", lTarget);
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
}
|
|
}
|