Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Mirai Dematro on January 03, 2014, 07:34:30 pm

Title: [QUESTION] Reward player with buff
Post by: Mirai Dematro on January 03, 2014, 07:34:30 pm
Dear Modcraft,

I want my player to be rewarded with a buff, as soon as he/she completes my quest.
When the player returns to the NPC, the NPC must cast the spell onto the player.

So in the quest DB, there is a column named 'RewardSpell' and 'RewardSpellCast'.
So I did a little internet search, and this is what I found:

Quote
--------------------------------------------------------------
RewardSpell
Spell that is shown to be casted on quest completion in the quest log.
Note that this spell will NOT be casted if RewardSpellCast is non-zero.
The spell in the other field will be casted instead,
in which case the spell here only serves as the visual in the quest log.

NOTE: This field comes straight from the WDB and should not be changed.

RewardSpellCast
Spell that will always be casted at player when completing the quest.
This can be learn spell and player learned some spell in result,
or buff spell, for example. If this field is non-zero then
this spell will ALWAYS be casted and the spell in RewardSpell will not.

NOTE: This field comes straight from the WDB and should not be changed.

I don't want my player to see what spell is going to be casted onto him.
So this leads me to believe that if I put the correct spell ID into 'RewardSpellCast' it should work.

HOWEVER!

It states that this field comes straight from the WDB and should NOT be changed.

So...   What should I do now?

Additional info:

- WoTLK 3.3.5a
- TrinityCore
Title: Re: [QUESTION] Reward player with buff
Post by: Steff on January 03, 2014, 09:10:30 pm
Have you just tested it.  I mean made a quest,  set reward spell to null and spell cast to the spell you want?
Title: Re: [QUESTION] Reward player with buff
Post by: Mirai Dematro on January 03, 2014, 10:13:29 pm
Dear Steff,

Thanks for replying!

I just tested this out with a simple quest.
RewardSpell: 0
RewardSpellCast: 5759

When I clicked the 'Complete Quest' button, the NPC casted the spell on himself!
Nothing crashed, everything was fine, he just casted it onto himself!  :roll:

Any ideas ?

-MD
Title: Re: [QUESTION] Reward player with buff
Post by: deep6ixed on January 03, 2014, 10:29:52 pm
Whats the Buff Spell?  It might be Target Self... Which case it's working perfectly...
Title: Re: [QUESTION] Reward player with buff
Post by: Mirai Dematro on January 03, 2014, 10:40:37 pm
Dear Deep6ixed,

This is the spell I'm referring to: http://www.wowhead.com/spell=5759 (http://www.wowhead.com/spell=5759" onclick="window.open(this.href);return false;)
That could be the problem with this spell, i guess...  XD

So if this is indeed the problem... How can I edit the spell that it isn't Self-Targeting?
I've already located the spell in the Spell.dbc, but have no clue wich column to edit.

Thanks in advance,
- MD
Title: Re: [QUESTION] Reward player with buff
Post by: deep6ixed on January 04, 2014, 01:02:08 am
It's the spell itself that isn't working.  The way that spell is working it will never give an attack power bonus.  And there is no way that I can be modified to give a bonus.  But I'll help you find a spell that will give a similar buff.  It actives a stance change, and if your not a druid you want have the passive skills needed to have the right effect.

So what buff effect do you want and how long do you want it  to last?
Title: Re: [QUESTION] Reward player with buff
Post by: Mirai Dematro on January 04, 2014, 10:16:22 am
Dear Deep6ixed,

General Idea of the spell:
- Increased attack power
- Lasts about 4 - 10 min

The attack power doesn't have to be extremely high.
The player will be around lvl 5-6 when taking the quest.
Also I wan't it to be available for all classes.

If you could help me on this, I'd really appreciate it.
-MD
Title: Re: [QUESTION] Reward player with buff
Post by: Hederick on January 17, 2014, 02:28:02 am
If you are using Trinitycore it should be easy to do via SAI Events. I can give you more info about how to do it if u need it.
Title: Re: [QUESTION] Reward player with buff
Post by: Steff on January 17, 2014, 07:06:56 am
The cast works as deep already told.  It is simple the wrong spell.  No need for sai.  Quest system fully support this.