Example #1
0
 private void Button3_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 59; i++)
     {
         HookCall.UseItem(player.hWnd, 0, 0);
         Thread.Sleep(20);
         HookCall.SelectLineMenu(player.hWnd, 8u, AutoClient.MenuID(player.HProcess));
         Thread.Sleep(20);
         HookCall.SelectLineMenu(player.hWnd, 3u, AutoClient.MenuID(player.HProcess));
         Thread.Sleep(20);
     }
     for (int j = 0; j < 6; j++)
     {
         for (int k = 0; k < 12; k++)
         {
             if (j != 0 || k != 0)
             {
                 HookCall.UseItem(player.hWnd, j, k);
                 Thread.Sleep(20);
                 HookCall.UseItem(player.hWnd, 0, 0);
                 Thread.Sleep(20);
                 HookCall.SelectLineMenu(player.hWnd, 8u, AutoClient.MenuID(player.HProcess));
                 Thread.Sleep(20);
                 HookCall.SelectLineMenu(player.hWnd, 3u, AutoClient.MenuID(player.HProcess));
                 Thread.Sleep(20);
             }
         }
     }
     for (int l = 0; l < 20; l++)
     {
         HookCall.CloseMenu(player.hWnd);
     }
     getMT();
 }
Example #2
0
 private void Button2_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < (int)numericUpDown1.Value; i++)
     {
         Player.Item item = listItem.FirstOrDefault((Player.Item x) => x.Name == comboBox1.Text);
         HookCall.UseItem(player.hWnd, item.cot, item.hang);
         Thread.Sleep(20);
         if (comboBox2.Text != "Không Sử Dụng")
         {
             string s    = comboBox2.Text.Split(' ')[1];
             int    line = int.Parse(s) - 1;
             HookCall.SelectLineMenu(player.hWnd, (uint)line, AutoClient.MenuID(player.HProcess));
             Thread.Sleep(20);
         }
         if (comboBox3.Text != "Không Sử Dụng")
         {
             string s2    = comboBox3.Text.Split(' ')[1];
             int    line2 = int.Parse(s2) - 1;
             HookCall.SelectLineMenu(player.hWnd, (uint)line2, AutoClient.MenuID(player.HProcess));
             Thread.Sleep(20);
         }
         if (comboBox4.Text != "Không Sử Dụng")
         {
             string s3    = comboBox4.Text.Split(' ')[1];
             int    line3 = int.Parse(s3) - 1;
             HookCall.SelectLineMenu(player.hWnd, (uint)line3, AutoClient.MenuID(player.HProcess));
             Thread.Sleep(20);
         }
         if (comboBox5.Text != "Không Sử Dụng")
         {
             string s4    = comboBox5.Text.Split(' ')[1];
             int    line4 = int.Parse(s4) - 1;
             HookCall.SelectLineMenu(player.hWnd, (uint)line4, AutoClient.MenuID(player.HProcess));
             Thread.Sleep(20);
         }
         if (comboBox6.Text != "Không Sử Dụng")
         {
             string s5    = comboBox6.Text.Split(' ')[1];
             int    line5 = int.Parse(s5) - 1;
             HookCall.SelectLineMenu(player.hWnd, (uint)line5, AutoClient.MenuID(player.HProcess));
             Thread.Sleep(20);
         }
         if (comboBox7.Text != "Không Sử Dụng")
         {
             string s6    = comboBox7.Text.Split(' ')[1];
             int    line6 = int.Parse(s6) - 1;
             HookCall.SelectLineMenu(player.hWnd, (uint)line6, AutoClient.MenuID(player.HProcess));
             Thread.Sleep(20);
         }
     }
 }
Example #3
0
 private void ThreadLuyenMT()
 {
     isloop = true;
     while (isloop)
     {
         for (int i = 0; i < 59; i++)
         {
             HookCall.UseItem(player.hWnd, 0, 0);
             Thread.Sleep(20);
             HookCall.SelectLineMenu(player.hWnd, 8, AutoClient.MenuID(player.HProcess)); //chọn dòng - 8
             Thread.Sleep(20);
             HookCall.SelectLineMenu(player.hWnd, 0, AutoClient.MenuID(player.HProcess)); // chọn dòng thứ 2 - 0
             Thread.Sleep(20);
         }
         for (int j = 0; j < 6; j++)
         {
             for (int k = 0; k < 12; k++)
             {
                 if (j != 0 || k != 0)
                 {
                     HookCall.UseItem(player.hWnd, j, k);
                     Thread.Sleep(20);
                     HookCall.UseItem(player.hWnd, 0, 0);
                     Thread.Sleep(20);
                     HookCall.SelectLineMenu(player.hWnd, 8u, AutoClient.MenuID(player.HProcess));
                     Thread.Sleep(20);
                     HookCall.SelectLineMenu(player.hWnd, 3u, AutoClient.MenuID(player.HProcess));
                     Thread.Sleep(20);
                 }
             }
         }
         listView1.Invoke((MethodInvoker) delegate
         {
             listView1.Items.Clear();
             getMT();
         });
         BanMT();
     }
 }
Example #4
0
    private void ThreadTayKX()
    {
        isloop = true;
        string name = "";
        uint   num  = 0u;
        int    num2 = 0;

        while (isloop)
        {
            listItem.Clear();
            comboBox1.Invoke((MethodInvoker) delegate
            {
                name = comboBox1.Text;
            });
            num = ((!isLuyenLo) ? ttoffsetKX(name) : lloffsetKX(name));
            if (AutoClient.BaseMenu(player.HProcess) != 0)
            {
                do
                {
                    HookCall.CloseMenu(player.hWnd);
                    Thread.Sleep(100);
                    HookCall.CloseMenu(player.hWnd);
                }while (AutoClient.BaseMenu(player.HProcess) != 0);
            }
            HookCall.taykx5(player.hWnd, num, 78u);
            Thread.Sleep(700 - speed);
            listItem.AddRange(AutoClient.GetItemList(player.HProcess));
            if (num2 == 50)
            {
                num2 = 0;
                foreach (Player.Item item2 in listItem)
                {
                    if (item2.Name == "Thẻ Trải Nghiệm")
                    {
                        HookCall.UseItem(player.hWnd, item2.cot, item2.hang);
                        Thread.Sleep(20);
                        HookCall.SelectLineMenu(player.hWnd, 12u, AutoClient.MenuID(player.HProcess));
                        do
                        {
                            HookCall.CloseMenu(player.hWnd);
                            Thread.Sleep(10);
                            HookCall.CloseMenu(player.hWnd);
                        }while (AutoClient.BaseMenu(player.HProcess) != 0);
                    }
                }
            }
            int kxcap = GetCapKX(name);
            if (!listItem.Exists((Player.Item x) => x.Name.Contains("Tẩy Tâm Thạch cấp " + kxcap) && x.type == 2) && isTayTam)
            {
                foreach (Player.Item item3 in listItem)
                {
                    if (item3.Name == "Thẻ Trải Nghiệm")
                    {
                        for (int i = 0; i < 11; i++)
                        {
                            HookCall.UseItem(player.hWnd, item3.cot, item3.hang);
                            Thread.Sleep(20);
                            HookCall.SelectLineMenu(player.hWnd, 13u, AutoClient.MenuID(player.HProcess));
                            Thread.Sleep(20);
                            HookCall.SelectLineMenu(player.hWnd, 9u, AutoClient.MenuID(player.HProcess));
                            Thread.Sleep(20);
                        }
                        Thread.Sleep(100);
                        do
                        {
                            HookCall.CloseMenu(player.hWnd);
                            Thread.Sleep(100);
                            HookCall.CloseMenu(player.hWnd);
                        }while (AutoClient.BaseMenu(player.HProcess) != 0);
                    }
                }
            }
            if (!listItem.Exists((Player.Item x) => x.Name.Contains("Luyện Lô Thiết cấp " + kxcap) && x.type == 2) && isLuyenLo)
            {
                foreach (Player.Item item4 in listItem)
                {
                    if (item4.Name == "Thẻ Trải Nghiệm")
                    {
                        for (int j = 0; j < 11; j++)
                        {
                            HookCall.UseItem(player.hWnd, item4.cot, item4.hang);
                            Thread.Sleep(20);
                            HookCall.SelectLineMenu(player.hWnd, 13u, AutoClient.MenuID(player.HProcess));
                            Thread.Sleep(20);
                            HookCall.SelectLineMenu(player.hWnd, 9u, AutoClient.MenuID(player.HProcess));
                            Thread.Sleep(20);
                        }
                        Thread.Sleep(100);
                        do
                        {
                            HookCall.CloseMenu(player.hWnd);
                            Thread.Sleep(100);
                            HookCall.CloseMenu(player.hWnd);
                        }while (AutoClient.BaseMenu(player.HProcess) != 0);
                    }
                }
            }
            if (isTayTam && !listItem.Exists((Player.Item x) => x.Name.Contains("Tẩy Tâm Thạch cấp " + kxcap) && x.type == 8))
            {
                foreach (Player.Item item5 in listItem)
                {
                    if (item5.Name.Contains("Tẩy Tâm Thạch cấp " + kxcap) && item5.type == 2)
                    {
                        HookCall.PickNPutItem(player.hWnd, item5.type, item5.cot, item5.hang, 8u, 1u, 0u, AutoClient.AddressItemLocation(player.HProcess));
                        break;
                    }
                }
            }
            if (isLuyenLo && !listItem.Exists((Player.Item x) => x.Name.Contains("Luyện Lô Thiết cấp " + kxcap) && x.type == 8))
            {
                foreach (Player.Item item6 in listItem)
                {
                    if (item6.Name.Contains("Luyện Lô Thiết cấp " + kxcap) && item6.type == 2)
                    {
                        HookCall.PickNPutItem(player.hWnd, item6.type, item6.cot, item6.hang, 8u, 1u, 0u, AutoClient.AddressItemLocation(player.HProcess));
                        break;
                    }
                }
            }
            foreach (Player.Item item in listItem.Where((Player.Item x) => x.Name == name))
            {
                if (item.Name == name && item.type != 8 && isTayTam && !listItemOld.Exists((Player.Item x) => x.id == item.id) && item.type != 3)
                {
                    if ((item.itemdong1 == (int)numericUpDown1.Value || (int)numericUpDown1.Value == 0) && (item.itemdong2 == (int)numericUpDown2.Value || (int)numericUpDown2.Value == 0) && (item.itemdong3 == (int)numericUpDown3.Value || (int)numericUpDown3.Value == 0) && (GetOpKX(d1) == 0 || item.itemdong1_O == GetOpKX(d1)) && (GetOpKX(d2) == 0 || item.itemdong2_O == GetOpKX(d2)) && (GetOpKX(d3) == 0 || item.itemdong3_O == GetOpKX(d3)))
                    {
                        HookCall.taykx5(player.hWnd, num, 79u);
                        button2.Invoke((MethodInvoker) delegate
                        {
                            button2.Text = "Start";
                        });
                        isloop = false;
                        return;
                    }
                }
                else if (item.Name == name && item.type != 8 && isLuyenLo && !listItemOld.Exists((Player.Item x) => x.id == item.id) && item.type != 3 && (item.itemdong4 == (int)numericUpDown1.Value || (int)numericUpDown1.Value == 0) && (item.itemdong5 == (int)numericUpDown2.Value || (int)numericUpDown2.Value == 0) && (item.itemdong6 == (int)numericUpDown3.Value || (int)numericUpDown3.Value == 0) && (GetOpKX(d1) == 0 || item.itemdong4_O == GetOpKX(d1)) && (GetOpKX(d2) == 0 || item.itemdong5_O == GetOpKX(d2)) && (GetOpKX(d3) == 0 || item.itemdong6_O == GetOpKX(d3)))
                {
                    HookCall.taykx5(player.hWnd, num, 79u);
                    button2.Invoke((MethodInvoker) delegate
                    {
                        button2.Text = "Start";
                    });
                    isloop = false;
                    return;
                }
            }
            int num3 = 0;
            while (true)
            {
IL_0afe:
                HookCall.taykx5(player.hWnd, num, 80u);
                Thread.Sleep(500 - speed);
                foreach (Player.Item item7 in AutoClient.GetItemList(player.HProcess))
                {
                    if (item7.Name == name && item7.type != 1 && item7.type != 2 && item7.type != 3 && item7.type != 7 && item7.type != 8)
                    {
                        num3++;
                        goto IL_0afe;
                    }
                    if (num3 > 300)
                    {
                        button2.Invoke((MethodInvoker) delegate
                        {
                            button2.Text = "Start";
                        });
                        MessageBox.Show("LAGGGGGGGGGGGGGG!!!");
                        return;
                    }
                }
                break;
            }
            num2++;
        }
    }
Example #5
0
 public void ThreadRunAutoClien()
 {
     while (!Exit && WinAPI.IsWindow(hWnd))
     {
         player.Address = AutoClient.AddressPlayer(player.HProcess);
         if (player.Name() != "" && player.Hp() != 0)
         {
             if (player.isSell && IsChecked && player.sellitemlist.Count > 0)
             {
                 foreach (Player.Item item in AutoClient.GetItemList(player.HProcess))
                 {
                     if (item.type != 2)
                     {
                         continue;
                     }
                     foreach (Player.Item item2 in player.sellitemlist)
                     {
                         if (item2.Name == item.Name)
                         {
                             HookCall.BanItem(hWnd, item.id);
                             break;
                         }
                     }
                 }
             }
             if (player.isBuff && IsChecked && (ulong)_time % 15uL == 0)
             {
             }
             if (IsChecked)
             {
                 HookCall.Uplvl(player.hWnd);
                 Thread.Sleep(10);
             }
             if (IsChecked && player.isKsTui)
             {
                 AutoClient.KsTui(this);
                 Thread.Sleep(10);
             }
             if (IsChecked && player.isBaoDanh)
             {
                 foreach (Player.NPCinfo nPC in AutoClient.GetNPCList(player.HProcess))
                 {
                     if (nPC.Name == player.NPCBB_Name && player.isDBCTC)
                     {
                         HookCall.ClickNpc(player.hWnd, nPC.id, player.Address);
                         Thread.Sleep(20);
                         HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                         Thread.Sleep(20);
                         HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                     }
                     if (nPC.Name == player.NPCBB_Name && !player.isDBCTC)
                     {
                         HookCall.ClickNpc(player.hWnd, nPC.id, player.Address);
                         Thread.Sleep(20);
                         if (player.CTP_Name == "Thôn Trang")
                         {
                             HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                             Thread.Sleep(20);
                             HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                         }
                         else if (player.CTP_Name == "Tài Nguyên")
                         {
                             HookCall.SelectLineMenu(player.hWnd, 1u, AutoClient.MenuID(player.HProcess));
                             Thread.Sleep(20);
                             HookCall.SelectLineMenu(player.hWnd, 1u, AutoClient.MenuID(player.HProcess));
                         }
                         else if (player.CTP_Name == "Pháo Đài")
                         {
                             HookCall.SelectLineMenu(player.hWnd, 2u, AutoClient.MenuID(player.HProcess));
                             Thread.Sleep(20);
                             HookCall.SelectLineMenu(player.hWnd, 2u, AutoClient.MenuID(player.HProcess));
                         }
                     }
                 }
             }
         }
         Thread.Sleep(100);
     }
 }
Example #6
0
 public void otrongcay()
 {
     while (player.isTrongCay)
     {
         List <Player.NPCinfo> nPCList = AutoClient.GetNPCList(player.HProcess);
         bool hG  = player.TrongCaylist.HG;
         bool bNN = player.TrongCaylist.BNN;
         bool bNL = player.TrongCaylist.BNL;
         if (nPCList.Exists((Player.NPCinfo x) => x.Name.Contains(player.Name() + " trồng ")))
         {
             foreach (Player.Item item in AutoClient.GetItemList(player.HProcess))
             {
                 if (item.Name == "Hạt giống" && hG)
                 {
                     HookCall.UseItem(player.hWnd, item.cot, item.hang);
                     Thread.Sleep(50);
                     HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                 }
                 if (item.Name == "Cây Bát Nhã nhỏ" && bNN)
                 {
                     HookCall.UseItem(player.hWnd, item.cot, item.hang);
                     Thread.Sleep(50);
                     HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                 }
                 if (item.Name == "Cây Bát Nhã lớn" && bNL)
                 {
                     HookCall.UseItem(player.hWnd, item.cot, item.hang);
                     Thread.Sleep(50);
                     HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                 }
             }
             foreach (Player.NPCinfo item2 in nPCList)
             {
                 if (item2.Name.Contains(player.Name() + " trồng "))
                 {
                     HookCall.ClickNpc(player.hWnd, item2.id, player.Address);
                     Thread.Sleep(50);
                     HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                 }
             }
         }
         else
         {
             foreach (Player.Item item3 in AutoClient.GetItemList(player.HProcess))
             {
                 if (item3.Name == "Hạt giống" && hG)
                 {
                     HookCall.UseItem(player.hWnd, item3.cot, item3.hang);
                     Thread.Sleep(50);
                     HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                 }
                 if (item3.Name == "Cây Bát Nhã nhỏ" && bNN)
                 {
                     HookCall.UseItem(player.hWnd, item3.cot, item3.hang);
                     Thread.Sleep(50);
                     HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                 }
                 if (item3.Name == "Cây Bát Nhã lớn" && bNL)
                 {
                     HookCall.UseItem(player.hWnd, item3.cot, item3.hang);
                     Thread.Sleep(50);
                     HookCall.SelectLineMenu(player.hWnd, 0u, AutoClient.MenuID(player.HProcess));
                 }
             }
         }
         Thread.Sleep(50);
         CloseMenu();
         Thread.Sleep(5000);
     }
 }