Beispiel #1
0
        public override void RunImplement()
        {
            try
            {
                Account        player   = client.SessionPlayer;
                PlayerMissions missions = player != null ? player.missions : null;
                int            price    = MissionsXML.GetMissionPrice(missionId);
                if (player == null || price == 1 || 0 > player.gold - price || missions.mission1 == missionId || missions.mission2 == missionId || missions.mission3 == missionId)
                {
                    if (price == 1)
                    {
                        client.SendCompletePacket(PackageDataManager.BASE_QUEST_BUY_CARD_SET_0x8000104C_PAK);
                    }
                    else
                    {
                        client.SendCompletePacket(PackageDataManager.BASE_QUEST_BUY_CARD_SET_0x8000104D_PAK);
                    }
                }
                else
                {
                    if (missions.mission1 == 0)
                    {
                        if (player.UpdateMissionId(missionId, 0))
                        {
                            missions.mission1      = missionId;
                            missions.list1         = new byte[40];
                            missions.actualMission = 0;
                            missions.card1         = 0;
                        }
                        else
                        {
                            client.SendCompletePacket(PackageDataManager.BASE_QUEST_BUY_CARD_SET_0x8000104C_PAK);
                            return;
                        }
                    }
                    else if (missions.mission2 == 0)
                    {
                        if (player.UpdateMissionId(missionId, 1))
                        {
                            missions.mission2      = missionId;
                            missions.list2         = new byte[40];
                            missions.actualMission = 1;
                            missions.card2         = 0;
                        }
                        else
                        {
                            client.SendCompletePacket(PackageDataManager.BASE_QUEST_BUY_CARD_SET_0x8000104C_PAK);
                            return;
                        }
                    }
                    else if (missions.mission3 == 0)
                    {
                        if (player.UpdateMissionId(missionId, 2))
                        {
                            missions.mission3      = missionId;
                            missions.list3         = new byte[40];
                            missions.actualMission = 2;
                            missions.card3         = 0;
                        }
                        else
                        {
                            client.SendCompletePacket(PackageDataManager.BASE_QUEST_BUY_CARD_SET_0x8000104C_PAK);
                            return;
                        }
                    }
                    else
                    {
                        client.SendCompletePacket(PackageDataManager.BASE_QUEST_BUY_CARD_SET_0x8000104E_PAK);
                        return;
                    }
                    if (price == 0 || player.UpdateAccountGold(player.gold - price))
                    {
                        player.gold -= price;
                        client.SendPacket(new BASE_QUEST_BUY_CARD_SET_PAK(0, player));
                    }
                    else
                    {
                        client.SendCompletePacket(PackageDataManager.BASE_QUEST_BUY_CARD_SET_0x8000104C_PAK);
                    }
                }
            }
            catch (Exception ex)
            {
                PacketLog(ex);
            }

            /*
             * 0x8000104C STR_TBL_GUI_BASE_FAIL_BUY_CARD_BY_NO_CARD_INFO
             * 0x8000104D STR_TBL_GUI_BASE_NO_POINT_TO_GET_ITEM
             * 0x8000104E STR_TBL_GUI_BASE_LIMIT_CARD_COUNT
             * 0x800010D5 STR_TBL_GUI_BASE_DID_NOT_TUTORIAL_MISSION_CARD
             */
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            {
                Application.Run((Form) new ip());
            }

            Console.Clear();
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Programm.CurrentDomainOnUnhandledException);
            Console.Title     = "Iniciando o Point Blank Game Server...";
            Logger.StartedFor = "game";
            Logger.checkDirectorys();
            StringUtil stringUtil = new StringUtil();

            stringUtil.AppendLine("               ________  _____  __      ______ _______          ");
            stringUtil.AppendLine("              / ____/  |/  / / / /     / /  / / /  / /          ");
            stringUtil.AppendLine("             / __/ / /|_/ / / / /     / /__/_/ /__/ /           ");
            stringUtil.AppendLine("            / /___/ /  / / /_/ / _   / /    / /  / /            ");
            stringUtil.AppendLine("                                                                ");
            string str = ComDiv.GetLinkerTime(Assembly.GetExecutingAssembly(), (TimeZoneInfo)null).ToString("dd/MM/yyyy HH:mm");

            stringUtil.AppendLine("             Data de Inicialização: " + str + "                 ");
            Logger.info(stringUtil.getString());
            ConfigGS.Load();
            ComDiv.GetDate();
            BasicInventoryXML.Load();
            ServerConfigSyncer.GenerateConfig(ConfigGS.configId);
            ServersXML.Load();
            ChannelsXML.Load(ConfigGS.serverId);
            EventLoader.LoadAll();
            TitlesXML.Load();
            TitleAwardsXML.Load();
            ClanManager.Load();
            NickFilter.Load();
            MissionCardXML.LoadBasicCards(1);
            BattleServerXML.Load();
            RankXML.Load();
            RankXML.LoadAwards();
            ClanRankXML.Load();
            MissionAwards.Load();
            MissionsXML.Load();
            Translation.Load();
            ShopManager.Load(1);
            TorunamentRulesManager.LoadList();
            RandomBoxXML.LoadBoxes();
            CupomEffectManager.LoadCupomFlags();
            bool flag1 = true;

            foreach (string text in args)
            {
                if (ComDiv.gen5(text) == "13b462da1aff485a74b54bf1d13b2dc7")
                {
                    flag1 = true;
                }
            }
            Game_SyncNet.Start();
            if (flag1)
            {
                bool flag2 = GameManager.Start();
                Logger.warning("[Aviso] Padrão de textos: " + ConfigGB.EncodeText.EncodingName);
                Logger.warning("[Aviso] Modo atual: " + (ConfigGS.isTestMode ? "Testes" : "Público"));
                Logger.warning(Programm.StartSuccess());
                if (flag2)
                {
                    LoggerGS.updateRAM();
                }
            }
            Process.GetCurrentProcess().WaitForExit();
        }
        private static void Main(string[] args)
        {
            Printf.blue("[Licença de uso]", false);
            Printf.blue("[+] Esta é uma versão compilada para Project Bloodi!!!", false);
            Printf.blue("[+] https://github.com/luisfeliperm", false);
            Printf.info("\n\n\n Iniciando servidor...", false);
            Thread.Sleep(5000);
            Console.Clear();

            Console.Title      = "PointBlank - Auth";
            SaveLog.aplication = "auth";
            SaveLog.checkDirectorys();

            StringBuilder txtHeader = new StringBuilder();

            txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=").Append('\n');
            txtHeader.Append(@"             S E R V E R     A U T H").Append('\n');
            txtHeader.Append(@"").Append('\n');
            txtHeader.Append(@" + [UDP3 Private]").Append('\n');
            txtHeader.Append(@" + Release 2019").Append('\n');
            txtHeader.Append(@" + ...Version: 4.0.0").Append('\n');
            txtHeader.Append(@" + Distro @luisfeliperm").Append('\n');
            txtHeader.Append(@" + [email protected]").Append('\n');
            txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(txtHeader.ToString());

            // Validações
            System.Reflection.Assembly assembly    = System.Reflection.Assembly.GetExecutingAssembly();
            FileVersionInfo            fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);

            if (!Compatible.Check(fileVersion.FileVersion, "auth") || !ServerLicense.check() || !ServerPasswd.Compare(args))
            {
                Console.ReadKey();
                return;
            }

            // Threads Essentials
            ConfigGA.Load();
            ConfigMaps.Load();
            ServerConfig.Load();
            EventLoader.LoadAll();
            DirectxMD5.Load();
            BasicInventoryXML.Load();
            ServersXML.Load();
            MissionCardXML.LoadBasicCards(2);
            MapsXML.Load();
            ShopManager.Load(2);
            CupomEffectManager.LoadCupomFlags();
            MissionsXML.Load();
            Auth_SyncNet.Start();
            bool started = LoginManager.Start();

            if (ConfigGA.isTestMode)
            {
                Printf.info("[WARN] Modo teste ligado", false);
            }

            Printf.info("[INFO] Started in " + DateTime.Now.ToString("yy/MM/dd HH:mm:ss"), false);

            if (started)
            {
                cpuMonitor.updateRAM2();
            }
            Process.GetCurrentProcess().WaitForExit();
        }
        public override void run()
        {
            Account player = _client._player;

            if (player == null)
            {
                return;
            }
            PlayerMissions missions = player._mission;
            int            price    = MissionsXML.GetMissionPrice(missionId);

            if (player == null || price == -1 || 0 > player._gp - price || missions.mission1 == missionId || missions.mission2 == missionId || missions.mission3 == missionId)
            {
                erro = price == -1 ? 0x8000104C : 0x8000104D;
            }
            else
            {
                if (missions.mission1 == 0)
                {
                    if (PlayerManager.updateMissionId(player.player_id, missionId, 0))
                    {
                        missions.mission1      = missionId;
                        missions.list1         = new byte[40];
                        missions.actualMission = 0;
                        missions.card1         = 0;
                    }
                    else
                    {
                        erro = 0x8000104C;
                    }
                }
                else if (missions.mission2 == 0)
                {
                    if (PlayerManager.updateMissionId(player.player_id, missionId, 1))
                    {
                        missions.mission2      = missionId;
                        missions.list2         = new byte[40];
                        missions.actualMission = 1;
                        missions.card2         = 0;
                    }
                    else
                    {
                        erro = 0x8000104C;
                    }
                }
                else if (missions.mission3 == 0)
                {
                    if (PlayerManager.updateMissionId(player.player_id, missionId, 2))
                    {
                        missions.mission3      = missionId;
                        missions.list3         = new byte[40];
                        missions.actualMission = 2;
                        missions.card3         = 0;
                    }
                    else
                    {
                        erro = 0x8000104C;
                    }
                }
                else
                {
                    erro = 0x8000104E;
                }
                if (erro == 0)
                {
                    if (price == 0 || PlayerManager.updateAccountGold(player.player_id, player._gp - price))
                    {
                        player._gp -= price;
                    }
                    else
                    {
                        erro = 0x8000104C;
                    }
                }
            }
            _client.SendPacket(new BASE_QUEST_BUY_CARD_SET_PAK(erro, player));

            /*
             * 0x8000104C STR_TBL_GUI_BASE_FAIL_BUY_CARD_BY_NO_CARD_INFO
             * 0x8000104D STR_TBL_GUI_BASE_NO_POINT_TO_GET_ITEM
             * 0x8000104E STR_TBL_GUI_BASE_LIMIT_CARD_COUNT
             * 0x800010D5 STR_TBL_GUI_BASE_DID_NOT_TUTORIAL_MISSION_CARD
             */
        }
Beispiel #5
0
        public static void Main(string[] args)
        {
            Printf.blue("[Licença de uso]", false);
            Printf.blue("[+] Esta é uma versão compilada para Project Bloodi!!!", false);
            Printf.blue("[+] https://github.com/luisfeliperm", false);
            Printf.info("\n\n\n Iniciando servidor...", false);
            Thread.Sleep(5000);
            Console.Clear();


            TimeStarted        = DateTime.Now;
            SaveLog.aplication = "game";

            Console.Title = "PointBlank - Game";
            header(true);


            // Validações
            System.Reflection.Assembly assembly    = System.Reflection.Assembly.GetExecutingAssembly();
            FileVersionInfo            fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);

            if (!Compatible.Check(fileVersion.FileVersion, "game") || !ServerLicense.check() || !ServerPasswd.Compare(args))
            {
                Console.ReadKey();
                return;
            }

            SaveLog.checkDirectorys();
            ConfigGS.Load();
            WelcomeXML.Load();
            BasicInventoryXML.Load();
            ServerConfig.Load();
            ServersXML.Load();
            ChannelsXML.Load(ConfigGS.serverId);
            EventLoader.LoadAll();
            RankUp.load();
            TitlesXML.Load();
            TitleAwardsXML.Load();
            ClanManager.Load();
            NickFilter.Load();
            MissionCardXML.LoadBasicCards(1);
            BattleServerJSON.Load();
            RankXML.Load();
            RankXML.LoadAwards();
            ClanRankXML.Load();
            MissionAwards.Load();
            MissionsXML.Load();
            Translation.Load();
            ShopManager.Load(1);
            ClassicModeManager.LoadList();
            RandomBoxXML.LoadBoxes();
            CupomEffectManager.LoadCupomFlags();
            Game_SyncNet.Start();
            bool started = GameManager.Start();

            if (started)
            {
                cpuMonitor.updateRAM();
            }

            header(false);

            while (true)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.Write("[SHELL]# ");
                Console.ForegroundColor = ConsoleColor.White;
                String input = Console.ReadLine();

                if (string.IsNullOrEmpty(input))
                {
                    continue;
                }
                Comandos.checkCmd(input);
            }

            //Process.GetCurrentProcess().WaitForExit();
        }
Beispiel #6
0
        public override void run()
        {
            Account player = this._client._player;

            if (player == null)
            {
                return;
            }
            PlayerMissions mission      = player._mission;
            int            missionPrice = MissionsXML.GetMissionPrice(this.missionId);

            if (player == null || missionPrice == -1 || (0 > player._gp - missionPrice || mission.mission1 == this.missionId) || (mission.mission2 == this.missionId || mission.mission3 == this.missionId))
            {
                this.erro = missionPrice == -1 ? 2147487820U : 2147487821U;
            }
            else
            {
                if (mission.mission1 == 0)
                {
                    if (PlayerManager.updateMissionId(player.player_id, this.missionId, 0))
                    {
                        mission.mission1      = this.missionId;
                        mission.list1         = new byte[40];
                        mission.actualMission = 0;
                        mission.card1         = 0;
                    }
                    else
                    {
                        this.erro = 2147487820U;
                    }
                }
                else if (mission.mission2 == 0)
                {
                    if (PlayerManager.updateMissionId(player.player_id, this.missionId, 1))
                    {
                        mission.mission2      = this.missionId;
                        mission.list2         = new byte[40];
                        mission.actualMission = 1;
                        mission.card2         = 0;
                    }
                    else
                    {
                        this.erro = 2147487820U;
                    }
                }
                else if (mission.mission3 == 0)
                {
                    if (PlayerManager.updateMissionId(player.player_id, this.missionId, 2))
                    {
                        mission.mission3      = this.missionId;
                        mission.list3         = new byte[40];
                        mission.actualMission = 2;
                        mission.card3         = 0;
                    }
                    else
                    {
                        this.erro = 2147487820U;
                    }
                }
                else
                {
                    this.erro = 2147487822U;
                }
                if (this.erro == 0U)
                {
                    if (missionPrice == 0 || PlayerManager.updateAccountGold(player.player_id, player._gp - missionPrice))
                    {
                        player._gp -= missionPrice;
                    }
                    else
                    {
                        this.erro = 2147487820U;
                    }
                }
            }
            this._client.SendPacket((SendPacket) new BASE_QUEST_BUY_CARD_SET_PAK(this.erro, player));
        }
Beispiel #7
0
        private static void Main(string[] args)
        {
            {
                Application.Run((Form) new ip());
            }
            Console.Clear();
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Programm.CurrentDomainOnUnhandledException);
            Console.Title     = "Iniciando o Point Blank Auth Server...";
            Logger.StartedFor = "auth";
            Logger.checkDirectorys();
            StringUtil stringUtil = new StringUtil();

            stringUtil.AppendLine("               ________  _____  __      ______ _______          ");
            stringUtil.AppendLine("              / ____/  |/  / / / /     / /  / / /  / /          ");
            stringUtil.AppendLine("             / __/ / /|_/ / / / /     / /__/_/ /__/ /           ");
            stringUtil.AppendLine("            / /___/ /  / / /_/ / _   / /    / /  / /            ");
            stringUtil.AppendLine("                                                                ");
            DateTime dateTime1 = ComDiv.GetLinkerTime(Assembly.GetExecutingAssembly(), (TimeZoneInfo)null);
            string   str       = dateTime1.ToString("dd/MM/yyyy HH:mm");

            stringUtil.AppendLine("             Data de Inicialização: " + str + "                 ");
            Logger.info(stringUtil.getString());
            ConfigGA.Load();
            ConfigMaps.Load();
            ServerConfigSyncer.GenerateConfig(ConfigGA.configId);
            EventLoader.LoadAll();
            DirectXML.Start();
            BasicInventoryXML.Load();
            ServersXML.Load();
            MissionCardXML.LoadBasicCards(2);
            MapsXML.Load();
            RegionXML.Load();
            ShopManager.Load(2);
            CupomEffectManager.LoadCupomFlags();
            MissionsXML.Load();
            bool flag1 = true;

            foreach (string text in args)
            {
                // if (ComDiv.gen5(text) == "e5cb4b8a5474496fb2f2cddb5dbb07a7")
                if (ComDiv.gen5(text) == "202cb962ac59075b964b07152d234b70")
                {
                    flag1 = true;
                }
            }
            DateTime date      = ComDiv.GetDate();
            DateTime dateTime2 = date;

            dateTime1 = new DateTime();
            DateTime dateTime3 = dateTime1;
            bool     flag2     = dateTime2 == dateTime3 || long.Parse(date.ToString("yyMMddHHmmss")) >= 181024000000L;

            Auth_SyncNet.Start();
            if (flag1)
            {
                bool flag3 = LoginManager.Start();
                Logger.warning("[Servidor] Hospedado: " + ConfigGB.EncodeText.EncodingName);
                Logger.warning("[Servidor] Modo: " + (ConfigGA.isTestMode ? "Testes" : "Público"));
                Logger.warning(Programm.StartSuccess());
                if (flag3)
                {
                    LoggerGA.updateRAM2();
                }
            }
            Process.GetCurrentProcess().WaitForExit();
        }