I wrote about the template on the first page of the topic... read, people, read, and read again :)
For Preds, as a true man - I'll specially post his template:
http://heroes-iii.com/templ/cube.txt
And this was a test :p. I answered the question about the template quickly, but not this:
I don't know how you tested it, here's an archive with the map, a save before the battle, and a save during the blue player's turn after the battle, in which Jabarkas bribed Aiden when he summoned the "poop" and killed a fly on a bear - Aiden is sitting empty in the tavern. The save and map are the most "Shades of Darkness" possible.
...