my humble attempt (and example):
Code:
monitor_event GeneralCaptureSettlement CharacterReligion catholic
and FactionIsLocal
; and TargetFactionReligion catholic ;not sure if this works to check the enemy religion
historic_event tolerancia_egypt_sim factions { egypt, }
set_faction_standing england france -0.1 ;or other value up to 1.0 the higher the lower relations
console_command diplomatic_stance england france, war ;england declares war on france
; console_command diplomatic_stance france england, war ; makes sure france declares war back to england
terminate_monitor
end_monitor