If I use the olfact command, and have set my auto-combat to a custom combat script, Mafia doesn't olfact the appropriate monster when it comes up; it'll olfact properly if auto-combat is set to attack with weapon, however.
Do you have a "special action" line in your CCS? Like this:
Code:
[ default ]
1: special action
2: skill shieldbutt
If you have "One time automatic olfaction..." set in Special, the CCS will olfact, it won't if not. See here for a better description of special actions in a CCS, or here for a more technical one on automatic olfaction.