Wip: Borrowed Technology, The Solution Solution, Volatility

[CODE]-- Fix quests Borrowed Technology, The Solution Solution /Daily/, Volatility, Volatility /Daily/
SET @Skytalon := 31583; – Frostbrood Skytalon
SET @Decoy := 31578; – Armored Decoy
SET @QuestCredit := 31364; – Kill credit
SET @Stun := 55591; – Freeze animation to look like Decoy
SET @Explosion := 59335; – The spell that should kill all in the end
SET @Summon := 59303; – Summon Skyatlon
SET @Immolation := 54690; – Skytalon ending spell, most likely some epxlosion effect animation
SET @Script := 3027406; – Decoy timed actions for exploding
SET @Ride := 56687; – Activated by grab as explained
SET @Grab := 59318;
– Makes Grab cause target to cast mount on source
INSERT INTO spell_scripts (id,effindex,delay,command,datalong,datalong2) VALUES
(@Grab,0,0,15,@Ride,3);
– Quests relations
UPDATE quest_template SET PrevQuestId=13290, NextQuestId=13383 WHERE id=13291; – Borrowed Technology
UPDATE quest_template SET PrevQuestId=13291, NextQuestId=0 WHERE id=13292; – The Solution Solution /Daily/
UPDATE quest_template SET PrevQuestId=13238, NextQuestId=13373 WHERE id=13356; – Volatility
UPDATE quest_template SET PrevQuestId=13356, NextQuestId=0 WHERE id=13239; – Volatiliy /Daily/
– Add SAI for Frostbrood Skytalon
UPDATE creature_template SET vehicleid=234,InhabitType=5,AIName= ‘SmartAI’ WHERE entry=@Skytalon;
DELETE FROM vehicle_template_accessory WHERE entry=31583 AND seat_id=1;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@Skytalon;
DELETE FROM smart_scripts WHERE source_type=9 AND entryorguid=@Script;
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
(@Skytalon,0,0,0,25,0,100,0,0,0,0,0,29,0,0,@Decoy,0,0,0,9,@Decoy,1,50,0,0,0,0,‘On Spawn - Go to target with follow’),
(@Skytalon,0,1,2,65,0,100,0,0,0,0,0,11,@Grab,0,0,0,0,0,9,@Decoy,1,10,0,0,0,0,‘On follow complete - Cast trigger spell to make Decoy mount’),
(@Skytalon,0,2,3,61,0,100,0,0,0,0,0,69,1,0,0,0,0,0,8,0,0,0,6510.496582,1192.790771,380.557190,0.222656,‘Linked with event 2 - Fly Away with move to position’),
(@Skytalon,0,3,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Linked with event 2 - Start script 00’),
– Script 00
(@Script,9,0,0,0,0,100,0,5000,5000,0,0,11,@Explosion,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Timed action - Cast Explosion on self’),
(@Script,9,1,0,0,0,100,0,0,0,0,0,33,@QuestCredit,0,0,0,0,0,21,50,0,0,0,0,0,0,‘Give kill credit to player’),
(@Script,9,2,0,0,0,100,0,0,0,0,0,11,@Immolation,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Cast Immolation’),
(@Script,9,3,0,0,0,100,0,0,0,0,0,51,0,0,0,0,0,0,9,@Decoy,0,5,0,0,0,0,‘Kill Decoy’),
(@Script,9,4,0,0,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,‘Call script reset’);
– Add SAI for Armored Decoy
UPDATE creature_template SET equipment_id=326,AIName= ‘SmartAI’ WHERE entry=@Decoy;
DELETE FROM smart_scripts WHERE source_type=0 AND entryorguid=@Decoy;
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
(@Decoy,0,0,1,25,0,100,0,0,0,0,0,11,@Stun,0,0,0,0,0,1,0,0,0,0,0,0,0,‘On spawn - Cast Freeze animation on self’),
(@Decoy,0,1,0,61,0,100,0,0,0,0,0,11,@Summon,0,0,0,0,0,1,0,0,0,0,0,0,0,‘On spawn - Cast summon Skytalon behind’),
(@Decoy,0,2,0,6,0,100,0,0,0,0,0,44,2,0,0,0,0,0,1,0,0,0,0,0,0,0,‘On death - Change phase mask’);
[/sql]

– Unused code until attributes get fixed, (@Decoy,0,2,0,61,0,100,0,0,0,0,0,11,@Stun,0,0,0,0,0,1,0,0,0,0,0,0,0,‘On spawn - cast stun on self’),-- also all things connected with Bunny are removed and rewritten, core has some bugs with vehicle data

– explosion has no visual effect when casted from drake /the picture shake, but no fire/ on self and when player do it it has, if anyone can help on that will be great

– the summon part is summoning the drake behind, always on ground*, there is either missing core function tp* at current coordinates, but changing z or the spell is missing data.

[/CODE]

Do the skytalons have vehicleId? If not the riding spell won’t work. Find an id where the passenger is in the right spot of the skytalon and take this one.

If they have, try summoning a skytalon and cast the riding spell on it manually. Perhaps the spell doesn’t work. Take http://old.wowhead.com/spell=46598 in this case.

I changed the vehicleid to a random working one /like 292 for example/ and when cast it from player it does work, but when the creature cast it nothing happens. And I’m sure the creature gets activated, because it did rest events. I was wondering if creature needs any specific flag to mount, unlike player?

Actually it doesn’t need anything special. I’m working on a similar quest and from sniff I know that my creature casts 46598 on its vehicle creature. I have it working and no flags set…

Are you sure that the follow complete event is triggered? I’d rather use movement inform event and move to position action instead. That definitely works.

Hmphh, can’t figure it out for now, and am having some other problems seems the summoning spell is bugged from whatever high I summon it always place the the summon on ground.

One suggestion, instead of using a hard value for the creature spawn (@QCGuid := 520500), you could use this:

SET @QCGuid := (SELECT MAX(`guid`) FROM `creature`); [/SQL]

That way the record in the creature table won’t accidentally overwrite an existing record. There might not be a 520500 now but you never know in the future… or if the player might be using some other custom SQL that already used that number.

I guess the only drawback to that is you’d need to run the SQL each time you update your DB to make sure the data isn’t overwritten.

@MrSmite - thanks a lot seems quite useful. One question does in that case delete from creature become not needed? I left it, but am wondering.

@Pitcrawler - I can’t define one of the dummies if the decoy is summoned near another. Or there is some function I just don’t understand. Like if I set 1 position to go on 2nd part it will ignore the current near dummy in the air.

Judging on all the feedback I will leave it defined, as of the quest I realised that the mechanic is sickly insane. On spawn mount, on reach mount on the mounted mount.

It may seem unlogical, but just looked into the free argent crusaders quest and it seems exactly like that.

I’m wondering if the drake should mount the invisible explosion trigger and the decoy to mount on the drake. Or is something else. Also I realised there is something wrong with the drake movement, whatever I do it always walks in air, I checked all data and can’t influence on it. Set inhabittype=7, since the same drake with different id has it. Movement types and creature_addon, what else can it be?

To clear things up I’ll do a sniff of this quest.

Thanks a lot. ;}

Can’t figure out the comming from above part for now, he perma gets summoned directly to ground, no matter your Z coordinates.

Small update, I figured out how the mount up part, now only the summons remains.

Ok, I have the sniff. The following happens:

[ul]
[li]Item is used => http://old.wowhead.com/spell=59036 is casted[/li]
[li]http://old.wowhead.com/npc=31578 has aura http://old.wowhead.com/spell=59292[/li]
[li]http://old.wowhead.com/npc=31578 casts http://old.wowhead.com/spell=59303 on spawn with target self (There seems to be a target location no target dummy. I guess on retail spell_target supports several targets for one spell and the core selects the closest position depending on player’s positions)[/li]
[li]http://old.wowhead.com/npc=31583 has a vehicle_template_accessory http://old.wowhead.com/npc=31630 using http://old.wowhead.com/spell=46598 (So the explosion bunny is riding the skytalon)[/li]
[li]http://old.wowhead.com/npc=31583 moves to http://old.wowhead.com/npc=31578[/li]
[li]http://old.wowhead.com/npc=31583 casts http://old.wowhead.com/spell=59318 on http://old.wowhead.com/npc=31578 when close to it[/li]
[li]http://old.wowhead.com/npc=31578 casts http://old.wowhead.com/spell=59319 on http://old.wowhead.com/npc=31583 when hit by spell[/li]
[li]http://old.wowhead.com/npc=31583 casts http://old.wowhead.com/spell=59375 on http://old.wowhead.com/npc=31630[/li]
[li]http://old.wowhead.com/npc=31583 takes off[/li]
[li]http://old.wowhead.com/npc=31630 casts http://old.wowhead.com/spell=59335 on self after 6 seconds (hitting http://old.wowhead.com/npc=31583 and http://old.wowhead.com/npc=31578, too)[/li]
[li]http://old.wowhead.com/npc=31578 casts http://old.wowhead.com/spell=59329 on summoner when hit by http://old.wowhead.com/spell=59335[/li]
[li]http://old.wowhead.com/npc=31583 casts http://old.wowhead.com/spell=54690 on self when hit by http://old.wowhead.com/spell=59335[/li]
[/ul]

That’s it /emoticons/default_biggrin.png .

Thanks a lot, I don’t understand few things:

http://old.wowhead.com/npc=31583 has a vehicle_template_accessory http://old.wowhead.com/npc=31630 using http://old.wowhead.com/spell=46598 (So the explosion bunny is riding the skytalon)

When accessory is defined why does it need that spell, I mean should I define to cast it on vehcile on spawn? I mean currently it has it defined as you say, but when the Skytalon walks the explosion bunny stays in one place as it is isn’t mounted some visual bug perhaps, otherwise it wouldn’t be spawned or I’m missing some vehicleid data or flags.

It’s been some time since I used vehicle_template_accessory. I found this on one of my quest fixes:

DELETE FROM `vehicle_template_accessory` WHERE `entry`=@ENTRY;
INSERT INTO `vehicle_template_accessory` (`entry`,`accessory_entry`,`seat_id`,`minion`,`description`,`summontype`,`summontimer`) VALUES
(@ENTRY,30390,0,0,'',3,300000);

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,46598,0,0,0,1,0,0,0);
[/sql]

Perhaps that will help you...

Ok, thanks I tried to rewrite it according to the sniff, I wonder if to move to specific target this is the best method or there is specific action used to move to target, moveforward,random and position are useless here or I’m wrong? Would be nice if there is a way to set move to position to take coordinates from the pointed target.

(@Skytalon,0,0,0,25,0,100,0,0,0,0,0,29,0,0,@Decoy,0,1,0,9,@Decoy,1,50,0,0,0,0,'On spawn move to decoy'),[/SQL]

I already pointed out several times that SMART_ACTION_MOVE_TO_POS should support SMART_TARGET_ACTION_INVOKER but sadly nothing happened…

@Pitcrawler - yeah, I needed something like that on a lot other quests.

Completed as far as the core allowed me. It is close to the video, the credit works fine, but there are some mechanics, which I just couldn’t find a way to fix as the Sniff said, so made it a bit different.

Implemented

See below

Yes, see below

Not necessarily, see below

You can delete custom, non-static GUIDs by using a lookup first (such as name and subname), like this:

[CODE]
SET @ct_entry=(SELECT entry FROM creature_template WHERE name=‘Some Name’ AND subname=‘Some Title’);

– creature_template
DELETE FROM creature_template WHERE entry=@ct_entry;

– creature (spawns)
DELETE FROM creature WHERE guid IN (SELECT guid FROM creature WHERE id=@ct_entry);
[/SQL][/CODE]

I use similar to add a JC Trainer and vendor to Stormwind without any issues.