aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-12-19 08:23:34 +0100
committerSpp <spp@jorge.gr>2012-12-19 08:23:34 +0100
commit80b1b6c4940a43fa0db175097a54d6cb50e7b15c (patch)
treeab3c1f0d7ea2df6fb563e3af7e205fcc84baacda /sql
parenta227a3494766103cf6805cf52839612854c2767b (diff)
parenta2832805afb9a8a3434172479c814ca2a729ece1 (diff)
Merge branch 'master' into 4.3.4
Conflicts: src/server/game/Globals/ObjectMgr.cpp src/server/game/World/World.h src/server/scripts/Kalimdor/moonglade.cpp
Diffstat (limited to 'sql')
-rw-r--r--sql/updates/characters/2012_12_18_00_character_worldstates.sql5
-rw-r--r--sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql4
-rw-r--r--sql/updates/world/2012_12_18_00_world_creature_text.sql5
-rw-r--r--sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql47
-rw-r--r--sql/updates/world/2012_12_18_01_world_creature_text.sql75
-rw-r--r--sql/updates/world/2012_12_18_02_world_misc.sql14
-rw-r--r--sql/updates/world/2012_12_18_02_world_sai.sql47
-rw-r--r--sql/updates/world/2012_12_19_00_world_sai.sql106
8 files changed, 303 insertions, 0 deletions
diff --git a/sql/updates/characters/2012_12_18_00_character_worldstates.sql b/sql/updates/characters/2012_12_18_00_character_worldstates.sql
new file mode 100644
index 00000000000..d781441f266
--- /dev/null
+++ b/sql/updates/characters/2012_12_18_00_character_worldstates.sql
@@ -0,0 +1,5 @@
+DELETE FROM `worldstates` WHERE `entry` IN (20004,20007,20050);
+INSERT INTO `worldstates` (`entry`, `value`, `comment`) VALUES
+(20004,0,'CleaningFlags'),
+(20007,0,'NextMonthlyQuestResetTime')
+(20050,0,'NextWeeklyGuildResetTime');
diff --git a/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql
new file mode 100644
index 00000000000..a2cfc7073d0
--- /dev/null
+++ b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql
@@ -0,0 +1,4 @@
+-- Fix Preserved Holly item triggered spell to apply reindeer transformation also so Fa-la-la-la Ogri'La can be doable with it also, based on sniffs.
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=62061;
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(62061,25860,0, 'Festive Holiday Mount');
diff --git a/sql/updates/world/2012_12_18_00_world_creature_text.sql b/sql/updates/world/2012_12_18_00_world_creature_text.sql
new file mode 100644
index 00000000000..1cf9211343f
--- /dev/null
+++ b/sql/updates/world/2012_12_18_00_world_creature_text.sql
@@ -0,0 +1,5 @@
+DELETE FROM `creature_text` WHERE `entry`=32273;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(32273, 0, 0, 'How dare you interfere with our work!', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_AGGRO'),
+(32273, 1, 0, 'My time... has run out...', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_DEATH'),
+(32273, 2, 0, 'The process is finally complete! My work here is done.', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_FAIL');
diff --git a/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql
new file mode 100644
index 00000000000..4f8a203100d
--- /dev/null
+++ b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql
@@ -0,0 +1,47 @@
+-- Convert quest_end_script "10964" to SAI, alongside dropping creature c++ script
+-- Indexes:
+SET @CLINTAR_DREAMWALKER := 22834;
+SET @SCRIPT := @CLINTAR_DREAMWALKER * 100;
+SET @SPIRIT := 22916;
+
+-- Remove template addon emote (all is handled by that SAI, this breaks it)
+UPDATE `creature_template_addon` SET `emote`=0 WHERE `entry`=@CLINTAR_DREAMWALKER;
+
+-- Remove from quest_end_scripts
+DELETE FROM `quest_end_scripts` WHERE `id`=10964;
+
+-- Add SAI support and drop c++ script
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@CLINTAR_DREAMWALKER;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@CLINTAR_DREAMWALKER AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@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
+(@CLINTAR_DREAMWALKER,0,0,0,20,0,100,0,10964,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10964 rewarded - Start action list'),
+(@CLINTAR_DREAMWALKER,0,1,2,19,1,100,0,10965,0,0,0,12,@SPIRIT,2,100000,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10965 accepted - Spawn creature (can happen only after actionlist stuff are complete)'),
+(@CLINTAR_DREAMWALKER,0,2,0,61,1,100,0,0,0,0,0,69,3,0,0,0,0,0,8,0,0,0,7459.47,-3122.79,439.485,5.84588, 'Clintar Dreamwalker - Linked - Move to pos'),
+(@CLINTAR_DREAMWALKER,0,3,4,34,1,100,0,8,3,0,0,90,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On point 3 reached set - Set field byte 1 for sleeping'),
+(@CLINTAR_DREAMWALKER,0,4,0,61,1,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Set phase 0'),
+(@CLINTAR_DREAMWALKER,0,5,6,1,1,100,1,360000,360000,360000,360000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - OOC (phase 1) - Set unseen'),
+(@CLINTAR_DREAMWALKER,0,6,0,61,1,100,1,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Despawn'),
+(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 0 - Remove npc flag for quest giver'),
+(@SCRIPT,9,1,0,0,0,100,0,3000,3000,0,0,91,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 1 - Remove bytes for sleeping'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 2 - Set bytes 1 kneel'),
+(@SCRIPT,9,3,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 3 - Say line 0'),
+(@SCRIPT,9,4,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 4 - Say line 1 (with exclamation emote)'),
+(@SCRIPT,9,5,0,0,0,100,0,7000,7000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 5 - Say line 2'),
+(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 6 - Remove bytes 1 for kneel'),
+(@SCRIPT,9,7,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 7 - Say line 3'),
+(@SCRIPT,9,8,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.25,-3116.29,439.604,5.534, 'Clintar Dreamwalker - Action 8 - Move to pos'),
+(@SCRIPT,9,9,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.79,-3116.83,439.604,5.534, 'Clintar Dreamwalker - Action 9 - Move to pos'),
+(@SCRIPT,9,10,0,0,0,100,0,8000,8000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 10 - Say line 4'),
+(@SCRIPT,9,11,0,0,0,100,0,1500,1500,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 11 - Add npc flag for quest giver'),
+(@SCRIPT,9,12,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 12 - Set phase 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000067,2000000068,2000000069);
+DELETE FROM `creature_text` WHERE `entry`=@CLINTAR_DREAMWALKER;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@CLINTAR_DREAMWALKER,0,0, 'Clintar Dreamwalker snaps up to a kneeling position, but seems as though he''s somewhere else.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 0)'),
+(@CLINTAR_DREAMWALKER,1,0, 'What are you doing in Ysera''s realm, interloper? Leave us, I say! Your kind are not welcome here!',12,0,100,5,0,0, 'Clintar Dreamwalker (line 1)'),
+(@CLINTAR_DREAMWALKER,2,0, 'Clintar Dreamwalker gets to his feet, beginning to recognize his surroundings.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 2)'),
+(@CLINTAR_DREAMWALKER,3,0, 'You - you''re not one of them! Let''s get out of sight before they find us! Hurry! ',12,0,100,1,0,0, 'Clintar Dreamwalker (line 3)'),
+(@CLINTAR_DREAMWALKER,4,0, 'They''re following me, $R! Quickly, tell me why you''re here before we''re discovered! If they catch up to me, it will mean my death and yours!',12,0,100,1,0,0, 'Clintar Dreamwalker (line 4)');
diff --git a/sql/updates/world/2012_12_18_01_world_creature_text.sql b/sql/updates/world/2012_12_18_01_world_creature_text.sql
new file mode 100644
index 00000000000..24779f67fc7
--- /dev/null
+++ b/sql/updates/world/2012_12_18_01_world_creature_text.sql
@@ -0,0 +1,75 @@
+-- Vazruden the herald
+DELETE FROM `creature_text` WHERE `entry`=17307;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+(17307,0,0,14,100,10292,"vazruden the herald SAY_INTRO","You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!");
+
+-- Nazan
+DELETE FROM `creature_text` WHERE `entry`=17536;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`comment`,`text`) VALUE
+(17536,0,0,41,100,"nazan EMOTE","%s descends from the sky");
+
+-- Vazruden
+DELETE FROM `creature_text` WHERE `entry`=17537;
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+(17537,0,0,14,100,10293,"vazruden SAY_WIPE","Is there no one left to test me?"),
+(17537,1,0,14,100,10294,"vazruden SAY_AGGRO_1","Your time is running out!"),
+(17537,1,1,14,100,10295,"vazruden SAY_AGGRO_2","You are nothing, I answer a higher call!"),
+(17537,1,2,14,100,10296,"vazruden SAY_AGGRO_3","The Dark Lord laughs at you!"),
+(17537,2,0,14,100,10297,"vazruden SAY_KILL_1","It is over. Finished!"),
+(17537,2,1,14,100,10298,"vazruden SAY_KILL_2","Your days are done!"),
+(17537,3,0,14,100,10299,"vazruden SAY_DIE","My lord will be the end you all...");
+
+-- Talbot aka Prince Valanar (There's an UpdateEntry() call in the script which I did not see)
+UPDATE `creature_text` SET `entry`=28189 WHERE `entry`=25301;
+
+-- Darion Mograine
+UPDATE `creature_text` SET `entry`=29228 WHERE `entry`=29173 AND `groupid`=74;
+
+-- Core rager
+UPDATE `creature_text` SET `entry`=11672 WHERE `entry`=11988;
+
+DELETE FROM `creature_text` WHERE `entry` IN (15550,16151);
+INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES
+-- Attumen
+(15550,0,0,14,100,9169,"attumen SAY_KILL1","It was... inevitable."),
+(15550,0,1,14,100,9300,"attumen SAY_KILL2","Another trophy to add to my collection!"),
+(15550,1,0,14,100,9166,"attumen SAY_DISARMED","Weapons are merely a convenience for a warrior of my skill!"),
+(15550,2,0,14,100,9165,"attumen SAY_DEATH","I always knew... someday I would become... the hunted."),
+(15550,3,0,14,100,9170,"attumen SAY_RANDOM1","Such easy sport."),
+(15550,3,1,14,100,9304,"attumen SAY_RANDOM2","Amateurs! Do not think you can best me! I kill for a living."),
+-- Midnight
+(16151,0,0,14,100,9173,"attumen SAY_MIDNIGHT_KILL","Well done Midnight!"),
+(16151,1,0,14,100,9167,"attumen SAY_APPEAR1","Cowards! Wretches!"),
+(16151,1,1,14,100,9298,"attumen SAY_APPEAR2","Who dares attack the steed of the Huntsman?"),
+(16151,1,2,14,100,9299,"attumen SAY_APPEAR3","Perhaps you would rather test yourselves against a more formidable opponent?!"),
+(16151,2,0,14,100,9168,"attumen SAY_MOUNT","Come, Midnight, let\'s disperse this petty rabble!");
+
+-- Creature text preparation for rajaxx
+DELETE FROM `creature_text` WHERE `entry` IN (15471,15341);
+INSERT INTO `creature_text`(`entry`,`groupid`,`sound`,`type`,`probability`,`comment`,`text`) VALUES
+(15471,0,0,14,100,"andorov SAY_ANDOROV_INTRO","They come now. Try not to get yourself killed, young blood."),
+(15471,1,0,14,100,"andorov SAY_ANDOROV_ATTACK","Remember, Rajaxx, when I said I\'d kill you last? I lied..."),
+(15341,0,8612,14,100,"rajaxx SAY_WAVE3","The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!"),
+(15341,1,8610,14,100,"rajaxx SAY_WAVE4","No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!"),
+(15341,2,8608,14,100,"rajaxx SAY_WAVE5","Fear is for the enemy! Fear and death!"),
+(15341,3,8611,14,100,"rajaxx SAY_WAVE6","Staghelm will whimper and beg for his life, just as his whelp of a son did! One thousand years of injustice will end this day!"),
+(15341,4,8607,14,100,"rajaxx SAY_WAVE7","Fandral! Your time has come! Go and hide in the Emerald Dream and pray we never find you!"),
+(15341,5,8609,14,100,"rajaxx SAY_INTRO","Impudent fool! I will kill you myself!"),
+(15341,6,8603,14,100,"rajaxx SAY_UNK1","Attack and make them pay dearly!"),
+(15341,7,8605,14,100,"rajaxx SAY_UNK2","Crush them! Drive them out!"),
+(15341,8,8606,14,100,"rajaxx SAY_UNK3","Do not hesitate! Destroy them!"),
+(15341,9,8613,14,100,"rajaxx SAY_UNK4","Warriors! Captains! Continue the fight!"),
+(15341,10,8614,14,100,"rajaxx SAY_DEAGGRO","You are not worth my time $N!"),
+(15341,11,8604,14,100,"rajaxx SAY_KILLS_ANDOROV","Breath your last!"),
+(15341,12,0,14,100,"rajaxx SAY_COMPLETE_QUEST","Soon you will know the price of your meddling, mortals... The master is nearly whole... And when he rises, your world will be cease!");
+
+-- moam
+DELETE FROM `creature_text` WHERE `entry`=15340;
+INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES
+(15340,0,16,100,"moam EMOTE_AGGRO","%s senses your fear."),
+(15340,1,16,100,"moan EMOTE_MANA_FULL","%s bristles with energy!");
+
+-- buru
+DELETE FROM `creature_text` WHERE `entry`=15370;
+INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES
+(15370,0,16,100,"buru EMOTE_TARGET","%s sets eyes on $N!");
diff --git a/sql/updates/world/2012_12_18_02_world_misc.sql b/sql/updates/world/2012_12_18_02_world_misc.sql
new file mode 100644
index 00000000000..5df6ef8eb95
--- /dev/null
+++ b/sql/updates/world/2012_12_18_02_world_misc.sql
@@ -0,0 +1,14 @@
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=15760;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=15760 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
+(15760, 0, 0, 0, 22, 0, 100, 0, 58, 0, 0, 0, 11, 26218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Winter Reveler - Cast Mistletoe on /kiss');
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=26218;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(26218,'spell_winter_veil_mistletoe');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=15760;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(22, 1, 15760, 0, 0, 1, 0, 26218, 1, 0, 1, 0, 0, '', 'execute sai only if player has not Mistletoe Debuff'),
+(22, 1, 15760, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, '', 'execute sai only if Winter Veil');
diff --git a/sql/updates/world/2012_12_18_02_world_sai.sql b/sql/updates/world/2012_12_18_02_world_sai.sql
new file mode 100644
index 00000000000..0843285550f
--- /dev/null
+++ b/sql/updates/world/2012_12_18_02_world_sai.sql
@@ -0,0 +1,47 @@
+SET @NPC_WARLORD_ZOLMAZ := 28902;
+SET @NPC_ENCHANTED_TIKI := 28927;
+SET @GO_ZOLMAZ_GATE := 190784;
+SET @GO_GATE_LEVER := 190834;
+
+DELETE FROM `event_scripts` WHERE `id`=18940;
+INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
+(18940,6,11,57571,180,0,0,0,0,0);
+
+DELETE FROM `creature_text` WHERE `entry`=@NPC_WARLORD_ZOLMAZ;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@NPC_WARLORD_ZOLMAZ,0,0,'%s becomes enraged.',16,0,100,0,0,0,'Warlord Zol''Maz'),
+(@NPC_WARLORD_ZOLMAZ,1,0,'You have an enchanted tiki? YOU KILLED MY FAMILY!',14,0,100,15,0,6200,'Warlord Zol''Maz'),
+(@NPC_WARLORD_ZOLMAZ,2,0,'I WILL KILL YOU, $N!',14,0,100,0,0,0,'Warlord Zol''Maz');
+
+UPDATE `creature_template` SET `dmg_multiplier`=2.75, `AIName`='SmartAI' WHERE `entry`=@NPC_WARLORD_ZOLMAZ;
+UPDATE `creature_template` SET `minlevel`=77, `maxlevel`=77, `exp`=2, `mindmg`=371, `maxdmg`=522, `attackpower`=478, `dmg_multiplier`=1.75, `unit_flags`=32776, `unit_class`=2, `minrangedmg`=314, `maxrangedmg`=466, `rangedattackpower`=81, `AIName`='SmartAI', `equipment_id`=838 WHERE `entry`=@NPC_ENCHANTED_TIKI;
+UPDATE `creature_model_info` SET `bounding_radius`=0.465, `combat_reach`=7.5 WHERE `modelid`=26286;
+
+DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_ENCHANTED_TIKI;
+INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@NPC_ENCHANTED_TIKI,0,0,0,1,0,'52614 52670');
+
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GO_GATE_LEVER;
+UPDATE `gameobject_template` SET `flags`=4 WHERE `entry` IN (190836,191766,194126);
+UPDATE `gameobject` SET `position_x`=6552.984, `position_y`=-3903.916, `position_z`=490.9412 WHERE `guid`=99744;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_WARLORD_ZOLMAZ,@NPC_ENCHANTED_TIKI) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@GO_GATE_LEVER 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
+(@NPC_WARLORD_ZOLMAZ,0,0,0,9,0,100,0,10,25,0,0,11,32323,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On target range 10-25y - Spellcast Charge'),
+(@NPC_WARLORD_ZOLMAZ,0,1,2,2,0,100,1,0,20,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Spellcast Enrage'),
+(@NPC_WARLORD_ZOLMAZ,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,3,0,0,0,100,0,12000,12000,20000,20000,11,54670,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On update IC - Spellcast Decapitate'),
+(@NPC_WARLORD_ZOLMAZ,0,4,0,2,0,100,1,0,35,0,0,11,40546,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 35% - Spellcast Retaliation'),
+(@NPC_WARLORD_ZOLMAZ,0,5,0,38,0,100,0,0,1,0,0,1,1,7000,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On data set 0 1 - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,6,7,52,0,100,0,1,@NPC_WARLORD_ZOLMAZ,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Say line'),
+(@NPC_WARLORD_ZOLMAZ,0,7,8,61,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Remove unit_flags IMMUNE_TO_PC'),
+(@NPC_WARLORD_ZOLMAZ,0,8,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Start attack'),
+(@NPC_WARLORD_ZOLMAZ,0,9,10,6,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On death - Reset gate'),
+(@NPC_WARLORD_ZOLMAZ,0,10,0,61,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On death - Set unit_flags IMMUNE_TO_PC'),
+(@NPC_WARLORD_ZOLMAZ,0,11,10,21,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On homeposition reached - Reset gate'),
+(@NPC_ENCHANTED_TIKI,0,0,1,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set data 0 1'),
+(@NPC_ENCHANTED_TIKI,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Store targetlist'),
+(@NPC_ENCHANTED_TIKI,0,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Send target list'),
+(@NPC_ENCHANTED_TIKI,0,3,0,61,0,100,0,0,0,0,0,3,0,25749,0,0,0,0,1,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set modelid'),
+(@GO_GATE_LEVER,1,0,0,70,0,100,0,2,0,0,0,9,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Gate lever - On activate - Activate gate');
diff --git a/sql/updates/world/2012_12_19_00_world_sai.sql b/sql/updates/world/2012_12_19_00_world_sai.sql
new file mode 100644
index 00000000000..170028e8a68
--- /dev/null
+++ b/sql/updates/world/2012_12_19_00_world_sai.sql
@@ -0,0 +1,106 @@
+-- Remove from quest_end_scripts
+DELETE FROM `quest_end_scripts` WHERE `id` IN (12657,12597,10988,10850,10447,9565);
+
+-- Convert quest_end_script "12657" to SAI
+-- Indexes:
+SET @DARION_MORGRAINE := 28444;
+SET @SCRIPT := @DARION_MORGRAINE * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@DARION_MORGRAINE;
+DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@DARION_MORGRAINE;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@DARION_MORGRAINE AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@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
+(@DARION_MORGRAINE,0,0,0,20,0,100,0,12657,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - On quest 12657 rewarded - Start action list'),
+(@DARION_MORGRAINE,0,1,0,1,0,100,0,60000,90000,60000,90000,4,12893,1,0,0,0,0,0,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - OOC - Play sound'),
+(@SCRIPT,9,0,0,0,0,100,0,16000,16000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 0 - Play emote 22'),
+(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2465.47,-5567.3,372.16,1.64, 'Highlord Darion Morgraine - Action 1 - Summon'),
+(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2434.52,-5588.56,372.16,3.26, 'Highlord Darion Morgraine - Action 2 - Summon'),
+(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2455.59,-5618.32,372.16,4.59, 'Highlord Darion Morgraine - Action 3 - Summon'),
+(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2439.31,-5608.69,372.16,3.77, 'Highlord Darion Morgraine - Action 4 - Summon'),
+(@SCRIPT,9,5,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2486.72,-5598.66,372.16,6.02, 'Highlord Darion Morgraine - Action 5 - Summon'),
+(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 6 - Say line 0'),
+(@SCRIPT,9,7,0,0,0,100,0,16000,16000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 7 - Say line 1');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000005409,2000005410);
+DELETE FROM `creature_text` WHERE `entry`=@DARION_MORGRAINE;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@DARION_MORGRAINE,0,0, '%s calls upon the mighty armies of the Scourge!',42,0,100,1,0,0, 'Highlord Darion Morgraine'),
+(@DARION_MORGRAINE,1,0, 'Armies of the Scourge, hear my call! The scarlet apocalypse has begun! Tear this land asunder and leave only death in your wake!',12,0,100,1,0,0, 'Highlord Darion Morgraine');
+
+-- Convert quest_end_script "10988" to SAI
+-- Indexes:
+SET @Arthorn_Windsong := 22924;
+SET @SCRIPT := @Arthorn_Windsong * 100;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Arthorn_Windsong;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Arthorn_Windsong AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@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
+(@Arthorn_Windsong,0,0,0,20,0,100,0,10988,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Captain Brandon - On quest 10988 rewarded - Start script'),
+(@SCRIPT,9,0,0,0,0,100,0,30000,30000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 0 - Say line 0'),
+(@SCRIPT,9,1,0,0,0,100,0,43000,43000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 1 - Say line 1'),
+(@SCRIPT,9,2,0,0,0,100,0,43000,43000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 2 - Play emote 1'),
+(@SCRIPT,9,3,0,0,0,100,0,56000,56000,0,0,69,1,0,0,0,0,0,8,0,0,0,3024.32,5511.29,146.051,2.31064, 'Arthorn Windsong - Action 3 - Move to'),
+(@SCRIPT,9,4,0,0,0,100,0,17000,17000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 4 - Play emote 1'),
+(@SCRIPT,9,5,0,0,0,100,0,17000,17000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 5 - Say line 2'),
+(@SCRIPT,9,6,0,0,0,100,0,11000,11000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 6 - Play emote'),
+(@SCRIPT,9,7,0,0,0,100,0,11000,11000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 7- Say line 3'),
+(@SCRIPT,9,8,0,0,0,100,0,1000,1000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 8 - Say line 4'),
+(@SCRIPT,9,9,0,0,0,100,0,11000,11000,0,0,11,39679,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 9 - Cast spell'),
+(@SCRIPT,9,10,0,0,0,100,0,10000,10000,0,0,69,0,0,0,0,0,0,8,0,0,0,3044.22,5510.91,146.033,4.654, 'Windsong - Action 10 - Move to pos'),
+(@SCRIPT,9,11,0,0,0,100,0,56000,56000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 11 - Say line 5');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry` IN (2000000073,2000000074,2000000072,2000000071,2000000070,2000000075);
+DELETE FROM `creature_text` WHERE `entry`=@Arthorn_Windsong;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Arthorn_Windsong,0,0, 'There''s something else here, too. After a discription of a bloody battle and the downfall of the raven, there''s a prophecy. Anzu will haunt the dreams of his enemies, twisting them to affect a return to this world...',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,1,0, 'The tablet has the confirmation we need, just as I thought. Now, we have to use this information to draw out and defeat this Anzu before he can do any more damage to the Emerald Dream!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,2,0, 'It''s all here... how the raven''s followers captured and subdued the sprints of rivals, trapping them forever within stone statues! The tablet even mentions the raven god''s name -- Anzu. I''d thought it was lost to history!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,3,0, 'This is it! This is really it -- the Book of the Raven!',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,4,0, 'It would''ve taken years to find the Book of the Raven without you, young sparrowhawk. Return to your home in Nagrand with our gratitude.',12,0,100,1,0,0, 'Arthorn Windsong'),
+(@Arthorn_Windsong,5,0, 'Since the sparrowhawks have proven such a success in hunting down the raven stones, Watcher Elaira has trained another one to relay my voice at a great distance. He can help us communicate as you investigate the bird spirits revealed in the tablet!',12,0,100,1,0,0, 'Arthorn Windsong');
+
+-- Convert quest_end_script "10850" to SAI
+-- Indexes:
+SET @Inactive_Fel_Reaver := 22293;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Inactive_Fel_Reaver;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Inactive_Fel_Reaver 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
+(@Inactive_Fel_Reaver,0,0,0,20,0,100,0,10850,0,0,0,15,10855,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Inactive Fel Reaver - On quest 10850 rewarded - Call Quest Explored for invoker');
+
+-- Convert quest_end_script "10447" to SAI
+-- Indexes:
+SET @Toki := 18447;
+
+-- Add SAI support
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Toki;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Toki 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
+(@Toki,0,0,0,20,0,100,0,10447,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Toki - On quest 10447 rewarded - Say line 0');
+
+-- Convert from db_script_string to creature_text
+DELETE FROM `db_script_string` WHERE `entry`=2000000062;
+DELETE FROM `creature_text` WHERE `entry`=@Toki;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(@Toki,0,0, 'The threat be over! $N be savin'' us all!',12,0,100,1,0,0, 'Toki');
+
+-- Convert quest_end_script "9565" to SAI
+-- Indexes:
+SET @Blood_Crystal := 181748;
+SET @SCRIPT := @Blood_Crystal * 100;
+
+-- Add SAI support
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@Blood_Crystal;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@Blood_Crystal AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@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
+(@Blood_Crystal,1,0,0,20,0,100,0,9565,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Blood Crystal - On quest 9565 rewarded - Start actionlist'),
+(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3105.36,-12549.2,-1.28,4.6, 'Blood Crystal - Action 0 - Summon'),
+(@SCRIPT,9,1,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3128.49,-12540.2,-2.54,1.5, 'Blood Crystal - Action 1 - Summon');