I was hoping to get some help with an on hit script. Basically what I’m trying to add to this script is when an NPC is hit it sends a message to the PC that’s says so-so has been diseased.
Any help with this would be appreciated.
#include "x2_inc_switches"
void main(){ int nEvent =GetUserDefinedItemEventNumber();
if (nEvent ==X2_ITEM_EVENT_ONHITCAST) { object oTarget = GetSpellTargetObject();
effect eEffect;
eEffect = EffectSlow();
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
effect aEffect;
aEffect = EffectAttackDecrease(2);
eEffect = SupernaturalEffect(aEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, aEffect, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(259), oTarget, 60.0f);
}}