Trinitycore: DB/Quest: Terokk's Downfall

Created on 18 Jun 2011  ·  37Comments  ·  Source: TrinityCore/TrinityCore

http://www.wowhead.com/quest=11073/terokks-downfall

the quest should allow to summon the boss through the bones at the scene ... just that, talking to the bones, does not seem able to summon the boss

http://www.youtube.com/watch?v=71dF4s9ZCRM

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Comp-Database Feedback-FixOutdatedMissingWIP Sub-Quests

Most helpful comment

Here's the fix for quest http://www.wowhead.com/quest=11073/terokks-downfall which I ported from SunwellCore (https://github.com/Kittnz/Sunwell) and fixed the errors. All credits goes to everyone involved in SunwellCore and its contributors.

```sql
-- Terokk's Downfall (11073)

UPDATE gameobject_template SET AIName="SmartGameObjectAI" WHERE entry=185928;
DELETE FROM gossip_menu_option WHERE menu_id=8687;
INSERT INTO gossip_menu_option VALUES(8687, 1, 0, "

DELETE FROM event_scripts WHERE id=15014;
INSERT INTO event_scripts VALUES
(15014, 4, 10, 21838, 600000, 1, -3788, 3509, 287, 5.7);

DELETE FROM smart_scripts WHERE entryorguid=185928 AND source_type=1;
INSERT INTO smart_scripts VALUES
(185928, 1, 0, 1, 62, 0, 100, 0, 8687, 1, 0, 0, 85, 41004, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Terokk summon'),
(185928, 1, 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, 'Terokk summon - linked close gossip');

DELETE FROM conditions WHERE SourceTypeOrReferenceId=15 AND SourceGroup IN(8687);
DELETE FROM creature_text WHERE entry=21838;
INSERT INTO creature_text VALUES
(21838, 0, 0, "Who calls me to this world? The stars are not yet aligned... my powers fail me! You will pay for this!", 12, 0, 100, 0, 0, 0, 0, 0, 'Terokk'),
(21838, 1, 0, "You cannot kill me, I am immortal!", 14, 0, 100, 0, 0, 0, 0, 0, 'Terokk'),
(21838, 2, 0, "%s becomes enraged as his shield shatters.", 41, 0, 100, 0, 0, 0, 0, 0, 'Terokk');

DELETE FROM smart_scripts WHERE entryorguid=21838 AND source_type=0;
INSERT INTO smart_scripts VALUES
(21838, 0, 0, 0, 0, 0, 100, 0, 4000, 7000, 10000, 15000, 11, 40721, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Terokk - In Combat - Cast 'Shadow Bolt Volley'"),
(21838, 0, 1, 0, 0, 0, 100, 0, 6000, 9000, 7000, 9000, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Terokk - In Combat - Cast 'Cleave'"),
(21838, 0, 2, 3, 2, 0, 100, 1, 0, 30, 120000, 120000, 11, 40733, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Between 0-30% Health - Cast 'Divine Shield' (No Repeat)"),
(21838, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Between 0-30% Health - Say Line 0 (No Repeat)"),
(21838, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 23377, 90, 0, 0, 0, 0, 0, "Terokk - Between 0-30% Health - Set Data"),
(21838, 0, 5, 6, 23, 0, 100, 0, 40657, 1, 600000, 600000, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Has Aura - Talk 2"),
(21838, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 11, 28747, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Has Aura - Cast Frenzy"),
(21838, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 40733, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Has Aura - Remove Aura Divine Shield"),
(21838, 0, 8, 0, 6, 0, 100, 1, 0, 0, 0, 0, 11, 40722, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Just Died - Cast 'Will of the Arakkoa God' (No Repeat)"),
(21838, 0, 9, 10, 4, 0, 100, 1, 0, 0, 0, 0, 12, 23377, 3, 240000, 0, 0, 0, 8, 0, 0, 0, -3771.60, 3499.32, 317.88, 2.5, "Terokk - On Aggro - Summon Creature"),
(21838, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 23377, 90, 0, 0, 0, 0, 0, "Terokk - On Aggro - Talk Target 0"),
(21838, 0, 11, 0, 11, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Respawn - Talk 0"),
(21838, 0, 12, 13, 7, 0, 100, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Evade - Remove All Auras"),
(21838, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 23377, 90, 0, 0, 0, 0, 0, "Terokk - On Evade - Despawn Target"),
(21838, 0, 14, 0, 60, 0, 100, 1, 0, 0, 0, 0, 11, 39579, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Update - Cast Shadowform");

DELETE FROM creature_text WHERE entry=23377;
INSERT INTO creature_text VALUES
(23377, 0, 0, "Enemy sighted! Fall into formation and prepare for bombing maneuvers!", 14, 0, 100, 0, 0, 0, 0, 0, 'Skyguard Ace'),
(23377, 1, 0, "Quickly! Use the flames and support ground troops. Its ancient magic should cleanse Terokk's shield.", 14, 0, 100, 0, 0, 0, 0, 0, 'Skyguard Ace');

DELETE FROM conditions WHERE SourceTypeOrReferenceId=13 AND SourceEntry=40657;
INSERT INTO conditions VALUES
(13, 6, 40657, 0, 0, 31, 0, 3, 23277, 0, 0, 0, 0, '', 'Requires Skyguard Target');

DELETE FROM creature_template_addon WHERE entry IN (23377,23277);
INSERT INTO creature_template_addon VALUES
(23377, 0, 21152, 0, 1, 0, ''),
(23277, 0, 0, 0, 1, 0, '40656');

UPDATE creature_template SET flags_extra=128, faction=1856, InhabitType=4, AIName='SmartAI', ScriptName='' WHERE entry=23377;
DELETE FROM smart_scripts WHERE entryorguid=23377 AND source_type=0;
DELETE FROM smart_scripts WHERE entryorguid=23377100 AND source_type=9;
INSERT INTO smart_scripts VALUES
(23377, 0, 0, 0, 60, 0, 100, 0, 5000, 5000, 5000, 5000, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On Update - Despawn"),
(23377, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On Data Set - Talk 1"),
(23377, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 23377
100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On Data Set - Start Script"),
(23377100, 9, 0, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3805, 3515, 287.2, 0, "Script9 - Summon Creature"),
(23377
100, 9, 1, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3797, 3489, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 3, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3770, 3501, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 5, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3805, 3515, 287.2, 0, "Script9 - Summon Creature"),
(23377
100, 9, 7, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 8, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3797, 3489, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 9, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 10, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3770, 3501, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 11, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell");

DELETE FROM conditions WHERE SourceTypeOrReferenceId=22 AND SourceEntry=23377;
INSERT INTO conditions VALUES
(22, 1, 23377, 0, 0, 29, 1, 21838, 100, 0, 1, 0, 0, '', 'Run action if no npc nearby');
```

All 37 comments

1115

This quest is not working as of Trinity Revision: 5485f92c5fa0+ Database Version: TDB 335.11.48 addon AHBot.
I see it has been move several times but no fixes why is it closed?

Spell:41004 should cast. just create small sai on gosip select with this cast.

Not sure if I want to use SAI on this one, I might do it in cpp; we'll see.

This fixes the summoning issue only, terokk already has sai but he cannot be killed since it was conversion of old eai script which never worked to begin with and casts his shield at 20% hp and then stays like that till evade,

you need at least one time-lost offering to see gossip and one gets consumed when the summon spell gets cast,

spawn is via event script

UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE  `entry`=185928;

DELETE FROM `smart_scripts` WHERE `entryorguid`=185928 AND `source_type`=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
(185928, 1, 0, 1, 62, 0, 100, 0, 8687, 0, 0, 0, 85, 41004, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ancient Skull Pile - On Gossip Option 0 Selected - Invoker Cast Summon Terokk'),
(185928, 1, 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, 'Ancient Skull Pile - On Gossip Option 0 Selected - Close Gossip');

DELETE FROM `event_scripts` WHERE `id` =15014;
INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
(15014, 0, 10, 21838, 3000000, 0, -3789.4, 3507.63, 286.982, -0.994838);

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8687 AND `ConditionTypeOrReference`=29;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 8687, 0, 0, 0, 29, 0, 21838, 200, 0, 1, 0, 0, '', 'Only show gossip if no terokk nearby');

Now we need someone to fix terokk.

hmm i don't know, but terrok already has an script here:

-- Terokk SAI
SET @ENTRY := 21838;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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
(@ENTRY,0,0,0,0,0,100,0,4000,7000,10000,15000,11,40721,0,0,0,0,0,2,0,0,0,0,0,0,0,"Terokk - In Combat - Cast 'Shadow Bolt Volley'"),
(@ENTRY,0,1,0,0,0,100,0,6000,9000,7000,9000,11,15284,0,0,0,0,0,2,0,0,0,0,0,0,0,"Terokk - In Combat - Cast 'Cleave'"),
(@ENTRY,0,2,3,2,0,100,1,0,30,120000,120000,11,40733,1,0,0,0,0,1,0,0,0,0,0,0,0,"Terokk - Between 0-30% Health - Cast 'Divine Shield' (No Repeat)"),
(@ENTRY,0,3,0,61,0,100,0,0,30,120000,120000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terokk - Between 0-30% Health - Say Line 0 (No Repeat)"),
(@ENTRY,0,4,5,2,0,100,1,0,25,0,0,11,28747,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terokk - Between 0-25% Health - Cast 'Frenzy' (No Repeat)"),
(@ENTRY,0,5,0,61,0,100,0,0,25,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terokk - Between 0-25% Health - Say Line 0 (No Repeat)"),
(@ENTRY,0,6,0,6,0,100,1,0,0,0,0,11,40722,7,0,0,0,0,7,0,0,0,0,0,0,0,"Terokk - On Just Died - Cast 'Will of the Arakkoa God' (No Repeat)");

so closing?

Is there anything missing in this ?

I don't think he should be spawned all the time.

hes not spawned all the time unless someone perma spawned, you need a time lost offering to summon him,

That sai for terokk himself is conversion of old eai which was never completed and never worked properly to begin with,

When the terokk puts his shield up skyguard bombers are meant to come and drop blue smoke flares and you have to kite terokk to these to remove his shield,

confirm on 80ec3e1515368884e07d0568d458a8900e59f83f

still missing that last part @dr-j said. there is no way to remove inmune aura.

confirm b967047

confirm

is bug terokk can't be killed.

does anyone else have 2 of him spawning every time? I tried changing the spell cast on gossip from 41004 'Summon Terokk' to 41003 'Terokk Trigger' doesn't seem to do anything.

40655 Skyguard Flare - Summons the Skyguard Target NPC in a random spot
40656 Skyguard Flare - is the visual of the blue flare
40657 Ancient Flames - is the spell that should take off his Divine Shield

is it possible to do this in SAI? I wanted to try it but I'm not sure if the shield is suppose to break directly after a spell hit from Ancient Flames , or after a certain period of time in the flames.

http://www.wowhead.com/npc=23377/skyguard-ace

I haven't seen a lot of them on actual video, but from what I have seen 2 of them spawn and circle around the area shooting the flares

Unless a timed removal can be found in sniff from that event, it should be OK to remove the shield directly, because it will take some time to kill Terokk by players of the required level anyway.
Removing a shield by spell cast is usually instant.

I just can't figure out why two Terokks spawn. As far as I can tell the summon spell is only cast once. Can anyone else confirm two of him spawning on the gossip select

There are two of the same event_script for the summon, which is why two of him spawned.
http://pastebin.com/53YzmajC
^ would fix at least that part.
edit: Can't figure out how to format it properly on here, putting it into a pastebin.


DELETE FROM `event_scripts` WHERE `id`=15014;
INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(15014, 0, 10, 21838, 3000000, 0, -3789.4, 3507.63, 286.982, -0.994838);

(added by tkrokli)

TC>TrinityCore rev. 4cdbc1a09bf9 2016-10-09 20:18:07 -0300 (3.3.5 branch) (Win64, Release, Static)

  • TDB 335.61 plus updates up to and including 2016_10_09_02_world.sql.

World of Warcraft: How to kill Terokk https://youtu.be/qYI9V99zWNc?t=33s

No, I don't get 2 copies of Terokk, only 1 as expected. What is your core revision hash?

2016-10-10 3


(edit) event_scripts ? Not been used for years, at least not that I have noticed. Can anyone confirm?

The 2 copies must of been just my issue, somehow it got duplicated. Summon Terokk actually sends the script event. Where would one put the script if not in event_scripts?

SELECT * FROM `gameobject_template` WHERE `entry`= 185928;
 entry    type  displayId  name                IconName  castBarCaption  unk1      size   Data0   Data1   Data2   Data3   Data4   Data5   Data6   Data7   Data8   Data9  Data10  Data11  Data12  Data13  Data14  Data15  Data16  Data17  Data18  Data19  Data20  Data21  Data22  Data23  AIName             ScriptName  VerifiedBuild
------  ------  ---------  ------------------  --------  --------------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  -----------------  ----------  -------------
185928       2       6393  Ancient Skull Pile                                       1.5       0       0       0    8687       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0  SmartGameObjectAI                      12340

AIName = SmartGameObjectAI
Data3 = 8687 (gossip_menu_option.menu_id)
https://trinitycore.atlassian.net/wiki/pages/viewpage.action?pageId=2130143#gameobject_template-data0-23 (GAMEOBJECT_TYPE_QUESTGIVER = 2 data3: gossipID (gossip_menu_option.menu_id))

SELECT * FROM `gossip_menu_option` WHERE `menu_id`= 8687;
menu_id      id  option_icon  option_text           OptionBroadcastTextID  option_id  npc_option_npcflag  action_menu_id  action_poi_id  box_coded  box_money  box_text  BoxBroadcastTextID  VerifiedBuild
-------  ------  -----------  --------------------  ---------------------  ---------  ------------------  --------------  -------------  ---------  ---------  --------  ------------------  -------------
   8687       0            0  <Call forth Terokk.>                  21634          1                   1               0              0          0          0                             0              0
SELECT * FROM `smart_scripts` WHERE `entryorguid`= 185928;
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
-----------  -----------  ------  ------  ----------  ----------------  ------------  -----------  ------------  ------------  ------------  ------------  -----------  -------------  -------------  -------------  -------------  -------------  -------------  -----------  -------------  -------------  -------------  --------  --------  --------  --------  -----------------------------------------------------------------------------
     185928            1       0       1          62                 0           100            0          8687             0             0             0           85          41004              0              0              0              0              0            7              0              0              0         0         0         0         0  Ancient Skull Pile - On Gossip Option 0 Selected - Invoker Cast Summon Terokk
     185928            1       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  Ancient Skull Pile - On Gossip Option 0 Selected - Close Gossip

Invoker Cast Summon Terokk (41004) -> http://www.wowhead.com/spell=41004/summon-terokk

In retail, Ancient Skull Pile despawns for 15 minutes after the summon. I tried adding a SMART_ACTION_FORCE_DESPAWN to it's SmartGameobjectAI but it won't work for me.

also is Terokk Trigger pretty much useless? http://www.wowhead.com/spell=41003/terokk-trigger

Not sure exactly how to do that myself. Here is a search I did just now:
https://github.com/TrinityCore/TrinityCore/search?q=SMART_ACTION_FORCE_DESPAWN&type=Issues&utf8=

Pull Request: SmartAI: Possibility to despawn object with SMART_ACTION_FORCE_DESPAWN #15022

issue: SmartAI: SMART_ACTION_FORCE_DESPAWN for gameobject #15020

But also notice previous activity in this issue: commit https://github.com/TrinityCore/TrinityCore/commit/0f26ecb8cbbb8e3edee6fa0a0cbb8757b48ed584 based on https://github.com/TrinityCore/TrinityCore/issues/2029#issuecomment-33365668

--
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE  `entry`=185928;

DELETE FROM `smart_scripts` WHERE `entryorguid`=185928 AND `source_type`=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
(185928, 1, 0, 1, 62, 0, 100, 0, 8687, 0, 0, 0, 85, 41004, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ancient Skull Pile - On Gossip Option 0 Selected - Invoker Cast Summon Terokk'),
(185928, 1, 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, 'Ancient Skull Pile - On Gossip Option 0 Selected - Close Gossip');

DELETE FROM `event_scripts` WHERE `id` =15014;
INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
(15014, 0, 10, 21838, 3000000, 0, -3789.4, 3507.63, 286.982, -0.994838);

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8687 AND `ConditionTypeOrReference`=29;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 8687, 0, 0, 0, 29, 0, 21838, 200, 0, 1, 0, 0, '', 'Only show gossip if no terokk nearby');

I see that event_scripts is used to spawn the GO, current TDB 335.61 content:

SELECT * FROM `event_scripts` WHERE `id` =15014;
    id   delay  command  datalong  datalong2  dataint        x        y        z          o  
------  ------  -------  --------  ---------  -------  -------  -------  -------  -----------
 15014       0       10     21838    3000000        0  -3789.4  3507.63  286.982    -0.994838

https://trinitycore.atlassian.net/wiki/display/tc/scripts (read the lines applicable for event_scripts)

id = 15014 (Event ID)
delay = 0 (Delay in seconds before this current step of the script activates. 0 = instant.)
command = 10 (TEMP_SUMMON_CREATURE - Temporarily summons a creature)
datalong = 21838 (Entry of the summoned creature. See creature_template.entry)
datalong2 = 3000000 (Despawn time in ms.)
dataint = 0 (not used in command = 10 (TEMP_SUMMON_CREATURE))

About despawning the GO, you said that it is supposed to be despawned for 15 minutes before respawning. That makes a lot of sense, because Terokk spawns in the same spot as the GO and also returns to that spot when evading (that happened a lot when I tested, so it looks a bit off to see him standing on top of the Ancient Skull Pile instead of standing on the ground). I am pretty sure some of the other developers like @dr-j, @Killyana and @SnapperRy know a lot more about this than I do (which is not much atm). I need to search a lot to find the info, so I will need a few days or a week to provide an educated answer there.

The event_script is what spawns Terokk, the GO is permanently there. The Summon spell only calls that event and activates a gameobject, most likely the skull pile. Maybe activating it should phase it out or something?

Good point, good question. I don't know. Needs more research or someone who knows.

More information: Terokk uses this spell - http://www.wowhead.com/spell=40726/chosen-one#used-by-npc

DELETE FROM `smart_scripts` WHERE `entryorguid`=21838;

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 
(21838, 0, 0, 0, 0, 0, 100, 0, 4000, 7000, 10000, 15000, 11, 40721, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Terokk - In Combat - Cast \'Shadow Bolt Volley\'');
(21838, 0, 1, 0, 0, 0, 100, 0, 6000, 9000, 7000, 9000, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Terokk - In Combat - Cast \'Cleave\'');
(21838, 0, 2, 3, 2, 0, 100, 0, 0, 20, 45000, 45000, 11, 40733, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - Between 0-20% Health - Cast \'Divine Shield\' (No Repeat)');
(21838, 0, 3, 0, 61, 0, 100, 1, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - Between 0-20% Health - Say Line 3 (No Repeat)');
(21838, 0, 4, 5, 2, 0, 100, 1, 20, 40, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - Between 20-40% Health - Say Line 2 (No Repeat)');
(21838, 0, 5, 0, 61, 0, 100, 1, 0, 0, 0, 0, 11, 40726, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Terokk - Between 20-40% Health - Cast \'Chosen One\'');
(21838, 0, 6, 7, 8, 0, 100, 0, 40657, 0, 0, 0, 28, 40733, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - On \'Ancient Flames\' Spellhit - Remove \'Divine Shield\'');
(21838, 0, 7, 8, 61, 0, 100, 1, 0, 0, 0, 0, 11, 28747, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - On \'Ancient Flames\' Spellhit - Cast \'Frenzy\'');
(21838, 0, 8, 0, 61, 0, 100, 1, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - On \'Ancient Flames\' Spellhit - Say Line 4');
(21838, 0, 10, 11, 54, 0, 100, 513, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - On Just Summoned - Say Line 1');
(21838, 0, 11, 0, 61, 0, 100, 513, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - On Just Summoned - Set Unattackable');
(21838, 0, 12, 0, 1, 0, 100, 513, 10000, 10000, 10000, 10000, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Terokk - Update Out of Combat (After Spawn) - Set Attackable');
(21838, 0, 13, 0, 6, 0, 100, 513, 0, 0, 0, 0, 11, 40722, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Terokk - On Just Died - Cast \'Will of the Arakkoa God\' (No Repeat)');

DELETE FROM `creature_text` WHERE `entry`=21838;

INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(21838, 1, 0, 'Who calls me to this world?  The stars are not yet aligned... my powers fail me!  You will pay for this!', 14, 0, 0, 0, 0, 0, 21639, 0, 'Terokk On Summon');
(21838, 2, 0, 'Show me what you\'re made of, $n!', 14, 0, 0, 0, 0, 0, 21327, 0, 'Terokk On 40% Health');
(21838, 3, 0, 'Kwa! You cannot kill me, I am immortal!', 14, 0, 0, 0, 0, 0, 24020, 0, 'Terokk On 20% Health');
(21838, 4, 0, 'Terokk becomes enraged as his shield shatters!', 41, 0, 0, 0, 0, 0, 0, 0, 'Terokk Boss Emote');

Here is a WIP that includes all of his missing text overs

Well the problem why this has never been scripted is due to Waypoints and vehicles the blue fire which you are meant to drag Terokk to should be dropped by skyguard bombers once Terokk puts his shield up.

I was responsible for scripting the gameobject for this https://github.com/TrinityCore/TrinityCore/commit/0f26ecb8cbbb8e3edee6fa0a0cbb8757b48ed584 however actual script on Terokk was eai to sai conversion and never actually worked properly.

do you mean that Skyguard Ace actually uses a vehicle instead of just a mount (via creature_addon)?

could anyone sniff out the waypoints for Skyguard Ace? this quest is repeatable I think.

Very unlikely for it to be a vehicle, as those weren't introduced until WotLK :P

The quest itself is not repeatable, but Terokk can be summoned anytime by farming the reagents.

Here's the fix for quest http://www.wowhead.com/quest=11073/terokks-downfall which I ported from SunwellCore (https://github.com/Kittnz/Sunwell) and fixed the errors. All credits goes to everyone involved in SunwellCore and its contributors.

```sql
-- Terokk's Downfall (11073)

UPDATE gameobject_template SET AIName="SmartGameObjectAI" WHERE entry=185928;
DELETE FROM gossip_menu_option WHERE menu_id=8687;
INSERT INTO gossip_menu_option VALUES(8687, 1, 0, "

DELETE FROM event_scripts WHERE id=15014;
INSERT INTO event_scripts VALUES
(15014, 4, 10, 21838, 600000, 1, -3788, 3509, 287, 5.7);

DELETE FROM smart_scripts WHERE entryorguid=185928 AND source_type=1;
INSERT INTO smart_scripts VALUES
(185928, 1, 0, 1, 62, 0, 100, 0, 8687, 1, 0, 0, 85, 41004, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Terokk summon'),
(185928, 1, 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, 'Terokk summon - linked close gossip');

DELETE FROM conditions WHERE SourceTypeOrReferenceId=15 AND SourceGroup IN(8687);
DELETE FROM creature_text WHERE entry=21838;
INSERT INTO creature_text VALUES
(21838, 0, 0, "Who calls me to this world? The stars are not yet aligned... my powers fail me! You will pay for this!", 12, 0, 100, 0, 0, 0, 0, 0, 'Terokk'),
(21838, 1, 0, "You cannot kill me, I am immortal!", 14, 0, 100, 0, 0, 0, 0, 0, 'Terokk'),
(21838, 2, 0, "%s becomes enraged as his shield shatters.", 41, 0, 100, 0, 0, 0, 0, 0, 'Terokk');

DELETE FROM smart_scripts WHERE entryorguid=21838 AND source_type=0;
INSERT INTO smart_scripts VALUES
(21838, 0, 0, 0, 0, 0, 100, 0, 4000, 7000, 10000, 15000, 11, 40721, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Terokk - In Combat - Cast 'Shadow Bolt Volley'"),
(21838, 0, 1, 0, 0, 0, 100, 0, 6000, 9000, 7000, 9000, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, "Terokk - In Combat - Cast 'Cleave'"),
(21838, 0, 2, 3, 2, 0, 100, 1, 0, 30, 120000, 120000, 11, 40733, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Between 0-30% Health - Cast 'Divine Shield' (No Repeat)"),
(21838, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Between 0-30% Health - Say Line 0 (No Repeat)"),
(21838, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 23377, 90, 0, 0, 0, 0, 0, "Terokk - Between 0-30% Health - Set Data"),
(21838, 0, 5, 6, 23, 0, 100, 0, 40657, 1, 600000, 600000, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Has Aura - Talk 2"),
(21838, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 11, 28747, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Has Aura - Cast Frenzy"),
(21838, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 28, 40733, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - Has Aura - Remove Aura Divine Shield"),
(21838, 0, 8, 0, 6, 0, 100, 1, 0, 0, 0, 0, 11, 40722, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Just Died - Cast 'Will of the Arakkoa God' (No Repeat)"),
(21838, 0, 9, 10, 4, 0, 100, 1, 0, 0, 0, 0, 12, 23377, 3, 240000, 0, 0, 0, 8, 0, 0, 0, -3771.60, 3499.32, 317.88, 2.5, "Terokk - On Aggro - Summon Creature"),
(21838, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 23377, 90, 0, 0, 0, 0, 0, "Terokk - On Aggro - Talk Target 0"),
(21838, 0, 11, 0, 11, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Respawn - Talk 0"),
(21838, 0, 12, 13, 7, 0, 100, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Evade - Remove All Auras"),
(21838, 0, 13, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 23377, 90, 0, 0, 0, 0, 0, "Terokk - On Evade - Despawn Target"),
(21838, 0, 14, 0, 60, 0, 100, 1, 0, 0, 0, 0, 11, 39579, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Terokk - On Update - Cast Shadowform");

DELETE FROM creature_text WHERE entry=23377;
INSERT INTO creature_text VALUES
(23377, 0, 0, "Enemy sighted! Fall into formation and prepare for bombing maneuvers!", 14, 0, 100, 0, 0, 0, 0, 0, 'Skyguard Ace'),
(23377, 1, 0, "Quickly! Use the flames and support ground troops. Its ancient magic should cleanse Terokk's shield.", 14, 0, 100, 0, 0, 0, 0, 0, 'Skyguard Ace');

DELETE FROM conditions WHERE SourceTypeOrReferenceId=13 AND SourceEntry=40657;
INSERT INTO conditions VALUES
(13, 6, 40657, 0, 0, 31, 0, 3, 23277, 0, 0, 0, 0, '', 'Requires Skyguard Target');

DELETE FROM creature_template_addon WHERE entry IN (23377,23277);
INSERT INTO creature_template_addon VALUES
(23377, 0, 21152, 0, 1, 0, ''),
(23277, 0, 0, 0, 1, 0, '40656');

UPDATE creature_template SET flags_extra=128, faction=1856, InhabitType=4, AIName='SmartAI', ScriptName='' WHERE entry=23377;
DELETE FROM smart_scripts WHERE entryorguid=23377 AND source_type=0;
DELETE FROM smart_scripts WHERE entryorguid=23377100 AND source_type=9;
INSERT INTO smart_scripts VALUES
(23377, 0, 0, 0, 60, 0, 100, 0, 5000, 5000, 5000, 5000, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On Update - Despawn"),
(23377, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On Data Set - Talk 1"),
(23377, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 23377
100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "On Data Set - Start Script"),
(23377100, 9, 0, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3805, 3515, 287.2, 0, "Script9 - Summon Creature"),
(23377
100, 9, 1, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3797, 3489, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 3, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3770, 3501, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 5, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3805, 3515, 287.2, 0, "Script9 - Summon Creature"),
(23377
100, 9, 7, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 8, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3797, 3489, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 9, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell"),
(23377100, 9, 10, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 12, 23277, 3, 22000, 0, 0, 0, 8, 0, 0, 0, -3770, 3501, 287.1, 0, "Script9 - Summon Creature"),
(23377
100, 9, 11, 0, 0, 0, 100, 0, 17000, 17000, 0, 0, 11, 40657, 2, 0, 0, 0, 0, 19, 23277, 50, 0, 0, 0, 0, 0, "Script9 - Cast Spell");

DELETE FROM conditions WHERE SourceTypeOrReferenceId=22 AND SourceEntry=23377;
INSERT INTO conditions VALUES
(22, 1, 23377, 0, 0, 29, 1, 21838, 100, 0, 1, 0, 0, '', 'Run action if no npc nearby');
```

works good for me

Any news for this Ancient Bug ?
Now i have tested the fix from @TerrorBringer and its works fine 👍
can you please push in GIT?

I would like to know why Aokromes thinks it is outdated or incomplete (why the label was changed) before pushing it. I also wonder if Killyana or dr-j knows why it should not be pushed.

Well idk could be pushed but the bombers are meant to follow path dropping bombs not spawning at each location casting spell to drop bomb then despawn as above does

OK, so the suggested solution lacks waypoints and a scripted waypoint part.


edit: By closer inspection, I also notice that the SQL from TerrorBringer is poorly documented, it deletes existing content from TDB without inserting it again and also has some mistakes. I don't approve of that way of doing it (as well as the outdated formats in some of the tables).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rushor picture Rushor  ·  3Comments

Jildor picture Jildor  ·  3Comments

Rushor picture Rushor  ·  3Comments

DDuarte picture DDuarte  ·  3Comments

cbcs picture cbcs  ·  3Comments