Ejemplo n.º 1
0
 private static void LoadBinary()
 {
     BinaryTableConfig.SkillProvider.Instance.Clear();
     BinaryTableConfig.SkillProvider.Instance.LoadForClient();
     LogSystem.Info("record num: {0}", BinaryTableConfig.SkillProvider.Instance.GetSkillCount());
 }
Ejemplo n.º 2
0
        public string HSZLHandler(string msg, string curMoney, string profit, out decimal a)
        {
            string[] info = GetInfos(msg, Settings.rules.HSZLInfoRules);
            if (info[0] == "" || info[1] == "")
            {
                a = 0;
                return(Settings.error.ZZ_ERROR);
            }
            else
            {
                //重复订单
                if (Enumerable.SequenceEqual <string>(info, oldInfos[2]))
                {
                    a = 0;
                    return(Settings.error.REPEAT_ERROR);
                }
                else
                {
                    oldInfos[2] = info;
                }
            }
            var notRecnum = int.Parse(info[0]);
            var recBei    = int.Parse(info[1]);

            LogSystem.CountRecord(Settings.GameType.HSZL, recBei);

            //c代表推荐的数字
            string c = "";

            for (int i = 0; i <= 9; i++)
            {
                if (notRecnum != i)
                {
                    c += i + "|";
                }
            }
            c = c.Substring(0, 17);

            //t代表倍数  不同模式倍数不用
            int t = GetFinalT(recBei, Settings.hszl.startBeishu, Settings.hszl.maxBeishu, Settings.hszl.flag);


            //n代表下注个数
            int n = 84;

            //a代表下注金额
            a = GetFinalA(Settings.hszl.m, t, n);

            //如果下注金额大于当前余额取消下注
            float curM = float.Parse(curMoney);

            if (a > (decimal)curM)
            {
                var mm = a;
                a = 0;
                return("下注失败\n下注所需金额:" + mm.ToString() + ",余额:" + curMoney);
            }

            //日志记录
            var log = "[后三组六]" + "\r\n推荐数字:" + c + "  推荐倍数:" + recBei + "  实际倍数:" + t + "\r\n投注前余额:" + curMoney + "元,投注前利润:" + profit + "元";

            LogSystem.Record(log);

            if (Settings.hszl.flag == 1)
            {
                if (recBei > Settings.hszl.maxBeishu)
                {
                    return("订单创建失败!\n推荐倍数:" + recBei + "\n设定最大倍数:" + Settings.hszl.maxBeishu);
                }
            }
            else if (Settings.hszl.flag == 2)
            {
                if (t > Settings.hszl.maxBeishu || recBei < Settings.hszl.startBeishu)
                {
                    return("订单创建失败!\n推荐倍数:" + recBei + "\n开始投注倍数:" + Settings.hszl.startBeishu + "\n设定最大倍数:" + Settings.hszl.maxBeishu);
                }
            }

            //  orderList = "";
            orderList = "[{\"i\":20979,\"c\":\"" + c + "\",\"n\":" + n + ",\"t\":" + t + ",\"k\":0,\"m\":" + Settings.hszl.m + ",\"a\":" + a + "}]";
            return(orderList);
        }
Ejemplo n.º 3
0
        public string BJSCHandler(string msg, string curMoney, string profit, out decimal a)
        {
            string[] info = GetInfos(msg, Settings.rules.BJSCInfoRules);

            if (info[0] == "" || info[1] == "" || info[2] == "")
            {
                a = 0;
                return(Settings.error.ZZ_ERROR);
            }
            else
            {
                //重复订单
                if (Enumerable.SequenceEqual <string>(info, oldInfos[3]))
                {
                    a = 0;
                    return(Settings.error.REPEAT_ERROR);
                }
                else
                {
                    oldInfos[3] = info;
                }
            }
            var curQi   = info[0];
            var recNums = info[1];
            var recBei  = int.Parse(info[2]);

            LogSystem.CountRecord(Settings.GameType.BJSC, recBei);


            //c代表推荐的数字
            string c = recNums;

            //t代表倍数  不同模式倍数不用
            int t = GetFinalT(recBei, Settings.bjsc.startBeishu, Settings.bjsc.maxBeishu, Settings.bjsc.flag);


            //n代表下注个数
            int n = 5;

            //a代表下注金额
            a = GetFinalA(Settings.bjsc.m, t, n);

            //如果下注金额大于当前余额取消下注
            float curM = float.Parse(curMoney);

            if (a > (decimal)curM)
            {
                var mm = a;
                a = 0;
                return("下注失败\n下注所需金额:" + mm.ToString() + ",余额:" + curMoney);
            }

            //日志记录
            var log = "[北京赛车]" + "\r\n期数:" + curQi + "\r推荐数字:" + c + "  推荐倍数:" + recBei + "  实际倍数:" + t + "\r\n投注前余额:" + curMoney + "元,投注前利润:" + profit + "元";

            LogSystem.Record(log);

            if (Settings.bjsc.flag == 1)
            {
                if (recBei > Settings.bjsc.maxBeishu)
                {
                    return("订单创建失败!\n推荐倍数:" + recBei + "\n设定最大倍数:" + Settings.bjsc.maxBeishu);
                }
            }
            else if (Settings.bjsc.flag == 2)
            {
                if (t > Settings.bjsc.maxBeishu || recBei < Settings.bjsc.startBeishu)
                {
                    return("订单创建失败!\n推荐倍数:" + recBei + "\n开始投注倍数:" + Settings.bjsc.startBeishu + "\n设定最大倍数:" + Settings.bjsc.maxBeishu);
                }
            }

            //  orderList = "";
            orderList = "[{\"i\":21120,\"c\":\"" + c + "\",\"n\":" + n + ",\"t\":" + t + ",\"k\":0,\"m\":" + Settings.bjsc.m + ",\"a\":" + a + "}]";
            return(orderList);
        }
Ejemplo n.º 4
0
        public string DDHandler2(string msg, string curMoney, string profit, out decimal a)
        {
            string[] info = GetInfos2(msg, Settings.rules.DDInfoRules2);
            if (info[0] == "" || info[1] == "")
            {
                a = 0;
                return(Settings.error.ZZ_ERROR);
            }


            var recNums = info[0];
            var recNum  = recNums[0];
            var recBei  = int.Parse(info[1]);

            LogSystem.CountRecord(Settings.GameType.DD, recBei);

            //c代表推荐的数字
            string c = "";

            c = recNum.ToString();

            //t代表倍数
            int t = GetFinalT(recBei, Settings.dd.startBeishu, Settings.dd.maxBeishu, Settings.dd.flag);


            //n代表下注个数
            int n = 5;

            //a代表下注金额
            a = GetFinalA(Settings.dd.m, t, n);

            //如果下注金额大于当前余额取消下注
            float curM = float.Parse(curMoney);

            if (a > (decimal)curM)
            {
                var mm = a;
                a = 0;
                return("下注失败\n下注所需金额:" + mm.ToString() + ",余额:" + curMoney);
            }

            //日志记录
            var log = "[独胆]" + "\r\n推荐数字:" + recNums + "  推荐倍数:" + recBei + "  实际倍数:" + t + "\r\n投注前余额:" + curMoney + "元,投注前利润:" + profit + "元";

            LogSystem.Record(log);

            if (Settings.dd.flag == 1)
            {
                if (recBei > Settings.dd.maxBeishu)
                {
                    return("订单创建失败!\n推荐倍数:" + recBei + "\n设定最大倍数:" + Settings.dd.maxBeishu);
                }
            }
            else if (Settings.dd.flag == 2)
            {
                if (t > Settings.dd.maxBeishu || recBei < Settings.dd.startBeishu)
                {
                    return("订单创建失败!\n推荐倍数:" + recBei + "\n开始投注倍数:" + Settings.dd.startBeishu + "\n设定最大倍数:" + Settings.dd.maxBeishu);
                }
            }

            var tmpA = a / 5;

            n = n / 5;
            //  orderList = "";
            orderList = "[{\"i\":21014,\"c\":\"" + c + "\",\"n\":" + n + ",\"t\":" + t + ",\"k\":0,\"m\":" + Settings.dd.m + ",\"a\":" + tmpA + "},"
                        + "{\"i\":21015,\"c\":\"" + c + "\",\"n\":" + n + ",\"t\":" + t + ",\"k\":0,\"m\":" + Settings.dd.m + ",\"a\":" + tmpA + "},"
                        + "{\"i\":21016,\"c\":\"" + c + "\",\"n\":" + n + ",\"t\":" + t + ",\"k\":0,\"m\":" + Settings.dd.m + ",\"a\":" + tmpA + "},"
                        + "{\"i\":21017,\"c\":\"" + c + "\",\"n\":" + n + ",\"t\":" + t + ",\"k\":0,\"m\":" + Settings.dd.m + ",\"a\":" + tmpA + "},"
                        + "{\"i\":21018,\"c\":\"" + c + "\",\"n\":" + n + ",\"t\":" + t + ",\"k\":0,\"m\":" + Settings.dd.m + ",\"a\":" + tmpA + "}]";

            return(orderList);
        }