-
Member
NPC Trainer Creation > 3.3.5a <
Hello, i want to show you how you create a own NPC trainer.
First we need a NPC. A tutorial for npc creation you can find here :
http://www.ownedcore.com/forums/worl...-database.html (NPC Creation > 3.3.5a < Database)
when you have create a NPC you have to change the NPC FLAGS to 16(Trainer)
But the NPC can't teach you anything. Why?
we need the table "npc_trainer"
When you open it, you see this:
its very simple
create a new entry
==========
entry - the entry id >>of your NPC<<
spell - the spell ID
spellcost - how much it cost. (in copper)
reqskill - the skill you need to learn it.(i dont test it yet)
reqskillvalue - the value of the skill
reqlevel - i think, the level you need to learn it(i dont test it yet)
==========
thats it.
but you have to create for every spell a new entry, so i have create a SQL template for it.
INSERT INTO `npc_trainer` (`entry`, `spell`, `spellcost`, `reqskill`, `reqskillvalue`, `reqlevel`)
VALUES (0, 0, 0, 0, 0, 0);
So i show you how you have to fill it for my example on the top of this thread.
INSERT INTO `npc_trainer` (`entry`, `spell`, `spellcost`, `reqskill`, `reqskillvalue`, `reqlevel`)
VALUES (558841, 6899, 500, 0, 0, 0);
so i wrote, that the NPC with the 558841 can teach me the spell 6899 (brown ram) for 500 copper (5silver)
when you write in the spellcost column "0" its free.
you can create a own sql batch with this template and copy it for every spell. you only have to change the spell ID.
Sorry for my bad english, i hope i helped you.
when i done mistakes, pls text me.
Last edited by Nekatus; 11-16-2013 at 01:14 PM.
-
Post Thanks / Like - 2 Thanks
-
Member
Helped a lot thank you so much! would give rep if I could lol