Okej. Just to start with. Credits goes to Ascent Wiki for all information that has helped me to learn this.
But have you ever wanted to make a NPC (trash mob) cast different spells? And you can't make lua scripts. There is an easy way to do this with your database. And the table we are going to work with is called Ai_Agents
It's real easy, and I'm are going to show you how to make a mob cast frost nova with a cooldown.
First you need a NPC, I wont tell you how to make one as I suppose you already know that - Else there are alot of guides on how to make NPCs.
When you open up your table Ai_Agents it will look like this, atleast have these colums.
I'm now going to explain each and one of them, and tell you what I'm going to add when I'm doing my frostnova.
Entry: There isn't so much to say about this. This is the ID number of your NPC that you are going to use - Mine here are 1992043
Type: This is what kind of type your attack are.
And Frost Nova, thats a spell. Spell is what you most will use. Atleast what I use in everyone of mine. So for my NPC I will put 4 here.Code:1 = MELEE 2 = RANGED 3 = FLEE 4 = SPELL 5 = CALLFORHELP
Event: This colum is the most compicated one. This explain when you NPC will do the spell you will give him.
Here is a list of all events.
My NPC will make frostnova when he takes damage on himself. Therefor I'm going to put a 2 here.Code:0 = ENTERCOMBAT 1 = LEAVECOMBAT 2 = DAMAGETAKEN 3 = TARGETCASTSPELL 4 = TARGETPARRYED 5 = TARGETDODGED 6 = TARGETBLOCKED 7 = TARGETCRITHIT 8 = TARGETDIED 9 = TARGETDIED 10 = UNITPARRYED 11 = UNITDODGED 12 = UNITBLOCKED 13 = UNITCRITHIT 14 = UNITDIED 15 = ASSISTTARGETDIED 16 = FOLLOWOWNER
If you want him to cast a spell when he enters combat, just put 0 here. Most of the events are self explaining.
Chance: This is how much many times he will do it. This is in percent. So if you want him to cast the spell for 100%, you put 100 in this colum.
But if you are gonna use a cooldown to the spell later, you must think double on this. If you want to have 100% chance to cast a spell, that has a cooldown. You will need to put 200 here. If you want him to have 50% chance to cast the spell with a cooldown. You need to put 150 here. Understand?
1-100 -> Percent chance WITHOUT cooldown
101 - 200 -> Percent chance WITH cooldown. (101 = 1 and 200 = 100)
I want my mob to have a cooldown, but only 50% to cast my spell. Therefor I put 150 here.
Maxcount: This colum decide how many of this spell the mob will cast in a fight. If you don't have any max number, just put 0 here. But you maybe got one powerful spell that you only want to be casted 3 times? But 3 here then. I'm gonna use 0 here for the frostnova.
Spell: Self explaning, put your spell ID here, can be found on wowhead.com or any other WoW database sites.
Spelltype: This colum descripes what kind of spell this is. Here is a list of what spell types it can be, the most is selfexplained. Just look on the spell you are using, is it a damage spell? Or a buff? Maybe a stun or root?
The most common spelltype to use is 8 (damage). But for me that is going to use frostnova, and that is a root spell, I will use 1 here.Code:1 = ROOT 2 = HEAL 3 = STUN 4 = FEAR 5 = SILENCE 6 = CURSE 7 = AOEDAMAGE 8 = DAMAGE 9 = SUMMON 10 = BUFF 11 = DEBUFF
Targettype: This decide on what target your NPC he will cast it on. I give you first a list and then explain some.
Null target -> I suppose this cast on the target he got marked for the moment (main tank usual)Code:0 = Null 1 = Random Target 2 = Target Location 3 = Creature Location 4 = Self 5 = Owner - (Pets / Slave cast on their Owner)
Random target -> He just picks a random target. Threat doesn't matter at all
Target Location -> The location of the marked target. Like if you are gonna use Rain of Fire.
Creature Location -> Most used for AoE spells. The middle of the radio is where the NPC stands
Self -> Cast the spell on himself.
Owner -> Not realy a clue, but this seems to be used for pets =(
And for my frost nova, I'm going to use creature location -> number 3.
Cooldown: Now we comes to the part that is connected to the chance colum. This can only be used if you got it between 101 and 200.
It's a simple cooldown in miliseconds.
1 sec -> 1000 ms
10 sec -> 10000 ms
Simple, seconds * 1000
The last to colums is normaly just to put 1 in. Worked for me, and even not Ascent Wiki explains what its for You maybe know?
When it's done, for me atleast. It should look like this.
This is tested ingame and it works without any problem!
-------------------------------------------------------------------------------------------------
Credits:
Ascent Wiki - Ai agents - Ascent Wiki
Myself - That wrote this guide and trying to learn out to all people on mmowned.
A program to make SQL codes is created by myself now!
Thread about it
http://www.mmowned.com/forums/progra...tml#post856020