[WIP] Defending the Wyrmrest Temple (Quest 12372)

hi all,

i tried to fix this quest but i fail on the vehicle.

everytime i use spell 1/2 on the hostile or the vehicle getting damage - the vehicle despawns


– implement texts into SAI
– after Spellhit of Spell1 and Spell2 or getting damage by a hostile - the Vehicle Despawns /Don’t know why
SET @Wyrm = 27629;
SET @Gossip = 9568; – gossip_menu_id
SET @Spell1 = 49161; – Flame Breath
SET @Spell2 = 49243; – Immolation
SET @Spell3 = 49263; – Renew
SET @Spell4 = 49264; – Blazing Speed
SET @Spell5 = 49367; – Destabilize Azure Dragonshrine
SET @Quest = 12372;
SET @Bunny = 27698; – Defending Wyrmrest Temple Kill Credit Bunny

UPDATE creature_template SET AIName=‘SmartAI’,npcflag=npcflag|16777217,unit_flags=0,gossip_menu_id= @Gossip,InhabitType=4,spell1[email protected],spell2[email protected],spell3[email protected],spell4[email protected],spell5[email protected] WHERE entry[email protected];

UPDATE quest_template SET ReqSpellCast3[email protected] WHERE entry[email protected]; – Destabilize the Azure Dragonshrine

DELETE FROM gossip_menu_option WHERE menu_id[email protected];
INSERT INTO gossip_menu_option (menu_id,id,option_icon,option_text,option_id,npc_option_npcflag,action_menu_id,action_poi_id,action_script_id,box_coded,box_money,box_text) VALUES
(@Gossip,1,0,‘We need to get into the fight. Are you ready ?’,1,1,0,0,0,0,0,NULL);
DELETE FROM creature_text WHERE entry[email protected];
INSERT INTO creature_text (entry,groupid,id,text,type,language,probability,emote,duration,sound,comment) VALUES
(@Wyrm,1,0,“We’ve been expecting you, $N. Now we have the upper hand.”,15,0,50,25,0,0,‘Wyrmrest Defender whisper1 - when mounted’),
(@Wyrm,1,1,“Where to first?”,15,0,50,0,0,0,‘Wyrmrest Defender whisper2 - when mounted’),
(@Wyrm,2,0,“Malygos has clearly gone insane.”,15,0,50,0,0,0,‘Wyrmrest Defender whisper3 - when IC’),
(@Wyrm,2,1,“Just hang on. We’ll get through this.”,15,0,50,0,0,0,‘Wyrmrest Defender whisper4 - when IC’),
(@Wyrm,3,0,“Nice one, kid.”,15,0,100,0,0,0,‘Wyrmrest Defender whisper5 - when enemy killed’),
(@Wyrm,4,0,“I need to heal!”,41,0,50,0,0,0,‘Wyrmrest Defender Boss emote6 - when low health’),
(@Wyrm,4,1,“We should get out of here. I need to heal!”,41,0,50,0,0,0,‘Wyrmrest Defender Boss emote7 - when low health’),
(@Wyrm,5,0,“With you and I working together, this battle will be over in no time.”,15,0,50,0,0,0,‘Wyrmrest Defender whisper8 - when OOC’),
(@Wyrm,5,1,“I’ve never seen anything like this before. I’m glad that you’re here.”,15,0,50,0,0,0,‘Wyrmrest Defender whisper9 - when OOC’);
DELETE FROM smart_scripts WHERE entryorguid[email protected] 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
(@Wyrm,0,0,1,62,0,100,0,@Gossip,1,0,0,85,49207,2,0,0,0,0,7,0,0,0,0,0,0,0,‘Wyrmrest Defender - on Gossip select - cast Defending Wyrmrest Temple: Summon Wyrmrest Defender’),
(@Wyrm,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,‘Wyrmrest Defender - on Gossip select - close Gossip’);

DELETE FROM conditions WHERE SourceTypeOrReferenceId=15 AND SourceGroup[email protected];
DELETE FROM conditions WHERE SourceTypeOrReferenceId=13 AND SourceEntry[email protected];
INSERT INTO conditions (SourceTypeOrReferenceId,SourceGroup,SourceEntry,ElseGroup,ConditionTypeOrReference,ConditionValue1,ConditionValue2,ConditionValue3,ErrorTextId,ScriptName,Comment) VALUES
(15,@Gossip,0,0,9,@Quest,0,0,0,‘’,‘show gossip option if Player has Quest 12372 taken’),
(13,0,@Spell5,0,18,1,@Bunny,0,0,‘’,‘spell target Defending Wyrmrest Temple Kill Credit Bunny’);

DELETE FROM npc_spellclick_spells WHERE npc_entry=27629;
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

DELETE FROM creature_template_addon WHERE entry[email protected];
INSERT INTO creature_template_addon (entry,path_id,mount,bytes1,bytes2,emote,auras) VALUES
(@Wyrm,0,0,0,0,0,‘50069’); – Wyrmrest Defender Flight Aura

-- Try to Fix Quest 12372 'Defending the Wyrmrest Temple'

I’ve tried to cast 49207 spell on myself and then go to attack targets and the vehicle doesn’t disappear…:-?