Esempio n. 1
0
 public override void Execute(WorldClient client, CommandParameters parameters)
 {
     if (parameters.Lenght > 0)
     {
         var packet = parameters.GetParameter(0);
         int npcid;
         if (!int.TryParse(packet, out npcid))
         {
             client.Send(new ConsoleMessage("Parametres invalide !", ConsoleColorEnum.RED));
             return;
         }
         var npc = client.Character.myMap.addNpc(npcid, client.Character.CellId, client.Character.Orientation);
         if (npc == null)
         {
             client.Send(new ConsoleMessage("Echoue de l'ajout du pnj invalide !", ConsoleColorEnum.RED));
             return;
         }
         client.Character.myMap.InitNpc(npc);
         NpcTemplateTable.Add(npcid, client.Character);
         client.Send(new ConsoleMessage("PNJ ajouté sur la map avec succès !", ConsoleColorEnum.GREEN));
     }
     else
     {
         client.Send(new ConsoleMessage("Parametres invalide !", ConsoleColorEnum.RED));
     }
 }
Esempio n. 2
0
        public static void Initialize()
        {
            nextPlayerGuid = CharacterTable.getNextGuid();
            nextPlayerGuid++;
            nextItemGuid = InventoryItemTable.getNextGuid();
            nextItemGuid++;
            nextGuildId = GuildTable.getNextGuid();
            nextGuildId++;
            nextMountId = MountTable.getNextGuid();
            nextMountId++;
            nextSpeakingId = SpeakingTable.getNextGuid();
            nextSpeakingId++;
            SpellTable.Load();
            ExpFloorTable.Load();
            MonsterTable.Load();
            ItemTemplateTable.Load();
            ItemTemplateTable.LoadItemActions();
            ItemSetTable.Load();
            DropTable.Load();
            TitleTable.Load();
            IObjectTemplateTable.Load();
            AreaTable.Load();
            AreaSubTable.Load();
            MapTable.Load();
            MapTable.LoadActions();
            CellActionTable.Load();
            MobGroupFixTable.Load();
            BreedTable.Load();
            NpcTemplateTable.Load();
            NpcTemplateTable.LoadPlaces();
            NpcQuestionTable.Load();
            NpcReplyTable.Load();
            ShopNpcTable.Initialize();
            GuildTable.Load();
            CharactersGuildTable.Load();
            TaxCollectorTable.Load();
            PrismeTable.Load();
            BidHouseTable.Load();
            BidHouseTable.LoadItems();
            MountParkTable.Load();
            StaticMountTable.Load();
            MountTable.Load();//TODO Dynamic load of Character mount
            ZaapTable.Load();
            ZaapiTable.Load();

            var Timer = new System.Timers.Timer(1000 * 60 * 25);

            Timer.Elapsed += delegate(object sender, ElapsedEventArgs e)
            {
                Save();
            };
            Timer.Start();
        }