If you don't want 2da modification you can always hijack a working example and put in your own custom behavior if a certain variable is set (remembering to unset it within the custom behavior).
For example this script would hijack into "x2_s1_shadow" using the shadow attack ability that is already set up to cause an AoO.
void main()
{
object oTarget = GetSpellTargetObject();
if(!GetIsObjectValid(oTarget))
{
SendMessageToPC(OBJECT_SELF, "INVALID TARGET");
return;
}
SetLocalInt(OBJECT_SELF, "INSERT_CUSTOM_ABILITY_NAME", TRUE);
ActionCastSpellAtObject(769 , oTarget, METAMAGIC_ANY, TRUE);
}
EDIT: I set this up under a normal spell script, if you use tag based scripting and are refering to a tag based script use the ActivateItem event commands to get the caster and target.
Modifié par WhiZard, 17 février 2012 - 04:56 .