WoR_PRC8/_module/nss/taerkey.nss

36 lines
751 B
Plaintext
Raw Permalink Normal View History

2025-04-03 11:49:34 -04:00
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));
}