Quest: Shredder Repair (12244)

Probably belongs in the Venture Bay event thread.

And how awfull is the coding part?

-- Shredder Repair (12244)
SET @ENTRY := 27354; -- Broken-down Shredder
SET @ENTRY2 := 27371; -- Synipus

UPDATE `creature_template` SET `spell1`=48548,`spell2`=48558,`spell3`=48604,`spell5`=48610 WHERE `entry`=@ENTRY;

DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@ENTRY;
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
(@ENTRY, 60944, 12244, 1, 0, 1, 0, 0, 0); -- Ride Shredder

DELETE FROM `conditions` WHERE `SourceEntry`=48610;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(17,0,48610,0,29,@ENTRY2,5,0,0,'', "Use spell Shredder Delivery only near Synipus - 5 yards"),
(13,0,48610,0,18,1,@ENTRY,0,0,'', "Spell Shredder Delivery target vehicle Broken-down Shredder ");

DELETE FROM `spell_scripts` WHERE `id`=48610;
INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(48610,2,0,18,3,@ENTRY,2,0,0,0,0); -- Despawn vehicle
[/SQL]

Seems valid, does it work as intended?

Yes.

Mount a shredder,get it back to base.Press deliver within 5 yards of the npc and get credit.

I love how you posted it in the correct section. /emoticons/default_smile.png

Not awful at all. In fact, I like it a lot. /emoticons/default_smile.png

First condition seems unneeded since the range of 48610 is 5 yd

Yes,but as i remember without it the deliver button would become pressable regardless if player is near npc or not.