Index: trunk/src/game/Chat.cpp
===================================================================
--- trunk/src/game/Chat.cpp (revision 163)
+++ trunk/src/game/Chat.cpp (revision 164)
@@ -526,5 +526,5 @@
 		{ "explorecheat",   SEC_ADMINISTRATOR,  false, &ChatHandler::HandleExploreCheatCommand,        "", NULL },
 		{ "hover",          SEC_ADMINISTRATOR,  false, &ChatHandler::HandleHoverCommand,               "", NULL },
-        { "waterwalk",          SEC_ADMINISTRATOR,  false, &ChatHandler::HandleWaterwalkCommand,               "", NULL },
+		{ "waterwalk",      SEC_ADMINISTRATOR,  false, &ChatHandler::HandleWaterwalkCommand,           "", NULL },
 		{ "levelup",        SEC_ADMINISTRATOR,  false, &ChatHandler::HandleLevelUpCommand,             "", NULL },
 		{ "showarea",       SEC_ADMINISTRATOR,  false, &ChatHandler::HandleShowAreaCommand,            "", NULL },
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp (revision 164)
@@ -24,4 +24,14 @@
 #include "precompiled.h"
 #include "def_serpent_shrine.h"
+
+#define SAY_AGGRO                   -1548000
+#define SAY_SWITCH_TO_CLEAN         -1548001
+#define SAY_CLEAN_SLAY1             -1548002
+#define SAY_CLEAN_SLAY2             -1548003
+#define SAY_CLEAN_DEATH             -1548004
+#define SAY_SWITCH_TO_CORRUPT       -1548005
+#define SAY_CORRUPT_SLAY1           -1548006
+#define SAY_CORRUPT_SLAY2           -1548007
+#define SAY_CORRUPT_DEATH           -1548008
 
 #define SWITCH_RADIUS               18
@@ -52,24 +62,4 @@
 #define ENTRY_TAINTED_SPAWN         22036
 
-#define SAY_AGGRO                   "I cannot allow you to interfere!"
-#define SAY_SWITCH_TO_CLEAN         "Better, much better."
-#define SAY_CLEAN_SLAY1             "They have forced me to this..."
-#define SAY_CLEAN_SLAY2             "I have no choice."
-#define SAY_CLEAN_DEATH             "I am... released..."
-#define SAY_SWITCH_TO_CORRUPT       "Aaghh, the poison..."
-#define SAY_CORRUPT_SLAY1           "I will purge you from this place."
-#define SAY_CORRUPT_SLAY2           "You are no better than they!"
-#define SAY_CORRUPT_DEATH           "You are the disease, not I"
-
-#define SOUND_AGGRO                 11289
-#define SOUND_SWITCH_TO_CLEAN       11290
-#define SOUND_CLEAN_SLAY1           11291
-#define SOUND_CLEAN_SLAY2           11292
-#define SOUND_CLEAN_DEATH           11293
-#define SOUND_SWITCH_TO_CORRUPT     11297
-#define SOUND_CORRUPT_SLAY1         11298
-#define SOUND_CORRUPT_SLAY2         11299
-#define SOUND_CORRUPT_DEATH         11300
-
 #define HYDROSS_X                   -239.439
 #define HYDROSS_Y                   -363.481
@@ -122,5 +112,5 @@
         m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_CLEAN);
 
-        if( pInstance )
+        if (pInstance)
             pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
     }
@@ -128,8 +118,7 @@
     void Aggro(Unit *who)
     {
-        DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);
-        DoPlaySoundToSet(m_creature, SOUND_AGGRO);
-
-        if( pInstance )
+        DoScriptText(SAY_AGGRO, m_creature);
+
+        if (pInstance)
             pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, IN_PROGRESS);
     }
@@ -137,56 +126,40 @@
     void KilledUnit(Unit *victim)
     {
-        if(CorruptedForm)
+        if (CorruptedForm)
+        {
             switch(rand()%2)
             {
-                case 0:
-                    DoYell(SAY_CORRUPT_SLAY1, LANG_UNIVERSAL, NULL);
-                    DoPlaySoundToSet(m_creature, SOUND_CORRUPT_SLAY1);
-                    break;
-                case 1:
-                    DoYell(SAY_CORRUPT_SLAY2, LANG_UNIVERSAL, NULL);
-                    DoPlaySoundToSet(m_creature, SOUND_CORRUPT_SLAY2);
-                    break;
+                case 0: DoScriptText(SAY_CORRUPT_SLAY1, m_creature); break;
+                case 1: DoScriptText(SAY_CORRUPT_SLAY2, m_creature); break;
             }
-            else
-            {
-                switch(rand()%2)
-                {
-                    case 0:
-                        DoYell(SAY_CLEAN_SLAY1, LANG_UNIVERSAL, NULL);
-                        DoPlaySoundToSet(m_creature, SOUND_CLEAN_SLAY1);
-                        break;
-                    case 1:
-                        DoYell(SAY_CLEAN_SLAY2, LANG_UNIVERSAL, NULL);
-                        DoPlaySoundToSet(m_creature, SOUND_CLEAN_SLAY2);
-                        break;
-                }
-            }
-    }
-
-    void JustSummoned(Creature* summoned)
-    {
-        if( summoned->GetEntry() == ENTRY_PURE_SPAWN )
-            summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
-        if( summoned->GetEntry() == ENTRY_TAINTED_SPAWN )
-            summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
-
-        summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
-    }
-
-    void JustDied(Unit *victim)
-    {
-        if( CorruptedForm )
-        {
-            DoYell(SAY_CORRUPT_DEATH, LANG_UNIVERSAL, NULL);
-            DoPlaySoundToSet(m_creature, SOUND_CORRUPT_DEATH);
         }
         else
         {
-            DoYell(SAY_CLEAN_DEATH, LANG_UNIVERSAL, NULL);
-            DoPlaySoundToSet(m_creature, SOUND_CLEAN_DEATH);
+            switch(rand()%2)
+            {
+                case 0: DoScriptText(SAY_CLEAN_SLAY1, m_creature); break;
+                case 1: DoScriptText(SAY_CLEAN_SLAY2, m_creature); break;
+            }
         }
-
-        if( pInstance )
+    }
+
+    void JustSummoned(Creature* summoned)
+    {
+        if (summoned->GetEntry() == ENTRY_PURE_SPAWN)
+            summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
+        if (summoned->GetEntry() == ENTRY_TAINTED_SPAWN)
+            summoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
+
+        summoned->CastSpell(summoned,SPELL_ELEMENTAL_SPAWNIN,true);
+    }
+
+    void JustDied(Unit *victim)
+    {
+        if (CorruptedForm)
+            DoScriptText(SAY_CORRUPT_DEATH, m_creature);
+        else
+            DoScriptText(SAY_CLEAN_DEATH, m_creature);
+
+        if (pInstance)
             pInstance->SetData(DATA_HYDROSSTHEUNSTABLEEVENT, NOT_STARTED);
     }
@@ -199,10 +172,10 @@
 
         // corrupted form
-        if( CorruptedForm )
+        if (CorruptedForm)
         {
             //MarkOfCorruption_Timer
-            if( MarkOfCorruption_Timer < diff )
-            {
-                if( MarkOfCorruption_Count <= 5 )
+            if (MarkOfCorruption_Timer < diff)
+            {
+                if (MarkOfCorruption_Count <= 5)
                 {
                     uint32 mark_spell;
@@ -220,5 +193,5 @@
                     DoCast(m_creature->getVictim(), mark_spell);
 
-                    if( MarkOfCorruption_Count < 5 )
+                    if (MarkOfCorruption_Count < 5)
                         MarkOfCorruption_Count++;
                 }
@@ -228,8 +201,8 @@
 
             //VileSludge_Timer
-            if( VileSludge_Timer < diff )
+            if (VileSludge_Timer < diff)
             {
                 Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
-                if( target )
+                if (target)
                     DoCast(target, SPELL_VILE_SLUDGE);
 
@@ -238,7 +211,7 @@
 
             //PosCheck_Timer
-            if( PosCheck_Timer < diff )
-            {
-                if( m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) < SWITCH_RADIUS )
+            if (PosCheck_Timer < diff)
+            {
+                if (m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) < SWITCH_RADIUS)
                 {
                     // switch to clean form
@@ -247,6 +220,5 @@
                     MarkOfHydross_Count = 0;
 
-                    DoYell(SAY_SWITCH_TO_CLEAN, LANG_UNIVERSAL, NULL);
-                    DoPlaySoundToSet(m_creature, SOUND_SWITCH_TO_CLEAN);
+                    DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature);
                     DoResetThreat();
 
@@ -269,7 +241,7 @@
         {
             //MarkOfHydross_Timer
-            if( MarkOfHydross_Timer < diff )
-            {
-                if( MarkOfHydross_Count <= 5 )
+            if (MarkOfHydross_Timer < diff)
+            {
+                if (MarkOfHydross_Count <= 5)
                 {
                     uint32 mark_spell;
@@ -287,5 +259,5 @@
                     DoCast(m_creature->getVictim(), mark_spell);
 
-                    if( MarkOfHydross_Count < 5 )
+                    if (MarkOfHydross_Count < 5)
                         MarkOfHydross_Count++;
                 }
@@ -295,8 +267,8 @@
 
             //WaterTomb_Timer
-            if( WaterTomb_Timer < diff )
+            if (WaterTomb_Timer < diff)
             {
                 Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
-                if( target )
+                if (target)
                     DoCast(target, SPELL_WATER_TOMB);
 
@@ -305,7 +277,7 @@
 
             //PosCheck_Timer
-            if( PosCheck_Timer < diff )
-            {
-                if( m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) >= SWITCH_RADIUS )
+            if (PosCheck_Timer < diff)
+            {
+                if (m_creature->GetDistance2d(HYDROSS_X, HYDROSS_Y) >= SWITCH_RADIUS)
                 {
                     // switch to corrupted form
@@ -314,6 +286,5 @@
                     CorruptedForm = true;
 
-                    DoYell(SAY_SWITCH_TO_CORRUPT, LANG_UNIVERSAL, NULL);
-                    DoPlaySoundToSet(m_creature, SOUND_SWITCH_TO_CORRUPT);
+                    DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature);
                     DoResetThreat();
 
@@ -334,5 +305,5 @@
 
         //EnrageTimer
-        if( EnrageTimer < diff )
+        if (EnrageTimer < diff)
         {
             DoCast(m_creature, SPELL_ENRAGE);
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp (revision 164)
@@ -25,34 +25,21 @@
 #include "def_serpent_shrine.h"
 
+#define SAY_AGGRO               -1548009
+#define SAY_SWITCH_TO_DEMON     -1548010
+#define SAY_INNER_DEMONS        -1548011
+#define SAY_DEMON_SLAY1         -1548012
+#define SAY_DEMON_SLAY2         -1548013
+#define SAY_DEMON_SLAY3         -1548014
+#define SAY_NIGHTELF_SLAY1      -1548015
+#define SAY_NIGHTELF_SLAY2      -1548016
+#define SAY_NIGHTELF_SLAY3      -1548017
+#define SAY_FINAL_FORM          -1548018
+#define SAY_FREE                -1548019
+#define SAY_DEATH               -1548020
+
 #define SPELL_WHIRLWIND         40653
 #define SPELL_CHAOS_BLAST       37675
 //#define SPELL_INSIDIOUS_WHISPER 37676                       // useless - dummy effect that can't be implemented
 
-#define SAY_AGGRO               "Finally my banishment ends!"
-#define SAY_SWITCH_TO_DEMON     "Be gone trifling elf. I'm in control now."
-#define SAY_INNER_DEMONS        "We all have our demons..."
-#define SAY_DEMON_SLAY1         "I have no equal."
-#define SAY_DEMON_SLAY2         "Perish, mortal."
-#define SAY_DEMON_SLAY3         "Yes, YES! Ahahah!"
-#define SAY_NIGHTELF_SLAY1      "Kill! KILL!"
-#define SAY_NIGHTELF_SLAY2      "That's right! Yes!"
-#define SAY_NIGHTELF_SLAY3      "Who's the master now?"
-#define SAY_FINAL_FORM          "No! NO! What have you done?! I am the master, do you hear me? I... aaghh... Can't... contain him..."
-#define SAY_FREE                "At last I am liberated. It has been too long since I have tasted true freedom!"
-#define SAY_DEATH               "You cannot kill me! Fools, I'll be back! I'll... aarghh..."
-
-#define SOUND_AGGRO             11312
-#define SOUND_SWITCH_TO_DEMON   11304
-#define SOUND_INNER_DEMONS      11305
-#define SOUND_DEMON_SLAY1       11306
-#define SOUND_DEMON_SLAY2       11307
-#define SOUND_DEMON_SLAY3       11308
-#define SOUND_NIGHTELF_SLAY1    11314
-#define SOUND_NIGHTELF_SLAY2    11315
-#define SOUND_NIGHTELF_SLAY3    11316
-#define SOUND_FINAL_FORM        11313
-#define SOUND_FREE              11309
-#define SOUND_DEATH             11317
-
 #define MODEL_DEMON             14555
 #define MODEL_NIGHTELF          20514
@@ -65,5 +52,5 @@
     boss_leotheras_the_blindAI(Creature *c) : ScriptedAI(c)
     {
-        pInstance = (c->GetInstanceData()) ? ((ScriptedInstance*)c->GetInstanceData()) : NULL;
+        pInstance = ((ScriptedInstance*)c->GetInstanceData());
         Demon = 0;
         Reset();
@@ -92,73 +79,57 @@
         m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
 
-        if(pInstance)
-            pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, 0);
+        if (pInstance)
+            pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, NOT_STARTED);
     }
 
     void StartEvent()
     {
-        DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);
-        DoPlaySoundToSet(m_creature, SOUND_AGGRO);
-
-        if(pInstance)
-            pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, 1);
+        DoScriptText(SAY_AGGRO, m_creature);
+
+        if (pInstance)
+            pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, IN_PROGRESS);
     }
 
     void KilledUnit(Unit *victim)
     {
-        if(victim->GetTypeId() != TYPEID_PLAYER)
-            return;
-
-        if(DemonForm)
+        if (victim->GetTypeId() != TYPEID_PLAYER)
+            return;
+
+        if (DemonForm)
+        {
             switch(rand()%3)
             {
-                case 0:
-                    DoYell(SAY_DEMON_SLAY1, LANG_UNIVERSAL, NULL);
-                    DoPlaySoundToSet(m_creature, SOUND_DEMON_SLAY1);
-                    break;
-                case 1:
-                    DoYell(SAY_DEMON_SLAY2, LANG_UNIVERSAL, NULL);
-                    DoPlaySoundToSet(m_creature, SOUND_DEMON_SLAY2);
-                    break;
-                case 2:
-                    DoYell(SAY_DEMON_SLAY3, LANG_UNIVERSAL, NULL);
-                    DoPlaySoundToSet(m_creature, SOUND_DEMON_SLAY3);
-                    break;
-            }
-            else
-                switch(rand()%3)
-                {
-                    case 0:
-                        DoYell(SAY_NIGHTELF_SLAY1, LANG_UNIVERSAL, NULL);
-                        DoPlaySoundToSet(m_creature, SOUND_NIGHTELF_SLAY1);
-                        break;
-                    case 1:
-                        DoYell(SAY_NIGHTELF_SLAY2, LANG_UNIVERSAL, NULL);
-                        DoPlaySoundToSet(m_creature, SOUND_NIGHTELF_SLAY2);
-                        break;
-                    case 2:
-                        DoYell(SAY_NIGHTELF_SLAY3, LANG_UNIVERSAL, NULL);
-                        DoPlaySoundToSet(m_creature, SOUND_NIGHTELF_SLAY3);
-                        break;
-                }
+                case 0: DoScriptText(SAY_DEMON_SLAY1, m_creature); break;
+                case 1: DoScriptText(SAY_DEMON_SLAY2, m_creature); break;
+                case 2: DoScriptText(SAY_DEMON_SLAY3, m_creature); break;
+            }
+        }
+        else
+        {
+            switch(rand()%3)
+            {
+                case 0: DoScriptText(SAY_NIGHTELF_SLAY1, m_creature); break;
+                case 1: DoScriptText(SAY_NIGHTELF_SLAY2, m_creature); break;
+                case 2: DoScriptText(SAY_NIGHTELF_SLAY3, m_creature); break;
+            }
+        }
     }
 
     void JustDied(Unit *victim)
     {
-        DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
-        DoPlaySoundToSet(m_creature, SOUND_DEATH);
+        DoScriptText(SAY_DEATH, m_creature);
 
         //despawn copy
-        if(Demon)
+        if (Demon)
         {
             Unit *pUnit = NULL;
             pUnit = Unit::GetUnit((*m_creature), Demon);
 
-            if(pUnit)
+            if (pUnit)
                 pUnit->DealDamage(pUnit, pUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
         }
 
-        if(pInstance)
-            pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, 0);
+        if (pInstance)
+            pInstance->SetData(DATA_LEOTHERASTHEBLINDEVENT, DONE);
     }
 
@@ -174,8 +145,8 @@
             return;
 
-        if(!DemonForm)
+        if (!DemonForm)
         {
             //Whirlwind_Timer
-            if(Whirlwind_Timer < diff)
+            if (Whirlwind_Timer < diff)
             {
                 DoCast(m_creature, SPELL_WHIRLWIND);
@@ -184,15 +155,15 @@
 
             //Switch_Timer
-            if(!IsFinalForm)
-                if(Switch_Timer < diff)
-            {
-                //switch to demon form
-                m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
-                DoYell(SAY_SWITCH_TO_DEMON, LANG_UNIVERSAL, NULL);
-                DoPlaySoundToSet(m_creature, SOUND_SWITCH_TO_DEMON);
-                DemonForm = true;
-
-                Switch_Timer = 60000;
-            }else Switch_Timer -= diff;
+            if (!IsFinalForm)
+            {
+                if (Switch_Timer < diff)
+                {
+                    //switch to demon form
+                    m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON);
+                    DoScriptText(SAY_SWITCH_TO_DEMON, m_creature);
+                    DemonForm = true;
+                    Switch_Timer = 60000;
+                }else Switch_Timer -= diff;
+            }
 
             DoMeleeAttackIfReady();
@@ -201,5 +172,5 @@
         {
             //ChaosBlast_Timer
-            if(ChaosBlast_Timer < diff)
+            if (ChaosBlast_Timer < diff)
             {
                 DoCast(m_creature->getVictim(), SPELL_CHAOS_BLAST);
@@ -208,5 +179,5 @@
 
             //Switch_Timer
-            if(Switch_Timer < diff)
+            if (Switch_Timer < diff)
             {
                 //switch to nightelf form
@@ -218,5 +189,5 @@
         }
 
-        if(!IsFinalForm && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15)
+        if (!IsFinalForm && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15)
         {
             //at this point he divides himself in two parts
@@ -224,5 +195,5 @@
             Copy = DoSpawnCreature(DEMON_FORM, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
 
-            if(Copy)
+            if (Copy)
             {
                 Demon = Copy->GetGUID();
@@ -234,7 +205,5 @@
             DemonForm = false;
 
-            DoYell(SAY_FINAL_FORM, LANG_UNIVERSAL, NULL);
-            DoPlaySoundToSet(m_creature, SOUND_FINAL_FORM);
-
+            DoScriptText(SAY_FINAL_FORM, m_creature);
             m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF);
         }
@@ -259,27 +228,17 @@
     void StartEvent()
     {
-        DoYell(SAY_FREE, LANG_UNIVERSAL, NULL);
-        DoPlaySoundToSet(m_creature, SOUND_FREE);
+        DoScriptText(SAY_FREE, m_creature);
     }
 
     void KilledUnit(Unit *victim)
     {
-        if(victim->GetTypeId() != TYPEID_PLAYER)
+        if (victim->GetTypeId() != TYPEID_PLAYER)
             return;
 
         switch(rand()%3)
         {
-            case 0:
-                DoYell(SAY_DEMON_SLAY1, LANG_UNIVERSAL, NULL);
-                DoPlaySoundToSet(m_creature, SOUND_DEMON_SLAY1);
-                break;
-            case 1:
-                DoYell(SAY_DEMON_SLAY2, LANG_UNIVERSAL, NULL);
-                DoPlaySoundToSet(m_creature, SOUND_DEMON_SLAY2);
-                break;
-            case 2:
-                DoYell(SAY_DEMON_SLAY3, LANG_UNIVERSAL, NULL);
-                DoPlaySoundToSet(m_creature, SOUND_DEMON_SLAY3);
-                break;
+            case 0: DoScriptText(SAY_DEMON_SLAY1, m_creature); break;
+            case 1: DoScriptText(SAY_DEMON_SLAY2, m_creature); break;
+            case 2: DoScriptText(SAY_DEMON_SLAY3, m_creature); break;
         }
     }
@@ -303,5 +262,5 @@
 
         //ChaosBlast_Timer
-        if(ChaosBlast_Timer < diff)
+        if (ChaosBlast_Timer < diff)
         {
             DoCast(m_creature->getVictim(), SPELL_CHAOS_BLAST);
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp (revision 117)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp (revision 164)
@@ -28,57 +28,44 @@
 #include "Spell.h"
 
-#define SPELL_MULTI_SHOT              38310
-#define SPELL_SHOCK_BLAST             38509
-#define SPELL_ENTANGLE                38316
-#define SPELL_STATIC_CHARGE_TRIGGER   38280
-#define SPELL_FORKED_LIGHTNING        40088
-#define SPELL_SHOOT                   40873
-#define SPELL_POISON_BOLT             40095
-#define SPELL_TOXIC_SPORES            38575
-#define SPELL_MAGIC_BARRIER           38112
-
-#define SAY_INTRO                     "Water is life. It has become a rare commodity here in Outland. A commodity that we alone shall control. We are the Highborne, and the time has come at last for us to retake our rightful place in the world!"
-#define SAY_AGGRO1                    "I'll split you from stem to stern! "
-#define SAY_AGGRO2                    "Victory to Lord Illidan!"
-#define SAY_AGGRO3                    "I spit on you, surface filth!"
-#define SAY_AGGRO4                    "Death to the outsiders!"
-#define SAY_PHASE1                    "I did not wish to lower myself by engaging your kind, but you leave me little choice!"
-#define SAY_PHASE2                    "The time is now! Leave none standing!"
-#define SAY_PHASE3                    "You may want to take cover."
-#define SAY_BOWSHOT1                  "Straight to the heart!"
-#define SAY_BOWSHOT2                  "Seek your mark!"
-#define SAY_SLAY1                     "Your time ends now!"
-#define SAY_SLAY2                     "You have failed!"
-#define SAY_DEATH                     "Lord Illidan, I... I am... sorry."
-
-#define SOUND_INTRO                   11531
-#define SOUND_AGGRO1                  11532
-#define SOUND_AGGRO2                  11533
-#define SOUND_AGGRO3                  11534
-#define SOUND_AGGRO4                  11535
-#define SOUND_PHASE1                  11538
-#define SOUND_PHASE2                  11539
-#define SOUND_PHASE3                  11540
-#define SOUND_BOWSHOT1                11536
-#define SOUND_BOWSHOT2                11537
-#define SOUND_SLAY1                   11541
-#define SOUND_SLAY2                   11542
-#define SOUND_DEATH                   11544
-
-#define MIDDLE_X                      30.134
-#define MIDDLE_Y                      -923.65
-#define MIDDLE_Z                      42.9
-
-#define SPOREBAT_X                    30.977156
-#define SPOREBAT_Y                    -925.297761
-#define SPOREBAT_Z                    77.176567
-#define SPOREBAT_O                    5.223932
-
-#define SHIED_GENERATOR_CHANNEL       19870
-#define ENCHANTED_ELEMENTAL           21958
-#define TAINTED_ELEMENTAL             22009
-#define COILFANG_STRIDER              22056
-#define COILFANG_ELITE                22055
-#define TOXIC_SPOREBAT               22140
+#define SAY_INTRO                   -1548042
+#define SAY_AGGRO1                  -1548043
+#define SAY_AGGRO2                  -1548044
+#define SAY_AGGRO3                  -1548045
+#define SAY_AGGRO4                  -1548046
+#define SAY_PHASE1                  -1548047
+#define SAY_PHASE2                  -1548048
+#define SAY_PHASE3                  -1548049
+#define SAY_BOWSHOT1                -1548050
+#define SAY_BOWSHOT2                -1548051
+#define SAY_SLAY1                   -1548052
+#define SAY_SLAY2                   -1548053
+#define SAY_SLAY3                   -1548054
+#define SAY_DEATH                   -1548055
+
+#define SPELL_MULTI_SHOT            38310
+#define SPELL_SHOCK_BLAST           38509
+#define SPELL_ENTANGLE              38316
+#define SPELL_STATIC_CHARGE_TRIGGER 38280
+#define SPELL_FORKED_LIGHTNING      40088
+#define SPELL_SHOOT                 40873
+#define SPELL_POISON_BOLT           40095
+#define SPELL_TOXIC_SPORES          38575
+#define SPELL_MAGIC_BARRIER         38112
+
+#define MIDDLE_X                    30.134
+#define MIDDLE_Y                    -923.65
+#define MIDDLE_Z                    42.9
+
+#define SPOREBAT_X                  30.977156
+#define SPOREBAT_Y                  -925.297761
+#define SPOREBAT_Z                  77.176567
+#define SPOREBAT_O                  5.223932
+
+#define SHIED_GENERATOR_CHANNEL     19870
+#define ENCHANTED_ELEMENTAL         21958
+#define TAINTED_ELEMENTAL           22009
+#define COILFANG_STRIDER            22056
+#define COILFANG_ELITE              22055
+#define TOXIC_SPOREBAT             22140
 
 float ElementPos[8][4] =
@@ -214,6 +201,5 @@
                 m_creature->GetMotionMaster()->Clear(false);
                 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
-                DoYell(SAY_INTRO,LANG_UNIVERSAL,NULL);
-                DoPlaySoundToSet(m_creature, SOUND_INTRO);
+                DoScriptText(SAY_INTRO, m_creature);
                 m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
                 AggroTargetGUID = who->GetGUID();
@@ -225,15 +211,9 @@
     void KilledUnit(Unit *victim)
     {
-        switch(rand()%2)
-        {
-            case 0:
-                DoYell(SAY_SLAY1, LANG_UNIVERSAL, NULL);
-                DoPlaySoundToSet(m_creature, SOUND_SLAY1);
-                break;
-
-            case 1:
-                DoPlaySoundToSet(m_creature, SOUND_SLAY1);
-                DoYell(SAY_SLAY2, LANG_UNIVERSAL, NULL);
-                break;
+        switch(rand()%3)
+        {
+            case 0: DoScriptText(SAY_SLAY1, m_creature); break;
+            case 1: DoScriptText(SAY_SLAY2, m_creature); break;
+            case 2: DoScriptText(SAY_SLAY3, m_creature); break;
         }
     }
@@ -241,6 +221,5 @@
     void JustDied(Unit *victim)
     {
-        DoPlaySoundToSet(m_creature, SOUND_DEATH);
-        DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
+        DoScriptText(SAY_DEATH, m_creature);
 
         if(pInstance)
@@ -252,20 +231,8 @@
         switch(rand()%4)
         {
-            case 0:
-                DoPlaySoundToSet(m_creature, SOUND_AGGRO1);
-                DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL);
-                break;
-            case 1:
-                DoPlaySoundToSet(m_creature, SOUND_AGGRO2);
-                DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL);
-                break;
-            case 2:
-                DoPlaySoundToSet(m_creature, SOUND_AGGRO3);
-                DoYell(SAY_AGGRO3, LANG_UNIVERSAL, NULL);
-                break;
-            case 3:
-                DoPlaySoundToSet(m_creature, SOUND_AGGRO4);
-                DoYell(SAY_AGGRO4, LANG_UNIVERSAL, NULL);
-                break;
+            case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
+            case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
+            case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
+            case 3: DoScriptText(SAY_AGGRO4, m_creature); break;
         }
 
@@ -298,12 +265,6 @@
             switch(rand()%2)
             {
-                case 0:
-                    DoPlaySoundToSet(m_creature, SOUND_BOWSHOT1);
-                    DoYell(SAY_BOWSHOT1, LANG_UNIVERSAL, NULL);
-                    break;
-                case 1:
-                    DoPlaySoundToSet(m_creature, SOUND_BOWSHOT2);
-                    DoYell(SAY_BOWSHOT2, LANG_UNIVERSAL, NULL);
-                    break;
+                case 0: DoScriptText(SAY_BOWSHOT1, m_creature); break;
+                case 1: DoScriptText(SAY_BOWSHOT2, m_creature); break;
             }
         }
@@ -332,20 +293,8 @@
 				switch(rand()%4)
 				{
-				case 0:
-					DoPlaySoundToSet(m_creature, SOUND_AGGRO1);
-					DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL);
-					break;
-				case 1:
-					DoPlaySoundToSet(m_creature, SOUND_AGGRO2);
-					DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL);
-					break;
-				case 2:
-					DoPlaySoundToSet(m_creature, SOUND_AGGRO3);
-					DoYell(SAY_AGGRO3, LANG_UNIVERSAL, NULL);
-					break;
-				case 3:
-					DoPlaySoundToSet(m_creature, SOUND_AGGRO4);
-					DoYell(SAY_AGGRO4, LANG_UNIVERSAL, NULL);
-					break;
+                    case 0: DoScriptText(SAY_AGGRO1, m_creature); break;
+                    case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
+                    case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
+                    case 3: DoScriptText(SAY_AGGRO4, m_creature); break;
 				}
 				Phase = 1;
@@ -439,6 +388,5 @@
                     }
 
-                    DoPlaySoundToSet(m_creature, SOUND_PHASE2);
-                    DoYell(SAY_PHASE2, LANG_UNIVERSAL, NULL);
+                    DoScriptText(SAY_PHASE2, m_creature);
                 }
             }
@@ -591,6 +539,5 @@
                     m_creature->RemoveAurasDueToSpell(SPELL_MAGIC_BARRIER);
 
-                    DoPlaySoundToSet(m_creature, SOUND_PHASE3);
-                    DoYell(SAY_PHASE3, LANG_UNIVERSAL, NULL);
+                    DoScriptText(SAY_PHASE3, m_creature);
 
                     Phase = 3;
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp (revision 130)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp (revision 164)
@@ -26,19 +26,27 @@
 #include "../../../npc/npc_escortAI.h"
 
+#define SAY_AGGRO                   -1548021
+#define SAY_GAIN_BLESSING           -1548022
+#define SAY_GAIN_ABILITY1           -1548023
+#define SAY_GAIN_ABILITY2           -1548024
+#define SAY_GAIN_ABILITY3           -1548025
+#define SAY_SLAY1                   -1548026
+#define SAY_SLAY2                   -1548027
+#define SAY_SLAY3                   -1548028
+#define SAY_DEATH                   -1548029
+
 //Karathress spells
-#define SPELL_CATACLYSMIC_BOLT			38441
-#define SPELL_POWER_OF_SHARKKIS			38455
-#define SPELL_POWER_OF_TIDALVESS		38452
-#define SPELL_POWER_OF_CARIBDIS			38451
-#define SPELL_ENRAGE					45078
-#define SPELL_SEAR_NOVA					38445
+#define SPELL_CATACLYSMIC_BOLT          38441
+#define SPELL_POWER_OF_SHARKKIS         38455
+#define SPELL_POWER_OF_TIDALVESS        38452
+#define SPELL_POWER_OF_CARIBDIS         38451
+#define SPELL_ENRAGE                    24318
+#define SPELL_SEAR_NOVA                 38445
 #define SPELL_BLESSING_OF_THE_TIDES		38449
 
 //Sharkkis spells
-#define SPELL_LEECHING_THROW			29436
-#define SPELL_THE_BEAST_WITHIN			38373
-#define SPELL_LEECHING_THROW			29436
+#define SPELL_LEECHING_THROW            29436
+#define SPELL_THE_BEAST_WITHIN          38373
 #define SPELL_MULTISHOT					38366
-#define SPELL_THE_BEAST_WITHIN			38373
 #define SPELL_SUMMON_FATHOM_LURKER		38433
 #define SPELL_SUMMON_FATHOM_SPOREBAT	38431
@@ -63,18 +71,4 @@
 
 //Yells and Quotes
-#define SAY_AGGRO						"Guards, attention! We have visitors..."
-#define SOUND_AGGRO						11277
-#define SAY_SLAY1						"I am rid of you."
-#define SOUND_SLAY1						11282
-#define SAY_SLAY2						"Land-dwelling scum!"
-#define SOUND_SLAY2						11284
-#define SAY_GAIN_ABILITY1				"I am more powerful than ever!"
-#define SOUND_GAIN_ABILITY1				11279
-#define SAY_GAIN_ABILITY2				"Go on, kill them! I'll be the better for it!"
-#define SOUND_GAIN_ABILITY2				11280
-#define SAY_GAIN_ABILITY3				"More knowledge, more power!"
-#define SOUND_GAIN_ABILITY3				11281
-#define SAY_DEATH						"Her ... excellency ... awaits!"
-#define SOUND_DEATH						11285
 #define SAY_GAIN_BLESSING_OF_TIDES		"Your overconfidence will be your undoing! Guards, lend me your strength!"
 #define SOUND_GAIN_BLESSING_OF_TIDES	11278
@@ -158,6 +152,5 @@
     void EventSharkkisDeath()
     {
-        DoPlaySoundToSet(m_creature, SOUND_GAIN_ABILITY1);
-        DoYell(SAY_GAIN_ABILITY1, LANG_UNIVERSAL, NULL);
+        DoScriptText(SAY_GAIN_ABILITY1, m_creature);
         DoCast(m_creature, SPELL_POWER_OF_SHARKKIS);
     }
@@ -165,6 +158,5 @@
     void EventTidalvessDeath()
     {
-        DoPlaySoundToSet(m_creature, SOUND_GAIN_ABILITY2);
-        DoYell(SAY_GAIN_ABILITY2, LANG_UNIVERSAL, NULL);
+        DoScriptText(SAY_GAIN_ABILITY2, m_creature);
         DoCast(m_creature, SPELL_POWER_OF_TIDALVESS);
     }
@@ -172,6 +164,5 @@
     void EventCaribdisDeath()
     {
-        DoPlaySoundToSet(m_creature, SOUND_GAIN_ABILITY3);
-        DoYell(SAY_GAIN_ABILITY3, LANG_UNIVERSAL, NULL);
+        DoScriptText(SAY_GAIN_ABILITY3, m_creature);
         DoCast(m_creature, SPELL_POWER_OF_CARIBDIS);
     }
@@ -179,5 +170,5 @@
     void GetAdvisors()
     {
-        if(!pInstance)
+        if (!pInstance)
             return;
 
@@ -189,11 +180,10 @@
     void StartEvent(Unit *who)
     {
-        if(!pInstance)
+        if (!pInstance)
             return;
 
         GetAdvisors();
 
-        DoPlaySoundToSet(m_creature, SOUND_AGGRO);
-        DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);
+        DoScriptText(SAY_AGGRO, m_creature);
 		DoZoneInCombat();
 
@@ -206,12 +196,7 @@
         switch(rand()%3)
         {
-            case 0:
-                DoPlaySoundToSet(m_creature, SOUND_SLAY1);
-                DoYell(SAY_SLAY1, LANG_UNIVERSAL, NULL);
-                break;
-            case 1:
-                DoPlaySoundToSet(m_creature, SOUND_SLAY2);
-				DoYell(SAY_SLAY2, LANG_UNIVERSAL, NULL);
-                break;
+            case 0: DoScriptText(SAY_SLAY1, m_creature); break;
+            case 1: DoScriptText(SAY_SLAY2, m_creature); break;
+            case 2: DoScriptText(SAY_SLAY3, m_creature); break;
         }
     }
@@ -219,9 +204,8 @@
     void JustDied(Unit *killer)
     {
-        DoPlaySoundToSet(m_creature, SOUND_DEATH);
-        DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
-
-        if( pInstance )
-            pInstance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, DONE);
+        DoScriptText(SAY_DEATH, m_creature);
+
+        if (pInstance)
+            pInstance->SetData(DATA_FATHOMLORDKARATHRESSEVENT, NOT_STARTED);
 
         //support for quest 10944
@@ -237,9 +221,9 @@
     {
         //Only if not incombat check if the event is started
-        if(!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
         {
             Unit* target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
 
-            if(target)
+            if (target)
             {
                 AttackStart(target);
@@ -253,5 +237,5 @@
 
         //someone evaded!
-        if(pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
 		{
             EnterEvadeMode();
@@ -260,5 +244,5 @@
 
         //CataclysmicBolt_Timer
-        if(CataclysmicBolt_Timer < diff)
+        if (CataclysmicBolt_Timer < diff)
         {
             //select a random unit other than the main tank
@@ -266,5 +250,5 @@
 
             //if there aren't other units, cast on the tank
-            if(!target)
+            if (!target)
                 target = m_creature->getVictim();
 
@@ -283,5 +267,5 @@
 
         //Enrage_Timer
-        if(Enrage_Timer < diff)
+        if (Enrage_Timer < diff)
         {
             DoCast(m_creature, SPELL_ENRAGE);
@@ -364,11 +348,11 @@
     void JustDied(Unit *victim)
     {
-        if(pInstance)
+        if (pInstance)
         {
             Creature *Karathress = NULL;
             Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
 
-            if(Karathress)
-				if(!m_creature->isAlive() && Karathress)
+            if (Karathress)
+                ((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
 					((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
         }
@@ -377,5 +361,5 @@
     void Aggro(Unit *who)
     {
-        if(pInstance)
+        if (pInstance)
         {
             pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
@@ -387,9 +371,9 @@
     {
         //Only if not incombat check if the event is started
-        if(!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
         {
             Unit* target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
 
-            if(target)
+            if (target)
             {
                 AttackStart(target);
@@ -402,5 +386,5 @@
 
         //someone evaded!
-        if(pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
 		{
 			EnterEvadeMode();
@@ -488,5 +472,5 @@
 		Earthbind_Timer = 45000;
 
-        if( pInstance )
+        if (pInstance)
             pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
     }
@@ -494,10 +478,10 @@
     void JustDied(Unit *victim)
     {
-        if(pInstance)
+        if (pInstance)
         {
             Creature *Karathress = NULL;
             Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
 
-            if(Karathress)
+            if (Karathress)
 				if(!m_creature->isAlive() && Karathress)
 					((boss_fathomlord_karathressAI*)Karathress->AI())->EventTidalvessDeath();
@@ -507,5 +491,5 @@
     void Aggro(Unit *who)
     {
-        if(pInstance)
+        if (pInstance)
         {
             pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
@@ -518,9 +502,9 @@
     {
         //Only if not incombat check if the event is started
-        if(!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
         {
             Unit* target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
 
-            if(target)
+            if (target)
             {
                 AttackStart(target);
@@ -533,5 +517,5 @@
 
         //someone evaded!
-        if(pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
 		{
             EnterEvadeMode();
@@ -545,5 +529,5 @@
 
         //FrostShock_Timer
-        if(FrostShock_Timer < diff)
+        if (FrostShock_Timer < diff)
         {
             DoCast(m_creature->getVictim(), SPELL_FROST_SHOCK);
@@ -604,5 +588,5 @@
 		Cyclone_Timer = 30000+rand()%10000;
 
-        if(pInstance)
+        if (pInstance)
             pInstance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
     }
@@ -610,10 +594,10 @@
     void JustDied(Unit *victim)
     {
-        if(pInstance)
+        if (pInstance)
         {
             Creature *Karathress = NULL;
             Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
 
-            if(Karathress)
+            if (Karathress)
 				if(!m_creature->isAlive() && Karathress)
 					((boss_fathomlord_karathressAI*)Karathress->AI())->EventCaribdisDeath();
@@ -623,5 +607,5 @@
     void Aggro(Unit *who)
     {
-        if(pInstance)
+        if (pInstance)
         {
             pInstance->SetData64(DATA_KARATHRESSEVENT_STARTER, who->GetGUID());
@@ -633,9 +617,9 @@
     {
         //Only if not incombat check if the event is started
-        if(!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (!InCombat && pInstance && pInstance->GetData(DATA_KARATHRESSEVENT))
         {
             Unit* target = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESSEVENT_STARTER));
 
-            if(target)
+            if (target)
             {
                 AttackStart(target);
@@ -648,5 +632,5 @@
 
         //someone evaded!
-        if(pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
+        if (pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))
 		{
             EnterEvadeMode();
@@ -655,5 +639,5 @@
 
         //WaterBoltVolley_Timer
-        if(WaterBoltVolley_Timer < diff)
+        if (WaterBoltVolley_Timer < diff)
         {
             DoCast(m_creature->getVictim(), SPELL_WATER_BOLT_VOLLEY);
@@ -662,5 +646,5 @@
 
         //TidalSurge_Timer
-        if(TidalSurge_Timer < diff)
+        if (TidalSurge_Timer < diff)
         {
             DoCast(m_creature->getVictim(), SPELL_TIDAL_SURGE);
@@ -706,6 +690,6 @@
 		}else Heal_Timer -= diff;
 
-		DoMeleeAttackIfReady();
-	}
+        DoMeleeAttackIfReady();
+    }
 
 	Unit* selectAdvisorUnit()
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp (revision 164)
@@ -25,48 +25,37 @@
 #include "def_serpent_shrine.h"
 
-#define SPELL_TIDAL_WAVE             37730
-#define SPELL_WATERY_GRAVE           38049
-#define SPELL_EARTHQUAKE             37764
+#define SAY_AGGRO                   -1548030
+#define SAY_SUMMON1                 -1548031
+#define SAY_SUMMON2                 -1548032
+#define SAY_SUMMON_BUBL1            -1548033
+#define SAY_SUMMON_BUBL2            -1548034
+#define SAY_SLAY1                   -1548035
+#define SAY_SLAY2                   -1548036
+#define SAY_SLAY3                   -1548037
+#define SAY_DEATH                   -1548038
+#define EMOTE_WATERY_GRAVE          -1548039
+#define EMOTE_EARTHQUAKE            -1548040
+#define EMOTE_WATERY_GLOBULES       -1548041
+
+#define SPELL_TIDAL_WAVE            37730
+#define SPELL_WATERY_GRAVE          38049
+#define SPELL_EARTHQUAKE            37764
 #define SPELL_WATERY_GRAVE_EXPLOSION 37852
 
-#define SAY_AGGRO                    "Flood of the deep, take you!"
-#define SAY_SUMMON1                  "By the Tides, kill them at once!"
-#define SAY_SUMMON2                  "Destroy them my subjects!"
-#define SAY_SLAY1                    "It is done!"
-#define SAY_SLAY2                    "Strugging only makes it worse."
-#define SAY_SLAY3                    "Only the strong survive."
-#define SAY_SUMMON_BUBL1             "There is nowhere to hide!"
-#define SAY_SUMMON_BUBL2             "Soon it will be finished!"
-#define SAY_DEATH                    "Great... currents of... Ageon."
-
-#define SOUND_AGGRO                  11321
-#define SOUND_SUMMON1                11322
-#define SOUND_SUMMON2                11323
-#define SOUND_SLAY1                  11326
-#define SOUND_SLAY2                  11327
-#define SOUND_SLAY3                  11328
-#define SOUND_SUMMON_BUBL1           11324
-#define SOUND_SUMMON_BUBL2           11325
-#define SOUND_DEATH                  11329
-
-#define WATERY_GRAVE_X1              334.64
-#define WATERY_GRAVE_Y1              -728.89
-#define WATERY_GRAVE_Z1              -14.42
-#define WATERY_GRAVE_X2              365.51
-#define WATERY_GRAVE_Y2              -737.14
-#define WATERY_GRAVE_Z2              -14.44
-#define WATERY_GRAVE_X3              366.19
-#define WATERY_GRAVE_Y3              -709.59
-#define WATERY_GRAVE_Z3              -14.36
-#define WATERY_GRAVE_X4              372.93
-#define WATERY_GRAVE_Y4              -690.96
-#define WATERY_GRAVE_Z4              -14.44
-
-#define EMOTE_WATERY_GRAVE         "sends his enemies to their watery graves!"
-#define EMOTE_EARTHQUAKE           "The violent earthquake has alerted nearby murlocs!"
-#define EMOTE_WATERY_GLOBULES      "summons Watery Globules!"
-
-#define WATER_GLOBULE              21913
-#define TIDEWALKER_LURKER          21920
+#define WATERY_GRAVE_X1             334.64
+#define WATERY_GRAVE_Y1             -728.89
+#define WATERY_GRAVE_Z1             -14.42
+#define WATERY_GRAVE_X2             365.51
+#define WATERY_GRAVE_Y2             -737.14
+#define WATERY_GRAVE_Z2             -14.44
+#define WATERY_GRAVE_X3             366.19
+#define WATERY_GRAVE_Y3             -709.59
+#define WATERY_GRAVE_Z3             -14.36
+#define WATERY_GRAVE_X4             372.93
+#define WATERY_GRAVE_Y4             -690.96
+#define WATERY_GRAVE_Z4             -14.44
+
+#define WATER_GLOBULE               21913
+#define TIDEWALKER_LURKER           21920
 
 //Morogrim Tidewalker AI
@@ -99,5 +88,5 @@
         Phase2 = false;
 
-        if(pInstance)
+        if (pInstance)
             pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
     }
@@ -105,8 +94,7 @@
     void StartEvent()
     {
-        DoPlaySoundToSet(m_creature, SOUND_AGGRO);
-        DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);
-
-        if(pInstance)
+        DoScriptText(SAY_AGGRO, m_creature);
+
+        if (pInstance)
             pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, IN_PROGRESS); 
     }
@@ -116,61 +104,46 @@
         switch(rand()%3)
         {
+            case 0: DoScriptText(SAY_SLAY1, m_creature); break;
+            case 1: DoScriptText(SAY_SLAY2, m_creature); break;
+            case 2: DoScriptText(SAY_SLAY3, m_creature); break;
+        }
+    }
+
+    void JustDied(Unit *victim)
+    {
+        DoScriptText(SAY_DEATH, m_creature);
+
+        if (pInstance)
+            pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
+    }
+
+    void Aggro(Unit *who) { StartEvent(); }
+
+    void ApplyWateryGrave(Unit *player, uint8 pos)
+    {
+        float x, y, z;
+
+        switch(pos)
+        {
             case 0:
-                DoPlaySoundToSet(m_creature, SOUND_SLAY1);
-                DoYell(SAY_SLAY1, LANG_UNIVERSAL, NULL);
+                x = WATERY_GRAVE_X1;
+                y = WATERY_GRAVE_Y1;
+                z = WATERY_GRAVE_Z1;
                 break;
-
             case 1:
-                DoPlaySoundToSet(m_creature, SOUND_SLAY2);
-                DoYell(SAY_SLAY2, LANG_UNIVERSAL, NULL);
+                x = WATERY_GRAVE_X2;
+                y = WATERY_GRAVE_Y2;
+                z = WATERY_GRAVE_Z2;
                 break;
-
             case 2:
-                DoPlaySoundToSet(m_creature, SOUND_SLAY3);
-                DoYell(SAY_SLAY3, LANG_UNIVERSAL, NULL);
+                x = WATERY_GRAVE_X3;
+                y = WATERY_GRAVE_Y3;
+                z = WATERY_GRAVE_Z3;
                 break;
-        }
-    }
-
-    void JustDied(Unit *victim)
-    {
-        DoPlaySoundToSet(m_creature, SOUND_DEATH);
-        DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
-
-        if(pInstance)
-            pInstance->SetData(DATA_MOROGRIMTIDEWALKEREVENT, NOT_STARTED);
-    }
-
-    void Aggro(Unit *who) { StartEvent(); }
-
-    void ApplyWateryGrave(Unit *player, uint8 pos)
-    {
-        float x, y, z;
-
-        switch(pos)
-        {
-            case 0:
-            x = WATERY_GRAVE_X1;
-            y = WATERY_GRAVE_Y1;
-            z = WATERY_GRAVE_Z1;
-            break;
-
-            case 1:
-            x = WATERY_GRAVE_X2;
-            y = WATERY_GRAVE_Y2;
-            z = WATERY_GRAVE_Z2;
-            break;
-            
-            case 2:
-            x = WATERY_GRAVE_X3;
-            y = WATERY_GRAVE_Y3;
-            z = WATERY_GRAVE_Z3;
-            break;
-
             case 3:
-            x = WATERY_GRAVE_X4;
-            y = WATERY_GRAVE_Y4;
-            z = WATERY_GRAVE_Z4;
-            break;
+                x = WATERY_GRAVE_X4;
+                y = WATERY_GRAVE_Y4;
+                z = WATERY_GRAVE_Z4;
+                break;
         }
 
@@ -184,9 +157,9 @@
 
         Summoned = m_creature->SummonCreature(TIDEWALKER_LURKER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
-        if(Summoned)
+        if (Summoned)
         {
             Unit *target = NULL;
             target = SelectUnit(SELECT_TARGET_RANDOM, 0);
-            if(target)
+            if (target)
                 Summoned->AI()->AttackStart(target);
         }
@@ -198,9 +171,9 @@
 
         Globule = m_creature->SummonCreature(WATER_GLOBULE, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); //they despawn after 30 seconds
-        if(Globule)
+        if (Globule)
         {
             Unit *target = NULL;
             target = SelectUnit(SELECT_TARGET_RANDOM, 0);
-            if(target)
+            if (target)
                 Globule->AI()->AttackStart(target);
         }
@@ -214,7 +187,7 @@
 
         //Earthquake_Timer
-        if(Earthquake_Timer < diff)
-        {
-            if(!Earthquake)
+        if (Earthquake_Timer < diff)
+        {
+            if (!Earthquake)
             {
                 DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE);
@@ -226,13 +199,6 @@
                 switch(rand()%2)
                 {
-                    case 0:
-                    DoPlaySoundToSet(m_creature, SOUND_SUMMON1);
-                    DoYell(SAY_SUMMON1, LANG_UNIVERSAL, NULL);
-                    break;
-
-                    case 1:
-                    DoPlaySoundToSet(m_creature, SOUND_SUMMON2);
-                    DoYell(SAY_SUMMON2, LANG_UNIVERSAL, NULL);
-                    break;
+                    case 0: DoScriptText(SAY_SUMMON1, m_creature); break;
+                    case 1: DoScriptText(SAY_SUMMON2, m_creature); break;
                 }
 
@@ -253,5 +219,5 @@
                 SummonMurloc(293.64, -726.64, -9.81);
 
-                DoTextEmote(EMOTE_EARTHQUAKE, NULL);
+                DoScriptText(EMOTE_EARTHQUAKE, m_creature);
 
                 Earthquake = false;
@@ -261,5 +227,5 @@
 
         //TidalWave_Timer
-        if(TidalWave_Timer < diff)
+        if (TidalWave_Timer < diff)
         {
             DoCast(m_creature->getVictim(), SPELL_TIDAL_WAVE);
@@ -267,8 +233,8 @@
         }else TidalWave_Timer -= diff;
 
-        if(!Phase2)
+        if (!Phase2)
         {
             //WateryGrave_Timer
-            if(WateryGrave_Timer < diff)
+            if (WateryGrave_Timer < diff)
             {
                 //Teleport 4 players under the waterfalls
@@ -277,5 +243,5 @@
                 {
                     target = SelectUnit(SELECT_TARGET_RANDOM, 1);
-                    if(target && (target->GetTypeId() == TYPEID_PLAYER) && !target->HasAura(SPELL_WATERY_GRAVE, 0) && target->IsWithinDistInMap(m_creature, 50))
+                    if (target && (target->GetTypeId() == TYPEID_PLAYER) && !target->HasAura(SPELL_WATERY_GRAVE, 0) && target->IsWithinDistInMap(m_creature, 50))
                         ApplyWateryGrave(target, i);
                 }
@@ -283,25 +249,14 @@
                 switch(rand()%2)
                 {
-                case 0:
-                    DoPlaySoundToSet(m_creature, SOUND_SUMMON_BUBL1);
-                    DoYell(SAY_SUMMON_BUBL1, LANG_UNIVERSAL, NULL);
-                    break;
-
-                case 1:
-                    DoPlaySoundToSet(m_creature, SOUND_SUMMON_BUBL2);
-                    DoYell(SAY_SUMMON_BUBL2, LANG_UNIVERSAL, NULL);
-                    break;
-
-                case 2:
-                    break;
+                    case 0: DoScriptText(SAY_SUMMON_BUBL1, m_creature); break;
+                    case 1: DoScriptText(SAY_SUMMON_BUBL2, m_creature); break;
                 }
 
-                DoTextEmote(EMOTE_WATERY_GRAVE, NULL);
-
+                DoScriptText(EMOTE_WATERY_GRAVE, m_creature);
                 WateryGrave_Timer = 30000;
             }else WateryGrave_Timer -= diff;
 
             //Start Phase2
-            if((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
+            if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
                 Phase2 = true;
         }
@@ -309,5 +264,5 @@
         {
             //WateryGlobules_Timer
-            if(WateryGlobules_Timer < diff)
+            if (WateryGlobules_Timer < diff)
             {
                 SummonWaterGlobule(WATERY_GRAVE_X1, WATERY_GRAVE_Y1, WATERY_GRAVE_Z1);
@@ -316,5 +271,5 @@
                 SummonWaterGlobule(WATERY_GRAVE_X4, WATERY_GRAVE_Y4, WATERY_GRAVE_Z4);
 
-                DoTextEmote(EMOTE_WATERY_GLOBULES, NULL);
+                DoScriptText(EMOTE_WATERY_GLOBULES, m_creature);
 
                 WateryGlobules_Timer = 25000;
@@ -363,7 +318,7 @@
             return;
 
-        if(Check_Timer < diff)
-        {
-            if(m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
+        if (Check_Timer < diff)
+        {
+            if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5))
             {
                 uint32 damage = 4000+rand()%2000;
Index: trunk/src/bindings/scripts/docs/Text-tables.txt
===================================================================
--- trunk/src/bindings/scripts/docs/Text-tables.txt (revision 164)
+++ trunk/src/bindings/scripts/docs/Text-tables.txt (revision 164)
@@ -0,0 +1,85 @@
+=========================================
+Texts Documentation
+=========================================
+
+Scriptdev2 Revision 695 introduces a new format for using texts in EventAI and SD2 Scripts.
+This information relates to the three *_texts tables located in the ScriptDev Database.
+
+Any script can at any time access and use text from any of the three text tables, as long as the entry does in fact exist.
+Custom scripters are adviced to store their text data in custom_texts.
+
+The three different tables has ranges of entries allowed for that table.
+eventai_texts: entry -1       -> -999999
+script_texts:  entry -1000000 -> -1999999
+custom_texts:  entry -2000000 -> -2999999
+Any entry out of range for that table will display a startup error.
+
+
+=========================================
+Basic Structure of eventai_texts, script_texts and custom_texts
+=========================================
+Below is a the list of current fields within the texts tables.
+
+Field_Name            Description
+-----------------------------------------------------------
+entry                 This value is mearly an NEGATIVE identifier of the current text number. Required for sql queries.
+content_default       This is the actual text presented in the default language (English).
+
+content_loc1          This is the actual text presented in the Localization #1 Clients (Korean)
+content_loc2          This is the actual text presented in the Localization #2 Clients (French)
+content_loc3          This is the actual text presented in the Localization #3 Clients (German)
+content_loc4          This is the actual text presented in the Localization #4 Clients (Chinese)
+content_loc5          This is the actual text presented in the Localization #5 Clients (Taiwanese)
+content_loc6          This is the actual text presented in the Localization #6 Clients (Spanish)
+content_loc7          This is the actual text presented in the Localization #7 Clients (Spanish Mexico)
+content_loc8          This is the actual text presented in the Localization #8 Clients (Russian)
+
+sound                 This value is the Sound ID that corresponds to the actual text used (Defined in SoundEntries.dbc).
+type                  Variables used to define type of text (Say/Yell/Textemote/Whisper).
+language              This value is the Language that the text is native in (Defined in Languages.dbc).
+comment               This is a comment regarding the text entry (For ACID, accepted format is to use Creature ID of NPC using it).
+
+Note: Fields `content_loc1` to `content_loc8` are NULL values by default and are handled by seperate localization projects.
+
+
+=========================================
+Text Types (type)
+=========================================
+Below is the list of current Text types that texts tables can handle. These were previously seperate Actions in ACID.
+
+#    Internal Name                 Description
+-----------------------------------------------------------
+0    CHAT_TYPE_SAY                 This type sets the text to be displayed as a Say (Speech Bubble).
+1    CHAT_TYPE_YELL                This type sets the text to be displayed as a Yell (Red Speech Bubble) and usually has a matching Sound ID.
+2    CHAT_TYPE_TEXT_EMOTE          This type sets the text to be displayed as a text emote in orange in the chat log. 
+3    CHAT_TYPE_BOSS_EMOTE          This type sets the text to be displayed as a text emote in orange in the chat log (Used only for specific Bosses). 
+4    CHAT_TYPE_WHISPER             This type sets the text to be displayed as a whisper to the player in the chat log.
+5    CHAT_TYPE_BOSS_WHISPER        This type sets the text to be displayed as a whisper to the player in the chat log (Used only for specific Bosses).
+
+
+=========================================
+Language Types (language)
+=========================================
+Below is the list of current Language types that are allowed.
+This is the Race Language that the text is native to (So it will display properly)
+
+#    Internal Name                Description
+-----------------------------------------------------------                    
+0    UNIVERSAL                    Text in this language is understood by ALL Races.
+1    ORCISH                       Text in this language is understood ONLY by Horde Races.
+2    DARNASSIAN                   Text in this language is understood ONLY by the Night Elf Race.
+3    TAURAHE                      Text in this language is understood ONLY by the Tauren Race.
+6    DWARVISH                     Text in this language is understood ONLY by the Dwarf Race.
+7    COMMON                       Text in this language is understood ONLY by Alliance Races.
+8    DEMONIC                      Text in this language is understood ONLY by the Demon Race (Not Implimented).
+9    TITAN                        This language was used by Sargeras to speak with other Titians (Not Implemented).
+10   THALASSIAN                   Text in this language is understood ONLY by the Blood Elf Race.
+11   DRACONIC                     Text in this language is understood ONLY by the Dragon Race.
+12   KALIMAG                      Text will display as Kalimag (not readable by players, language of all elementals)
+13   GNOMISH                      Text in this language is understood ONLY by the Gnome Race.
+14   TROLL                        Text in this language is understood ONLY by the Troll Race.
+33   GUTTERSPEAK                  Text in this language is understood ONLY by the Undead Race.
+35   DRAENEI                      Text in this language is understood ONLY by the Draenai Race.
+36   ZOMBIE                       (not currently used?)
+37   GNOMISH BINARY               Binary language used by Alliance when drinking Binary Brew
+38   GOBLIN BINARY                Binary language used by Horce when drinking Binary Brew
