30 lines
776 B
Plaintext
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)));
|
|
|
|
}
|