79 lines
1.8 KiB
Plaintext
79 lines
1.8 KiB
Plaintext
//Created by Guile 3/12/07
|
|
//Multiple NPC spawn trigger script, this one checks each creature.
|
|
|
|
location lTarget;
|
|
object oSpawn;
|
|
object oTarget;
|
|
object oObject;
|
|
|
|
|
|
//Put this script OnEnter
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetEnteringObject();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
oObject = GetWaypointByTag("WP_omegasmith03_01");
|
|
|
|
if (!GetIsObjectValid(GetNearestObjectByTag("omegasmith03", oObject)))
|
|
{
|
|
oTarget = GetWaypointByTag("WP_omegasmith03_01");
|
|
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "omegasmith03", lTarget);
|
|
|
|
}
|
|
oObject = GetWaypointByTag("WP_omegasmith4_01");
|
|
if (!GetIsObjectValid(GetNearestObjectByTag("omegasmith4", oObject)))
|
|
{
|
|
oTarget = GetWaypointByTag("WP_omegasmith4_01");
|
|
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "ilridentifier", lTarget);
|
|
|
|
}
|
|
oObject = GetWaypointByTag("WP_omegasmith02_01");
|
|
if (!GetIsObjectValid(GetNearestObjectByTag("omegasmith02", oObject)))
|
|
{
|
|
oTarget = GetWaypointByTag("WP_omegasmith02_01");
|
|
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "omegasmith02", lTarget);
|
|
|
|
}
|
|
oObject = GetWaypointByTag("WP_omegasmith01_01");
|
|
if (!GetIsObjectValid(GetNearestObjectByTag("omegasmith01", oObject)))
|
|
{
|
|
oTarget = GetWaypointByTag("WP_omegasmith01_01");
|
|
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "omegasmith01", lTarget);
|
|
|
|
}
|
|
|
|
|
|
oTarget = GetObjectByTag("omegasmith03");
|
|
|
|
DelayCommand(1200.0, DestroyObject(oTarget, 0.0));
|
|
|
|
oTarget = GetObjectByTag("omegasmith4");
|
|
|
|
DelayCommand(1201.0, DestroyObject(oTarget, 0.0));
|
|
|
|
oTarget = GetObjectByTag("omegasmith02");
|
|
|
|
DelayCommand(1202.0, DestroyObject(oTarget, 0.0));
|
|
|
|
oTarget = GetObjectByTag("omegasmith01");
|
|
|
|
DelayCommand(1203.0, DestroyObject(oTarget, 0.0));
|
|
|
|
|
|
}
|