28 lines
658 B
Plaintext
28 lines
658 B
Plaintext
//Created by Guile 01/09/07
|
|
//Put this script OnClose
|
|
#include "nw_i0_tool"
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetLastClosedBy();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
object oTarget;
|
|
oTarget = OBJECT_SELF;
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//the VFX will be applied to the WP's location instead
|
|
|
|
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));
|
|
|
|
DestroyObject(oTarget, 3.0);
|
|
|
|
RewardPartyGP(3000, oPC, FALSE);
|
|
|
|
}
|