Now that the "trigger" opcode/data to make NPCs cast has been found, a basic but probably fairly effective spellcaster AI would be, once a NPC of a caster class has "aggroed" and targeted a player, to make it randomly cast spells from the list available to its class (is there an easy way of randomly choosing a spell?), targeted at itself if a buff/heal and at the player if a damage/debuff spell.
Maybe some sort of script with a list of damage, buff, debuff and heal spells would help in getting the NPC to choose the right spells.
|