Ejemplo n.º 1
0
        private void SummonButton_Click(object sender, EventArgs e)
        {
            var t = new Thread(() =>
            {
                Func <int, int> iteration = i =>
                {
                    summonButton.Text = (i + 1).ToString() + "...";
                    return(1);
                };
                summonButton.Enabled = false;
                var unit             = Unit.Units.First(u => u.Name == unitDataGrid.Rows[unitDataGrid.CurrentRow.Index].Cells[0].Value.ToString() && u.UnitId == u.BaseUnitId);
                var b = new BraveExvius
                {
                    FacebookUserId = fbidInput.Text.Replace(" ", ""),
                    FacebookToken  = fbtokenInput.Text.Replace(" ", "")
                };
                b.Login();
                b.UnitHunter(unit, iteration);
                summonButton.Text    = "summon highlighted";
                summonButton.Enabled = true;
            });

            t.IsBackground = true;
            t.Start();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var b = new BraveExvius {
            };

            b.Login();
            var iw = b.Network.SendPacket(request: Request.EquipGrowEntry);

            Logger.Out($"Current Item : {iw[GameObject.EquipGrowEventInfo][0][Variable.EquipId].ToString()}");
        }
Ejemplo n.º 3
0
        private void InitGacha(BraveExvius b)
        {
            Gachas = b.GetUserInfo[GameObject.GachaScheduleMst];

            foreach (var gacha in b.GachaId)
            {
                JPGacha.Items.Add(gacha);
            }

            JPGacha.SelectedIndex = 0;

            foreach (var ticket in Ticket.Tickets)
            {
                JPGachaTicket.Items.Add(ticket.Name);
            }

            JPGachaTicket.SelectedIndex = 0;
        }
Ejemplo n.º 4
0
        private void JPLogin_Click(object sender, EventArgs e)
        {
            var t = new Thread(() =>
            {
                JPLogin.Enabled = false;
                JP = new BraveExvius
                {
                    TransferCode = JPCode.Text.Replace(" ", ""),
                    TransferPin  = JPPin.Text.Replace(" ", "")
                };
                JP.LoginJapan(JP.TransferCode, JP.TransferPin);
                InitGacha(JP);
                JPLogin.Enabled     = true;
                GachaSummon.Enabled = true;
            });

            t.IsBackground = true;
            t.Start();
        }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            var fb = new Facebook();

            fb.Login("*****@*****.**", "password");
            if (fb.TwoFactorAuth)
            {
                fb.FinishTwoFactorAuth("1234 5678");
            }
            fb.AllowFFBE();
            var b = new BraveExvius
            {
                FacebookUserId = fb.Id,
                FacebookToken  = fb.AccessToken,
            };

            b.Login();
            b.DoMission(Mission.AirshipDeck, false, null, null, null, 0);
            b.DoMission(Mission.AirshipDeck);
        }
Ejemplo n.º 6
0
        private void InjectButton_Click(object sender, EventArgs e)
        {
            var t = new Thread(() =>
            {
                injectButton.Enabled = false;
                var itemHax          = String.Join(",", injectDataTable.Rows.Cast <DataRow>().ToList().FindAll(i => i.ItemArray[1].ToString() == "item" && i.ItemArray[0].ToString() != "0").Select(i => "20:" + i.ItemArray[3] + ":" + i.ItemArray[0]));
                var equipmentHax     = String.Join(",", injectDataTable.Rows.Cast <DataRow>().ToList().FindAll(i => i.ItemArray[1].ToString() == "equip" && i.ItemArray[0].ToString() != "0").Select(i => "21:" + i.ItemArray[3] + ":" + i.ItemArray[0]));
                var materiaHax       = String.Join(",", injectDataTable.Rows.Cast <DataRow>().ToList().FindAll(i => i.ItemArray[1].ToString() == "materia" && i.ItemArray[0].ToString() != "0").Select(i => "22:" + i.ItemArray[3] + ":" + i.ItemArray[0]));
                var b = new BraveExvius
                {
                    FacebookUserId = fbidInput.Text.Replace(" ", ""),
                    FacebookToken  = fbtokenInput.Text.Replace(" ", "")
                };
                b.Login();
                b.DoMission(Mission.AirshipDeck, false, itemHax, equipmentHax, materiaHax);
                injectButton.Enabled = true;
            });

            t.IsBackground = true;
            t.Start();
        }
Ejemplo n.º 7
0
        private void LevelPartyButton_Click(object sender, EventArgs e)
        {
            var t = new Thread(() =>
            {
                Func <string, int> update = i =>
                {
                    levelStatus.Text = i;
                    return(1);
                };
                levelPartyButton.Enabled = false;
                var b = new BraveExvius
                {
                    FacebookUserId = fbidInput.Text.Replace(" ", ""),
                    FacebookToken  = fbtokenInput.Text.Replace(" ", "")
                };
                b.Login();
                b.LevelParty(update);
                levelPartyButton.Enabled = true;
            });

            t.IsBackground = true;
            t.Start();
        }
Ejemplo n.º 8
0
        private void RankUpButton_Click(object sender, EventArgs e)
        {
            var t = new Thread(() =>
            {
                Func <string, int> update = i =>
                {
                    levelStatus.Text = i;
                    return(1);
                };
                rankUpButton.Enabled = false;
                var b = new BraveExvius
                {
                    FacebookUserId = fbidInput.Text.Replace(" ", ""),
                    FacebookToken  = fbtokenInput.Text.Replace(" ", "")
                };
                b.Login();
                fbidInput.Text    = b.FacebookUserId;
                fbtokenInput.Text = b.FacebookUserId;
                while (true)
                {
                    var result       = b.DoMission(Mission.PortCityLodin, false, null, null, null, 15000);
                    var level        = result[GameObject.UserTeamInfo].First()[Variable.Level].ToString();
                    var experience   = result[GameObject.UserTeamInfo].First()[Variable.Experience].ToString();
                    levelStatus.Text = "Rank " + level + " : experience = " + experience;
                    if (level == "150")
                    {
                        break;
                    }
                    Thread.Sleep(3000);
                }
                rankUpButton.Enabled = true;
            });

            t.IsBackground = true;
            t.Start();
        }
Ejemplo n.º 9
0
        static void Main(string[] args)
        {
            /*DumpTranslation("87", "65", "F_TEXT_UNITS_NAME", "F_UNIT_MST", "Unit", new Dictionary<String, String>  {
             *     { "UniqueUnitId", "" },
             *     { "Level", "" },
             *     { "Tmr", "" },
             *     { "Equip", "" } });*/
            /*DumpTranslation("108", "58", "F_TEXT_ITEM_EQUIP_NAME", "F_EQUIP_ITEM_MST", "Equipment");
             * DumpTranslation("88", "58", "F_TEXT_ITEM_NAME", "F_ITEM_MST", "Item");
             * DumpTranslation("87", "44", "F_TEXT_MATERIA_NAME", "F_MATERIA_MST", "Materia");
             * for (int i = 61; i < 150; i++)
             * { try { DecodeOne("F_UNIT_MST", i.ToString()); } catch { } }
             * for (int i = 80; i < 150; i++)
             * { try { DecodeOne("F_TEXT_UNITS_NAME", i.ToString()); } catch { } }
             *
             * for (int i = 48; i < 150; i++)
             * { try { DecodeOne("F_ITEM_MST", i.ToString()); } catch { } }
             * for (int i = 81; i < 150; i++)
             * { try { DecodeOne("F_TEXT_ITEM_NAME", i.ToString()); } catch { } }
             *
             * for (int i = 57; i < 150; i++)
             * { try { DecodeOne("F_EQUIP_ITEM_MST", i.ToString()); } catch { } }
             * for (int i = 100; i < 150; i++)
             * { try { DecodeOne("F_TEXT_ITEM_EQUIP_NAME", i.ToString()); } catch { } }
             *
             * for (int i = 41; i < 150; i++)
             * { try { DecodeOne("F_MATERIA_MST", i.ToString()); } catch { } }
             * for (int i = 80; i < 150; i++)
             * { try { DecodeOne("F_TEXT_MATERIA_NAME", i.ToString()); } catch { } }*/
            //DecodeAll();
            DumpHardcoded("Request", networkJson, new List <String> {
                "Url", "EncodeKey", "RequestID"
            });
            DumpHardcoded("GameObject", responseJson);
            DumpHardcoded("Variable", variableJson);
            var bot = new BraveExvius
            {
                MstVersion = "0"
            };
            var init    = bot.Network.SendPacket(Request.Initialize);
            var newMsts = init[GameObject.VersionInfo];
            var F_LOCALIZED_TEXT_MST = DecodeFile(newMsts.First(m => m[Variable.KeyName].ToString() == "F_LOCALIZED_TEXT_MST"));

            F_LOCALIZED_TEXT_MST.ForEach(l => {
                newMsts.Last.AddAfterSelf(new JObject(
                                              new JProperty(Variable.KeyName, ((JObject)JsonConvert.DeserializeObject(l))[Variable.KeyName].ToString()),
                                              new JProperty(Variable.Value, ((JObject)JsonConvert.DeserializeObject(l))["00zAYGYS"].ToString())));
            });
            {
                var switchJson      = DecodeFile(newMsts.First(m => m[Variable.KeyName].ToString() == "F_SUBLIMATION_RECIPE_MST"));
                var switchMst       = switchJson.Select(m => (JObject)JsonConvert.DeserializeObject(m)).ToList();
                var definitions     = new StringBuilder();
                var definitionsList = new StringBuilder();
                var className       = "Sublimation";
                var classVars       = @"
        public String SublimationId { get; set; }
        public String UnitId { get; set; }
        public String Items { get; set; }
";
                foreach (var switchObj in switchMst)
                {
                    var id      = switchObj[Variable.SublimationId].ToString();
                    var unitId  = switchObj[Variable.SublimationUnitId].ToString();
                    var items   = switchObj[Variable.SublimationItems].ToString();
                    var varName = "Sublimation_" + id;
                    definitions.AppendLine($"        public static readonly {className} {varName} = new {className} {{ SublimationId = \"{id}\", UnitId = \"{unitId}\", Items = \"{items}\"}};");
                    definitionsList.AppendLine($"           {varName},");
                }
                var file = new StringBuilder();
                file.Append(fileHeader.Replace("CLASSNAME", className));
                file.AppendLine(classVars);
                file.Append(definitions.ToString());
                file.AppendLine(fileMiddle.Replace("CLASSNAME", className));
                file.Append(definitionsList.ToString());
                file.Append(fileFooter);
                File.WriteAllText(@"..\BraveHaxvius\Data\" + className + ".cs", file.ToString());
            }
            DumpTranslation(newMsts, "F_TEXT_ITEM_EQUIP_NAME", "F_EQUIP_ITEM_MST", "Equipment");
            DumpTranslation(newMsts, "F_TEXT_UNITS_NAME", "F_UNIT_MST", "Unit", new Dictionary <String, String>  {
                { "UniqueUnitId", "" },
                { "Level", "" },
                { "Tmr", "" },
                { "Equip", "" }
            });
            DumpTranslation(newMsts, "F_TEXT_MISSION", "F_MISSION_MST", "Mission");
            DumpTranslation(newMsts, "F_TEXT_IMPORTANT_ITEM_NAME", "F_IMPORTANT_ITEM_MST", "ImportantItem");
            DumpTranslation(newMsts, "F_TEXT_ITEM_NAME", "F_ITEM_MST", "Item");
            DumpTranslation(newMsts, "F_TEXT_RECIPE_BOOK_NAME", "F_RECIPE_BOOK_MST", "Recipe");
            DumpTranslation(newMsts, "F_TEXT_MATERIA_NAME", "F_MATERIA_MST", "Materia");
            DumpTranslation(newMsts, "F_TEXT_CHALLENGE_NAME", "F_CHALLENGE_MST", "Challenge");
            {
                var translations    = DecodeFile(newMsts.First(m => m[Variable.KeyName].ToString() == "F_TEXT_TEXT_EN"));
                var definitions     = new StringBuilder();
                var definitionsList = new StringBuilder();
                var className       = "Text";
                var names           = new List <String>();
                foreach (var line in translations)
                {
                    var name = line.Split(new char[1] {
                        '^'
                    })[0];
                    var message = line.Split(new char[1] {
                        '^'
                    })[1].Replace("\\", "\\\\").Replace("\"", "\\\"");
                    if (names.Contains(name))
                    {
                        name += message;
                    }
                    names.Add(name);
                    definitionsList.AppendLine($"           {{\"{name}\", \"{message}\"}},");
                }
                var file = new StringBuilder();
                file.Append(fileHeader.Replace("CLASSNAME", className));
                file.AppendLine(fileMiddle.Replace("List<CLASSNAME>", "Dictionary<String, String>").Replace("CLASSNAME", className));
                file.Append(definitionsList.ToString());
                file.Append(fileFooter);
                File.WriteAllText(@"..\BraveHaxvius\Data\" + className + ".cs", file.ToString());
            }
            {
                var switchJson      = DecodeFile(newMsts.First(m => m[Variable.KeyName].ToString() == "F_SWITCH_MST"));
                var switchMst       = switchJson.Select(m => (JObject)JsonConvert.DeserializeObject(m)).ToList();
                var definitions     = new StringBuilder();
                var definitionsList = new StringBuilder();
                var className       = "Switch";
                var classVars       = @"
        public String SwitchId { get; set; }
        public String SwitchType { get; set; }
        public String SwitchBit { get; set; }
";
                foreach (var switchObj in switchMst)
                {
                    var id      = switchObj["8vAYn3IX"].ToString();
                    var type    = switchObj[Variable.SwitchType].ToString();
                    var bit     = switchObj[Variable.BitNumber].ToString();
                    var varName = "Switch_" + id;
                    definitions.AppendLine($"        public static readonly {className} {varName} = new {className} {{ SwitchId = \"{id}\", SwitchType = \"{type}\", SwitchBit = \"{bit}\"}};");
                    definitionsList.AppendLine($"           {varName},");
                }
                var file = new StringBuilder();
                file.Append(fileHeader.Replace("CLASSNAME", className));
                file.AppendLine(classVars);
                file.Append(definitions.ToString());
                file.AppendLine(fileMiddle.Replace("CLASSNAME", className));
                file.Append(definitionsList.ToString());
                file.Append(fileFooter);
                File.WriteAllText(@"..\BraveHaxvius\Data\" + className + ".cs", file.ToString());
            }
            {
                var switchJson      = DecodeFile(newMsts.First(m => m[Variable.KeyName].ToString() == "F_UNIT_CLASS_UP_MST"));
                var switchMst       = switchJson.Select(m => (JObject)JsonConvert.DeserializeObject(m)).ToList();
                var definitions     = new StringBuilder();
                var definitionsList = new StringBuilder();
                var className       = "ClassUp";
                var classVars       = @"
        public String UnitId { get; set; }
        public String Items { get; set; }
";
                foreach (var switchObj in switchMst)
                {
                    var id      = switchObj[Variable.UnitId].ToString();
                    var items   = switchObj[Variable.ClassUpItems].ToString();
                    var varName = "Unit_" + id;
                    definitions.AppendLine($"        public static readonly {className} {varName} = new {className} {{ UnitId = \"{id}\", Items = \"{items}\"}};");
                    definitionsList.AppendLine($"           {varName},");
                }
                var file = new StringBuilder();
                file.Append(fileHeader.Replace("CLASSNAME", className));
                file.AppendLine(classVars);
                file.Append(definitions.ToString());
                file.AppendLine(fileMiddle.Replace("CLASSNAME", className));
                file.Append(definitionsList.ToString());
                file.Append(fileFooter);
                File.WriteAllText(@"..\BraveHaxvius\Data\" + className + ".cs", file.ToString());
            }
        }
Ejemplo n.º 10
0
        static void DecodeAll()
        {
            var bot = new BraveExvius
            {
                MstVersion = "0"
            };
            var init    = bot.Network.SendPacket(Request.Initialize);
            var newMsts = init[GameObject.VersionInfo];
            var F_LOCALIZED_TEXT_MST = DecodeFile(newMsts.First(m => m[Variable.KeyName].ToString() == "F_LOCALIZED_TEXT_MST"));

            F_LOCALIZED_TEXT_MST.ForEach(l => {
                newMsts.Last.AddAfterSelf(new JObject(
                                              new JProperty(Variable.KeyName, ((JObject)JsonConvert.DeserializeObject(l))[Variable.KeyName].ToString()),
                                              new JProperty(Variable.Value, ((JObject)JsonConvert.DeserializeObject(l))["00zAYGYS"].ToString())));
            });
            foreach (var mst in newMsts)
            {
                var name    = mst[Variable.KeyName].ToString();
                var version = mst[Variable.Value].ToString();
                //version = (int.Parse(version) + 1).ToString();
                var loc = "mst";
                if (name.Contains("F_TEXT"))
                {
                    loc = "localized_texts/en";
                }
                var nameKey = (JToken)fileJson.FirstOrDefault(r => r.Key == name).Value;
                try
                {
                    var datContent = Downloader.DownloadString("http://lapis-dlc.gumi.sg/dlc_assets_prod/" + loc + "/Ver" + version + "_" + nameKey["Name"] + ".dat");
                    var datLines   = datContent.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries);
                    var entireFile = new List <String>();
                    foreach (var base64 in datLines)
                    {
                        var decryptedMst     = Crypto.Decrypt(base64, nameKey["Key"].ToString());
                        var decryptedEntries = decryptedMst.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries);
                        entireFile.AddRange(decryptedEntries);
                    }
                    Logger.Out(name);
                    File.WriteAllLines("..\\mst\\" + name + "_" + version, entireFile);
                    if (loc == "mst")
                    {
                        StringBuilder sb   = new StringBuilder();
                        var           keys = (JObject)JsonConvert.DeserializeObject(entireFile.First());
                        foreach (var key in keys)
                        {
                            if (Variable.Variables.ContainsKey(key.Key))
                            {
                                sb.Append(Variable.Variables.FirstOrDefault(k => k.Key == key.Key).Value + " (" + key.Key + "),");
                            }
                            else
                            {
                                sb.Append(key.Key + ",");
                            }
                        }
                        sb.AppendLine();
                        foreach (var line in entireFile)
                        {
                            var obj = (JObject)JsonConvert.DeserializeObject(line);
                            foreach (var o in obj)
                            {
                                if (o.Key == Variable.Description)
                                {
                                    try { sb.Append(Unit.Units.First(m => m.UnitId == obj[Variable.UnitId].ToString()).Name.Replace(",", "|") + ","); } catch { sb.Append(o.Value + ","); }
                                }
                                else
                                {
                                    sb.Append(o.Value.ToString().Replace(",", "|") + ",");
                                }
                            }
                            sb.AppendLine();
                        }
                        File.WriteAllText("..\\mst\\" + name + "_" + version + ".csv", sb.ToString());
                    }
                }
                catch { }
            }
        }