- Joined
- Apr 3, 2004
- Messages
- 19
I've made an Ai ,in Jass Editor, for my campaign for ,Player 2 Blue - Blood elf, but it don't work what is wrong on it???
-------------------------------------
globals
player user = PlayerEx(3)
endglobals
function main takes nothing returns nothing
call CampaingAI(ELF_FARM,null)
call SetWoodPeons = 2
call SetGoldPeons = 3
call SetReplacements(0,2,3)
call SetBuildUnitEx(0,0,1, TOWN_HALL)
call SetBuildUnitEx(0,1,2, ELF_HIGH_BARRACKS)
call SetBuildUnitEx(0,3,6, HOUSE)
call SetBuildUnitEx(0,0,2, LUMBER_MILL)
call SetBuildUnitEx(0,0,1, HUMAN_ALTAR)
call SetBuildUnitEx(0,0,1, BLACKSMITH)
call SetBuildUnitEx(0,0,1, SANCTUM)
call SetBuildUnitEx(0,0,1, KEEP)
call SetBuildUnitEx(0,0,1, CASTLE)
call CampaignDefenderEx( 1,1,1, SPELL_BREAKER )
call CampaignDefenderEx( 1,1,2, HIGH_SWORDMAN )
call CampaignDefenderEx( 0,0,1, SORCERESS )
call CampaignDefenderEx( 1,1,1, PRIEST )
call CampaignDefenderEx( 1,1,2, HIGH_ARCHER )
call WaitForSignal()
//*** WAVE 1 ***
call InitAssaultGroup()
call CampaignAttackerEx( 3,3,5, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,3, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M4,M3,M3,user)
//*** WAVE 2 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,3,4, SPELL_BREAKER )
call CampaignAttackerEx( 2,2,3, HIGH_ARCHER )
call SuicideOnPlayerEx(M6,M4,M5,user)
//*** WAVE 3 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, HIGH_SWORDMAN )
call CampaignAttackerEx( 1,1,2, PRIEST )
call CampaignAttackerEx( 1,1,3, SPELL_BREAKER )
call SuicideOnPlayerEx(M5,M4,M5,user)
//*** WAVE 4 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,1,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M4,M4,M2,user)
//*** WAVE 5 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 2,2,4, SORCERESS )
call SuicideOnPlayerEx(M6,M5,M7,user)
//*** WAVE 6 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,4, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call SuicideOnPlayerEx(M6,M6,M7,user)
//*** WAVE 7 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,3,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,1,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call CampaignAttackerEx( 1,2,3, SORCERESS )
call SuicideOnPlayerEx(M7,M5,M6,user)
//*** WAVE 8 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,4, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call SuicideOnPlayerEx(M8,M8,M3,user)
//*** WAVE 9 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,3,4, SPELL_BREAKER )
call CampaignAttackerEx( 2,2,3, HIGH_SWORDMAN )
call CampaignAttackerEx( 0,1,2, HIGH_ARCHER )
call SuicideOnPlayerEx(M8,M7,M7,user)
//*** WAVE 10 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M4,M4,M6,user)
//*** WAVE 11 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,4, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call SuicideOnPlayerEx(M7,M7,M7,user)
//*** WAVE 12 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M8,M8,M3,user)
loop
//*** WAVE 13 ***
call InitAssaultGroup()
call CampaignAttackerEx( 1,2,4, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call CampaignAttackerEx( 1,1,2, SORCERESS )
call SuicideOnPlayerEx(M5,M4,M3,user)
//*** WAVE 14 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,4, HIGH_SWORDMAN )
call CampaignAttackerEx( 1,2,3, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, PRIEST )
call CampaignAttackerEx( 1,1,2, SORCERESS )
call SuicideOnPlayerEx(M6,M4,M4,user)
//*** WAVE 15 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call CampaignAttackerEx( 2,2,4, SORCERESS )
call SuicideOnPlayerEx(M8,M6,M6,user)
//*** WAVE 16 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,2,3, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call CampaignAttackerEx( 2,2,4, SORCERESS )
call SuicideOnPlayerEx(M8,M5,M4,user)
endloop
endfunction
--------------------------------------------
-------------------------------------
globals
player user = PlayerEx(3)
endglobals
function main takes nothing returns nothing
call CampaingAI(ELF_FARM,null)
call SetWoodPeons = 2
call SetGoldPeons = 3
call SetReplacements(0,2,3)
call SetBuildUnitEx(0,0,1, TOWN_HALL)
call SetBuildUnitEx(0,1,2, ELF_HIGH_BARRACKS)
call SetBuildUnitEx(0,3,6, HOUSE)
call SetBuildUnitEx(0,0,2, LUMBER_MILL)
call SetBuildUnitEx(0,0,1, HUMAN_ALTAR)
call SetBuildUnitEx(0,0,1, BLACKSMITH)
call SetBuildUnitEx(0,0,1, SANCTUM)
call SetBuildUnitEx(0,0,1, KEEP)
call SetBuildUnitEx(0,0,1, CASTLE)
call CampaignDefenderEx( 1,1,1, SPELL_BREAKER )
call CampaignDefenderEx( 1,1,2, HIGH_SWORDMAN )
call CampaignDefenderEx( 0,0,1, SORCERESS )
call CampaignDefenderEx( 1,1,1, PRIEST )
call CampaignDefenderEx( 1,1,2, HIGH_ARCHER )
call WaitForSignal()
//*** WAVE 1 ***
call InitAssaultGroup()
call CampaignAttackerEx( 3,3,5, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,3, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M4,M3,M3,user)
//*** WAVE 2 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,3,4, SPELL_BREAKER )
call CampaignAttackerEx( 2,2,3, HIGH_ARCHER )
call SuicideOnPlayerEx(M6,M4,M5,user)
//*** WAVE 3 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, HIGH_SWORDMAN )
call CampaignAttackerEx( 1,1,2, PRIEST )
call CampaignAttackerEx( 1,1,3, SPELL_BREAKER )
call SuicideOnPlayerEx(M5,M4,M5,user)
//*** WAVE 4 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,1,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M4,M4,M2,user)
//*** WAVE 5 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 2,2,4, SORCERESS )
call SuicideOnPlayerEx(M6,M5,M7,user)
//*** WAVE 6 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,4, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call SuicideOnPlayerEx(M6,M6,M7,user)
//*** WAVE 7 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,3,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,1,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call CampaignAttackerEx( 1,2,3, SORCERESS )
call SuicideOnPlayerEx(M7,M5,M6,user)
//*** WAVE 8 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,4, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call SuicideOnPlayerEx(M8,M8,M3,user)
//*** WAVE 9 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,3,4, SPELL_BREAKER )
call CampaignAttackerEx( 2,2,3, HIGH_SWORDMAN )
call CampaignAttackerEx( 0,1,2, HIGH_ARCHER )
call SuicideOnPlayerEx(M8,M7,M7,user)
//*** WAVE 10 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M4,M4,M6,user)
//*** WAVE 11 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,4, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call SuicideOnPlayerEx(M7,M7,M7,user)
//*** WAVE 12 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call SuicideOnPlayerEx(M8,M8,M3,user)
loop
//*** WAVE 13 ***
call InitAssaultGroup()
call CampaignAttackerEx( 1,2,4, HIGH_SWORDMAN )
call CampaignAttackerEx( 2,2,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,2, PRIEST )
call CampaignAttackerEx( 1,1,2, SORCERESS )
call SuicideOnPlayerEx(M5,M4,M3,user)
//*** WAVE 14 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,4, HIGH_SWORDMAN )
call CampaignAttackerEx( 1,2,3, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, PRIEST )
call CampaignAttackerEx( 1,1,2, SORCERESS )
call SuicideOnPlayerEx(M6,M4,M4,user)
//*** WAVE 15 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,0,2, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call CampaignAttackerEx( 2,2,4, SORCERESS )
call SuicideOnPlayerEx(M8,M6,M6,user)
//*** WAVE 16 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,6, SPELL_BREAKER )
call CampaignAttackerEx( 0,2,3, HIGH_ARCHER )
call CampaignAttackerEx( 1,1,1, BALLISTA )
call CampaignAttackerEx( 2,2,4, SORCERESS )
call SuicideOnPlayerEx(M8,M5,M4,user)
endloop
endfunction
--------------------------------------------