33 lines
668 B
Plaintext
33 lines
668 B
Plaintext
|
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));
|
||
|
|
||
|
}
|
||
|
|