Since I don't know from where the script is called but you mention a targeted player, it would be:
#include "x2_inc_switches"
void main()
{
if(GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
object oPC = GetItemActivatedTarget();
if(!GetIsPC(oPC)) return;
object oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem))
{
if(FindSubString(GetName(oItem), "Vere Umbra") > -1) DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
}
Then you would give this script the same name as the activated item's tag, to use the tag-based system. Don't forget that your item must have the property Cast Spell: Unique Power on it, so that you can "use" it on your targets.
Kato
Modifié par Kato_Yang, 22 juin 2011 - 07:24 .