Dude, the ai editor is useful for only custom melee races, otherwise, its pretty useless compared to the simple "Order unit to attack move to -BLANK-"
You could then use triggers to order the unit to buy items, then thats all u need, like if your hero has 500 gold, you could do a dice roll to determine which weapon to buy, and use a variable to check wether what type of hero it is to determine what to buy(like a "hammer of might" for a paladin)