WoR_PRC8/_module/nss/gw_portout.nss

33 lines
668 B
Plaintext
Raw Permalink Normal View History

2025-04-03 11:49:34 -04:00
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("WP_sha_tempwp");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
DelayCommand(2.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
oTarget = oPC;
oTarget = GetObjectByTag("WP_sha_Gateway");
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HARM), GetLocation(oTarget));
}