diff -r a6d2b41fb269 src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp
--- a/src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp	Mon Dec 07 03:32:41 2009 -0300
+++ b/src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp	Tue Dec 08 20:06:41 2009 +0300
@@ -1,15 +1,16 @@
 /* Script Data Start
-SDName: Boss malygos
-SDAuthor: LordVanMartin
-SD%Complete:
-SDComment:
-SDCategory:
+Name: Boss malygos
+Author: Destros
+%Complete:
+Comment:
+Category:
 Script Data End */
 
 /*** SQL START ***
-update creature_template set scriptname = '' where entry = '';
+update creature_template set scriptname = 'boss_malygos' where entry = '28859';
 *** SQL END ***/
 #include "precompiled.h"
+#include "eye_of_eternity.h"
 
 //Spells
 #define SPELL_ARCANE_BREATH_N                        56272
@@ -23,6 +24,7 @@
 #define SPELL_SURGE_OF_POWER_2                       57407
 #define SPELL_SURGE_OF_POWER_3                       60936
 #define SPELL_VORTEX                                 56105
+#define SPELL_ENRAGE                                 26662
 
 //Dragon "mounts" spells in Phase3
 //they use Rugelike energy
@@ -83,59 +85,100 @@
 #define SAY_PHASE3_SLAY_3                          -1616027
 #define SAY_PHASE3_BIG_ATTACK                      -1616028
 
+// Achievements
+#define ACHIEVEMENT_YOU_DONT_HAVE_AN_ETERNITY      HEROIC(1874, 1875)
+#define MAX_ENCOUNTER_TIME                         6 * 60 * 1000
+
 struct TRINITY_DLL_DECL boss_malygosAI : public ScriptedAI
 {
-    boss_malygosAI(Creature *c) : ScriptedAI(c) {}
+    boss_malygosAI(Creature *c) : ScriptedAI(c) 
+    {
+        pInstance = c->GetInstanceData();
+    }
 
-    uint32 phase,
-           enrage;
+    ScriptedInstance* pInstance;
+
+    uint32 uiPhase;
+    uint32 uiEnrageTimer;
+
+    uint32 EncounterTime;
 
     void Reset()
     {
         //Source Deadly Boss Mod
-        enrage = 615000; //10 min
+        uiEnrageTimer = 615000; //10 min
+
+        if (pInstance)
+            pInstance->SetData(DATA_MALYGOS_EVENT, NOT_STARTED);
     }
+
+    void JustReachedHome()
+    {
+        if (pInstance)
+            pInstance->SetData(DATA_MALYGOS_EVENT, NOT_STARTED);
+    }
+
     void EnterCombat(Unit* who)
     {
-        if (phase == 1)
+        EncounterTime = 0;
+
+        if (uiPhase == 1)
             DoScriptText(SAY_PHASE1_AGGRO, m_creature);
-        if (phase == 2)
+        if (uiPhase == 2)
             DoScriptText(SAY_PHASE1_AGGRO, m_creature);
-        if (phase == 3)
+        if (uiPhase == 3)
             DoScriptText(SAY_PHASE1_AGGRO, m_creature);
+
+        if (pInstance)
+            pInstance->SetData(DATA_MALYGOS_EVENT, IN_PROGRESS);
     }
-    void AttackStart(Unit* who) {}
-    void MoveInLineOfSight(Unit* who) {}
+
     void UpdateAI(const uint32 diff)
     {
-        phase =1;
         //Return since we have no target
         if (!UpdateVictim())
             return;
+        
+        EncounterTime += diff;
 
-        if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 50){
-            phase = 2;
+        if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 50)
+        {
+            uiPhase = 2;
             //spawn adds
             //set malygos unatackable untill all adds spawned dead
             //start phase3
         }
 
+        if(uiEnrageTimer <= diff)
+        {
+            DoCast(m_creature, SPELL_ENRAGE);
+            uiEnrageTimer = 615000;
+        } else uiEnrageTimer -= diff;
+
         DoMeleeAttackIfReady();
     }
+
     void JustDied(Unit* killer)
     {
         DoScriptText(SAY_DEATH, m_creature);
+
+        if(EncounterTime <= MAX_ENCOUNTER_TIME)
+            pInstance->DoCompleteAchievement(ACHIEVEMENT_YOU_DONT_HAVE_AN_ETERNITY);  
+
+        if (pInstance)
+            pInstance->SetData(DATA_MALYGOS_EVENT, DONE);
     }
+
     void KilledUnit(Unit *victim)
     {
         if (victim == m_creature)
             return;
 
-        if (phase ==1)
+        if (uiPhase ==1)
             DoScriptText(RAND(SAY_PHASE1_SLAY_1,SAY_PHASE1_SLAY_2,SAY_PHASE1_SLAY_3), m_creature);
-        if (phase ==2)
+        if (uiPhase ==2)
             DoScriptText(RAND(SAY_PHASE2_SLAY_1,SAY_PHASE2_SLAY_2,SAY_PHASE2_SLAY_3), m_creature);
-        if (phase ==3)
+        if (uiPhase ==3)
             DoScriptText(RAND(SAY_PHASE3_SLAY_1,SAY_PHASE3_SLAY_2,SAY_PHASE3_SLAY_3), m_creature);
     }
 };
diff -r a6d2b41fb269 src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h
--- a/src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h	Mon Dec 07 03:32:41 2009 -0300
+++ b/src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h	Tue Dec 08 20:06:41 2009 +0300
@@ -1,4 +1,9 @@
 #ifndef DEF_EYE_OF_ETERNITY_H
 #define DEF_EYE_OF_ETERNITY_H
 
+#define MAX_ENCOUNTER                 1
+
+#define DATA_MALYGOS                  2
+#define DATA_MALYGOS_EVENT            3
+
 #endif
diff -r a6d2b41fb269 src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp
--- a/src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp	Mon Dec 07 03:32:41 2009 -0300
+++ b/src/bindings/scripts/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp	Tue Dec 08 20:06:41 2009 +0300
@@ -1,9 +1,85 @@
+/* ScriptData
+Name: Instance_Nexus
+Author: Destros
+%Complete:
+Comment:
+Category: The Nexus, The Eye of Eternity
+EndScriptData */
+
 #include "precompiled.h"
 #include "eye_of_eternity.h"
 
+
 struct TRINITY_DLL_DECL instance_eye_of_eternity : public ScriptedInstance
 {
-    instance_eye_of_eternity(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
+    instance_eye_of_eternity(Map* pMap) : ScriptedInstance(pMap), AlexstraszasGift(NULL) {Initialize();};
+
+    uint32 m_auiEncounter[MAX_ENCOUNTER];
+    std::string str_data;
+
+    uint64 Malygos;
+
+    GameObject* AlexstraszasGift;
+
+    void Initialize()
+    {
+        memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
+
+        Malygos = 0;
+        AlexstraszasGift = 0;
+    }
+
+    void OnCreatureCreate(Creature* pCreature, bool add)
+    {
+        switch(pCreature->GetEntry())
+        {
+            case 28859: Malygos = pCreature->GetGUID(); break;
+        }
+    }
+
+    void OnGameObjectCreate(GameObject* pGo, bool add)
+    {
+        switch(pGo->GetEntry())
+        {
+            case 193905: AlexstraszasGift = add ? pGo : NULL; break;
+            //case ??: AlexstraszasGift = add ? pGo : NULL; break;           Heroic, id?
+        }
+    }
+
+    void SetData(uint32 type, uint32 data)
+    {
+        switch(type)
+        {
+        case DATA_MALYGOS_EVENT:
+            if (data == DONE && AlexstraszasGift)
+                AlexstraszasGift->SetRespawnTime(AlexstraszasGift->GetRespawnDelay());
+            m_auiEncounter[0] = data;
+            break;
+        }
+
+        if (data == DONE)
+            SaveToDB();
+    }
+
+    uint32 GetData(uint32 type)
+    {
+        switch(type)
+        {
+            case DATA_MALYGOS_EVENT:             return m_auiEncounter[0];
+        }
+
+        return 0;
+    }
+
+    uint64 GetData64(uint32 type)
+    {
+        switch(type)
+        {
+            case DATA_MALYGOS:                   return Malygos;
+        }
+
+        return 0;
+    }
 };
 
 InstanceData* GetInstanceData_instance_eye_of_eternity(Map* pMap)
diff -r a6d2b41fb269 src/bindings/scripts/system/ScriptLoader.cpp
--- a/src/bindings/scripts/system/ScriptLoader.cpp	Mon Dec 07 03:32:41 2009 -0300
+++ b/src/bindings/scripts/system/ScriptLoader.cpp	Tue Dec 08 20:06:41 2009 +0300
@@ -311,6 +311,8 @@
 extern void AddSC_boss_ormorok();
 extern void AddSC_boss_keristrasza();
 extern void AddSC_instance_nexus();
+extern void AddSC_boss_malygos();               // The Eye of Eternity
+extern void AddSC_instance_eye_of_eternity();   
 extern void AddSC_boss_sartharion();            //Obsidian Sanctum
 extern void AddSC_instance_obsidian_sanctum();
 extern void AddSC_boss_bjarngrim();             //Ulduar Halls of Lightning
@@ -763,6 +765,8 @@
     AddSC_boss_ormorok();
     AddSC_boss_keristrasza();
     AddSC_instance_nexus();
+    AddSC_boss_malygos();               // The Eye of Eternity
+    AddSC_instance_eye_of_eternity();  
     AddSC_boss_sartharion();            //Obsidian Sanctum
     AddSC_instance_obsidian_sanctum();
     AddSC_boss_bjarngrim();             //Ulduar Halls of Lightning
