UW2_PRC8/_module/nss/guileteleportspc.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

30 lines
776 B
Plaintext

//Created by Guile 01/01/07 (New Years Day :)
//Put this in a conversation "action" to have the npc teleport the pc from conv.
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = oPC;
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
location lTarget;
oTarget = GetWaypointByTag("magicshopexitway1");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
DelayCommand(2.0, AssignCommand(oPC, ClearAllActions()));
DelayCommand(2.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
}