Jump to content
  • 0

Corsol

Question

Hi! i'm here again! :P

another question: How to dynamically add spell (to be casted like "knoking" with spell id 67869) to player when he accept a quest (Evacuate the Merchant Sqare)?

i've tryed to fill the "spell_area" table with this information

INSERT INTO `mangos`.`spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `condition_id`, `aura_spell`, `racemask`, `gender`, `autocast`) VALUES 
(67869, 4755, 14098, 1, 14099, 0, 0, 0, 2, 0);

but system gave me thi error: "ERROR:World: Player Priesttest (Guid: 5) casts spell 67869 which he shouldn't have"

What's wrong?

Table "dbscript_on_quest_start" didn't have a command tha can add a spell to player... so i can't use that way...

Is there another way to dynamically and temporally add spell to player? Any ideas?

Thanks

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Before Three, such problem was solvable in the two ways:

  • Adding an item which has "on use" the spell in question. Due to the quest description, it is not the case.
  • Putting the player onto a vehicle (which may be invisible and not changing the action bars, like vampiric aura in the Icecrown Citadel).

Neither pre-Three mechanic allows a spell to be dynamically added to the player. For this task you should look for an additional Three functionality missing in the Two; probably there is none helpful. However your error looks like the spell cannot be used by a player, suggesting a vehicle.

So, trying to solve the problem, I would

  • look in creature_template for a creature having the spell in question as well as VehicleId. If there is one, you're lucky but probably in need of an SD2/Eluna script to mount the player, in case you will not find a spell doing this;
  • explore how the problem is solved in the TrinityCore (they had put an effort into Cata, so I'm nearly sure the very beginning quests are implemented there).

Link to comment
Share on other sites

I've looked for vehicle_id... and nothing was founded.... :(

btw i've already done an SD2 script that use the funciont "addSpell(...)" to add spell to player when he got quest. This work... So the problem is fixed, but not into database.... ;)

Thanks!

Link to comment
Share on other sites

Good point...

My script, when the quest is done, remove that spell from player. But in case the quest was dropped nothing happen, so the spell will remain to player. In that case it's not a dangerous spell, but your point is good.

At the moment i don't have idea on how to script that mechanic into the core...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use