You will probably need to script the AI for your heroes.
Break it apart into a tactical component and a strategic component. The tactical component is responsible for casting abilities and other "micro" operations. The strategic part is responsible for deciding where/when to move units, what items to get and other "macro" operations.
Both can be implemented in the form of periodic triggers. Tactical polls area around the hero for possible ability targets. Strategic polls state of finances, item, enemy toughness approximations etc and decides where to move based on them.