UW2_PRC8/_module/nss/tresurescript1.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

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);
}