Back then at that time I figured that the Caravan Ox only reduced it's own personal reputation relation with me. And that it would only be a temporary effect as personal animosity I thought to be usually. I continued the escort to successfully bring it to the town gates without a single strain of hair on it harmed. There I spot the that the city guard is now enemies.Darkness onEnter script uses the GetIsFriend(caster) check to determine if the spell effect event should be considered hostile or not. Take note that GetIsFriend returns FALSE when OBJECT_SELF considers the caster an enemy OR is simply neutral. I suppose the caravan ox had a neutral relation to me.
What the AI that receives a spell effect event flagged as hostile, does is speak the silent "NW_ATTACK_MY_TARGET" with the caster as target. And all NPCs that hears that (including itself) will do this following as response:Code: Select all
if(GetIsFriend(oTarget)) { SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DARKNESS, FALSE)); } if(!GetIsFriend(oTarget)) { SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DARKNESS)); }
Code: Select all
AdjustReputation(oIntruder, OBJECT_SELF, -100); if(GetIsFriend(oShouter)) { SetIsTemporaryEnemy(oIntruder); ClearActions(CLEAR_NW_I0_GENERIC_834); DetermineCombatRound(oIntruder); }
I can't now approach any towns because a single ox walked harmlessly though a darkness sphere at it's own volition. Until a server reset or whatnot. (relogging did not help)