Conquest mode - script

The rules: the script is designed for 3v3 fight maps. In the space between two teams there are buildings, which each player is supposed to capture. You capture a building by standing in its entrance. For each building, players get weapons to their barracks, each X seconds (see below). Each player has 3 schools, that (after you make 1 recruit) are continuing with the recruits production on their own (I scripted infinite gold; also, on each unit created, the script adds 1 recruit to the school queue). Obviously, your goal is to take enemy buildings, and destroy their barracks.
I'm not releasing the script yet officially, but if you hang around TS you'll be able to play the testing version with us. The test is based off Cursed Ravine's magnificent fighting field (my personal favourite), but that's only because our competition map is work in progress.
edit: I'm putting the link here to the most current version as of 2 August 2013: http://ubuntuone.com/330jseuUwcxJP4EHaUFINW
- Code:
Each side of the map has: 5 cutters - militia 4 weapon workshops - axemen 3 l. armories - bowmen 2 tanneries - lancemen 1 iron smelter - pikes 1 iron weaponry - swordmen 1 iron armory - xbows 1 stable - knights For 1 building, you get: 1 militia each 20 seconds 1 leather unit each 30 seconds 1 iron unit each 40 seconds 1 knight each 50 seconds