//:://////////////////////////////////////////////
//:: LoD OnModuleLoad Event Handler
//:://////////////////////////////////////////////

#include "x2_inc_switches"
#include "x2_inc_restsys"
#include "nw_i0_spells"
#include "itemupdater_inc"
#include "lod_boss_inc"
#include "areahandler_inc"

void main()
{
   SetModuleSwitch (MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE);
   SetModuleSwitch (MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE);
   SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE);
   SetModuleOverrideSpellscript("lod_spell_interv");

   if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE)
      WMBuild2DACache();

    DelayCommand(7080.0,ExecuteScript("reset_module", OBJECT_SELF));

    /* Start the export characters timer */
    DelayCommand(400.0, SignalEvent(OBJECT_SELF, EventUserDefined(200)));

    /* Start scanning and deleting overfarms */
    DelayCommand(180.0, SignalEvent(OBJECT_SELF, EventUserDefined(556)));

    //Random Monster
    SignalEvent(OBJECT_SELF, EventUserDefined(555));


    //Welcome To LOD Portals
    SetLocalInt(GetModule(), "SEND_PORTALS", TRUE);
    DelayCommand(120.0, SetLocalInt(GetModule(), "SEND_PORTALS", FALSE));

    BuildItemsForUpdateString();
    InitializeAreaList();
}