Lankhmar_PRC8/_module/nss/ent_tport_sg_tp2.nss
Jaysyn904 ebc0c6a9b2 Initial commit
Initial commit [v9.7]
2025-04-03 12:54:47 -04:00

71 lines
1.6 KiB
Plaintext

/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("WP_TP_sgd");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "shanoner", lTarget);
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "kesa34", lTarget);
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lamin", lTarget);
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
oTarget=GetFirstFactionMember(oPC, FALSE);
while (GetIsObjectValid(oTarget))
{
AssignCommand(oTarget, ClearAllActions());
AssignCommand(oTarget, ActionJumpToLocation(lTarget));
oTarget=GetNextFactionMember(oPC, FALSE);
}
oTarget = GetObjectByTag("Kesa34c");
DestroyObject(oTarget, 0.0);
oTarget = GetObjectByTag("Lamin2");
DestroyObject(oTarget, 0.0);
oTarget = GetObjectByTag("Shanoner2");
DestroyObject(oTarget, 0.0);
}