Index: trunk/src/bindings/scripts/ScriptMgr.h
===================================================================
--- trunk/src/bindings/scripts/ScriptMgr.h (revision 149)
+++ trunk/src/bindings/scripts/ScriptMgr.h (revision 260)
@@ -25,5 +25,5 @@
 class WorldObject;
 
-#define MAX_SCRIPTS         1000                            //72 bytes each (approx 71kb)
+#define MAX_SCRIPTS         5000                            //72 bytes each (approx 351kb)
 #define VISIBLE_RANGE       (166.0f)                        //MAX visible range (size of grid)
 #define DEFAULT_TEXT        "<Trinity Script Text Entry Missing!>"
@@ -32,37 +32,36 @@
 {
     Script() :
-pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),
-pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL),
-pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL),
-pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL)
-{}
+        pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),
+        pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL),
+        pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL),
+        pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL)
+    {}
 
-std::string Name;
+    std::string Name;
 
-// Quest/gossip Methods to be scripted
-bool (*pGossipHello         )(Player*, Creature*);
-bool (*pQuestAccept         )(Player*, Creature*, Quest const* );
-bool (*pGossipSelect        )(Player*, Creature*, uint32 , uint32  );
-bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* );
-bool (*pQuestSelect         )(Player*, Creature*, Quest const* );
-bool (*pQuestComplete       )(Player*, Creature*, Quest const* );
-uint32 (*pNPCDialogStatus   )(Player*, Creature* );
-uint32 (*pGODialogStatus    )(Player *player, GameObject * _GO );
-bool (*pChooseReward        )(Player*, Creature*, Quest const*, uint32 );
-bool (*pItemHello           )(Player*, Item*, Quest const* );
-bool (*pGOHello             )(Player*, GameObject* );
-bool (*pAreaTrigger         )(Player*, AreaTriggerEntry* );
-bool (*pItemQuestAccept     )(Player*, Item *, Quest const* );
-bool (*pGOQuestAccept       )(Player*, GameObject*, Quest const* );
-bool (*pGOChooseReward      )(Player*, GameObject*_GO, Quest const*, uint32 );
-bool (*pReceiveEmote        )(Player*, Creature*, uint32 );
-bool (*pItemUse             )(Player*, Item*, SpellCastTargets const& );
+    //Methods to be scripted
+    bool (*pGossipHello         )(Player*, Creature*);
+    bool (*pQuestAccept         )(Player*, Creature*, Quest const* );
+    bool (*pGossipSelect        )(Player*, Creature*, uint32 , uint32 );
+    bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* );
+    bool (*pQuestSelect         )(Player*, Creature*, Quest const* );
+    bool (*pQuestComplete       )(Player*, Creature*, Quest const* );
+    uint32 (*pNPCDialogStatus   )(Player*, Creature* );
+    uint32 (*pGODialogStatus    )(Player*, GameObject * _GO );
+    bool (*pChooseReward        )(Player*, Creature*, Quest const*, uint32 );
+    bool (*pItemHello           )(Player*, Item*, Quest const* );
+    bool (*pGOHello             )(Player*, GameObject* );
+    bool (*pAreaTrigger         )(Player*, AreaTriggerEntry* );
+    bool (*pItemQuestAccept     )(Player*, Item *, Quest const* );
+    bool (*pGOQuestAccept       )(Player*, GameObject*, Quest const* );
+    bool (*pGOChooseReward      )(Player*, GameObject*, Quest const*, uint32 );
+    bool (*pReceiveEmote        )(Player*, Creature*, uint32 );
+    bool (*pItemUse             )(Player*, Item*, SpellCastTargets const& );
 
-CreatureAI* (*GetAI)(Creature*);
-InstanceData* (*GetInstanceData)(Map*);
+    CreatureAI* (*GetAI)(Creature*);
+    InstanceData* (*GetInstanceData)(Map*);
+
+    void RegisterSelf();
 };
-
-extern int nrscripts;
-extern Script *m_scripts[MAX_SCRIPTS];
 
 //Generic scripting text function
Index: trunk/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp (revision 260)
@@ -141,4 +141,4 @@
     newscript->pGossipHello = &GossipHello_npc_innkeeper;
     newscript->pGossipSelect = &GossipSelect_npc_innkeeper;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/npc/npcs_special.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/npc/npcs_special.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/npc/npcs_special.cpp (revision 260)
@@ -836,15 +836,15 @@
     newscript->pQuestAccept =   &QuestAccept_npc_chicken_cluck;
     newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_dancing_flames";
     newscript->pReceiveEmote =  &ReceiveEmote_npc_dancing_flames;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_injured_patient";
     newscript->GetAI = GetAI_npc_injured_patient;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -852,10 +852,10 @@
     newscript->GetAI = GetAI_npc_doctor;
     newscript->pQuestAccept = &QuestAccept_npc_doctor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_guardian";
     newscript->GetAI = GetAI_npc_guardian;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -863,5 +863,5 @@
     newscript->pGossipHello =  &GossipHello_npc_mount_vendor;
     newscript->pGossipSelect = &GossipSelect_npc_mount_vendor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -869,5 +869,5 @@
     newscript->pGossipHello =  &GossipHello_npc_rogue_trainer;
     newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -875,4 +875,4 @@
     newscript->pGossipHello = &GossipHello_npc_sayge;
     newscript->pGossipSelect = &GossipSelect_npc_sayge;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/npc/npc_professions.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/npc/npc_professions.cpp (revision 91)
+++ trunk/src/bindings/scripts/scripts/npc/npc_professions.cpp (revision 260)
@@ -1178,5 +1178,5 @@
     newscript->pGossipHello =  &GossipHello_npc_prof_alchemy;
     newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1184,5 +1184,5 @@
     newscript->pGossipHello =  &GossipHello_npc_prof_blacksmith;
     newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1190,5 +1190,5 @@
     newscript->pGossipHello =  &GossipHello_npc_prof_leather;
     newscript->pGossipSelect = &GossipSelect_npc_prof_leather;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1196,5 +1196,5 @@
     newscript->pGossipHello =  &GossipHello_npc_prof_tailor;
     newscript->pGossipSelect = &GossipSelect_npc_prof_tailor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     /*newscript = new Script;
@@ -1202,4 +1202,4 @@
     newscript->pGOHello =  &GOHello_go_soothsaying_for_dummies;
     //newscript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies;
-    m_scripts[nrscripts++] = newscript;*/
-}
+    newscript->RegisterSelf();*/
+}
Index: trunk/src/bindings/scripts/scripts/guard/guards.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/guard/guards.cpp (revision 159)
+++ trunk/src/bindings/scripts/scripts/guard/guards.cpp (revision 260)
@@ -3981,5 +3981,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_azuremyst;
     newscript->GetAI = GetAI_guard_azuremyst;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -3988,10 +3988,10 @@
     newscript->pGossipSelect         = &GossipSelect_guard_bluffwatcher;
     newscript->GetAI = GetAI_guard_bluffwatcher;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="guard_contested";
     newscript->GetAI = GetAI_guard_contested;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4000,5 +4000,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_darnassus;
     newscript->GetAI = GetAI_guard_darnassus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4007,5 +4007,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_dunmorogh;
     newscript->GetAI = GetAI_guard_dunmorogh;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4014,5 +4014,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_durotar;
     newscript->GetAI = GetAI_guard_durotar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4021,5 +4021,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_elwynnforest;
     newscript->GetAI = GetAI_guard_elwynnforest;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4028,5 +4028,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_eversong;
     newscript->GetAI = GetAI_guard_eversong;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4035,5 +4035,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_exodar;
     newscript->GetAI = GetAI_guard_exodar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4042,5 +4042,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_ironforge;
     newscript->GetAI = GetAI_guard_ironforge;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4049,5 +4049,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_mulgore;
     newscript->GetAI = GetAI_guard_mulgore;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4057,5 +4057,5 @@
     newscript->pReceiveEmote         = &ReceiveEmote_guard_orgrimmar;
     newscript->GetAI = GetAI_guard_orgrimmar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4064,5 +4064,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_shattrath;
     newscript->GetAI = GetAI_guard_shattrath;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4071,5 +4071,5 @@
     newscript->pGossipHello          = &GossipHello_guard_shattrath_aldor;
     newscript->pGossipSelect         = &GossipSelect_guard_shattrath_aldor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4078,5 +4078,5 @@
     newscript->pGossipHello          = &GossipHello_guard_shattrath_scryer;
     newscript->pGossipSelect         = &GossipSelect_guard_shattrath_scryer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4085,5 +4085,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_silvermoon;
     newscript->GetAI = GetAI_guard_silvermoon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4093,5 +4093,5 @@
     newscript->pReceiveEmote         = &ReceiveEmote_guard_stormwind;
     newscript->GetAI = GetAI_guard_stormwind;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4100,5 +4100,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_teldrassil;
     newscript->GetAI = GetAI_guard_teldrassil;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4107,5 +4107,5 @@
     newscript->pGossipSelect         = &GossipSelect_guard_tirisfal;
     newscript->GetAI = GetAI_guard_tirisfal;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -4114,4 +4114,4 @@
     newscript->pGossipSelect         = &GossipSelect_guard_undercity;
     newscript->GetAI = GetAI_guard_undercity;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/go/go_scripts.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/go/go_scripts.cpp (revision 239)
+++ trunk/src/bindings/scripts/scripts/go/go_scripts.cpp (revision 260)
@@ -166,44 +166,44 @@
     newscript->Name="go_northern_crystal_pylon";
     newscript->pGOHello =           &GOHello_go_northern_crystal_pylon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_eastern_crystal_pylon";
     newscript->pGOHello =           &GOHello_go_eastern_crystal_pylon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_western_crystal_pylon";
     newscript->pGOHello =           &GOHello_go_western_crystal_pylon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_barov_journal";
     newscript->pGOHello =           &GOHello_go_barov_journal;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_field_repair_bot_74A";
     newscript->pGOHello =           &GOHello_go_field_repair_bot_74A;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_orb_of_command";
     newscript->pGOHello =           &GOHello_go_orb_of_command;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_tablet_of_madness";
     newscript->pGOHello =           &GOHello_go_tablet_of_madness;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_tablet_of_the_seven";
     newscript->pGOHello =           &GOHello_go_tablet_of_the_seven;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_teleporter";
     newscript->pGOHello =           &GOHello_go_teleporter;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/boss/boss_taerar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/boss/boss_taerar.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/boss/boss_taerar.cpp (revision 260)
@@ -298,9 +298,9 @@
     newscript->Name="boss_taerar";
     newscript->GetAI = GetAI_boss_taerar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_shade_of_taerar";
     newscript->GetAI = GetAI_boss_shadeoftaerar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/boss/boss_ysondre.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/boss/boss_ysondre.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/boss/boss_ysondre.cpp (revision 260)
@@ -238,9 +238,9 @@
     newscript->Name="boss_ysondre";
     newscript->GetAI = GetAI_boss_ysondre;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_dementeddruids";
     newscript->GetAI = GetAI_mob_dementeddruids;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/boss/boss_emeriss.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/boss/boss_emeriss.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/boss/boss_emeriss.cpp (revision 260)
@@ -153,4 +153,4 @@
     newscript->Name="boss_emeriss";
     newscript->GetAI = GetAI_boss_emeriss;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp (revision 260)
@@ -169,4 +169,4 @@
     newscript->Name="generic_creature";
     newscript->GetAI = GetAI_generic_creature;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp (revision 239)
+++ trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp (revision 260)
@@ -1401,4 +1401,4 @@
     newscript->Name="mob_eventai";
     newscript->GetAI = GetAI_Mob_EventAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/custom/test.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/custom/test.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/custom/test.cpp (revision 260)
@@ -197,4 +197,4 @@
     newscript->pGossipHello          = &GossipHello_npc_test;
     newscript->pGossipSelect         = &GossipSelect_npc_test;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/custom/custom_gossip_codebox.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/custom/custom_gossip_codebox.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/custom/custom_gossip_codebox.cpp (revision 260)
@@ -78,4 +78,4 @@
     newscript->pGossipSelect =          &GossipSelect_custom_gossip_codebox;
     newscript->pGossipSelectWithCode =  &GossipSelectWithCode_custom_gossip_codebox;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/custom/custom_example.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/custom/custom_example.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/custom/custom_example.cpp (revision 260)
@@ -274,4 +274,4 @@
     newscript->pGossipSelect = &GossipSelect_custom_example;
     newscript->pReceiveEmote = &ReceiveEmote_custom_example;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp (revision 260)
@@ -97,4 +97,4 @@
     newscript->Name="boss_hazzarah";
     newscript->GetAI = GetAI_boss_hazzarah;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp (revision 260)
@@ -532,14 +532,14 @@
     newscript->Name="boss_thekal";
     newscript->GetAI = GetAI_boss_thekal;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_zealot_lorkhan";
     newscript->GetAI = GetAI_mob_zealot_lorkhan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_zealot_zath";
     newscript->GetAI = GetAI_mob_zealot_zath;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp (revision 260)
@@ -289,9 +289,9 @@
     newscript->Name="boss_jeklik";
     newscript->GetAI = GetAI_boss_jeklik;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_batrider";
     newscript->GetAI = GetAI_mob_batrider;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp (revision 260)
@@ -81,4 +81,4 @@
     newscript->Name="boss_wushoolay";
     newscript->GetAI = GetAI_boss_wushoolay;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp (revision 260)
@@ -197,4 +197,4 @@
     newscript->Name="boss_venoxis";
     newscript->GetAI = GetAI_boss_venoxis;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp (revision 260)
@@ -89,4 +89,4 @@
     newscript->Name="boss_grilek";
     newscript->GetAI = GetAI_boss_grilek;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp (revision 260)
@@ -235,4 +235,4 @@
     newscript->Name = "instance_zulgurub";
     newscript->GetInstanceData = GetInstanceData_instance_zulgurub;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp (revision 260)
@@ -148,4 +148,4 @@
     newscript->Name="boss_renataki";
     newscript->GetAI = GetAI_boss_renataki;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp (revision 260)
@@ -253,4 +253,4 @@
     newscript->Name="boss_hakkar";
     newscript->GetAI = GetAI_boss_hakkar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp (revision 260)
@@ -208,4 +208,4 @@
     newscript->Name="boss_arlokk";
     newscript->GetAI = GetAI_boss_arlokk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp (revision 260)
@@ -259,14 +259,14 @@
     newscript->Name="boss_jindo";
     newscript->GetAI = GetAI_boss_jindo;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_healing_ward";
     newscript->GetAI = GetAI_mob_healing_ward;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_shade_of_jindo";
     newscript->GetAI = GetAI_mob_shade_of_jindo;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp (revision 260)
@@ -303,9 +303,9 @@
     newscript->Name="boss_mandokir";
     newscript->GetAI = GetAI_boss_mandokir;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_ohgan";
     newscript->GetAI = GetAI_mob_ohgan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp (revision 260)
@@ -245,9 +245,9 @@
     newscript->Name="boss_marli";
     newscript->GetAI = GetAI_boss_marli;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_spawn_of_marli";
     newscript->GetAI = GetAI_mob_spawn_of_marli;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp (revision 260)
@@ -89,4 +89,4 @@
     newscript->Name="boss_gahzranka";
     newscript->GetAI = GetAI_boss_gahzranka;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp (revision 166)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp (revision 260)
@@ -124,9 +124,9 @@
     newscript->Name="boss_broggok";
     newscript->GetAI = GetAI_boss_broggokAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_broggok_poisoncloud";
     newscript->GetAI = GetAI_mob_broggok_poisoncloudAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp (revision 260)
@@ -128,4 +128,4 @@
     newscript->Name="boss_the_maker";
     newscript->GetAI = GetAI_boss_the_makerAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp (revision 260)
@@ -226,9 +226,9 @@
     newscript->Name="boss_kelidan_the_breaker";
     newscript->GetAI = GetAI_boss_kelidan_the_breaker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_shadowmoon_channeler";
     newscript->GetAI = GetAI_mob_shadowmoon_channeler;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp (revision 260)
@@ -165,4 +165,4 @@
     newscript->Name="boss_watchkeeper_gargolmar";
     newscript->GetAI = GetAI_boss_watchkeeper_gargolmarAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp (revision 166)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp (revision 260)
@@ -210,4 +210,4 @@
     newscript->Name="boss_omor_the_unscarred";
     newscript->GetAI = GetAI_boss_omor_the_unscarredAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp (revision 166)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp (revision 260)
@@ -395,9 +395,9 @@
     newscript->Name="boss_warbringer_omrogg";
     newscript->GetAI = GetAI_boss_warbringer_omrogg;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_omrogg_heads";
     newscript->GetAI = GetAI_mob_omrogg_heads;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp (revision 260)
@@ -445,14 +445,14 @@
     newscript->Name="boss_grand_warlock_nethekurse";
     newscript->GetAI = GetAI_boss_grand_warlock_nethekurse;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_fel_orc_convert";
     newscript->GetAI = GetAI_mob_fel_orc_convert;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_lesser_shadow_fissure";
     newscript->GetAI = GetAI_mob_lesser_shadow_fissure;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp (revision 260)
@@ -111,4 +111,4 @@
     newscript->Name = "instance_shattered_halls";
     newscript->GetInstanceData = GetInstanceData_instance_shattered_halls;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp (revision 260)
@@ -283,4 +283,4 @@
     newscript->Name = "instance_magtheridons_lair";
     newscript->GetInstanceData = GetInstanceData_instance_magtheridons_lair;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp (revision 203)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp (revision 260)
@@ -546,20 +546,20 @@
     newscript->Name="boss_magtheridon";
     newscript->GetAI = GetAI_boss_magtheridon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_hellfire_channeler";
     newscript->GetAI = GetAI_mob_hellfire_channeler;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="go_manticron_cube";
     newscript->pGOHello = &GOHello_go_Manticron_Cube;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_abyssal";
     newscript->GetAI = GetAI_mob_abyssalAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp (revision 260)
@@ -576,14 +576,14 @@
     newscript->Name = "mob_doom_blossom";
     newscript->GetAI = GetAI_mob_doom_blossom;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_shadowy_construct";
     newscript->GetAI = GetAI_mob_shadowy_construct;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_teron_gorefiend";
     newscript->GetAI = GetAI_boss_teron_gorefiend;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp (revision 260)
@@ -65,4 +65,4 @@
     newscript->pGossipHello = GossipHello_npc_spirit_of_olum;
     newscript->pGossipSelect = GossipSelect_npc_spirit_of_olum;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp (revision 239)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp (revision 260)
@@ -2248,5 +2248,5 @@
     newscript->Name = "boss_illidan_stormrage";
     newscript->GetAI = GetAI_boss_illidan_stormrage;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -2255,44 +2255,44 @@
     newscript->pGossipHello = GossipHello_npc_akama_at_illidan;
     newscript->pGossipSelect = GossipSelect_npc_akama_at_illidan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "boss_maiev_shadowsong";
     newscript->GetAI = GetAI_boss_maiev;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_flame_of_azzinoth";
     newscript->GetAI = GetAI_mob_flame_of_azzinoth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_blade_of_azzinoth";
     newscript->GetAI = GetAI_blade_of_azzinoth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "gameobject_cage_trap";
     newscript->pGOHello = GOHello_cage_trap;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_cage_trap_trigger";
     newscript->GetAI = &GetAI_cage_trap_trigger;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_shadow_demon";
     newscript->GetAI = GetAI_shadow_demon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_demon_fire";
     newscript->GetAI = GetAI_demonfire;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_parasitic_shadowfiend";
     newscript->GetAI = GetAI_parasitic_shadowfiend;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp (revision 260)
@@ -358,4 +358,4 @@
     newscript->Name="boss_mother_shahraz";
     newscript->GetAI = GetAI_boss_shahraz;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp (revision 108)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp (revision 260)
@@ -856,29 +856,29 @@
     newscript->Name="mob_illidari_council";
     newscript->GetAI = GetAI_mob_illidari_council;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_blood_elf_council_voice_trigger";
     newscript->GetAI = GetAI_mob_blood_elf_council_voice_trigger;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_gathios_the_shatterer";
     newscript->GetAI = GetAI_boss_gathios_the_shatterer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lady_malande";
     newscript->GetAI = GetAI_boss_lady_malande;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_veras_darkshadow";
     newscript->GetAI = GetAI_boss_veras_darkshadow;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_high_nethermancer_zerevor";
     newscript->GetAI = GetAI_boss_high_nethermancer_zerevor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp (revision 178)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp (revision 260)
@@ -333,4 +333,4 @@
     newscript->Name = "instance_black_temple";
     newscript->GetInstanceData = GetInstanceData_instance_black_temple;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp (revision 160)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp (revision 260)
@@ -259,9 +259,9 @@
     newscript->Name="boss_najentus";
     newscript->GetAI = GetAI_boss_najentus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "go_najentus_spine";
     newscript->pGOHello = &GOHello_go_najentus_spine;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp (revision 222)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp (revision 260)
@@ -797,15 +797,15 @@
     newscript->Name="boss_shade_of_akama";
     newscript->GetAI = GetAI_boss_shade_of_akama;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_ashtongue_channeler";
     newscript->GetAI = GetAI_mob_ashtongue_channeler;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_ashtongue_sorcerer";
     newscript->GetAI = GetAI_mob_ashtongue_sorcerer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -814,4 +814,4 @@
     newscript->pGossipHello = &GossipHello_npc_akama;
     newscript->pGossipSelect = &GossipSelect_npc_akama;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp (revision 203)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp (revision 260)
@@ -237,9 +237,9 @@
     newscript->Name="boss_supremus";
     newscript->GetAI = GetAI_boss_supremus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="molten_flame";
     newscript->GetAI = GetAI_molten_flame;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp (revision 260)
@@ -362,4 +362,4 @@
     newscript->Name="boss_gurtogg_bloodboil";
     newscript->GetAI = GetAI_boss_gurtogg_bloodboil;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp (revision 260)
@@ -724,24 +724,24 @@
     newscript->Name="boss_reliquary_of_souls";
     newscript->GetAI = GetAI_boss_reliquary_of_souls;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_essence_of_suffering";
     newscript->GetAI = GetAI_boss_essence_of_suffering;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_essence_of_desire";
     newscript->GetAI = GetAI_boss_essence_of_desire;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_essence_of_anger";
     newscript->GetAI = GetAI_boss_essence_of_anger;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_enslaved_soul";
     newscript->GetAI = GetAI_npc_enslaved_soul;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp (revision 260)
@@ -77,4 +77,4 @@
     newscript->pGossipHello = &GossipHello_npc_braug_dimspirit;
     newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp (revision 260)
@@ -294,9 +294,9 @@
     newscript->Name="boss_warp_splinter";
     newscript->GetAI = GetAI_boss_warp_splinter;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_warp_splinter_treant";
     newscript->GetAI = GetAI_mob_treant;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp (revision 260)
@@ -212,4 +212,4 @@
     newscript->Name="boss_high_botanist_freywinn";
     newscript->GetAI = GetAI_boss_high_botanist_freywinn;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp (revision 260)
@@ -195,4 +195,4 @@
     newscript->Name="boss_laj";
     newscript->GetAI = GetAI_boss_laj;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp (revision 260)
@@ -1582,34 +1582,34 @@
     newscript->Name="boss_kaelthas";
     newscript->GetAI = GetAI_boss_kaelthas;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_thaladred_the_darkener";
     newscript->GetAI = GetAI_boss_thaladred_the_darkener;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lord_sanguinar";
     newscript->GetAI = GetAI_boss_lord_sanguinar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_grand_astromancer_capernian";
     newscript->GetAI = GetAI_boss_grand_astromancer_capernian;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_master_engineer_telonicus";
     newscript->GetAI = GetAI_boss_master_engineer_telonicus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name= "mob_kael_flamestrike";
     newscript->GetAI = GetAI_mob_kael_flamestrike;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_phoenix";
     newscript->GetAI = GetAI_mob_phoenix;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp (revision 260)
@@ -95,4 +95,4 @@
     newscript->Name="mob_crystalcore_devastator";
     newscript->GetAI = GetAI_mob_crystalcore_devastator;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp (revision 204)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp (revision 260)
@@ -537,9 +537,9 @@
     newscript->Name="boss_high_astromancer_solarian";
     newscript->GetAI = GetAI_boss_high_astromancer_solarian;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_solarium_priest";
     newscript->GetAI = GetAI_mob_solarium_priest;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp (revision 260)
@@ -506,14 +506,14 @@
     newscript->Name="boss_alar";
     newscript->GetAI = GetAI_boss_alar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_ember_of_alar";
     newscript->GetAI = GetAI_mob_ember_of_alar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_flame_patch_alar";
     newscript->GetAI = GetAI_mob_flame_patch_alar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp (revision 204)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp (revision 260)
@@ -173,4 +173,4 @@
     newscript->Name = "instance_the_eye";
     newscript->GetInstanceData = GetInstanceData_instance_the_eye;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp (revision 204)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp (revision 260)
@@ -196,4 +196,4 @@
     newscript->Name="boss_void_reaver";
     newscript->GetAI = GetAI_boss_void_reaver;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp (revision 260)
@@ -368,9 +368,9 @@
     newscript->Name="boss_harbinger_skyriss";
     newscript->GetAI = GetAI_boss_harbinger_skyriss;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_harbinger_skyriss_illusion";
     newscript->GetAI = GetAI_boss_harbinger_skyriss_illusion;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp (revision 260)
@@ -576,14 +576,14 @@
     newscript->Name="npc_millhouse_manastorm";
     newscript->GetAI = GetAI_npc_millhouse_manastorm;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_warden_mellichar";
     newscript->GetAI = GetAI_npc_warden_mellichar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_zerekethvoidzone";
     newscript->GetAI = GetAI_mob_zerekethvoidzoneAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp (revision 260)
@@ -221,4 +221,4 @@
     newscript->Name = "instance_arcatraz";
     newscript->GetInstanceData = GetInstanceData_instance_arcatraz;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp (revision 260)
@@ -278,9 +278,9 @@
     newscript->Name="boss_nethermancer_sepethrea";    
     newscript->GetAI = GetAI_boss_nethermancer_sepethrea;    
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;    
     newscript->Name="mob_ragin_flames";    
     newscript->GetAI = GetAI_mob_ragin_flames;    
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp (revision 260)
@@ -87,4 +87,4 @@
     newscript->Name = "instance_mechanar";
     newscript->GetInstanceData = GetInstanceData_instance_mechanar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp (revision 260)
@@ -158,4 +158,4 @@
     newscript->Name="boss_gatewatcher_iron_hand";    
     newscript->GetAI = GetAI_boss_gatewatcher_iron_hand;    
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp (revision 260)
@@ -298,9 +298,9 @@
     newscript->Name="boss_pathaleon_the_calculator";    
     newscript->GetAI = GetAI_boss_pathaleon_the_calculator;    
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;    
     newscript->Name="mob_nether_wraith";    
     newscript->GetAI = GetAI_mob_nether_wraith;    
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp (revision 260)
@@ -246,5 +246,5 @@
     newscript->pGossipHello = &GossipHello_npc_archmage_malin;
     newscript->pGossipSelect = &GossipSelect_npc_archmage_malin;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -252,5 +252,5 @@
     newscript->GetAI = GetAI_npc_bartleby;
     newscript->pQuestAccept = &QuestAccept_npc_bartleby;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -258,10 +258,10 @@
     newscript->GetAI = GetAI_npc_dashel_stonefist;
     newscript->pQuestAccept = &QuestAccept_npc_dashel_stonefist;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "npc_general_marcus_jonathan";
     newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -269,4 +269,4 @@
     newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor;
     newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp (revision 260)
@@ -335,14 +335,14 @@
     newscript->Name="boss_kri";
     newscript->GetAI = GetAI_boss_kri;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_vem";
     newscript->GetAI = GetAI_boss_vem;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_yauj";
     newscript->GetAI = GetAI_boss_yauj;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp (revision 260)
@@ -140,4 +140,4 @@
     newscript->Name="boss_huhuran";
     newscript->GetAI = GetAI_boss_huhuran;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp (revision 260)
@@ -690,9 +690,9 @@
     newscript->Name="boss_veknilash";
     newscript->GetAI = GetAI_boss_veknilash;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_veklor";
     newscript->GetAI = GetAI_boss_veklor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp (revision 260)
@@ -187,4 +187,4 @@
     newscript->Name="boss_fankriss";
     newscript->GetAI = GetAI_boss_fankriss;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp (revision 260)
@@ -1330,34 +1330,34 @@
     newscript->Name="boss_eye_of_cthun";
     newscript->GetAI = GetAI_eye_of_cthun;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_cthun";
     newscript->GetAI = GetAI_cthun;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_eye_tentacle";
     newscript->GetAI = GetAI_eye_tentacle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_claw_tentacle";
     newscript->GetAI = GetAI_claw_tentacle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_giant_claw_tentacle";
     newscript->GetAI = GetAI_giant_claw_tentacle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_giant_eye_tentacle";
     newscript->GetAI = GetAI_giant_eye_tentacle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_giant_flesh_tentacle";
     newscript->GetAI = GetAI_flesh_tentacle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp (revision 260)
@@ -260,9 +260,9 @@
     newscript->Name="boss_sartura";
     newscript->GetAI = GetAI_boss_sartura;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_sartura_royal_guard";
     newscript->GetAI = GetAI_mob_sartura_royal_guard;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp (revision 260)
@@ -311,4 +311,4 @@
     newscript->Name="boss_skeram";
     newscript->GetAI = GetAI_boss_skeram;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp (revision 260)
@@ -137,4 +137,4 @@
     newscript->Name="boss_ouro";
     newscript->GetAI = GetAI_boss_ouro;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp (revision 260)
@@ -162,4 +162,4 @@
     newscript->Name = "instance_temple_of_ahnqiraj";
     newscript->GetInstanceData = GetInstanceData_instance_temple_of_ahnqiraj;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp (revision 260)
@@ -310,5 +310,5 @@
     newscript->Name="mob_anubisath_sentinel";
     newscript->GetAI = GetAI_mob_anubisath_sentinelAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
 
Index: trunk/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp (revision 260)
@@ -90,4 +90,4 @@
     newscript->pGossipHello =  &GossipHello_npc_royal_historian_archesonus;
     newscript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp (revision 260)
@@ -213,4 +213,4 @@
     newscript->Name="boss_doomwalker";
     newscript->GetAI = GetAI_boss_doomwalker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp (revision 141)
+++ trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp (revision 260)
@@ -1107,15 +1107,15 @@
     newscript->Name = "mob_mature_netherwing_drake";
     newscript->GetAI = GetAI_mob_mature_netherwing_drake;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_enslaved_netherwing_drake";
     newscript->GetAI = GetAI_mob_enslaved_netherwing_drake;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
 	newscript->Name = "mob_dragonmaw_peon";
 	newscript->GetAI = GetAI_mob_dragonmaw_peon;
-	m_scripts[nrscripts++] = newscript;
+	newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1123,10 +1123,10 @@
     newscript->pGossipHello =  &GossipHello_npc_drake_dealer_hurlunk;
     newscript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_invis_legion_teleporter";
     newscript->GetAI = GetAI_npc_invis_legion_teleporter;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1134,5 +1134,5 @@
     newscript->pGossipHello =  &GossipHello_npcs_flanis_swiftwing_and_kagrosh;
     newscript->pGossipSelect = &GossipSelect_npcs_flanis_swiftwing_and_kagrosh;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1140,5 +1140,5 @@
     newscript->pGossipHello =  &GossipHello_npc_murkblood_overseer;
     newscript->pGossipSelect = &GossipSelect_npc_murkblood_overseer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1146,10 +1146,10 @@
     newscript->pGossipHello =  &GossipHello_npc_neltharaku;
     newscript->pGossipSelect = &GossipSelect_npc_neltharaku;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "npc_karynaku";
     newscript->pQuestAccept = &QuestAccept_npc_karynaku;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -1157,5 +1157,5 @@
     newscript->pGossipHello =  &GossipHello_npc_oronok_tornheart;
     newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
@@ -1163,10 +1163,10 @@
 	newscript->GetAI = GetAI_Overlord_Morghor;
 	newscript->pQuestAccept = &QuestAccept_Overlord_Morghor;
-	m_scripts[nrscripts++] = newscript;
+	newscript->RegisterSelf();
 
 	newscript = new Script;
 	newscript->Name = "npc_lord_illidan_stormrage";
 	newscript->GetAI = GetAI_Lord_Illidan;
-	m_scripts[nrscripts++] = newscript;
+	newscript->RegisterSelf();
 
 	newscript = new Script;
@@ -1175,4 +1175,4 @@
 	newscript->pGossipHello = &GossipHello_npc_yarzill_fly;
 	newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly;
-	m_scripts[nrscripts++] = newscript;
-}
+	newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp (revision 260)
@@ -202,4 +202,4 @@
     newscript->Name="boss_gyth";
     newscript->GetAI = GetAI_boss_gyth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp (revision 260)
@@ -118,4 +118,4 @@
     newscript->Name="boss_warmaster_voone";
     newscript->GetAI = GetAI_boss_warmastervoone;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp (revision 260)
@@ -92,4 +92,4 @@
     newscript->Name="boss_halycon";
     newscript->GetAI = GetAI_boss_halycon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp (revision 260)
@@ -90,4 +90,4 @@
     newscript->Name="boss_the_beast";
     newscript->GetAI = GetAI_boss_thebeast;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp (revision 260)
@@ -124,4 +124,4 @@
     newscript->Name="boss_overlord_wyrmthalak";
     newscript->GetAI = GetAI_boss_overlordwyrmthalak;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp (revision 260)
@@ -88,4 +88,4 @@
     newscript->Name="boss_rend_blackhand";
     newscript->GetAI = GetAI_boss_rend_blackhand;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp (revision 260)
@@ -128,4 +128,4 @@
     newscript->Name="boss_highlord_omokk";
     newscript->GetAI = GetAI_boss_highlordomokk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp (revision 260)
@@ -83,4 +83,4 @@
     newscript->Name="boss_mother_smolderweb";
     newscript->GetAI = GetAI_boss_mothersmolderweb;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp (revision 260)
@@ -92,4 +92,4 @@
     newscript->Name="boss_shadow_hunter_voshgajin";
     newscript->GetAI = GetAI_boss_shadowvosh;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp (revision 260)
@@ -98,4 +98,4 @@
     newscript->Name="boss_drakkisath";
     newscript->GetAI = GetAI_boss_drakkisath;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp (revision 260)
@@ -90,4 +90,4 @@
     newscript->Name="boss_pyroguard_emberseer";
     newscript->GetAI = GetAI_boss_pyroguard_emberseer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp (revision 260)
@@ -82,4 +82,4 @@
     newscript->Name="quartermaster_zigris";
     newscript->GetAI = GetAI_boss_quatermasterzigris;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp (revision 260)
@@ -95,4 +95,4 @@
     newscript->Name="npc_henze_faulk";
     newscript->GetAI = GetAI_npc_henze_faulk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp (revision 260)
@@ -150,5 +150,5 @@
     newscript->pGossipHello =  &GossipHello_npc_deathly_usher;
     newscript->pGossipSelect = &GossipSelect_npc_deathly_usher;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -156,4 +156,4 @@
     newscript->pGossipHello =  &GossipHello_npc_fallen_hero_of_horde;
     newscript->pGossipSelect = &GossipSelect_npc_fallen_hero_of_horde;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp (revision 260)
@@ -179,4 +179,4 @@
     newscript->Name="boss_kruul";
     newscript->GetAI = GetAI_boss_kruul;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp (revision 260)
@@ -375,10 +375,10 @@
     newscript->Name="mob_aquementas";
     newscript->GetAI = GetAI_mob_aquementas;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_custodian_of_time";
     newscript->GetAI = GetAI_npc_custodian_of_time;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -386,5 +386,5 @@
     newscript->pGossipHello =  &GossipHello_npc_marin_noggenfogger;
     newscript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -393,5 +393,5 @@
     newscript->pGossipSelect = &GossipSelect_npc_steward_of_time;
     newscript->pQuestAccept =  &QuestAccept_npc_steward_of_time;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -399,4 +399,4 @@
     newscript->pGossipHello =  &GossipHello_npc_stone_watcher_of_norgannon;
     newscript->pGossipSelect = &GossipSelect_npc_stone_watcher_of_norgannon;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp (revision 260)
@@ -415,5 +415,5 @@
     newscript->pGossipHello =  &GossipHello_npc_raliq_the_drunk;
     newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -421,5 +421,5 @@
     newscript->GetAI = GetAI_npc_salsalabim;
     newscript->pGossipHello =  &GossipHello_npc_salsalabim;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -427,5 +427,5 @@
     newscript->pGossipHello =  &GossipHello_npc_shattrathflaskvendors;
     newscript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -433,9 +433,9 @@
     newscript->pGossipHello =  &GossipHello_npc_zephyr;
     newscript->pGossipSelect = &GossipSelect_npc_zephyr;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
        newscript = new Script;
     newscript->Name="npc_kservant";
     newscript->GetAI = GetAI_npc_kservantAI;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp (revision 260)
@@ -153,5 +153,5 @@
     newscript->Name="mobs_mana_tapped";
     newscript->GetAI = GetAI_mobs_mana_tapped;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -160,4 +160,4 @@
     newscript->pGossipHello =  &GossipHello_npc_prospector_anvilward;
     newscript->pGossipSelect = &GossipSelect_npc_prospector_anvilward;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp (revision 260)
@@ -681,19 +681,19 @@
     newscript->Name="boss_kalecgos";
     newscript->GetAI = GetAI_boss_kalecgos;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_sathrovarr";
     newscript->GetAI = GetAI_boss_Sathrovarr;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_kalec";
     newscript->GetAI = GetAI_boss_kalec;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="kalocegos_teleporter";
     newscript->pGOHello = &GOkalocegos_teleporter;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp (revision 141)
+++ trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp (revision 260)
@@ -179,4 +179,4 @@
     newscript->Name="boss_brutallus";
     newscript->GetAI = GetAI_boss_brutallus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp (revision 239)
+++ trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp (revision 260)
@@ -193,4 +193,4 @@
     newscript->Name = "instance_sunwell_plateau";
     newscript->GetInstanceData = GetInstanceData_instance_sunwell_plateau;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp (revision 260)
@@ -575,14 +575,14 @@
     newscript->Name="boss_felmyst";
     newscript->GetAI = GetAI_boss_felmyst;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_felmyst_vapor";
     newscript->GetAI = GetAI_mob_felmyst_vapor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_felmyst_trail";
     newscript->GetAI = GetAI_mob_felmyst_trail;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp (revision 260)
@@ -762,14 +762,14 @@
     newscript->Name="boss_sacrolash";
     newscript->GetAI = GetAI_boss_sacrolash;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_alythess";
     newscript->GetAI = GetAI_boss_alythess;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_shadow_image";
     newscript->GetAI = GetAI_mob_shadow_image;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp (revision 204)
+++ trunk/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp (revision 260)
@@ -546,5 +546,5 @@
     newscript->pGossipHello =  &GossipHello_npc_bunthen_plainswind;
     newscript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -552,5 +552,5 @@
     newscript->pGossipHello =  &GossipHello_npc_great_bear_spirit;
     newscript->pGossipSelect = &GossipSelect_npc_great_bear_spirit;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -558,14 +558,14 @@
     newscript->pGossipHello =  &GossipHello_npc_silva_filnaveth;
     newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
     newscript->Name="npc_clintar_dreamwalker";
     newscript->pQuestAccept = &QuestAccept_npc_clintar_dreamwalker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_clintar_spirit";
     newscript->GetAI = GetAI_npc_clintar_spirit;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/undercity/undercity.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/undercity/undercity.cpp (revision 260)
@@ -246,10 +246,10 @@
     newscript->GetAI = GetAI_npc_lady_sylvanas_windrunner;
     newscript->pChooseReward = &ChooseReward_npc_lady_sylvanas_windrunner;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_highborne_lamenter";
     newscript->GetAI = GetAI_npc_highborne_lamenter;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -257,4 +257,4 @@
     newscript->pGossipHello = &GossipHello_npc_parqual_fintallas;
     newscript->pGossipSelect = &GossipSelect_npc_parqual_fintallas;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp (revision 260)
@@ -125,4 +125,4 @@
     newscript->Name="boss_broodlord";
     newscript->GetAI = GetAI_boss_broodlord;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp (revision 260)
@@ -91,4 +91,4 @@
     newscript->Name="boss_firemaw";
     newscript->GetAI = GetAI_boss_firemaw;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp (revision 260)
@@ -128,4 +128,4 @@
     newscript->Name="boss_razorgore";
     newscript->GetAI = GetAI_boss_razorgore;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp (revision 260)
@@ -91,4 +91,4 @@
     newscript->Name="boss_flamegor";
     newscript->GetAI = GetAI_boss_flamegor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp (revision 260)
@@ -311,4 +311,4 @@
     newscript->Name="boss_chromaggus";
     newscript->GetAI = GetAI_boss_chromaggus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp (revision 260)
@@ -258,4 +258,4 @@
     newscript->pGossipHello = &GossipHello_boss_vael;
     newscript->pGossipSelect = &GossipSelect_boss_vael;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp (revision 260)
@@ -391,4 +391,4 @@
     newscript->pGossipHello = &GossipHello_boss_victor_nefarius;
     newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp (revision 260)
@@ -224,4 +224,4 @@
     newscript->Name="boss_nefarian";
     newscript->GetAI = GetAI_boss_nefarian;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp (revision 260)
@@ -100,4 +100,4 @@
     newscript->Name="boss_ebonroc";
     newscript->GetAI = GetAI_boss_ebonroc;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp (revision 260)
@@ -144,5 +144,5 @@
     newscript->pGossipHello =  &GossipHello_npc_kalaran_windblade;
     newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -150,5 +150,5 @@
     newscript->pGossipHello          = &GossipHello_npc_lothos_riftwaker;
     newscript->pGossipSelect         = &GossipSelect_npc_lothos_riftwaker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -156,4 +156,4 @@
     newscript->pGossipHello =  &GossipHello_npc_zamael_lunthistle;
     newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp (revision 260)
@@ -407,15 +407,15 @@
     newscript->Name="mobs_bladespire_ogre";
     newscript->GetAI = GetAI_mobs_bladespire_ogre;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mobs_nether_drake";
     newscript->GetAI = GetAI_mobs_nether_drake;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_daranelle";
     newscript->GetAI = GetAI_npc_daranelle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -423,5 +423,5 @@
     newscript->pGossipHello = &GossipHello_npc_overseer_nuaar;
     newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -429,5 +429,5 @@
     newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder;
     newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -435,4 +435,4 @@
     newscript->pGossipHello =  &GossipHello_npc_skyguard_handler_irena;
     newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp (revision 260)
@@ -272,9 +272,9 @@
     newscript->Name="boss_nexusprince_shaffar";
     newscript->GetAI = GetAI_boss_nexusprince_shaffar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_ethereal_beacon";
     newscript->GetAI = GetAI_mob_ethereal_beacon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp (revision 115)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp (revision 260)
@@ -135,4 +135,4 @@
     newscript->Name="boss_pandemonius";
     newscript->GetAI = GetAI_boss_pandemonius;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp (revision 260)
@@ -349,14 +349,14 @@
     newscript->Name="boss_exarch_maladaar";
     newscript->GetAI = GetAI_boss_exarch_maladaar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_avatar_of_martyred";
     newscript->GetAI = GetAI_mob_avatar_of_martyred;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_stolen_soul";
     newscript->GetAI = GetAI_mob_stolen_soul;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp (revision 260)
@@ -71,4 +71,4 @@
     newscript->Name = "instance_sethekk_halls";
     newscript->GetInstanceData = GetInstanceData_instance_sethekk_halls;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp (revision 260)
@@ -220,4 +220,4 @@
     newscript->Name="boss_talon_king_ikiss";
     newscript->GetAI = GetAI_boss_talon_king_ikiss;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp (revision 115)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp (revision 260)
@@ -393,24 +393,24 @@
     newscript->Name="boss_darkweaver_syth";
     newscript->GetAI = GetAI_boss_darkweaver_syth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_syth_fire";
     newscript->GetAI = GetAI_mob_syth_arcane;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_syth_arcane";
     newscript->GetAI = GetAI_mob_syth_arcane;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_syth_frost";
     newscript->GetAI = GetAI_mob_syth_frost;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_syth_shadow";
     newscript->GetAI = GetAI_mob_syth_shadow;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp (revision 115)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp (revision 260)
@@ -174,4 +174,4 @@
     newscript->Name="boss_blackheart_the_inciter";
     newscript->GetAI = GetAI_boss_blackheart_the_inciter;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp (revision 260)
@@ -175,4 +175,4 @@
     newscript->Name = "instance_shadow_labyrinth";
     newscript->GetInstanceData = GetInstanceData_instance_shadow_labyrinth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp (revision 260)
@@ -364,9 +364,9 @@
     newscript->Name="boss_grandmaster_vorpil";
     newscript->GetAI = GetAI_boss_grandmaster_vorpil;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_voidtraveler";
     newscript->GetAI = GetAI_mob_voidtraveler;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp (revision 115)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp (revision 260)
@@ -195,4 +195,4 @@
     newscript->Name="boss_ambassador_hellmaw";
     newscript->GetAI = GetAI_boss_ambassador_hellmaw;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp (revision 260)
@@ -149,4 +149,4 @@
     newscript->Name="boss_murmur";
     newscript->GetAI = GetAI_boss_murmur;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp (revision 260)
@@ -262,5 +262,5 @@
     newscript->pGossipHello =  &GossipHello_npcs_ashyen_and_keleth;
     newscript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -268,5 +268,5 @@
     newscript->pGossipHello =  &GossipHello_npc_cooshcoosh;
     newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -274,5 +274,5 @@
     newscript->pGossipHello =  &GossipHello_npc_elder_kuruti;
     newscript->pGossipSelect = &GossipSelect_npc_elder_kuruti;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -280,4 +280,4 @@
     newscript->pGossipHello =  &GossipHello_npc_mortog_steamhead;
     newscript->pGossipSelect = &GossipSelect_npc_mortog_steamhead;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp (revision 260)
@@ -133,4 +133,4 @@
     newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof;
     newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp (revision 260)
@@ -189,9 +189,9 @@
     newscript->Name="boss_hydromancer_thespia";
     newscript->GetAI = GetAI_boss_thespiaAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_coilfang_waterelemental";
     newscript->GetAI = GetAI_mob_coilfang_waterelementalAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp (revision 260)
@@ -227,9 +227,9 @@
     newscript->Name="mob_naga_distiller";
     newscript->GetAI = GetAI_mob_naga_distiller;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_warlord_kalithresh";
     newscript->GetAI = GetAI_boss_warlord_kalithresh;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp (revision 166)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp (revision 260)
@@ -272,9 +272,9 @@
     newscript->Name="boss_mekgineer_steamrigger";
     newscript->GetAI = GetAI_boss_mekgineer_steamrigger;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_steamrigger_mechanic";
     newscript->GetAI = GetAI_mob_steamrigger_mechanic;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp (revision 260)
@@ -167,4 +167,4 @@
     newscript->Name = "instance_steam_vault";
     newscript->GetInstanceData = GetInstanceData_instance_steam_vault;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp (revision 260)
@@ -148,9 +148,9 @@
     newscript->Name="boss_hungarfen";
     newscript->GetAI = GetAI_boss_hungarfen;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_underbog_mushroom";
     newscript->GetAI = GetAI_mob_underbog_mushroom;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
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 182)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp (revision 260)
@@ -383,4 +383,4 @@
     newscript->Name="boss_hydross_the_unstable";
     newscript->GetAI = GetAI_boss_hydross_the_unstable;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp (revision 260)
@@ -168,15 +168,15 @@
     newscript->Name="boss_the_lurker_below";
     newscript->GetAI = GetAI_boss_the_lurker_below;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
     newscript->Name="mob_coilfang_guardian";
     newscript->GetAI = GetAI_mob_coilfang_guardian;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
     newscript->Name="mob_coilfang_ambusher";
     newscript->GetAI = GetAI_mob_coilfang_ambusher;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
 
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 257)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp (revision 260)
@@ -805,19 +805,19 @@
     newscript->Name="boss_leotheras_the_blind";
     newscript->GetAI = GetAI_boss_leotheras_the_blind;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_leotheras_the_blind_demonform";
     newscript->GetAI = GetAI_boss_leotheras_the_blind_demonform;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
     newscript->Name="mob_greyheart_spellbinder";
     newscript->GetAI = GetAI_mob_greyheart_spellbinder;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
     newscript->Name="mob_inner_demon";
     newscript->GetAI = GetAI_mob_inner_demon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
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 257)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp (revision 260)
@@ -1030,40 +1030,40 @@
     newscript->Name="boss_lady_vashj";
     newscript->GetAI = GetAI_boss_lady_vashj;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_enchanted_elemental";
     newscript->GetAI = GetAI_mob_enchanted_elemental;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_tainted_elemental";
     newscript->GetAI = GetAI_mob_tainted_elemental;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_toxic_sporebat";
     newscript->GetAI = GetAI_mob_toxic_sporebat;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_coilfang_elite";
     newscript->GetAI = GetAI_mob_coilfang_elite;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_coilfang_strider";
     newscript->GetAI = GetAI_mob_coilfang_strider;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_shield_generator_channel";
     newscript->GetAI = GetAI_mob_shield_generator_channel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_tainted_core";
     newscript->pItemUse = ItemUse_item_tainted_core;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
 
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 164)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp (revision 260)
@@ -745,19 +745,19 @@
     newscript->Name="boss_fathomlord_karathress";
     newscript->GetAI = GetAI_boss_fathomlord_karathress;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_fathomguard_sharkkis";
     newscript->GetAI = GetAI_boss_fathomguard_sharkkis;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_fathomguard_tidalvess";
     newscript->GetAI = GetAI_boss_fathomguard_tidalvess;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_fathomguard_caribdis";
     newscript->GetAI = GetAI_boss_fathomguard_caribdis;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
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 229)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp (revision 260)
@@ -351,9 +351,9 @@
     newscript->Name="boss_morogrim_tidewalker";
     newscript->GetAI = GetAI_boss_morogrim_tidewalker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_water_globule";
     newscript->GetAI = GetAI_mob_water_globule;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp (revision 187)
+++ trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp (revision 260)
@@ -216,4 +216,4 @@
     newscript->Name = "instance_serpent_shrine";
     newscript->GetInstanceData = GetInstanceData_instance_serpentshrine_cavern;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp (revision 260)
@@ -114,4 +114,4 @@
     newscript->Name="boss_moam";
     newscript->GetAI = GetAI_boss_moam;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp (revision 260)
@@ -104,4 +104,4 @@
     newscript->Name="boss_ayamiss";
     newscript->GetAI = GetAI_boss_ayamiss;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp (revision 260)
@@ -90,4 +90,4 @@
     newscript->Name="boss_kurinnaxx";
     newscript->GetAI = GetAI_boss_kurinnaxx;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp (revision 260)
@@ -230,4 +230,4 @@
     newscript->Name="boss_onyxia";
     newscript->GetAI = GetAI_boss_onyxiaAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp (revision 260)
@@ -95,4 +95,4 @@
     newscript->Name="npc_narm_faulk";
     newscript->GetAI = GetAI_npc_narm_faulk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp (revision 260)
@@ -118,4 +118,4 @@
     newscript->Name="boss_aeonus";
     newscript->GetAI = GetAI_boss_aeonus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp (revision 260)
@@ -106,4 +106,4 @@
     newscript->Name="boss_chrono_lord_deja";
     newscript->GetAI = GetAI_boss_chrono_lord_deja;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp (revision 260)
@@ -140,4 +140,4 @@
     newscript->Name="boss_temporus";
     newscript->GetAI = GetAI_boss_temporus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp (revision 260)
@@ -894,5 +894,5 @@
     newscript->pGossipHello =   &GossipHello_npc_brazen;
     newscript->pGossipSelect =  &GossipSelect_npc_brazen;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -900,5 +900,5 @@
     newscript->pGossipHello =   &GossipHello_npc_erozion;
     newscript->pGossipSelect =  &GossipSelect_npc_erozion;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -907,5 +907,5 @@
     newscript->pGossipSelect = &GossipSelect_npc_thrall_old_hillsbrad;
     newscript->GetAI = GetAI_npc_thrall_old_hillsbrad;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -913,4 +913,4 @@
     newscript->pGossipHello =   &GossipHello_npc_taretha;
     newscript->pGossipSelect =  &GossipSelect_npc_taretha;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp (revision 260)
@@ -153,4 +153,4 @@
     newscript->Name="boss_captain_skarloc";
     newscript->GetAI = GetAI_boss_captain_skarloc;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp (revision 260)
@@ -175,4 +175,4 @@
     newscript->Name = "instance_old_hillsbrad";
     newscript->GetInstanceData = GetInstanceData_instance_old_hillsbrad;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp (revision 125)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp (revision 260)
@@ -147,4 +147,4 @@
     newscript->Name="boss_epoch_hunter";
     newscript->GetAI = GetAI_boss_epoch_hunter;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp (revision 239)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp (revision 260)
@@ -195,9 +195,9 @@
     newscript->Name="go_barrel_old_hillsbrad";
     newscript->pGOHello = &GOHello_go_barrel_old_hillsbrad;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lieutenant_drake";
     newscript->GetAI = GetAI_boss_lieutenant_drake;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp (revision 260)
@@ -770,19 +770,19 @@
     newscript->Name="boss_archimonde";
     newscript->GetAI = GetAI_boss_archimonde;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_doomfire";
     newscript->GetAI = GetAI_mob_doomfire;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_doomfire_targetting";
     newscript->GetAI = GetAI_mob_doomfire_targetting;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_ancient_wisp";
     newscript->GetAI = GetAI_mob_ancient_wisp;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp (revision 260)
@@ -201,5 +201,5 @@
     newscript->pGossipHello = &GossipHello_npc_jaina_proudmoore;
     newscript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -208,5 +208,5 @@
     newscript->pGossipHello = &GossipHello_npc_thrall;
     newscript->pGossipSelect = &GossipSelect_npc_thrall;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -214,4 +214,4 @@
     newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind;
     newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp (revision 260)
@@ -200,4 +200,4 @@
     newscript->Name = "instance_hyjal";
     newscript->GetInstanceData = GetInstanceData_instance_mount_hyjal;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp (revision 260)
@@ -148,4 +148,4 @@
     newscript->pGossipHello =  &GossipHello_npc_ragged_john;
     newscript->pGossipSelect = &GossipSelect_npc_ragged_john;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp (revision 260)
@@ -59,4 +59,4 @@
     newscript->Name="npc_ravenholdt";
     newscript->GetAI = GetAI_npc_ravenholdt;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp (revision 204)
+++ trunk/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp (revision 260)
@@ -632,5 +632,5 @@
     newscript->Name="mob_shattered_rumbler";
     newscript->GetAI = GetAI_mob_shattered_rumbler;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -639,10 +639,10 @@
     newscript->pGossipHello =  &GossipHello_mob_lump;
     newscript->pGossipSelect = &GossipSelect_mob_lump;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_sunspring_villager";
     newscript->GetAI = GetAI_mob_sunspring_villager;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -651,5 +651,5 @@
     newscript->pGossipSelect = &GossipSelect_npc_altruis_the_sufferer;
     newscript->pQuestAccept =  &QuestAccept_npc_altruis_the_sufferer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -657,5 +657,5 @@
     newscript->pGossipHello =  &GossipHello_npc_greatmother_geyah;
     newscript->pGossipSelect = &GossipSelect_npc_greatmother_geyah;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -663,14 +663,14 @@
     newscript->pGossipHello =  &GossipHello_npc_lantresor_of_the_blade;
     newscript->pGossipSelect = &GossipSelect_npc_lantresor_of_the_blade;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_creditmarker_visit_with_ancestors";
     newscript->GetAI = GetAI_npc_creditmarker_visit_with_ancestors;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_sparrowhawk";
     newscript->GetAI = GetAI_mob_sparrowhawk;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp (revision 260)
@@ -159,5 +159,5 @@
     newscript->Name="mobs_ghoul_flayer";
     newscript->GetAI = GetAI_mobs_ghoul_flayer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -165,5 +165,5 @@
     newscript->pGossipHello = &GossipHello_npc_augustus_the_touched;
     newscript->pGossipSelect = &GossipSelect_npc_augustus_the_touched;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -171,5 +171,5 @@
     newscript->GetAI = GetAI_npc_darrowshire_spirit;
     newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -177,4 +177,4 @@
     newscript->pGossipHello =  &GossipHello_npc_tirion_fordring;
     newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp (revision 260)
@@ -114,4 +114,4 @@
     newscript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner;
     newscript->GetAI = GetAI_npc_shadowfang_prisoner;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp (revision 260)
@@ -149,4 +149,4 @@
     newscript->Name = "instance_shadowfang_keep";
     newscript->GetInstanceData = GetInstanceData_instance_shadowfang_keep;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp (revision 260)
@@ -301,4 +301,4 @@
     newscript->Name="boss_gruul";
     newscript->GetAI = GetAI_boss_gruul;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp (revision 260)
@@ -818,24 +818,24 @@
     newscript->Name="boss_high_king_maulgar";
     newscript->GetAI = GetAI_boss_high_king_maulgar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_kiggler_the_crazed";
     newscript->GetAI = GetAI_boss_kiggler_the_crazed;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_blindeye_the_seer";
     newscript->GetAI = GetAI_boss_blindeye_the_seer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_olm_the_summoner";
     newscript->GetAI = GetAI_boss_olm_the_summoner;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_krosh_firehand";
     newscript->GetAI = GetAI_boss_krosh_firehand;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp (revision 98)
+++ trunk/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp (revision 260)
@@ -185,4 +185,4 @@
     newscript->Name = "instance_gruuls_lair";
     newscript->GetInstanceData = GetInstanceData_instance_gruuls_lair;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp (revision 260)
@@ -132,5 +132,5 @@
     newscript->Name="mob_webbed_creature";
     newscript->GetAI = GetAI_mob_webbed_creature;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -138,4 +138,4 @@
     newscript->pGossipHello =  &GossipHello_npc_captured_sunhawk_agent;
     newscript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp (revision 260)
@@ -142,5 +142,5 @@
     newscript->pGossipHello =  &GossipHello_npc_lorax;
     newscript->pGossipSelect = &GossipSelect_npc_lorax;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -148,5 +148,5 @@
     newscript->pGossipHello =  &GossipHello_npc_rivern_frostwind;
     newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -154,4 +154,4 @@
     newscript->pGossipHello =  &GossipHello_npc_witch_doctor_mauari;
     newscript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp (revision 92)
+++ trunk/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp (revision 260)
@@ -370,5 +370,5 @@
     newscript->pGossipHello = &GossipHello_npc_beaten_corpse;
     newscript->pGossipSelect = &GossipSelect_npc_beaten_corpse;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -376,5 +376,5 @@
     newscript->pGossipHello = &GossipHello_npc_sputtervalve;
     newscript->pGossipSelect = &GossipSelect_npc_sputtervalve;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -382,9 +382,9 @@
     newscript->GetAI = GetAI_npc_taskmaster_fizzule;
     newscript->pReceiveEmote = &ReciveEmote_npc_taskmaster_fizzule;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_twiggy_flathead";
     newscript->GetAI = GetAI_npc_twiggy_flathead;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp (revision 260)
@@ -85,4 +85,4 @@
     newscript->GetAI = GetAI_npc_calvin_montague;
     newscript->pQuestAccept = &QuestAccept_npc_calvin_montague;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp (revision 101)
+++ trunk/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp (revision 260)
@@ -100,4 +100,4 @@
     newscript->Name="npc_blood_knight_stillblade";
     newscript->GetAI = GetAI_npc_blood_knight_stillblade;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp (revision 260)
@@ -110,4 +110,4 @@
     newscript->Name="boss_interrogator_vishas";
     newscript->GetAI = GetAI_boss_interrogator_vishas;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp (revision 260)
@@ -94,4 +94,4 @@
     newscript->Name="boss_azshir_the_sleepless";
     newscript->GetAI = GetAI_boss_azshir_the_sleepless;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp (revision 260)
@@ -75,4 +75,4 @@
     newscript->Name="boss_houndmaster_loksey";
     newscript->GetAI = GetAI_boss_houndmaster_loksey;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp (revision 260)
@@ -133,4 +133,4 @@
     newscript->Name="boss_bloodmage_thalnos";
     newscript->GetAI = GetAI_boss_bloodmage_thalnos;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp (revision 260)
@@ -194,4 +194,4 @@
     newscript->Name="boss_herod";
     newscript->GetAI = GetAI_boss_herod;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scarlet_commander_mograine.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scarlet_commander_mograine.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scarlet_commander_mograine.cpp (revision 260)
@@ -157,4 +157,4 @@
     newscript->Name="boss_scarlet_commander_mograine";
     newscript->GetAI = GetAI_boss_scarlet_commander_mograine;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp (revision 260)
@@ -97,4 +97,4 @@
     newscript->Name="boss_scorn";
     newscript->GetAI = GetAI_boss_scorn;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp (revision 260)
@@ -168,4 +168,4 @@
     newscript->Name="boss_arcanist_doan";
     newscript->GetAI = GetAI_boss_arcanist_doan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp (revision 260)
@@ -129,4 +129,4 @@
     newscript->Name="boss_high_inquisitor_fairbanks";
     newscript->GetAI = GetAI_boss_high_inquisitor_fairbanks;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_whitemane.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_whitemane.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_whitemane.cpp (revision 260)
@@ -174,4 +174,4 @@
     newscript->Name="boss_high_inquisitor_whitemane";
     newscript->GetAI = GetAI_boss_high_inquisitor_whitemane;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp (revision 260)
@@ -655,19 +655,19 @@
     newscript->Name="boss_shade_of_aran";
     newscript->GetAI = GetAI_boss_aran;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_shadow_of_aran";
     newscript->GetAI = GetAI_shadow_of_aran;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_aran_elemental";
     newscript->GetAI = GetAI_water_elemental;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     //newscript = new Script;
     //newscript->Name="mob_aran_blizzard";
     //newscript->GetAI = GetAI_boss_aran;
-    //m_scripts[nrscripts++] = newscript;
+    //newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp (revision 260)
@@ -461,5 +461,5 @@
     newscript->pGossipHello = GossipHello_npc_barnes;
     newscript->pGossipSelect = GossipSelect_npc_barnes;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -467,4 +467,4 @@
     newscript->pGossipHello = GossipHello_npc_berthold;
     newscript->pGossipSelect = GossipSelect_npc_berthold;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp (revision 260)
@@ -437,19 +437,19 @@
     newscript->Name="boss_terestian_illhoof";
     newscript->GetAI = GetAI_boss_terestian_illhoof;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_karazhan_imp";
     newscript->GetAI = GetAI_mob_karazhan_imp;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_kilrek";
     newscript->GetAI = GetAI_mob_kilrek;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_demon_chain";
     newscript->GetAI = GetAI_mob_demon_chain;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp (revision 260)
@@ -250,4 +250,4 @@
     newscript->Name = "instance_karazhan";
     newscript->GetInstanceData = GetInstanceData_instance_karazhan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp (revision 260)
@@ -1415,35 +1415,35 @@
     newscript->GetAI = GetAI_boss_dorothee;
     newscript->Name = "boss_dorothee";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_boss_strawman;
     newscript->Name = "boss_strawman";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_boss_tinhead;
     newscript->Name = "boss_tinhead";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_boss_roar;
     newscript->Name = "boss_roar";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_boss_crone;
     newscript->Name = "boss_crone";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_mob_tito;
     newscript->Name = "mob_tito";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_mob_cyclone;
     newscript->Name = "mob_cyclone";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     // Hood
@@ -1452,10 +1452,10 @@
     newscript->pGossipSelect = GossipSelect_npc_grandmother;
     newscript->Name = "npc_grandmother";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_boss_bigbadwolf;
     newscript->Name = "boss_bigbadwolf";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     // Romeo And Juliet
@@ -1463,9 +1463,9 @@
     newscript->GetAI = GetAI_boss_julianne;
     newscript->Name = "boss_julianne";
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->GetAI = GetAI_boss_romulo;
     newscript->Name = "boss_romulo";
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp (revision 260)
@@ -197,4 +197,4 @@
     newscript->Name="boss_curator";
     newscript->GetAI = GetAI_boss_curator;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp (revision 260)
@@ -180,4 +180,4 @@
     newscript->Name="boss_maiden_of_virtue";
     newscript->GetAI = GetAI_boss_maiden_of_virtue;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp (revision 260)
@@ -363,9 +363,9 @@
     newscript->Name="boss_attumen";
     newscript->GetAI = GetAI_boss_attumen;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_midnight";
     newscript->GetAI = GetAI_boss_midnight;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp (revision 109)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp (revision 260)
@@ -836,34 +836,34 @@
     newscript->Name="boss_moroes";
     newscript->GetAI = GetAI_boss_moroes;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_baroness_dorothea_millstipe";
     newscript->GetAI = GetAI_baroness_dorothea_millstipe;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_baron_rafe_dreuger";
     newscript->GetAI = GetAI_baron_rafe_dreuger;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lady_catriona_von_indi";
     newscript->GetAI = GetAI_lady_catriona_von_indi;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lady_keira_berrybuck";
     newscript->GetAI = GetAI_lady_keira_berrybuck;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lord_robin_daris";
     newscript->GetAI = GetAI_lord_robin_daris;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lord_crispin_ference";
     newscript->GetAI = GetAI_lord_crispin_ference;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp (revision 260)
@@ -667,9 +667,9 @@
     newscript->Name="boss_malchezaar";
     newscript->GetAI = GetAI_boss_malchezaar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="netherspite_infernal";
     newscript->GetAI = GetAI_netherspite_infernal;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/felwood/felwood.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/felwood/felwood.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/felwood/felwood.cpp (revision 260)
@@ -86,4 +86,4 @@
     newscript->pGossipHello = &GossipHello_npcs_riverbreeze_and_silversky;
     newscript->pGossipSelect = &GossipSelect_npcs_riverbreeze_and_silversky;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp (revision 260)
@@ -205,10 +205,10 @@
     newscript->Name="mobs_risen_husk_spirit";
     newscript->GetAI = GetAI_mobs_risen_husk_spirit;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_restless_apparition";
     newscript->pGossipHello =   &GossipHello_npc_restless_apparition;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -216,5 +216,5 @@
     newscript->GetAI = GetAI_npc_deserter_agitator;
     newscript->pGossipHello = &GossipHello_npc_deserter_agitator;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -222,5 +222,5 @@
     newscript->pGossipHello = &GossipHello_npc_lady_jaina_proudmoore;
     newscript->pGossipSelect = &GossipSelect_npc_lady_jaina_proudmoore;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -228,4 +228,4 @@
     newscript->pGossipHello = &GossipHello_npc_nat_pagle;
     newscript->pGossipSelect = &GossipSelect_npc_nat_pagle;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp (revision 260)
@@ -248,5 +248,5 @@
     newscript->pGossipHello =  &GossipHello_npc_neeru_fireblade;
     newscript->pGossipSelect = &GossipSelect_npc_neeru_fireblade;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -255,5 +255,5 @@
     newscript->pQuestAccept =  &QuestAccept_npc_shenthul;
     newscript->pReceiveEmote = &ReciveEmote_npc_shenthul;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -262,4 +262,4 @@
     newscript->pGossipHello =  &GossipHello_npc_thrall_warchief;
     newscript->pGossipSelect = &GossipSelect_npc_thrall_warchief;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp (revision 260)
@@ -137,4 +137,4 @@
     newscript->Name="boss_amnennar_the_coldbringer";
     newscript->GetAI = GetAI_boss_amnennar_the_coldbringer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp (revision 260)
@@ -214,5 +214,5 @@
     newscript->pGossipHello =  &GossipHello_npc_sergeant_bly;
     newscript->pGossipSelect = &GossipSelect_npc_sergeant_bly;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -221,4 +221,4 @@
     newscript->pGossipHello =  &GossipHello_npc_weegli_blastfuse;
     newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp (revision 260)
@@ -104,4 +104,4 @@
     newscript->Name = "mob_yenniku";
     newscript->GetAI = GetAI_mob_yenniku;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp (revision 260)
@@ -102,4 +102,4 @@
     newscript->Name="boss_high_interrogator_gerstahn";
     newscript->GetAI = GetAI_boss_high_interrogator_gerstahn;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp (revision 260)
@@ -112,4 +112,4 @@
     newscript->Name="boss_seethrel";
     newscript->GetAI = GetAI_boss_seethrel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp (revision 260)
@@ -222,5 +222,5 @@
     newscript->Name="phalanx";
     newscript->GetAI = GetAI_mob_phalanx;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -228,5 +228,5 @@
     newscript->pGossipHello =  &GossipHello_npc_kharan_mighthammer;
     newscript->pGossipSelect = &GossipSelect_npc_kharan_mighthammer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -234,4 +234,4 @@
     newscript->pGossipHello =  &GossipHello_npc_lokhtos_darkbargainer;
     newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp (revision 260)
@@ -164,4 +164,4 @@
     newscript->Name="boss_general_angerforge";
     newscript->GetAI = GetAI_boss_general_angerforge;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp (revision 260)
@@ -139,4 +139,4 @@
     newscript->pGossipHello = &GossipHello_boss_gloomrel;
     newscript->pGossipSelect = &GossipSelect_boss_gloomrel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp (revision 260)
@@ -102,4 +102,4 @@
     newscript->Name="boss_haterel";
     newscript->GetAI = GetAI_boss_haterel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp (revision 260)
@@ -96,4 +96,4 @@
     newscript->Name="boss_moira_bronzebeard";
     newscript->GetAI = GetAI_boss_moira_bronzebeard;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp (revision 260)
@@ -78,4 +78,4 @@
     newscript->Name="boss_gorosh_the_dervish";
     newscript->GetAI = GetAI_boss_gorosh_the_dervish;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp (revision 260)
@@ -101,4 +101,4 @@
     newscript->Name="boss_emperor_dagran_thaurissan";
     newscript->GetAI = GetAI_boss_draganthaurissan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp (revision 260)
@@ -83,4 +83,4 @@
     newscript->Name="boss_grizzle";
     newscript->GetAI = GetAI_boss_grizzle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp (revision 260)
@@ -103,4 +103,4 @@
     newscript->Name="boss_ambassador_flamelash";
     newscript->GetAI = GetAI_boss_ambassador_flamelash;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp (revision 260)
@@ -81,4 +81,4 @@
     newscript->Name="boss_magmus";
     newscript->GetAI = GetAI_boss_magmus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp (revision 260)
@@ -88,4 +88,4 @@
     newscript->Name="boss_doperel";
     newscript->GetAI = GetAI_boss_doperel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp (revision 260)
@@ -88,4 +88,4 @@
     newscript->Name="boss_angerrel";
     newscript->GetAI = GetAI_boss_angerrel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp (revision 260)
@@ -136,4 +136,4 @@
     newscript->Name="boss_doomrel";
     newscript->GetAI = GetAI_boss_doomrel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp (revision 260)
@@ -112,4 +112,4 @@
     newscript->Name="boss_anubshiah";
     newscript->GetAI = GetAI_boss_anubshiah;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp (revision 260)
@@ -98,4 +98,4 @@
     newscript->Name="boss_vilerel";
     newscript->GetAI = GetAI_boss_vilerel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp (revision 260)
@@ -88,4 +88,4 @@
     newscript->pGossipHello =  &GossipHello_npc_mountaineer_pebblebitty;
     newscript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp (revision 260)
@@ -369,20 +369,20 @@
     newscript->Name="mob_unkor_the_ruthless";
     newscript->GetAI = GetAI_mob_unkor_the_ruthless;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_infested_root_walker";
     newscript->GetAI = GetAI_mob_infested_root_walker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_rotting_forest_rager";
     newscript->GetAI = GetAI_mob_rotting_forest_rager;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_netherweb_victim";
     newscript->GetAI = GetAI_mob_netherweb_victim;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -390,5 +390,5 @@
     newscript->pGossipHello =  &GossipHello_npc_floon;
     newscript->pGossipSelect = &GossipSelect_npc_floon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -396,4 +396,4 @@
     newscript->pGossipHello =  &GossipHello_npc_skyguard_handler_deesak;
     newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_deesak;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp (revision 260)
@@ -168,9 +168,9 @@
     newscript->pGossipHello = &GossipHello_npcs_dithers_and_arbington;
     newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_the_scourge_cauldron";
     newscript->GetAI = GetAI_npc_the_scourge_cauldron;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp (revision 205)
+++ trunk/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp (revision 260)
@@ -134,5 +134,5 @@
     newscript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar;
     newscript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -140,5 +140,5 @@
     newscript->pGossipHello = &GossipHello_npc_budd_nedreck;
     newscript->pGossipSelect = &GossipSelect_npc_budd_nedreck;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -146,9 +146,9 @@
     newscript->pGossipHello = &GossipHello_npc_rathis_tomber;
     newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "go_gilded_brazier";
     newscript->pGOHello = &GOHello_gilded_brazier;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp (revision 260)
@@ -88,4 +88,4 @@
     newscript->Name="boss_gehennas";
     newscript->GetAI = GetAI_boss_gehennas;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp (revision 260)
@@ -94,4 +94,4 @@
     newscript->Name="boss_magmadar";
     newscript->GetAI = GetAI_boss_magmadar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp (revision 260)
@@ -118,4 +118,4 @@
     newscript->Name="boss_shazzrah";
     newscript->GetAI = GetAI_boss_shazzrah;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp (revision 260)
@@ -141,9 +141,9 @@
     newscript->Name="boss_garr";
     newscript->GetAI = GetAI_boss_garr;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_firesworn";
     newscript->GetAI = GetAI_mob_firesworn;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp (revision 260)
@@ -130,4 +130,4 @@
     newscript->Name="boss_majordomo";
     newscript->GetAI = GetAI_boss_majordomo;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp (revision 260)
@@ -314,4 +314,4 @@
     newscript->Name="boss_ragnaros";
     newscript->GetAI = GetAI_boss_ragnaros;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp (revision 260)
@@ -207,9 +207,9 @@
     newscript->Name="boss_sulfuron";
     newscript->GetAI = GetAI_boss_sulfuron;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_flamewaker_priest";
     newscript->GetAI = GetAI_mob_flamewaker_priest;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp (revision 260)
@@ -85,4 +85,4 @@
     newscript->Name="mob_ancient_core_hound";
     newscript->GetAI = GetAI_mob_ancient_core_hound;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp (revision 260)
@@ -102,4 +102,4 @@
     newscript->Name="boss_baron_geddon";
     newscript->GetAI = GetAI_boss_baron_geddon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp (revision 260)
@@ -87,4 +87,4 @@
     newscript->Name="boss_lucifron";
     newscript->GetAI = GetAI_boss_lucifron;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp (revision 260)
@@ -193,9 +193,9 @@
     newscript->Name="boss_golemagg";
     newscript->GetAI = GetAI_boss_golemagg;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_core_rager";
     newscript->GetAI = GetAI_mob_core_rager;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp (revision 260)
@@ -254,4 +254,4 @@
     newscript->Name="instance_molten_core";
     newscript->GetInstanceData = &GetInstance_instance_molten_core;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp (revision 260)
@@ -630,14 +630,14 @@
     newscript->Name="boss_zuljin";
     newscript->GetAI = GetAI_boss_zuljin;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="do_nothing";
     newscript->GetAI = GetAI_do_nothing;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_zuljin_vortex";
     newscript->GetAI = GetAI_feather_vortexAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp (revision 260)
@@ -707,24 +707,24 @@
     newscript->Name="boss_janalai";
     newscript->GetAI = GetAI_boss_janalaiAI;
-    m_scripts[nrscripts++] = newscript;  
+    newscript->RegisterSelf();  
 
     newscript = new Script;
     newscript->Name="mob_janalai_firebomb";
     newscript->GetAI = GetAI_mob_jandalai_firebombAI;
-    m_scripts[nrscripts++] = newscript;  
+    newscript->RegisterSelf();  
 
     newscript = new Script;
     newscript->Name="mob_janalai_hatcher";
     newscript->GetAI = GetAI_mob_amanishi_hatcherAI;
-    m_scripts[nrscripts++] = newscript; 
+    newscript->RegisterSelf(); 
 
     newscript = new Script;
     newscript->Name="mob_janalai_hatchling";
     newscript->GetAI = GetAI_mob_hatchlingAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_janalai_egg";
     newscript->GetAI = GetAI_mob_eggAI;
-    m_scripts[nrscripts++] = newscript; 
+    newscript->RegisterSelf(); 
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp (revision 260)
@@ -172,5 +172,5 @@
     newscript->Name="npc_forest_frog";
     newscript->GetAI = GetAI_npc_forest_frog;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -179,4 +179,4 @@
     newscript->pGossipHello = GossipHello_npc_zulaman_hostage;
     newscript->pGossipSelect = GossipSelect_npc_zulaman_hostage;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp (revision 154)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp (revision 260)
@@ -395,9 +395,9 @@
     newscript->Name="boss_halazzi";
     newscript->GetAI = GetAI_boss_halazziAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_halazzi_lynx";
     newscript->GetAI = GetAI_boss_spiritlynxAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp (revision 260)
@@ -301,4 +301,4 @@
     newscript->Name="boss_nalorakk";
     newscript->GetAI = GetAI_boss_nalorakk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp (revision 260)
@@ -869,44 +869,44 @@
     newscript->Name="boss_hexlord_malacrass";
     newscript->GetAI = GetAI_boss_hex_lord_malacrass;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_thurg";
     newscript->GetAI = GetAI_boss_thurg;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_gazakroth";
     newscript->GetAI = GetAI_boss_gazakroth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_lord_raadan";
     newscript->GetAI = GetAI_boss_lord_raadan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_darkheart";
     newscript->GetAI = GetAI_boss_darkheart;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_slither";
     newscript->GetAI = GetAI_boss_slither;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_fenstalker";
     newscript->GetAI = GetAI_boss_fenstalker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_koragg";
     newscript->GetAI = GetAI_boss_koragg;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_alyson_antille";
     newscript->GetAI = GetAI_boss_alyson_antille;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp (revision 260)
@@ -329,4 +329,4 @@
     newscript->Name = "instance_zulaman";
     newscript->GetInstanceData = GetInstanceData_instance_zulaman;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp (revision 154)
+++ trunk/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp (revision 260)
@@ -462,9 +462,9 @@
     newscript->Name="boss_akilzon";
     newscript->GetAI = GetAI_boss_akilzon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_akilzon_eagle";
     newscript->GetAI = GetAI_mob_soaring_eagle;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp (revision 260)
@@ -401,10 +401,10 @@
     newscript->Name="go_manaforge_control_console";
     newscript->pGOHello = &GOHello_go_manaforge_control_console;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_manaforge_control_console";
     newscript->GetAI = GetAI_npc_manaforge_control_console;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -412,5 +412,5 @@
     newscript->pGossipHello =   &GossipHello_npc_protectorate_nether_drake;
     newscript->pGossipSelect =  &GossipSelect_npc_protectorate_nether_drake;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -418,4 +418,4 @@
     newscript->pGossipHello =   &GossipHello_npc_veronia;
     newscript->pGossipSelect =  &GossipSelect_npc_veronia;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp (revision 260)
@@ -141,10 +141,10 @@
     newscript->pGossipHello = &GossipHello_npc_ayren_cloudbreaker;
     newscript->pGossipSelect = &GossipSelect_npc_ayren_cloudbreaker;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_converted_sentry";
     newscript->GetAI = GetAI_npc_converted_sentry;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -152,4 +152,4 @@
     newscript->pGossipHello = &GossipHello_npc_unrestrained_dragonhawk;
     newscript->pGossipSelect = &GossipSelect_npc_unrestrained_dragonhawk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp (revision 260)
@@ -351,5 +351,5 @@
     newscript->Name="npc_draenei_survivor";
     newscript->GetAI = GetAI_npc_draenei_survivor;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -358,10 +358,10 @@
     newscript->pGossipHello =  &GossipHello_npc_engineer_spark_overgrind;
     newscript->pGossipSelect = &GossipSelect_npc_engineer_spark_overgrind;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_injured_draenei";
     newscript->GetAI = GetAI_npc_injured_draenei;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -369,4 +369,4 @@
     newscript->pGossipHello =  &GossipHello_npc_susurrus;
     newscript->pGossipSelect = &GossipSelect_npc_susurrus;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp (revision 260)
@@ -178,5 +178,5 @@
     newscript->Name="mob_jadespine_basilisk";
     newscript->GetAI = GetAI_mob_jadespine_basilisk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -184,4 +184,4 @@
     newscript->pGossipHello = &GossipHello_npc_lore_keeper_of_norgannon;
     newscript->pGossipSelect = &GossipSelect_npc_lore_keeper_of_norgannon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp (revision 260)
@@ -104,4 +104,4 @@
     newscript->Name="boss_ironaya";
     newscript->GetAI = GetAI_boss_ironaya;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp (revision 260)
@@ -135,4 +135,4 @@
     newscript->Name="boss_nerubenkan";
     newscript->GetAI = GetAI_boss_nerubenkan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp (revision 260)
@@ -111,4 +111,4 @@
     newscript->Name="boss_magistrate_barthilas";
     newscript->GetAI = GetAI_boss_magistrate_barthilas;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp (revision 260)
@@ -97,4 +97,4 @@
     newscript->Name="boss_timmy_the_cruel";
     newscript->GetAI = GetAI_boss_timmy_the_cruel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp (revision 260)
@@ -218,4 +218,4 @@
     newscript->Name="boss_cannon_master_willey";
     newscript->GetAI = GetAI_boss_cannon_master_willey;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp (revision 260)
@@ -313,4 +313,4 @@
     newscript->Name="boss_dathrohan_balnazzar";
     newscript->GetAI = GetAI_boss_dathrohan_balnazzar;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp (revision 260)
@@ -311,10 +311,10 @@
     newscript->Name="mob_freed_soul";
     newscript->GetAI = GetAI_mob_freed_soul;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_restless_soul";
     newscript->GetAI = GetAI_mob_restless_soul;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -322,14 +322,14 @@
     newscript->GetAI = GetAI_mobs_spectral_ghostly_citizen;
     newscript->pReceiveEmote = &ReciveEmote_mobs_spectral_ghostly_citizen;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_mindless_skeleton";
     newscript->GetAI = GetAI_mob_mindless_skeleton;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_thuzadin_acolyte";
     newscript->GetAI = GetAI_mob_thuzadin_acolyte;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp (revision 260)
@@ -158,4 +158,4 @@
     newscript->Name="boss_silver_hand_bosses";
     newscript->GetAI = GetAI_boss_silver_hand_bossesAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp (revision 260)
@@ -121,4 +121,4 @@
     newscript->Name="boss_baroness_anastari";
     newscript->GetAI = GetAI_boss_baroness_anastari;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp (revision 260)
@@ -141,4 +141,4 @@
     newscript->Name="boss_postmaster_malown";
     newscript->GetAI = GetAI_boss_postmaster_malown;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp (revision 260)
@@ -212,4 +212,4 @@
     newscript->Name="boss_baron_rivendare";
     newscript->GetAI = GetAI_boss_baron_rivendare;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp (revision 260)
@@ -74,4 +74,4 @@
     newscript->Name = "instance_stratholme";
     newscript->GetInstanceData = GetInstanceData_instance_stratholme;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp (revision 260)
@@ -116,4 +116,4 @@
     newscript->Name="boss_maleki_the_pallid";
     newscript->GetAI = GetAI_boss_maleki_the_pallid;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp (revision 260)
@@ -89,4 +89,4 @@
     newscript->Name="boss_ramstein_the_gorger";
     newscript->GetAI = GetAI_boss_ramstein_the_gorger;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp (revision 260)
@@ -150,4 +150,4 @@
     newscript->Name="boss_azuregos";
     newscript->GetAI = GetAI_boss_azuregos;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/azshara/azshara.cpp (revision 204)
+++ trunk/src/bindings/scripts/scripts/zone/azshara/azshara.cpp (revision 260)
@@ -493,5 +493,5 @@
     newscript->Name="mobs_spitelashes";
     newscript->GetAI = GetAI_mobs_spitelashes;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -499,5 +499,5 @@
     newscript->pGossipHello =  &GossipHello_npc_loramus_thalipedes;
     newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
@@ -506,9 +506,9 @@
     newscript->pGossipHello =  &GossipHello_mob_rizzle_sprysprocket;
     newscript->pGossipSelect = &GossipSelect_mob_rizzle_sprysprocket;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_depth_charge";
     newscript->GetAI = GetAI_mob_depth_charge;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp (revision 260)
@@ -105,4 +105,4 @@
     newscript->Name="boss_doctor_theolen_krastinov";
     newscript->GetAI = GetAI_boss_theolenkrastinov;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp (revision 260)
@@ -92,4 +92,4 @@
     newscript->Name="boss_vectus";
     newscript->GetAI = GetAI_boss_vectus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp (revision 260)
@@ -99,4 +99,4 @@
     newscript->Name = "instance_scholomance";
     newscript->GetInstanceData = GetInstanceData_instance_scholomance;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp (revision 260)
@@ -113,4 +113,4 @@
     newscript->Name="boss_illucia_barov";
     newscript->GetAI = GetAI_boss_illuciabarov;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp (revision 260)
@@ -149,4 +149,4 @@
     newscript->Name="boss_instructor_malicia";
     newscript->GetAI = GetAI_boss_instructormalicia;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp (revision 260)
@@ -56,4 +56,4 @@
     newscript->Name="boss_death_knight_darkreaver";
     newscript->GetAI = GetAI_boss_death_knight_darkreaver;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp (revision 260)
@@ -189,4 +189,4 @@
     newscript->Name="boss_darkmaster_gandling";
     newscript->GetAI = GetAI_boss_darkmaster_gandling;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp (revision 260)
@@ -95,4 +95,4 @@
     newscript->Name="boss_lord_alexei_barov";
     newscript->GetAI = GetAI_boss_lordalexeibarov;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp (revision 260)
@@ -152,4 +152,4 @@
     newscript->Name="boss_kormok";
     newscript->GetAI = GetAI_boss_kormok;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp (revision 260)
@@ -115,4 +115,4 @@
     newscript->Name="boss_the_ravenian";
     newscript->GetAI = GetAI_boss_theravenian;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp (revision 260)
@@ -122,4 +122,4 @@
     newscript->Name="boss_boss_ras_frostwhisper";
     newscript->GetAI = GetAI_boss_rasfrost;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp (revision 223)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp (revision 260)
@@ -213,9 +213,9 @@
     newscript->Name="boss_jandice_barov";
     newscript->GetAI = GetAI_boss_jandicebarov;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_illusionofjandicebarov";
     newscript->GetAI = GetAI_mob_illusionofjandicebarov;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp (revision 260)
@@ -110,4 +110,4 @@
     newscript->Name="boss_lorekeeper_polkelt";
     newscript->GetAI = GetAI_boss_lorekeeperpolkelt;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp (revision 260)
@@ -97,4 +97,4 @@
     newscript->pGossipSelect = &GossipSelect_npc_astor_hadren;
     newscript->GetAI = GetAI_npc_astor_hadren;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp (revision 260)
@@ -177,4 +177,4 @@
     newscript->Name="boss_noth";
     newscript->GetAI = GetAI_boss_noth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp (revision 260)
@@ -209,4 +209,4 @@
     newscript->Name="boss_anubrekhan";
     newscript->GetAI = GetAI_boss_anubrekhan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp (revision 260)
@@ -213,4 +213,4 @@
     newscript->Name="boss_loatheb";
     newscript->GetAI = GetAI_boss_loatheb;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp (revision 229)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp (revision 260)
@@ -198,4 +198,4 @@
     newscript->Name="boss_faerlina";
     newscript->GetAI = GetAI_boss_faerlina;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp (revision 260)
@@ -175,4 +175,4 @@
     newscript->Name="boss_highlord_mograine";
     newscript->GetAI = GetAI_boss_highlord_mograine;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp (revision 260)
@@ -171,4 +171,4 @@
     newscript->Name="boss_gluth";
     newscript->GetAI = GetAI_boss_gluth;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp (revision 260)
@@ -157,4 +157,4 @@
     newscript->Name="boss_patchwerk";
     newscript->GetAI = GetAI_boss_patchwerk;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp (revision 260)
@@ -144,4 +144,4 @@
     newscript->Name="boss_thane_korthazz";
     newscript->GetAI = GetAI_boss_thane_korthazz;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp (revision 260)
@@ -538,5 +538,5 @@
     newscript->Name="boss_kelthuzad";
     newscript->GetAI = GetAI_boss_kelthuzadAI;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
     */
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp (revision 260)
@@ -144,4 +144,4 @@
     newscript->Name="boss_lady_blaumeux";
     newscript->GetAI = GetAI_boss_lady_blaumeux;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp (revision 260)
@@ -143,4 +143,4 @@
     newscript->Name="boss_sir_zeliek";
     newscript->GetAI = GetAI_boss_sir_zeliek;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp (revision 260)
@@ -238,9 +238,9 @@
     newscript->Name="boss_maexxna";
     newscript->GetAI = GetAI_boss_maexxna;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_webwrap";
     newscript->GetAI = GetAI_mob_webwrap;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp (revision 158)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp (revision 260)
@@ -196,4 +196,4 @@
     newscript->Name="boss_sapphiron";
     newscript->GetAI = GetAI_boss_sapphiron;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp (revision 260)
@@ -164,4 +164,4 @@
     newscript->Name="boss_razuvious";
     newscript->GetAI = GetAI_boss_razuvious;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp (revision 137)
+++ trunk/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp (revision 260)
@@ -250,4 +250,4 @@
     newscript->Name = "instance_magisters_terrace";
     newscript->GetInstanceData = GetInstanceData_instance_magisters_terrace;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp (revision 257)
+++ trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp (revision 260)
@@ -762,34 +762,34 @@
     newscript->Name = "boss_felblood_kaelthas";
     newscript->GetAI = GetAI_boss_felblood_kaelthas;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name = "mob_arcane_sphere";
     newscript->GetAI = GetAI_mob_arcane_sphere;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_felkael_phoenix";
     newscript->GetAI = GetAI_mob_felkael_phoenix;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_felkael_phoenix_egg";
     newscript->GetAI = GetAI_mob_felkael_phoenix_egg;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_felkael_flamestrike";
     newscript->GetAI = GetAI_mob_felkael_flamestrike;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
     newscript->Name="go_kael_orb";
     newscript->pGOHello = &GOHello_go_kael_orb;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
 	newscript = new Script;
     newscript->Name="go_movie_orb";
     newscript->pGOHello = &GOHello_go_movie_orb;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp (revision 137)
+++ trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp (revision 260)
@@ -404,9 +404,9 @@
     newscript->Name="boss_selin_fireheart";
     newscript->GetAI = GetAI_boss_selin_fireheart;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_fel_crystal";
     newscript->GetAI = GetAI_mob_fel_crystal;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp (revision 137)
+++ trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp (revision 260)
@@ -239,9 +239,9 @@
     newscript->Name="boss_vexallus";
     newscript->GetAI = GetAI_boss_vexallus;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="mob_pure_energy";
     newscript->GetAI = GetAI_mob_pure_energy;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp (revision 137)
+++ trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp (revision 260)
@@ -1356,59 +1356,59 @@
     newscript->Name="boss_priestess_delrissa";
     newscript->GetAI = GetAI_boss_priestess_delrissa;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_kagani_nightstrike";
     newscript->GetAI = GetAI_boss_kagani_nightstrike;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_ellris_duskhallow";
     newscript->GetAI = GetAI_ellris_duskhallow;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_eramas_brightblaze";
     newscript->GetAI = GetAI_eramas_brightblaze;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_yazzai";
     newscript->GetAI = GetAI_yazzai;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_warlord_salaris";
     newscript->GetAI = GetAI_warlord_salaris;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_garaxxas";
     newscript->GetAI = GetAI_garaxxas;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_apoko";
     newscript->GetAI = GetAI_apoko;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="boss_zelfan";
     newscript->GetAI = GetAI_zelfan;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     /*newscript = new Script;
     newscript->Name="mob_high_explosive_sheep";
     newscript->GetAI = GetAI_mob_high_explosive_sheep;
-    m_scripts[nrscripts++] = newscript;*/
+    newscript->RegisterSelf();*/
 
     /*newscript = new Script;
     newscript->Name="mob_fizzle";
     newscript->GetAI = GetAI_mob_fizzle;
-    m_scripts[nrscripts++] = newscript;*/
+    newscript->RegisterSelf();*/
 
     /*newscript = new Script;
     newscript->Name="mob_sliver";
     newscript->GetAI = GetAI_mob_sliver;
-    m_scripts[nrscripts++] = newscript;*/
+    newscript->RegisterSelf();*/
 }
Index: trunk/src/bindings/scripts/scripts/zone/silithus/silithus.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/silithus/silithus.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/silithus/silithus.cpp (revision 260)
@@ -146,4 +146,4 @@
     newscript->pGossipHello =   &GossipHello_npcs_rutgar_and_frankal;
     newscript->pGossipSelect =  &GossipSelect_npcs_rutgar_and_frankal;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp (revision 260)
@@ -91,4 +91,4 @@
     newscript->Name="boss_landslide";
     newscript->GetAI = GetAI_boss_landslide;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp (revision 260)
@@ -146,4 +146,4 @@
     newscript->Name="boss_noxxion";
     newscript->GetAI = GetAI_boss_noxxion;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp (revision 260)
@@ -105,4 +105,4 @@
     newscript->Name="boss_princess_theradras";
     newscript->GetAI = GetAI_boss_ptheradras;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp (revision 260)
@@ -94,4 +94,4 @@
     newscript->Name="celebras_the_cursed";
     newscript->GetAI = GetAI_celebras_the_cursed;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp (revision 260)
@@ -138,4 +138,4 @@
     newscript->Name="boss_doomlord_kazzak";
     newscript->GetAI = GetAI_boss_doomlordkazzak;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp (revision 260)
@@ -172,5 +172,5 @@
     newscript->pGossipHello =   &GossipHello_npc_wing_commander_dabiree;
     newscript->pGossipSelect =  &GossipSelect_npc_wing_commander_dabiree;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -178,5 +178,5 @@
     newscript->pGossipHello =   &GossipHello_npc_gryphoneer_windbellow;
     newscript->pGossipSelect =  &GossipSelect_npc_gryphoneer_windbellow;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
@@ -184,4 +184,4 @@
     newscript->pGossipHello =   &GossipHello_npc_wing_commander_brack;
     newscript->pGossipSelect =  &GossipSelect_npc_wing_commander_brack;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp (revision 260)
@@ -61,4 +61,4 @@
     newscript->pGossipHello          = &GossipHello_npc_skorn_whitecloud;
     newscript->pGossipSelect         = &GossipSelect_npc_skorn_whitecloud;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/zone/feralas/feralas.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/zone/feralas/feralas.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/zone/feralas/feralas.cpp (revision 260)
@@ -77,9 +77,9 @@
     newscript->pGossipHello = &GossipHello_npc_gregan_brewspewer;
     newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="npc_screecher_spirit";
     newscript->pGossipHello = &GossipHello_npc_screecher_spirit;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp (revision 260)
@@ -41,4 +41,4 @@
     newscript->Name="at_test";
     newscript->pAreaTrigger = ATtest;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/scripts/item/item_scripts.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/item/item_scripts.cpp (revision 105)
+++ trunk/src/bindings/scripts/scripts/item/item_scripts.cpp (revision 260)
@@ -456,94 +456,94 @@
     newscript->Name="item_area_52_special";
     newscript->pItemUse = ItemUse_item_area_52_special;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_arcane_charges";
     newscript->pItemUse = ItemUse_item_arcane_charges;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_attuned_crystal_cores";
     newscript->pItemUse = ItemUse_item_attuned_crystal_cores;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_blackwhelp_net";
     newscript->pItemUse = ItemUse_item_blackwhelp_net;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_disciplinary_rod";
     newscript->pItemUse = ItemUse_item_disciplinary_rod;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_draenei_fishing_net";
     newscript->pItemUse = ItemUse_item_draenei_fishing_net;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_nether_wraith_beacon";
     newscript->pItemUse = ItemUse_item_nether_wraith_beacon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_flying_machine";
     newscript->pItemUse = ItemUse_item_flying_machine;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_gor_dreks_ointment";
     newscript->pItemUse = ItemUse_item_gor_dreks_ointment;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_muiseks_vessel";
     newscript->pItemUse = ItemUse_item_muiseks_vessel;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_razorthorn_flayer_gland";
     newscript->pItemUse = ItemUse_item_razorthorn_flayer_gland;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_tame_beast_rods";
     newscript->pItemUse = ItemUse_item_tame_beast_rods;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_protovoltaic_magneto_collector";
     newscript->pItemUse = ItemUse_item_protovoltaic_magneto_collector;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_soul_cannon";
     newscript->pItemUse = ItemUse_item_soul_cannon;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_sparrowhawk_net";
     newscript->pItemUse = ItemUse_item_sparrowhawk_net;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_voodoo_charm";
     newscript->pItemUse = ItemUse_item_voodoo_charm;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_vorenthals_presence";
     newscript->pItemUse = ItemUse_item_vorenthals_presence;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_yehkinyas_bramble";
     newscript->pItemUse = ItemUse_item_yehkinyas_bramble;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 
     newscript = new Script;
     newscript->Name="item_zezzaks_shard";
     newscript->pItemUse = ItemUse_item_zezzak_shard;
-    m_scripts[nrscripts++] = newscript;
-}
+    newscript->RegisterSelf();
+}
Index: trunk/src/bindings/scripts/scripts/item/item_test.cpp
===================================================================
--- trunk/src/bindings/scripts/scripts/item/item_test.cpp (revision 90)
+++ trunk/src/bindings/scripts/scripts/item/item_test.cpp (revision 260)
@@ -39,4 +39,4 @@
     newscript->Name="item_test";
     newscript->pItemUse = ItemUse_item_test;
-    m_scripts[nrscripts++] = newscript;
+    newscript->RegisterSelf();
 }
Index: trunk/src/bindings/scripts/ScriptMgr.cpp
===================================================================
--- trunk/src/bindings/scripts/ScriptMgr.cpp (revision 223)
+++ trunk/src/bindings/scripts/ScriptMgr.cpp (revision 260)
@@ -18,5 +18,6 @@
 
 //*** Global data ***
-int nrscripts;
+int num_db_scripts;
+int num_sc_scripts;
 Script *m_scripts[MAX_SCRIPTS];
 
@@ -47,5 +48,4 @@
 // Text Maps
 UNORDERED_MAP<int32, StringTextData> TextMap;
-
 
 //*** End Global data ***
@@ -1181,13 +1181,14 @@
 TRINITY_DLL_EXPORT
 void ScriptsFree()
-{   
+{
     // Free Spell Summary
     delete []SpellSummary;
 
     // Free resources before library unload
-    for(int i=0;i<nrscripts;i++)
+    for(int i=0;i<num_db_scripts;i++)
         delete m_scripts[i];
 
-    nrscripts = 0;
+    num_db_scripts = 0;
+    num_sc_scripts = 0;
 }
 
@@ -1240,4 +1241,6 @@
         LoadDatabase();
 
+    num_db_scripts = GetScriptNames().size();
+
     outstring_log("TSCR: Loading C++ scripts");
     barGoLink bar(1);
@@ -1245,5 +1248,4 @@
     outstring_log("");
 
-    nrscripts = 0;
     for(int i=0;i<MAX_SCRIPTS;i++)
         m_scripts[i]=NULL;
@@ -1776,6 +1778,5 @@
     // -------------------
 
-    outstring_log("TSCR: Loaded %u C++ Scripts", nrscripts);
-    outstring_log("");
+    outstring_log(">> Loaded %i C++ Scripts (of %i ScriptNames defined in Mangos database)", num_sc_scripts, num_db_scripts);
 }
 
@@ -1849,21 +1850,13 @@
 //*** Functions used internally ***
 
-TRINITY_DLL_EXPORT
-char const* ScriptsVersion()
-{
-	return "Default Trinity scripting library";
-}
-
-Script* GetScriptByName(std::string Name)
-{
-    if (Name.empty())
-        return NULL;
-
-    for(int i=0;i<MAX_SCRIPTS;i++)
-    {
-        if (m_scripts[i] && m_scripts[i]->Name == Name)
-            return m_scripts[i];
-    }
-    return NULL;
+void Script::RegisterSelf()
+{
+    int id = GetScriptId(Name.c_str());
+    if (id != 0)
+    {
+        m_scripts[id] = this;
+        ++num_sc_scripts;
+    } else
+        debug_log("SD2: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str());
 }
 
@@ -1872,7 +1865,12 @@
 
 TRINITY_DLL_EXPORT
+char const* ScriptsVersion()
+{
+	return "Default Trinity scripting library";
+}
+TRINITY_DLL_EXPORT
 bool GossipHello ( Player * player, Creature *_Creature )
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pGossipHello) return false;
 
@@ -1886,5 +1884,5 @@
     debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
 
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pGossipSelect) return false;
 
@@ -1898,5 +1896,5 @@
     debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action);
 
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false;
 
@@ -1908,5 +1906,5 @@
 bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest )
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pQuestAccept) return false;
 
@@ -1918,5 +1916,5 @@
 bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest )
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pQuestSelect) return false;
 
@@ -1928,5 +1926,5 @@
 bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest )
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pQuestComplete) return false;
 
@@ -1938,5 +1936,5 @@
 bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt )
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pChooseReward) return false;
 
@@ -1948,5 +1946,5 @@
 uint32 NPCDialogStatus( Player *player, Creature *_Creature )
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pNPCDialogStatus) return 100;
 
@@ -1958,6 +1956,6 @@
 uint32 GODialogStatus( Player *player, GameObject *_GO )
 {
-    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
-    if(!tmpscript || !tmpscript->pGODialogStatus) return 100;
+    Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
+    if (!tmpscript || !tmpscript->pGODialogStatus) return 100;
 
     player->PlayerTalkClass->ClearMenus();
@@ -1968,5 +1966,5 @@
 bool ItemHello( Player *player, Item *_Item, Quest const *_Quest )
 {
-    Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
+    Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];
     if (!tmpscript || !tmpscript->pItemHello) return false;
 
@@ -1978,5 +1976,5 @@
 bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest )
 {
-    Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
+    Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];
     if (!tmpscript || !tmpscript->pItemQuestAccept) return false;
 
@@ -1988,5 +1986,5 @@
 bool GOHello( Player *player, GameObject *_GO )
 {
-    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
+    Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
     if (!tmpscript || !tmpscript->pGOHello) return false;
 
@@ -1998,5 +1996,5 @@
 bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest )
 {
-    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
+    Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
     if (!tmpscript || !tmpscript->pGOQuestAccept) return false;
 
@@ -2008,5 +2006,5 @@
 bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt )
 {
-    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
+    Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
     if (!tmpscript || !tmpscript->pGOChooseReward) return false;
 
@@ -2018,7 +2016,5 @@
 bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry)
 {
-    Script *tmpscript = NULL;
-
-    tmpscript = GetScriptByName(GetAreaTriggerScriptNameById(atEntry->id));
+    Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)];
     if (!tmpscript || !tmpscript->pAreaTrigger) return false;
 
@@ -2029,7 +2025,7 @@
 CreatureAI* GetAI(Creature *_Creature)
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
-
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->GetAI) return NULL;
+
     return tmpscript->GetAI(_Creature);
 }
@@ -2038,5 +2034,5 @@
 bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
 {
-    Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
+    Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];
     if (!tmpscript || !tmpscript->pItemUse) return false;
 
@@ -2047,5 +2043,5 @@
 bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote )
 {
-    Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
+    Script *tmpscript = m_scripts[_Creature->GetScriptId()];
     if (!tmpscript || !tmpscript->pReceiveEmote) return false;
 
@@ -2056,10 +2052,8 @@
 InstanceData* CreateInstanceData(Map *map)
 {
-    Script *tmpscript = NULL;
-
-    if (!map->IsDungeon()) return false;
-
-    tmpscript = GetScriptByName(((InstanceMap*)map)->GetScript());
-    if (!tmpscript || !tmpscript->GetInstanceData) return false;
+    if (!map->IsDungeon()) return NULL;
+
+    Script *tmpscript = m_scripts[((InstanceMap*)map)->GetScriptId()];
+    if (!tmpscript || !tmpscript->GetInstanceData) return NULL;
 
     return tmpscript->GetInstanceData(map);
