Note that this script only includes the code to launch attacks, so you'll need to give the AI at least 7 military units and explore enemy buildings before the attack code will execute. I've included a demo scenario where you can watch the code in action.
If you are new to DUC, I suggest reading the script alongside my DUC guide (again, still in progress): https://airef.github.io/duc/articles/le ... intro.html
Whenever you come across a command that you don't recognize, I recommend looking up the command in the AI ref: https://airef.github.io/commands/commands-index.html. It's important to understand what each step is doing, because forgetting a step in your DUC code can mess up your AI's behavior if you aren't careful.
This demo doesn't cover everything that is possible with DUC, such as using control groups, but it should be a good start.
- Put the .ai and .per files in your AI folder.
- Put one of the scenario files in your Scenario folder. The .scx file is compatible with all game versions, while the .aoe2scenario file is DE-compatible