Set up spell lists,
from npc_spells.sql
Quote:
Insert into npc_spells (id, name, parent_list, attack_proc)
values (1, "Defaul Cleric List", 0, -1);
-- Type 1 spells - Nukes
-- Strike
Insert into npc_spells_entries (npc_spells_id, spellid, type, minlevel, maxlevel, manacost, recast_delay, priority)
values (1, 14, 1, 1, 13, -1, -1, 0);
-- Furor
Insert into npc_spells_entries (npc_spells_id, spellid, type, minlevel, maxlevel, manacost, recast_delay, priority)
values (1, 560, 1, 5, 28, -1, -1, 10);
|
Lets make a hypothetical pet that is a cleric class so i can be lazy and not look up spell numbers
We give them a spell list, buffs heals ect
Code:
Insert into npc_spells (id, name, parent_list, attack_proc)
values (13, "Mage pet cleric1", 0, -1);
It is a parent list, and they are not procs...
And a proc list, dd lifetap ect.
Code:
Insert into npc_spells (id, name, parent_list, attack_proc)
values (14, "Mage pet cleric1 procs", 13, 1);
A proc list with parent list set to 13
Buff
Code:
-- Type 8 spells - Buffs
-- Courage
Insert into npc_spells_entries (npc_spells_id, spellid, type, minlevel, maxlevel, manacost, recast_delay, priority)
values (13, 202, 8, 1, 255, 0, -1, 0);
Cast Courage from min level to max level, with no manacost, using the default recast delay.
And a heal it is a cleric after all =)
Code:
-- Type 2 spells - Heals
-- Minor Healing
Insert into npc_spells_entries (npc_spells_id, spellid, type, minlevel, maxlevel, manacost, recast_delay, priority)
values (13, 200, 2, 1, 255, 0, 10, 1);
Cast Minor Healing, again at any level with no manacost, no faster than every 10 seconds with an increased priority
And now lets make them proc thier low level dd and root =)
DD
Code:
-- Type 1 spells - Nukes
-- Strike
Insert into npc_spells_entries (npc_spells_id, spellid, type, minlevel, maxlevel, manacost, recast_delay, priority)
values (14, 14, 1, 1, 255, 0, -1, 0);
We use 14 instead of 13 so it goes to the proc list we made above
Again at any level with no manacost using default recast.
Root
Code:
-- Type 4 spells - Root
-- Root
Insert into npc_spells_entries (npc_spells_id, spellid, type, minlevel, maxlevel, manacost, recast_delay, priority)
values (14, 230, 4, 1, 255, 0, -1, 0);
Again using the proc list all levels no mana and default delay
EDIT:
I forgot to tell you how to assign them if you didn't spot it it's part of the npc_type so you can do a
Code:
npc_type->npc_spells_id=14