[Completed] There's Something About The Squire (13654)

– Quest:There’s Something About the Squire (13654)

– Zone: Crystalsong Forest

– WowheadID: http://www.old.wowhead.com/quest=13654

– Problem: - Skeletal Woodcutter (33499) doesn´t drop the needed quest item,

– - Maloric (33498) is not responding.

– TDB 335.11.42

– TrinityCore rev. 2011-08-25 13:16:09 +0200 (dfa179b427bf+) (Win32, Release)

– source: sniff (Aggramar EU, 29/08/2011) & Fraps.

Edit: improvements of tREAk added and attached a .patch file.

[CODE]SET @ENTRY := 33499; – Skeletal Woodcutter
SET @QUEST_LOOT := 45080; – Large Femur
SET @QUEST := 13654; – There’s Something About the Squire
SET @SPELL1 := 63124; – Incapacitate Maloric
SET @SPELL2 := 63126; – Search Maloric

– add quest item to Skeletal Woodcutter
UPDATE creature_template SET lootid=entry WHERE entry=@ENTRY;
DELETE FROM creature_loot_template WHERE entry=@ENTRY;
INSERT INTO creature_loot_template VALUES
(@ENTRY,@QUEST_LOOT,-100,1,0,1,1); – 100% drop

– set visual effects on the skeletons
DELETE FROM creature_template_addon WHERE entry=@ENTRY;
INSERT INTO creature_template_addon (entry,emote) VALUES
(@ENTRY,234); – chopping wood

– conditions for skeleton quest loot
DELETE FROM conditions WHERE SourceGroup=@ENTRY AND SourceEntry=@QUEST_LOOT;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,Comment) VALUES
(1,@ENTRY,@QUEST_LOOT,0,9,@QUEST,0,‘skeleton drops quest loot when player has quest’);

SET @ENTRY := 33498; – Maloric
UPDATE creature_template SET AIName=‘SmartAI’,lootid=entry WHERE entry=@ENTRY;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY 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
(@ENTRY,0,0,0,23,0,100,0,@SPELL1,1,0,0,81,16777216,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Maloric - on Aura: Incapacitate Maloric - set npcflag: Spellclick’),
(@ENTRY,0,1,0,23,0,100,0,@SPELL1,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Maloric - on NoAura: Incapacitate Maloric - set npcflag: none’);

– conditions for Large Femur and Maloric
DELETE FROM conditions WHERE SourceTypeOrReferenceId=18 AND SourceEntry=@QUEST_LOOT;
DELETE FROM conditions WHERE SourceTypeOrReferenceId=17 AND SourceEntry=@SPELL2;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES
(18,0,@QUEST_LOOT,0,24,1,@ENTRY,0,0,‘’,‘Item:Large Femur only target Maloric’),
(17,0,@SPELL2,0,9,@QUEST,0,0,0,‘’,‘needs taken Quest 13654 to perform Spell: Search Maloric’);

– execute search Maloric, get quest item, quest completed
DELETE FROM npc_spellclick_spells WHERE npc_entry=@ENTRY;
INSERT INTO npc_spellclick_spells VALUES
(@ENTRY,@SPELL2,@QUEST,1,@QUEST,2,0,0,0);[/sql][/CODE]
0001-Incapacitate-Maloric-from-behind.patch

I don’t know if it works but I like your sql /emoticons/default_smile.png

tested on local server, works :wink:

I don’t get how this quest should work. Why insert loot if spell 63126 gives the item?

You need to kill a skeleton first to get the loot (not dropping previously) and then use that loot…

Please move this to the completed section.

Thanks

may some improvements

[CODE]
UPDATE creature_template SET AIName=‘SmartAI’ WHERE entry=33498;

DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=33498;
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
(33498,0,0,0,23,0,100,0,63124,1,0,0,81,16777216,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Maloric - on Aura: Incapacitate Maloric - set npcflag: Spellklick’),
(33498,0,1,0,23,0,100,0,63124,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Maloric - on NoAura: Incapacitate Maloric - set npcflag: none’);

DELETE FROM npc_spellclick_spells WHERE npc_entry=33498;
INSERT INTO npc_spellclick_spells (npc_entry,spell_id,quest_start,quest_start_active,quest_end,cast_flags,aura_required,aura_forbidden,user_type) VALUES
(33498,63126,13654,1,13654,2,0,0,0);

UPDATE creature_template SET lootid=entry WHERE entry=33499;

DELETE FROM creature_loot_template WHERE entry=33499;
INSERT INTO creature_loot_template (entry,item,ChanceOrQuestChance,lootmode,groupid,mincountOrRef,maxcount) VALUES
(33499,45080,-100,0,0,1,1);

DELETE FROM conditions WHERE SourceTypeOrReferenceId=18 AND SourceEntry=45080;
DELETE FROM conditions WHERE SourceTypeOrReferenceId=17 AND SourceEntry=63126;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES
(18,0,45080,0,24,1,33498,0,0,‘’,‘Item:Large Femur only target Maloric’),
(17,0,63126,0,9,13654,0,0,0,‘’,‘needs taken Quest 13654 to perform Spell: Search Maloric’);
[/sql][/CODE]

  • linked npcflag change with aura - aura lasts 30 sec so you haven’t to remove npcflag after 30sec

  • item /Spell should only target Maloric - it’s a stun with a duration of 30sec and shouldn’t use on any npc because of abusing

  • this spell has to cast behind Maloric (aktually it doesn’t) solution:

case 63124: // Incapacitate Maloric

(SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET) ->SpellMgr.cpp

may this will help you

Thanks tREAk, I’ve implemented your comments. C++ patch will be attached a bit later. Thanks!

Closed threat, updated issue https://github.com/TrinityCore/TrinityCore/issues/2843 and moved the c++ to that issue, moved to complete section

Thank you /emoticons/default_smile.png