AI's using triggers/jass is far more complex than making a system or spell coz you need to manipulate AI's movement, attack, building, retreat, etc...
If it's a melee game then I strongly recommend using the WE ai editor, if for example like rpg, then triggers can do it...
There are AI systems here like the ZTS threat system and see my signature...