Try making the item cast spell activate item long range.
This is the script I used to test it. I left the references in to the item, the target, an oPC, though they are not used.
#include "x2_inc_switches"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
if (!nEvent == X2_ITEM_EVENT_ACTIVATE)
return;
object oItem = GetItemActivated();
object oPC = GetItemActivator();
object oTarget = GetItemActivatedTarget();
ExecuteScript("x2_s1_beantimag",GetItemActivator());
}
Btw i assume it works as it made some undead sparkle, which I guess means they are immune to the spell effects.
Modifié par ffbj, 18 septembre 2012 - 01:34 .