Changed folder name.
Changed folder name.
This commit is contained in:
76
_module/nss/spawnemporium.nss
Normal file
76
_module/nss/spawnemporium.nss
Normal file
@@ -0,0 +1,76 @@
|
||||
//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_magicitemmerch_01");
|
||||
|
||||
if (!GetIsObjectValid(GetNearestObjectByTag("magicitemmerch", oObject)))
|
||||
{
|
||||
oTarget = GetWaypointByTag("WP_magicitemmerch_01");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "magicitemmerch", lTarget);
|
||||
|
||||
}
|
||||
oObject = GetWaypointByTag("WP_weaponmerchant_01");
|
||||
if (!GetIsObjectValid(GetNearestObjectByTag("weaponmerchant", oObject)))
|
||||
{
|
||||
oTarget = GetWaypointByTag("WP_weaponmerchant_01");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "weaponmerchant", lTarget);
|
||||
|
||||
}
|
||||
oObject = GetWaypointByTag("WP_npcarmorer_01");
|
||||
if (!GetIsObjectValid(GetNearestObjectByTag("npcarmorer", oObject)))
|
||||
{
|
||||
oTarget = GetWaypointByTag("WP_npcarmorer_01");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "npcarmorer", lTarget);
|
||||
|
||||
}
|
||||
oObject = GetWaypointByTag("WP_bowermerchant_01");
|
||||
if (!GetIsObjectValid(GetNearestObjectByTag("bowermerchant", oObject)))
|
||||
{
|
||||
oTarget = GetWaypointByTag("WP_bowermerchant_01");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "bowermerchant", lTarget);
|
||||
|
||||
}
|
||||
|
||||
|
||||
oTarget = GetObjectByTag("magicitemmerch");
|
||||
|
||||
DelayCommand(901.0, DestroyObject(oTarget, 0.0));
|
||||
|
||||
oTarget = GetObjectByTag("weaponmerchant");
|
||||
|
||||
DelayCommand(902.0, DestroyObject(oTarget, 0.0));
|
||||
|
||||
oTarget = GetObjectByTag("npcarmorer");
|
||||
|
||||
DelayCommand(903.0, DestroyObject(oTarget, 0.0));
|
||||
|
||||
oTarget = GetObjectByTag("bowermerchant");
|
||||
|
||||
DelayCommand(904.0, DestroyObject(oTarget, 0.0));
|
||||
|
||||
}
|
Reference in New Issue
Block a user