Code: Select all
// the arrows this script is attached to will kill Monster X instantly.
// otherwise they are more or less useless.
#include "x2_inc_switches"
void main()
{
int nEvent = GetUserDefinedItemEventNumber();
if (nEvent == X2_ITEM_EVENT_ONHITCAST)
{
object oTarget = GetItemActivatedTarget();
if (GetTag(oTarget)=="TagOfMonsterX")
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(0,TRUE),oTarget);
}
}