• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[AI] Custom AI making , read plz

Status
Not open for further replies.
Level 2
Joined
May 27, 2005
Messages
9
Bellow is an AI used bu the game programers , it is actualy very simple , this one is the one used in the second human mission of the Reign if Chaos campaing , i got it using Qmpq , it is easier to get the AI scripts made by the programers then to make yourself , this tipe of AI is only good for campaings , for mele use the AI editor .and one thing u will need trigers that will give the AI gold and lumber for it to work

//============================================================================
// Human 02 -- red player -- AI Script
//============================================================================
globals
player user = Player(1)
endglobals

//============================================================================
// main
//============================================================================
function main takes nothing returns nothing

call CampaignAI(PIG_FARM,null)
call SetReplacements(0,1,3)

call CampaignDefenderEx( 1,1,1, HEAD_HUNTER )
call CampaignDefenderEx( 1,1,2, GRUNT )
call CampaignDefenderEx( 0,0,1, RAIDER )


//*** WAVE 1 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,2, GRUNT )
call CampaignAttackerEx( 1,1,2, HEAD_HUNTER )
call SuicideOnPlayer(M2,user)

//*** WAVE 2 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,2, GRUNT )
call CampaignAttackerEx( 2,2,3, HEAD_HUNTER )
call SuicideOnPlayer(M2,user)

//*** WAVE 3 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,4, GRUNT )
call CampaignAttackerEx( 0,0,2, RAIDER )
call CampaignAttackerEx( 1,1,1, HEAD_HUNTER )
call SuicideOnPlayer(M3,user)

//*** WAVE 4 ***
call InitAssaultGroup()
call CampaignAttackerEx( 3,3,3, GRUNT )
call CampaignAttackerEx( 1,1,3, HEAD_HUNTER )
call SuicideOnPlayer(M2,user)

loop
//*** WAVE 5 ***
call InitAssaultGroup()
call CampaignAttackerEx( 1,1,3, GRUNT )
call CampaignAttackerEx( 0,0,2, RAIDER )
call CampaignAttackerEx( 4,4,4, HEAD_HUNTER )
call SuicideOnPlayer(M3,user)

//*** WAVE 6 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,5, GRUNT )
call CampaignAttackerEx( 1,1,2, HEAD_HUNTER )
call SuicideOnPlayer(M3,user)

//*** WAVE 7 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,3, GRUNT )
call CampaignAttackerEx( 0,0,2, RAIDER )
call CampaignAttackerEx( 3,3,4, HEAD_HUNTER )
call SuicideOnPlayer(M4,user)
endloop
endfunction
 
Status
Not open for further replies.
Top