EN4_PRC8/_module/nss/en4_xspot.nss

23 lines
438 B
Plaintext
Raw Permalink Normal View History

#include "rd_misc"
void main()
{
int iX;
string sTag;
string sZone;
object oCreature;
object oSpot;
oCreature = GetEnteringObject();
if (!GetIsPC(oCreature))
{
sZone = GetZone(oCreature);
iX = GetXSpot(sZone);
sTag = sZone + "_X_" + IntToString(iX);
oSpot = GetObjectByTag(sTag);
if (GetIsObjectValid(oSpot))
DelayCommand(0.5f,AssignCommand(oCreature,ActionJumpToLocation(GetLocation(oSpot))));
}
}