/// <summary> /// Loads all the npc scripts. /// </summary> public static void LoadNPCScripts() { Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("\tLoading NPC Scripts..."); ScriptSettings x = ScriptDatabase.cssettings.DeepClone(); x.ScriptLocation = ServerDatabase.DatabaseLocation + "\\NPCScripts"; x.AddScriptType(typeof(Packets.MessagePacket)); x.AddScriptType(typeof(Packets.Message.MessageCore)); x.AddScriptType(typeof(Packets.NPC.NPCHandler)); x.AddScriptType(typeof(Data.ItemInfo)); x.AddScriptType(typeof(Data.Equipments)); x.AddScriptType(typeof(Data.SpellInfo)); x.AddScriptType(typeof(Data.Spell)); x.AddScriptType(typeof(Data.SpellData)); x.AddScriptType(typeof(Data.Team)); x.AddScriptType(typeof(Data.NobilityBoard)); x.AddScriptType(typeof(Data.NobilityDonation)); x.AddScriptType(typeof(Maps.Map)); x.AddScriptType(typeof(Maps.MapPoint)); x.AddScriptType(typeof(Maps.MapTools)); x.AddScriptType(typeof(Core.Kernel)); x.AddScriptType(typeof(Data.Guild)); x.AddScriptType(typeof(Data.GuildMember)); x.AddScriptType(typeof(Database.CharacterDatabase)); x.AddScriptType(typeof(Calculations.BasicCalculations)); Type[] typelist = GetTypesInNamespace(System.Reflection.Assembly.GetExecutingAssembly(), "ProjectX_V3_Game.Enums"); foreach (Type type in typelist) { x.AddScriptType(type); } Type[] typelist2 = GetTypesInNamespace(System.Reflection.Assembly.GetExecutingAssembly(), "ProjectX_V3_Game.Tournaments"); foreach (Type type in typelist2) { x.AddScriptType(type); } Type[] typelist3 = GetTypesInNamespace(System.Reflection.Assembly.GetExecutingAssembly(), "ProjectX_V3_Game.Entities"); foreach (Type type in typelist3) { x.AddScriptType(type); } Core.Kernel.ScriptEngine = new ScriptEngine(x, Core.TimeIntervals.ScriptUpdate); // scripts updates every 10 sec. Core.Kernel.ScriptEngine.Check_Updates(); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("\tLoaded NPC Scripts..."); }