36 lines
751 B
Plaintext
36 lines
751 B
Plaintext
|
void main()
|
||
|
{
|
||
|
object oPC;
|
||
|
|
||
|
if (GetIsInCombat(GetItemActivator())
|
||
|
){
|
||
|
|
||
|
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||
|
return;}
|
||
|
|
||
|
oPC = GetItemActivator();
|
||
|
|
||
|
object oTarget;
|
||
|
location lTarget;
|
||
|
oTarget = GetWaypointByTag("TaerCityPortal");
|
||
|
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
|
||
|
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
|
||
|
DelayCommand(2.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||
|
|
||
|
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));
|
||
|
|
||
|
}
|
||
|
|