Quest: I've Got A Flying Machine! (11390)

[CODE]-- Fix I’ve Got a Flying Machine
– zone condition for vehicle
DELETE FROM conditions WHERE SourceEntry=24418;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES
(16, 0, 24418, 0, 4, 3999, 0, 0, 0, ‘’, ‘Dismount player when not in intended zone’);
– setting vehicle spell bar abilities
UPDATE creature_template SET spell1=44009, spell2=43770, spell3=43799, spell4=43769, spell5=47769 WHERE entry=24418;
– condition for Grappling Hook spell(43770)
DELETE FROM conditions WHERE SourceEntry=43770;
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES
(13, 0, 43770, 0, 18, 1, 24439, 0, 0, ‘’, ‘Spell 43770(Grappling Hook) targets npc 24439(Sack of Relics)’);
– Sack of Relics SAI
SET @ENTRY := 24439;
SET @SOURCETYPE := 0;
DELETE FROM smart_scripts WHERE entryorguid=@ENTRY AND source_type=@SOURCETYPE;
UPDATE creature_template SET AIName=“SmartAI” WHERE entry=@ENTRY LIMIT 1;
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,@SOURCETYPE,0,1,8,0,100,0,43770,0,0,0,11,43775,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,“on spell hit 43770 start script”),
(@ENTRY,@SOURCETYPE,1,0,61,0,100,0,0,0,0,0,11,46598,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,“mount sack to vehicle”),
#needs fixing below,just added the lines as a guide to what must happen next
(@ENTRY,@SOURCETYPE,2,3,9,0,100,0,1,10,3000,3000,11,43798,0,0,0,0,0,10,102855,24399,0,0.0,0.0,0.0,0.0,“teleport(43798) sack(24439) to Invisible Stalker(24526) when in range”),
(@ENTRY,@SOURCETYPE,3,4,61,0,100,0,0,0,0,0,11,36553,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,“pet stay(36553)”),
(@ENTRY,@SOURCETYPE,4,0,61,0,100,0,0,0,0,0,11,43806,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,“credit(43806) cast on player”);
#add force despawn for the sack
[/sql]

What should happen after you pick up the sack:move vehicle to the platform,autodrop the sack and get credit.

The teleport,pet stay and killcredit are sniffed as being used by the sack.I mean the spells.

The 2 Invisible Stalkers will need a position sniff also,as they are both spawned near the quest giver,but they should stand each on the dropoff platforms.(guids are 105997 and 105998).But i guess they can be moved to the platforms without a sniff.

I’ve tried using smart event range,ooc and ooc_los but with no success.I never managed to get this range stuff working.

So please don’t be harsh with me,i’m still learning here…hope i posted in the corect format…

[/CODE]

nothing immediately jumps out as wrong with the SQL format, other than a few spaces that could be killed in the first 2 insert into statements.

And, technically that whole first block could be merged into one delete and one insert, but, I don’t think anyone would have a problem with you leaving it the way it is…