Creating custom badge with custom rules

May it help?