[Wip]The Purification Of The Quel'delar(H)


-- [Q]The purification of the Quel'delar(H)

UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`Health_mod`=2.9480580,`Mana_mod`=1,`IconName`='Speak', `npcflag`=4483,`gossip_menu_id`=50000,`AIname`='SmartAI' WHERE `entry`=37523;

-- spawn Warden of sunwell

DELETE FROM `creature` WHERE `id`=37523;

INSERT INTO `creature` VALUES ('1002398', '37523', '530', '1', '1', '0', '0', '12556.6', '-6779.59', '15.039', '0.223384', '300', '0', '0', '41', '60', '0', '0', '0', '0');

INSERT INTO `creature` VALUES ('1002399', '37523', '530', '1', '1', '0', '0', '12556.7', '-6769.64', '15.1005', '0.283409', '300', '0', '0', '41', '60', '0', '0', '0', '0');

DELETE FROM `gossip_menu` WHERE `entry`=50000;

INSERT INTO `gossip_menu` VALUES (50000,300000);

-- Texts from Warden of Sunwell

DELETE FROM `npc_text` WHERE `id`=300000;

INSERT INTO `npc_text` VALUES (300000, 'I will escort you into the Sunwell when you´re ready.', 'I will escort you into the Sunwell when you''re ready.', '0','1', '0', '1', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0','0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0', '0', '0', '0', '12340');

DELETE FROM `gossip_menu_option` WHERE `menu_id`=50000;

INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`) VALUES

(50000,0,0,'I''m ready to enter the Sunwell.',1,1);

-- Warden of Sunwell script SAI

DELETE FROM `smart_scripts` WHERE `entryorguid`=37523 AND `source_type`=0;

INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES

('37523', '0', '0', '1', '61', '0', '100', '0', '0', '0', '0', '0', '85', '70746', '0', '0', '0', '0', '0', '7', '0', '0', '0', '0', '0', '0', '0', 'Warden of the Sunwell - On Gossip Select - Cast spell on self'),

('37523', '0', '1', '0', '62', '0', '100', '0', '50000', '0', '0', '0', '72', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Warden of the Sunwell - On Gossip Select - Close Gossip');

INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES

(15,50000,0,0,9,24596,0,0,0,'',"Only show first gossip if player is on quest The purification of the Quel'delar(H)");

--Fix spell target

DELETE FROM `spell_target_position` WHERE `id`='70746';

INSERT INTO `spell_target_position`(`id`,`target_map`,`target_position_x` ,`target_position_y`,`target_position_z`,`target_orientation`) VALUES

(70746,580,1790.650024,925.669983,15.150000,3.100000);

I’ve tried to fix the quest. But the wardens doenst casts the spell.

http://www.wowhead.com/spell=70746

http://www.wowhead.com/npc=37523

What ist the problem? /emoticons/default_biggrin.png

Fixed sql a bit but still needs more work, Malcrom.

Try adding coordinates in spell_target_position http://www.trinitycore.info/Spell_target_position_tc2

Ok i try it, thanks /emoticons/default_biggrin.png

i dont know which phase it is? can someone help me ?

The style is not very… beautiful. /emoticons/default_tongue.png Try looking at other people’s script and check the codestyle they used.

[CODE]INSERT INTO spell_target_position(id,target_position_x ,target_position_y,target_position_z,target_orientation) VALUES

(70746,1742.7,701.924,71.1907,2.61437);[/CODE]

@Discover i know but it works 90% /emoticons/default_biggrin.png

So know the map id missing ;(

Why doesnt cast the warder the spell ? -.-

Nowadays “just working” isn’t enough for it to be valid.

http://www.trinitycore.org/f/topic/2588-sql-guidelines/

ok sorre its my first questfix post /emoticons/default_biggrin.png

It’s fine, everyone learns and no one is born knowning it all.

Resuming the sql guidelines we use:

[ul][li]No quotes around numbers;[/li]
[li]Always delete what you are inserting;[/li]
[li]If you are inserting a creature, use a guid var and assign it to xxx (we will change this later) (SET @GUID = XXX; … INSERT INTO creature… (@GUID+0,123,0,…)) and do the same to guessed gossip_menu entries[/li]
[li]DO NOT change WDB values (http://www.trinitycore.org/f/topic/58-wdb-fields/) (you changed a lot of them)[/li]
[li]Full inserts (with the fields, like the smart_scripts one and not like the creature insert)[/li]
[/ul]

ok thank you /emoticons/default_biggrin.png

ok, i think the smart_script is wrong because the NPC doenst cast the spell, but the spell works fine.

Whats the Problem?

Don’t send me a private message next time…

-- Warden of Sunwell script DELETE FROM `smart_scripts` WHERE `entryorguid`=37523 INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES (37523,0,0,1,62,0,100,0,50000,0,0,0,11,70746,0,0,0,0,0,7,0,0,0,0,0,0,0,"Warden of the Sunwell - On Gossip Select - Cast Spell Teleport Into Sunwell"), (37523,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Warden of the Sunwell - On Gossip Select - Close Gossip");[/sql]

Ok thanks

@Discover the npc doesnst cast the spell.

On select gossip, nothing happens

Any ideas? /emoticons/default_biggrin.png

The spell works when youre character has learn it. But on select the gossip nothing happens :-/

i dont know why the quest doesnt work. The smart_script is corect. Any Ideas?

any news for this quest ?

Maybe you forgot to declare the spell on the creature_template table?

UPDATE `creature_template` SET `minlevel`='80', `maxlevel`='80', `Health_mod`='2.9480580', `Mana_mod`='1',`IconName`='Speak', `npcflag`='4483', `gossip_menu_id`='50000', `AIname`='Smartai' WHERE `entry`IN (37523);

It should not be Smartai but SmartAI, the core is case-sensitive

[/CODE]

Ok now the wardens teleport you, but the teleport position is wrong. i will update it next time /emoticons/default_biggrin.png

I have a problem with the phase, can somebody help me? /emoticons/default_smile.png

Try these for the phasing

[CODE]SET @PHASE := 70193;

DELETE FROM spell_area WHERE spell=@PHASE;
INSERT INTO spell_area (spell,area,quest_start,quest_start_active,quest_end,aura_spell,racemask,gender,autocast) VALUES
(@PHASE,4075,24522,1,24553,0,0,2,1),
(@PHASE,4075,24562,1,24564,0,0,2,1);[/SQL][/CODE]

With these you’ll be in phase 2048 in Sunwell Plateau if you start the quest “Journey to the Sunwell” until you finish the quest “The Purification of Quel’delar”