Example #1
0
 public void method_13(int int_0, int int_1, int int_2)
 {
     if (int_2 != 0)
     {
         int num = this.class15_0.DUOC_KIEN_HANG_RONG(this.class15_0);
         if (num != -1)
         {
             byte[] bytes = BitConverter.GetBytes(RxjhClass.GetDBItmeId());
             this.class15_0.TANG_CUONG_VAT_PHAM_2(bytes, BitConverter.GetBytes(1700101), num, BitConverter.GetBytes(1), new byte[56]);
             this.method_1(int_0, 11, 2);
             this.method_12(int_0, 2);
             return;
         }
         this.method_1(int_0, 10, int_2);
     }
     else
     {
         if (int_1 == 1)
         {
             this.method_1(int_0, 11, int_2);
             return;
         }
         if (int_1 == 2)
         {
             this.method_1(int_0, 21, int_2);
             this.method_12(int_0, 1);
             return;
         }
         if (int_1 == 3)
         {
             this.method_1(int_0, 31, int_2);
             return;
         }
         if (int_1 == 5)
         {
             this.method_1(int_0, 51, int_2);
             return;
         }
     }
 }
Example #2
0
 public void method_14(int int_0, int int_1, int int_2)
 {
     if (int_2 != 0)
     {
         int num  = 0;
         int num1 = 0;
         int num2 = 0;
         int num3 = 0;
         int num4 = 0;
         for (int i = 0; i < 36; i++)
         {
             if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[i].VAT_PHAM_ID, 0) == 1000000161)
             {
                 num = 1;
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[i].VAT_PHAM_ID, 0) == 1000000162)
             {
                 num1 = 1;
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[i].VAT_PHAM_ID, 0) == 1000000163)
             {
                 num2 = 1;
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[i].VAT_PHAM_ID, 0) == 1000000164)
             {
                 num3 = 1;
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[i].VAT_PHAM_ID, 0) == 1000000199)
             {
                 num4 = 1;
             }
         }
         if (num == 0 || num1 == 0 || num2 == 0 || num3 == 0 || num4 == 0)
         {
             this.method_1(int_0, 12, int_2);
             return;
         }
         for (int j = 0; j < 36; j++)
         {
             if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[j].VAT_PHAM_ID, 0) == 1000000161)
             {
                 this.class15_0.LAM_GIAM_DI_VAT_PHAM(j, 1);
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[j].VAT_PHAM_ID, 0) == 1000000162)
             {
                 this.class15_0.LAM_GIAM_DI_VAT_PHAM(j, 1);
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[j].VAT_PHAM_ID, 0) == 1000000163)
             {
                 this.class15_0.LAM_GIAM_DI_VAT_PHAM(j, 1);
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[j].VAT_PHAM_ID, 0) == 1000000164)
             {
                 this.class15_0.LAM_GIAM_DI_VAT_PHAM(j, 1);
             }
             else if (BitConverter.ToInt32(this.class15_0.TRANG_BI_LAN_BAO_VAY[j].VAT_PHAM_ID, 0) == 1000000199)
             {
                 this.class15_0.LAM_GIAM_DI_VAT_PHAM(j, 1);
             }
         }
         int    num5  = this.class15_0.DUOC_KIEN_HANG_RONG(this.class15_0);
         byte[] bytes = BitConverter.GetBytes(RxjhClass.GetDBItmeId());
         this.class15_0.TANG_CUONG_VAT_PHAM(bytes, BitConverter.GetBytes(1000000365), num5, BitConverter.GetBytes(1), new byte[56]);
         this.method_1(int_0, 11, 2);
         this.method_12(int_0, 3);
     }
     else
     {
         if (int_1 == 1)
         {
             this.method_1(int_0, 11, int_2);
             return;
         }
         if (int_1 == 2)
         {
             this.method_1(int_0, 21, int_2);
             this.method_12(int_0, 1);
             return;
         }
         if (int_1 == 3)
         {
             this.method_1(int_0, 31, int_2);
             return;
         }
     }
 }
Example #3
0
        public void THOI_GIAN_KET_THUC_SU_KIEN3(object sender, ElapsedEventArgs e)
        {
            DateTime now;

            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "EventClass_THOI_GIAN_KET_THUC_SU_KIEN3");
            }
            try
            {
                DBA.ExeSqlCommand(string.Concat("DELETE FROM EventTop where PHAN_KHU_TIN_TUC='", World.Phan_khu_danh_so, "'"));
                foreach (EventTopClass value in World.EventTop.Values)
                {
                    DBA.ExeSqlCommand(string.Format("INSERT INTO EventTop (NHAN_VAT_TEN,BANG_PHAI,THE_LUC,DANG_CAP,GIET_NGUOI_SO,TU_VONG_SO,PHAN_KHU_TIN_TUC)values('{0}','{1}','{2}',{3},{4},{5},'{6}')", new object[] { value.string_0, value.string_1, value.THE_LUC, value.int_0, value.Kills, value.Dead, World.Phan_khu_danh_so }));
                }
                string empty = string.Empty;
                World.EventTop.Clear();
                if (World.THE_LUC_CHIEN_2_CHINH_PHAI_DIEM_SO > World.THE_LUC_CHIEN_2_TA_PHAI_DIEM_SO)
                {
                    this.THE_LUC_CHIEN_sj = 1;
                    World.SendMsg("Death loss of っ leave Iraq by Nan Yi Yi づ cut Bru village: the ignorant column");
                }
                else if (World.THE_LUC_CHIEN_2_CHINH_PHAI_DIEM_SO != World.THE_LUC_CHIEN_2_TA_PHAI_DIEM_SO)
                {
                    this.THE_LUC_CHIEN_sj = 2;
                    World.SendMsg("Death loss of っ Iraqi borrow clothes づ Yijianangua Bru village: through sister bright");
                }
                else
                {
                    this.THE_LUC_CHIEN_sj = 3;
                    World.SendMsg("Death loss of っ Iraqi borrow clothes づ Yijianangua Bru village: Suo Restraints");
                }
                foreach (Players player in World.allConnectedChars.Values)
                {
                    if (player.CharacterCoords_Map == 801)
                    {
                        player.GUI_DI_THE_LUC_CHIEN_KET_THUC_TIN_TUC(this.THE_LUC_CHIEN_sj);
                        if (player.Player_Zx == this.THE_LUC_CHIEN_sj)
                        {
                            if (World.The_luc_chien_khen_thuong_Loai_hinh == 1)
                            {
                                string[] strArrays  = World.The_luc_chien_khen_thuong_Thuoc_tinh.Split(new char[] { ';' });
                                string[] strArrays1 = World.Thang_cap_thanh_vien_can_Thuoc_tinh.Split(new char[] { ',' });
                                if (int.Parse(strArrays[0]) != 0)
                                {
                                    Players khenThuongThemVaoSinhMenh = player;
                                    khenThuongThemVaoSinhMenh.Khen_thuong_them_vao_sinh_menh = khenThuongThemVaoSinhMenh.Khen_thuong_them_vao_sinh_menh + long.Parse(strArrays[0]);
                                    player.GameMessage(string.Concat("life", long.Parse(strArrays[0])), 10, "Forces battle reward");
                                }
                                if (long.Parse(strArrays[1]) != 0 && player.Khen_thuong_them_vao_cong_kich < long.Parse(strArrays1[0]))
                                {
                                    Players khenThuongThemVaoCongKich = player;
                                    khenThuongThemVaoCongKich.Khen_thuong_them_vao_cong_kich = khenThuongThemVaoCongKich.Khen_thuong_them_vao_cong_kich + long.Parse(strArrays[1]);
                                    player.GameMessage(string.Concat("attack", long.Parse(strArrays[1])), 10, "Forces battle reward");
                                }
                                if (long.Parse(strArrays[2]) != 0 && player.Khen_thuong_them_vao_phong_ngu < long.Parse(strArrays1[1]))
                                {
                                    Players khenThuongThemVaoPhongNgu = player;
                                    khenThuongThemVaoPhongNgu.Khen_thuong_them_vao_phong_ngu = khenThuongThemVaoPhongNgu.Khen_thuong_them_vao_phong_ngu + long.Parse(strArrays[2]);
                                    player.GameMessage(string.Concat("defense", long.Parse(strArrays[2])), 10, "Forces battle reward");
                                }
                                if (int.Parse(strArrays[3]) != 0)
                                {
                                    Players khenThuongThemVaoNeTranh = player;
                                    khenThuongThemVaoNeTranh.Khen_thuong_them_vao_ne_tranh = khenThuongThemVaoNeTranh.Khen_thuong_them_vao_ne_tranh + int.Parse(strArrays[3]);
                                    player.GameMessage(string.Concat("avoid", int.Parse(strArrays[3])), 10, "Forces battle reward");
                                }
                                if (int.Parse(strArrays[4]) != 0)
                                {
                                    Players khenThuongThemVaoNoiCong = player;
                                    khenThuongThemVaoNoiCong.Khen_thuong_them_vao_noi_cong = khenThuongThemVaoNoiCong.Khen_thuong_them_vao_noi_cong + int.Parse(strArrays[4]);
                                    player.GameMessage(string.Concat("Neigong", int.Parse(strArrays[4])), 10, "Forces battle reward");
                                }
                                if (int.Parse(strArrays[5]) != 0)
                                {
                                    Players khenThuongThemVaoTrungMucTieu = player;
                                    khenThuongThemVaoTrungMucTieu.Khen_thuong_them_vao_trung_muc_tieu = khenThuongThemVaoTrungMucTieu.Khen_thuong_them_vao_trung_muc_tieu + int.Parse(strArrays[5]);
                                    player.GameMessage(string.Concat("Hit", int.Parse(strArrays[5])), 10, "Forces battle reward");
                                }
                                if (int.Parse(strArrays[6]) != 0 && player.FLD_RXPIONT != World.Nhan_vat_lon_nhat_CASH_so_luong)
                                {
                                    player.KIEM_TRA_BACH_BAO_CAC_NGUYEN_BAO_SO_LUONG();
                                    player.KIEM_SOAT_CASH_SO_LIEU(int.Parse(strArrays[6]), 1);
                                    player.GameMessage(string.Concat("Get", int.Parse(strArrays[6]), "Ingot!"), 10, "Forces battle reward");
                                    player.UPDATE_RXPIONT();
                                }
                                if (int.Parse(strArrays[7]) != 0)
                                {
                                    Players playerWuXun = player;
                                    playerWuXun.Player_WuXun = playerWuXun.Player_WuXun + int.Parse(strArrays[7]);
                                    player.GameMessage(string.Concat("Nhan duoc diem vo huan:  ", int.Parse(strArrays[7])), 10, World.ServerName);
                                    player.UpdatePowersAndStatus();
                                }
                                if (int.Parse(strArrays[8]) != 0)
                                {
                                    DateTime dateTime = DateTime.Now;
                                    now               = DateTime.Now;
                                    dateTime          = now.AddDays((double)int.Parse(strArrays[8]));
                                    player.FLD_VIP    = 1;
                                    player.FLD_VIPTIM = dateTime;
                                    player.LUU_THANH_VIEN_SO_LIEU();
                                    player.GameMessage(string.Concat("Congratulations, you get", int.Parse(strArrays[8]), "Day membership, please check the small back!"), 10, "Reward fighting forces");
                                }
                            }
                            else if (World.The_luc_chien_khen_thuong_Loai_hinh == 2)
                            {
                                int num = player.DUOC_KIEN_HANG_RONG(player);
                                if (num == -1)
                                {
                                    player.GameMessage("Please leave by empty backpack, send have AK IT!", 10, "Reward fighting forces");
                                    return;
                                }
                                else
                                {
                                    byte[] bytes    = BitConverter.GetBytes(RxjhClass.GetDBItmeId());
                                    byte[] numArray = new byte[56];
                                    player.TANG_CUONG_VAT_PHAM_1(bytes, BitConverter.GetBytes(World.The_luc_chien_khen_thuong_trang_phuc), num, BitConverter.GetBytes(1), numArray, false);
                                    player.GameMessage("Congratulations, you get a package, please check!", 10, "Reward fighting forces");
                                }
                            }
                            else if (World.The_luc_chien_khen_thuong_Loai_hinh == 3)
                            {
                                string[] strArrays2 = World.The_luc_chien_khen_thuong_Item.Split(new char[] { ';' });
                                int      num1       = player.DUOC_KIEN_HANG_RONG(player);
                                if (num1 == -1)
                                {
                                    player.GameMessage("Please leave an empty backpack, send you a mysterious gift Oh!", 10, "Reward fighting forces");
                                    return;
                                }
                                else
                                {
                                    player.BACH_BAO_TANG_CUONG_ITEM_MANG_THUOC_TINH(int.Parse(strArrays2[0]), num1, int.Parse(strArrays2[1]), int.Parse(strArrays2[2]), int.Parse(strArrays2[3]), int.Parse(strArrays2[4]), int.Parse(strArrays2[5]), int.Parse(strArrays2[6]), int.Parse(strArrays2[7]), int.Parse(strArrays2[8]), int.Parse(strArrays2[9]), int.Parse(strArrays2[10]), int.Parse(strArrays2[11]));
                                    player.GameMessage("Congratulations, you get a system of reward items, please check!", 10, "Reward fighting forces");
                                }
                            }
                        }
                    }
                    player.SendCountdown(5, 2, 0);
                }
                World.THE_LUC_CHIEN_2_TIEN_TRINH = 5;
                now         = DateTime.Now;
                this.kssjgj = now.AddMinutes(30);
                this.THOI_GIAN_3.Enabled = false;
                this.THOI_GIAN_3.Close();
                this.THOI_GIAN_3.Dispose();
                this.THOI_GIAN_4           = new System.Timers.Timer(60000);
                this.THOI_GIAN_4.Elapsed  += new ElapsedEventHandler(this.THOI_GIAN_KET_THUC_SU_KIEN4);
                this.THOI_GIAN_4.Enabled   = true;
                this.THOI_GIAN_4.AutoReset = true;
                this.THOI_GIAN_5           = new System.Timers.Timer(60000);
                this.THOI_GIAN_5.Elapsed  += new ElapsedEventHandler(this.THOI_GIAN_KET_THUC_SU_KIEN5);
                this.THOI_GIAN_5.Enabled   = true;
                this.THOI_GIAN_5.AutoReset = true;
            }
            catch (Exception exception)
            {
                Form1.WriteLine(1, string.Concat("势力战 THOI_GIAN_KET_THUC_SU_KIEN3 出错:", exception));
            }
        }
Example #4
0
        public void method_11(int int_0, int int_1, int int_2)
        {
            if (int_1 == 1)
            {
                if (this.class15_0.Player_FLD_LEVEL < 120 || this.class15_0.Player_Money < (long)1000000000)
                {
                    this.method_1(int_0, 10, int_2);
                }
                else
                {
                    this.method_1(int_0, 11, int_2);
                }
            }
            if (int_1 == 2)
            {
                if (this.class15_0.Player_FLD_JOB_LEVEL >= 7)
                {
                    return;
                }
                if (this.class15_0.Player_FLD_LEVEL < 120 || this.class15_0.Player_Money < (long)1000000000)
                {
                    this.method_1(int_0, 10, int_2);
                }
                else
                {
                    int num = this.class15_0.DUOC_KIEN_HANG_RONG(this.class15_0);
                    if (num != -1)
                    {
                        this.class15_0.NHAN_VAT_CHUYEN_NGHE_NGHIEP(this.class15_0.Player_Zx, 7);
                        this.method_1(int_0, 21, 1);
                        this.method_12(int_0, 1);
                        byte[] bytes = BitConverter.GetBytes(RxjhClass.GetDBItmeId());
                        int    num1  = 0;
                        switch (this.class15_0.Player_Job)
                        {
                        case 1:
                        {
                            if (this.class15_0.Player_Zx == 1)
                            {
                                num1 = 1000000388;
                                break;
                            }
                            else
                            {
                                num1 = 1000000394;
                                break;
                            }
                        }

                        case 2:
                        {
                            if (this.class15_0.Player_Zx == 1)
                            {
                                num1 = 1000000389;
                                break;
                            }
                            else
                            {
                                num1 = 1000000395;
                                break;
                            }
                        }

                        case 3:
                        {
                            if (this.class15_0.Player_Zx == 1)
                            {
                                num1 = 1000000390;
                                break;
                            }
                            else
                            {
                                num1 = 1000000396;
                                break;
                            }
                        }

                        case 4:
                        {
                            if (this.class15_0.Player_Zx == 1)
                            {
                                num1 = 1000000391;
                                break;
                            }
                            else
                            {
                                num1 = 1000000397;
                                break;
                            }
                        }

                        case 5:
                        {
                            if (this.class15_0.Player_Zx == 1)
                            {
                                num1 = 1000000392;
                                break;
                            }
                            else
                            {
                                num1 = 1000000398;
                                break;
                            }
                        }

                        case 6:
                        {
                            if (this.class15_0.Player_Zx == 1)
                            {
                                num1 = 1000000393;
                                break;
                            }
                            else
                            {
                                num1 = 1000000399;
                                break;
                            }
                        }
                        }
                        this.class15_0.TANG_CUONG_VAT_PHAM_2(bytes, BitConverter.GetBytes(num1), num, BitConverter.GetBytes(1), new byte[56]);
                        this.class15_0.UpdatePowersAndStatus();
                        this.class15_0.UpdateExperience();
                        this.class15_0.LAN_DAU_DOI_THOAI_DA_TRANG_BI_VAT_PHAM();
                        this.class15_0.UpdateMoneyAndWeight();
                    }
                    else
                    {
                        this.class15_0.GameMessage("Equipment bar no vacancy, please clean up", 9, "System");
                        this.method_1(int_0, 31, int_2);
                    }
                }
            }
            if (int_1 == 3)
            {
                this.method_1(int_0, 31, int_2);
            }
        }
Example #5
0
        public void jl(string string_0)
        {
            if (World.jlMsg == 1)
            {
                Form1.WriteLine(0, "EventClass-jl");
            }
            DataTable dBToDataTable = DBA.GetDBToDataTable(string.Format("Select * from [EventTop] where THE_LUC='{0}' Order By GIET_NGUOI_SO Desc,TU_VONG_SO Asc", string_0));

            if (dBToDataTable != null && dBToDataTable.Rows.Count > 0)
            {
                for (int i = 0; i < dBToDataTable.Rows.Count; i++)
                {
                    Players player = World.smethod_2(dBToDataTable.Rows[i]["NHAN_VAT_TEN"].ToString());
                    if (player != null)
                    {
                        foreach (TBL_XWWL_DROP tBLXWWLDROP in TBL_XWWL_DROP.smethod_0(i * (100 / dBToDataTable.Rows.Count)))
                        {
                            if (tBLXWWLDROP == null)
                            {
                                continue;
                            }
                            int fLDPID = tBLXWWLDROP.FLD_PID;
                            if (fLDPID > 800000002)
                            {
                                if (fLDPID == 800000013)
                                {
                                    Random random = new Random();
                                    int    num    = random.Next(8, 10);
                                    string str    = "0000";
                                    int    num1   = 0;
                                    num1 = random.Next(1, 3);
                                    string str1 = string.Concat(num.ToString(), str, num1);
                                    tBLXWWLDROP.FLD_MAGIC0 = int.Parse(str1);
                                }
                                else
                                {
                                    switch (fLDPID)
                                    {
                                    case 800000023:
                                    {
                                        tBLXWWLDROP.FLD_MAGIC0 = (new Random()).Next(700020, 700031);
                                        break;
                                    }

                                    case 800000024:
                                    {
                                        tBLXWWLDROP.FLD_MAGIC0 = (new Random()).Next(200018, 200026);
                                        break;
                                    }

                                    case 800000025:
                                    {
                                        tBLXWWLDROP.FLD_MAGIC0 = (new Random()).Next(1000005, 1000021);
                                        break;
                                    }

                                    case 800000026:
                                    {
                                        tBLXWWLDROP.FLD_MAGIC0 = (new Random()).Next(700015, 700026);
                                        break;
                                    }

                                    case 800000028:
                                    {
                                        int    num2 = (new Random()).Next(1, 7);
                                        string str2 = "000";
                                        string str3 = string.Concat("200", num2.ToString(), str2);
                                        tBLXWWLDROP.FLD_MAGIC0 = int.Parse(str3);
                                        break;
                                    }
                                    }
                                }
                            }
                            else if (fLDPID == 800000001)
                            {
                                tBLXWWLDROP.FLD_MAGIC0 = (new Random()).Next(100010, 100026);
                            }
                            else if (fLDPID == 800000002)
                            {
                                tBLXWWLDROP.FLD_MAGIC0 = (new Random()).Next(200010, 200021);
                            }
                            int num3 = player.DUOC_KIEN_HANG_RONG(player);
                            if (num3 == -1)
                            {
                                continue;
                            }
                            byte[] bytes     = BitConverter.GetBytes(tBLXWWLDROP.FLD_PID);
                            byte[] numArray  = BitConverter.GetBytes(1);
                            byte[] numArray1 = new byte[56];
                            byte[] bytes1    = BitConverter.GetBytes(RxjhClass.GetDBItmeId());
                            Buffer.BlockCopy(BitConverter.GetBytes(tBLXWWLDROP.FLD_MAGIC0), 0, numArray1, 0, 4);
                            Buffer.BlockCopy(BitConverter.GetBytes(tBLXWWLDROP.FLD_MAGIC1), 0, numArray1, 4, 4);
                            Buffer.BlockCopy(BitConverter.GetBytes(tBLXWWLDROP.FLD_MAGIC2), 0, numArray1, 8, 4);
                            Buffer.BlockCopy(BitConverter.GetBytes(tBLXWWLDROP.FLD_MAGIC3), 0, numArray1, 12, 4);
                            Buffer.BlockCopy(BitConverter.GetBytes(tBLXWWLDROP.FLD_MAGIC4), 0, numArray1, 16, 4);
                            player.TANG_CUONG_VAT_PHAM(bytes1, bytes, num3, numArray, numArray1);
                        }
                    }
                }
            }
        }