Demons and Devils become HOSTILE to anyone not of their own race (Demon or Devil) or protected from evil / Circle against evil.
If the Demon / Devil is already hostile towards someone protected from evil in any form they will become neutral to the creature for the duration of the spell.
The script is attached to the OnPerception Event and triggers only for an outsider (If the seeing object is an Outsider himself) There is then a check to see if he is a Demon / Devil and how he should react to whichever creature he sees.
For Developers: This works using personal reputation so make sure you switch that "on" in your campaign. Normal modules have this switched off!
Playtesting works if you load it in a Campaign! (test campaign included)
//----Updated 29/08/2011
Fixed the script to loop properly
and update the status of the creature.
Will now check if prot vs evil has expired and react accordingly. (or if a creature has just cast the spell then become neutral etc..)
The loop will continue while a player is nearby and is triggered by a perception event.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone