This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [SOLVED] Add a custom spell to a trainer  (Read 1508 times)

Unbreakables

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 21
    • View Profile
[SOLVED] Add a custom spell to a trainer
« on: May 02, 2015, 12:40:13 am »
Sorry for my bad english, I'm french.

Hello everyone !

I want to add a custom spell to a trainer, I add it on my database in npc_trainer, but it's not working. I don't find any thing in the Spell DBC, so I think it is on mangos source files, but I don't know where.

Thanks !
« Last Edit: May 05, 2015, 02:39:51 pm by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION] Add a custom spell to a trainer
« Reply #1 on: May 04, 2015, 09:59:28 am »
I doubt anyone can help you while you provide only such a little of information.

Do you have edited spell.dbc in your custom patch?
Do you have edited spell.dbc in your server data folder?
Did you restart server after all changes?
Did you delete Cache?
Would you provide soke kind of screenshot what your row in npc_trainer looks like?
Are you sure that your NPC has all kind of flags set correctly?
Does your spell work when you try to learn and use it?

And far more questions. There are pretty many things which could go wrong here.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

Unbreakables

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 21
    • View Profile
Re: [QUESTION] Add a custom spell to a trainer
« Reply #2 on: May 04, 2015, 11:59:37 am »
Quote from: "Amaroth"
Do you have edited spell.dbc in your custom patch?
Do you have edited spell.dbc in your server data folder?
Did you restart server after all changes?
Did you delete Cache?
Does your spell work when you try to learn and use it?

Yes, I have edited and it's work. I can learn it with .learn . But trainer don't want to learn it "is not a learning spell".

Quote from: "Amaroth"
Would you provide soke kind of screenshot what your row in npc_trainer looks like?

[attachment=5:115v7q0o]ss+(2015-05-04+at+11.39.33).png[/attachment:115v7q0o]

Quote from: "Amaroth"
Are you sure that your NPC has all kind of flags set correctly?

I use a shaman trainor, so I think, yes.

I add some screenshot of the spell in the editor.

[attachment=4:115v7q0o]ss+(2015-05-04+at+11.44.43).png[/attachment:115v7q0o]
[attachment=3:115v7q0o]ss+(2015-05-04+at+11.44.50).png[/attachment:115v7q0o]
[attachment=2:115v7q0o]ss+(2015-05-04+at+11.45.10).png[/attachment:115v7q0o]
[attachment=1:115v7q0o]ss+(2015-05-04+at+11.45.13).png[/attachment:115v7q0o]
[attachment=0:115v7q0o]ss+(2015-05-04+at+11.45.33).png[/attachment:115v7q0o]
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [QUESTION] Add a custom spell to a trainer
« Reply #3 on: May 04, 2015, 03:00:33 pm »
Well, everything seems to be fine, I'm sorry, I can't find anything wrong... Maybe someone else will have some kind of good idea.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

stoneharry

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 617
    • View Profile
Re: [QUESTION] Add a custom spell to a trainer
« Reply #4 on: May 04, 2015, 03:17:45 pm »
I think there is a spell flag that prevents it being used in a trainer. Trainers are purely server side too I believe. I'm not entirely sure.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Unbreakables

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 21
    • View Profile
Re: [QUESTION] Add a custom spell to a trainer
« Reply #5 on: May 04, 2015, 11:22:01 pm »
Quote from: "stoneharry"
I think there is a spell flag that prevents it being used in a trainer. Trainers are purely server side too I believe. I'm not entirely sure.

I try to find it, by comparison with a other spell used in a trainer, but in vain. It's very strange.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] Add a custom spell to a trainer
« Reply #6 on: May 05, 2015, 01:22:04 am »
Trinity is using the skillline*.dbcs to generate trainer skills iirc
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Unbreakables

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 21
    • View Profile
Re: [QUESTION] Add a custom spell to a trainer
« Reply #7 on: May 05, 2015, 03:22:45 am »
Quote from: "Ascathos"
Trinity is using the skillline*.dbcs to generate trainer skills iirc

How ? I check the skilline.dbc but there are no comment on spell. I don't see the link between skilline and spell  :(

There aren't many documentation on it.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Unbreakables

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 21
    • View Profile
Re: [QUESTION] Add a custom spell to a trainer
« Reply #8 on: May 05, 2015, 05:55:33 am »
Ok, it's solved !

If someone have the same problem, valid trainer's spell is definite in the SkillLineAbility.dbc.

You need only add a entry with :

1> entry
2> SkillLine (ex: 375 = Combat Elementaire)
3> IdSpell
4> RequiredRaces
5> RequiredClasses (64 = Chaman)
6> ExcludedRaces
7> ExcludedClasses
8> MinSkillLineRank (I think is for spell chain like Fire Bolt Rank 1, 2...) Set = 1 by default
9> ParentSpell (Like 8, the parent is the rank 1 for rank 2, etc...) Set = 0 by default
10> 0x0
11+> Set empty

Thanks a lot for your help ! I hope I will can post some screenshots of my project soon ! <3
« Last Edit: January 01, 1970, 01:00:00 am by Admin »