Thx a lot, everything worked. I tried it with small_chapel just for test, now I rewrote it for chapel to continue the game.
It looked like this:
Code:
Trigger Crown_scotland_Fit
 WhenToTest CharacterTurnEndInSettlement
 
 Condition FactionIsLocal
    and FactionType scotland
    and IsFactionLeader
    and SettlementName Edinburgh
    and SettlementBuildingExists >= cathedral
    and not IsUnderSiege
    and GovernorLoyaltyLevel > loyalty_disillusioned
    and Treasury > 20000
    and Trait Crownholder > 1
    and Trait Crownholder < 4
 
 Affects Fit_Crown_scotland 1 Chance 100