CPP part involved - can't multipull stuff, so will just spam over issues: (tested)
http://pastebin.com/u6SSQK5R
(Needs to be put in scripts/spells/spell_quest.cpp
-- Add support for quest "Teleport this!" - http://www.wowhead.com/quest=10857
-- ID indexes
-- NPCs
SET @FORGELORD := 16943;
SET @IRONSPINE_FORGELORD := 20928;
SET @WESTERN_TP := 22348;
SET @EASTERN_TP := 22351;
SET @CENTRAL_TP := 22350;
SET @GUID := XXXXX; -- Guid for teleporters credits set by TDB team
SET @MISSING_TRIGGER_GUID := XXXXX; -- Set by TDB team
-- Scripts
SET @WESTERN_SCRIPT := 22348*100;
SET @EASTERN_SCRIPT := 22351*100;
SET @CENTRAL_SCRIPT := 22350*100;
-- Spells
SET @DETONATE := 38920;
SET @MENTAL_INT := 38915; -- item charming spell
-- Remove immunity to players/npcs for credits
UPDATE `creature_template` SET `unit_flags`=unit_flags&~256&~512 WHERE `entry` IN (@CENTRAL_TP,@EASTERN_TP,@WESTERN_TP);
-- Update template for charmed NPCs - spell bar support
UPDATE `creature_template` SET `spell2`=36255,`spell3`=8599,`spell4`=38920 WHERE `entry`=@FORGELORD;
UPDATE `creature_template` SET `spell2`=33963,`spell3`=36251,`spell4`=38920 WHERE `entry`=@IRONSPINE_FORGELORD;
-- Insert missing spawns for killcredits /here the spell itself kills the credit to reward it/
DELETE FROM `creature` WHERE `guid` IN (@GUID,@GUID+1,@GUID+2,@MISSING_TRIGGER_GUID);
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
(@GUID,@EASTERN_TP,530,1,1,0,0,4672.85,3126.15,166.729,2.16261,300,0,0,6722,0,0,0,0,0),
(@GUID+1,@CENTRAL_TP,530,1,1,0,0,4733.85,3193.78,161.486,2.56865,300,0,0,6722,0,0,0,0,0),
(@GUID+2,@WESTERN_TP,530,1,1,0,0,4697.31,3298.01,178.886,5.40394,300,0,0,6722,0,0,0,0,0),
(@MISSING_TRIGGER_GUID,19656,530,1,1,0,0,4626.69,3262.59,176.827,0.418778,300,0,0,4120,0,0,0,0,0);
-- Conditions
DELETE FROM `conditions` WHERE `SourceEntry`=@DETONATE AND `SourceTypeOrReferenceId`=13;
DELETE FROM `conditions` WHERE `SourceEntry`=@MENTAL_INT AND `SourceTypeOrReferenceId`=17;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,7,@DETONATE,0,1,31,0,3,@WESTERN_TP,0,0,0,'', 'Detonate all 3 implicit effects can hit western teleporter'),
(13,7,@DETONATE,0,2,31,0,3,@EASTERN_TP,0,0,0,'', 'Detonate all 3 implicit effects can hit eastern teleporter'),
(13,7,@DETONATE,0,3,31,0,3,@CENTRAL_TP,0,0,0,'', 'Detonate all 3 implicit effects can hit central teleporter'),
(17,0,@MENTAL_INT,0,1,31,1,3,@FORGELORD,0,0,0,'', 'Mental interference target can be Cyber-Rage Forgelord'),
(17,0,@MENTAL_INT,0,2,31,1,3,@IRONSPINE_FORGELORD,0,0,0,'', 'Mental interference target can be Ironspine Forgelord');
-- Insert spell_script names
DELETE FROM `spell_script_names` WHERE `spell_id`=@DETONATE;
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(@DETONATE, 'spell_q10857_detonate');
-- Remove triggers with nonexistant wrong coordinates (on top of that they are uneeded, since proper spawns exist already)
DELETE FROM `creature` WHERE `guid` IN (70104,70103,70102,70101,70100);
-- This visually don't work, because auras are not applied on target to make the channel, can't trace why /////////////////Some outside of the quest viusal stuff that are part of the visual mechanic/////////////////
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-70104,-70103,-70102,-70101,-70100) AND `source_type`=0; -- wrong spawns and nowhere to place, so remove their scripts too
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-70125,-70122,-70124,-70126,-70123,-70116,-70115,-70117,-70118,-70119,-70128,-70127,-70121,-70120,-@MISSING_TRIGGER_GUID,@CENTRAL_TP,@WESTERN_TP,@EASTERN_TP) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@CENTRAL_SCRIPT,@WESTERN_SCRIPT,@EASTERN_SCRIPT) AND `source_type`=9;
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
-- Central teleporter beaming system
(@CENTRAL_TP,0,0,0,25,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,70116,19656,0,0,0,0,0,'Central Teleporter - On just spawned - Data set 0 1'),
(@CENTRAL_TP,0,1,2,8,0,100,0,@DETONATE,0,60000,60000,45,0,2,0,0,0,0,10,70116,19656,0,0,0,0,0,'Central Teleporter - On hit by detonation - Data set 0 1'),
(@CENTRAL_TP,0,2,0,61,0,100,0,0,0,0,0,80,@CENTRAL_SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0,'Central Teleporter - Linked with previous event - Start action list (for restart beams in 60 secs)'),
(@CENTRAL_SCRIPT,9,0,0,0,0,100,0,60000,60000,0,0,45,0,1,0,0,0,0,10,70116,19656,0,0,0,0,0,'Central Teleporter - Action 0 - Data set 0 1 to start beams'),
(-70116,0,0,0,38,0,100,0,0,2,0,0,28,33346,0,0,0,0,0,1,0,0,0,0,0,0,0,'Invisible Location Trigger (central teleporter crystal) - On data set 0 2 - Remove all auras from Green Beam'),
(-70116,0,1,2,38,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70115,19656,0,0,0,0,0,'Invisible Location Trigger (central teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70116,0,2,3,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70117,19656,0,0,0,0,0,'Invisible Location Trigger (central teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70116,0,3,4,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70118,19656,0,0,0,0,0,'Invisible Location Trigger (central teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70116,0,4,0,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70119,19656,0,0,0,0,0,'Invisible Location Trigger (central teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70115,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70116,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70118,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70116,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70117,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70116,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70119,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70116,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
-- Western teleporter beaming system
(@WESTERN_TP,0,0,0,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,70120,19656,0,0,0,0,0,'Western Teleporter - On just spawned - Data set 0 1'),
(@WESTERN_TP,0,1,2,8,0,100,0,@DETONATE,0,60000,60000,45,0,2,0,0,0,0,10,70120,19656,0,0,0,0,0,'Western Teleporter - On hit by detonation - Data set 0 1'),
(@WESTERN_TP,0,2,0,61,0,100,0,0,0,0,0,80,@WESTERN_SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0,'Western Teleporter - Linked with previous event - Start action list (for restart beams in 60 secs)'),
(@WESTERN_SCRIPT,9,0,0,0,0,100,0,60000,60000,0,0,45,0,1,0,0,0,0,10,70120,19656,0,0,0,0,0,'Western Teleporter - Action 0 - Data set 0 1 to start beams'),
(-70120,0,0,0,38,0,100,0,0,2,0,0,28,33346,0,0,0,0,0,1,0,0,0,0,0,0,0,'Invisible Location Trigger (western teleporter crystal) - On data set 0 2 - Remove all auras from Green Beam'),
(-70120,0,1,2,38,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70128,19656,0,0,0,0,0,'Invisible Location Trigger (western teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70120,0,2,3,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70121,19656,0,0,0,0,0,'Invisible Location Trigger (western teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70120,0,3,4,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70127,19656,0,0,0,0,0,'Invisible Location Trigger (western teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70120,0,4,0,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,@MISSING_TRIGGER_GUID,19656,0,0,0,0,0,'Invisible Location Trigger (western teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70128,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70120,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70121,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70120,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70127,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70120,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-@MISSING_TRIGGER_GUID,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70120,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
-- Eastern teleporter beaming system
(@EASTERN_TP,0,0,0,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,70123,19656,0,0,0,0,0,'Eastern teleporter - On just spawned - Data set 0 1'),
(@EASTERN_TP,0,1,2,8,0,100,0,@DETONATE,0,60000,60000,45,0,2,0,0,0,0,10,70123,19656,0,0,0,0,0,'Eastern Teleporter - On hit by detonation - Data set 0 1'),
(@EASTERN_TP,0,2,0,61,0,100,0,0,0,0,0,80,@EASTERN_SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0,'Eeastern Teleporter - Linked with previous event - Start action list (for restart beams in 60 secs)'),
(@EASTERN_SCRIPT,9,0,0,0,0,100,0,60000,60000,0,0,45,0,1,0,0,0,0,10,70123,19656,0,0,0,0,0,'Eeastern Teleporter - Action 0 - Data set 0 1 to start beams'),
(-70123,0,0,0,38,0,100,0,0,2,0,0,28,33346,0,0,0,0,0,1,0,0,0,0,0,0,0,'Invisible Location Trigger (eastern teleporter crystal) - On data set 0 2 - Remove all auras from Green Beam'),
(-70123,0,1,2,38,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70126,19656,0,0,0,0,0,'Invisible Location Trigger (eastern teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70123,0,2,3,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70122,19656,0,0,0,0,0,'Invisible Location Trigger (eastern teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70123,0,3,4,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70124,19656,0,0,0,0,0,'Invisible Location Trigger (eastern teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70123,0,4,0,61,0,100,0,0,1,0,0,45,0,1,0,0,0,0,10,70125,19656,0,0,0,0,0,'Invisible Location Trigger (eastern teleporter crystal) - On data set 0 1 - Data set 0 1'),
(-70126,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70123,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70122,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70123,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70124,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70123,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target'),
(-70125,0,0,0,38,0,100,0,0,1,0,0,11,33346,0,0,0,0,0,10,70123,19656,0,0,0,0,0,'Invisible Location Trigger - On data set 0 1 - Cast Green Beam on target');
CPP part involved - can't multipull stuff, so will just spam over issues: (tested)
http://pastebin.com/u6SSQK5R
(Needs to be put in scripts/spells/spell_quest.cpp
TDB: 11.49