private void GetItemToolStripMenuItem_Click(object sender, EventArgs e)
 {
     listView1.Items.Clear();
     foreach (Player.Item item in AutoClient.GetItemList(player.HProcess))
     {
         if (item.type == 2 || item.type == 37)
         {
             ListViewItem value = new ListViewItem(new string[1]
             {
                 item.Name
             });
             listView1.Items.Add(value);
         }
     }
 }
Exemple #2
0
 private void Button1_Click(object sender, EventArgs e)
 {
     comboBox1.Items.Clear();
     listItem.Clear();
     foreach (Player.Item item in from x in AutoClient.GetItemList(player.HProcess)
              orderby x.id descending
              select x)
     {
         if (item.type == 2)
         {
             comboBox1.Items.Add(item.Name);
             listItem.Add(item);
         }
     }
     comboBox1.SelectedIndex = 0;
 }
 private void Button1_Click(object sender, EventArgs e)
 {
     comboBox1.Items.Clear();
     foreach (Player.Item item in from x in AutoClient.GetItemList(player.HProcess)
              orderby x.id descending
              select x)
     {
         if (item.type == 8 && !item.Name.Contains("Luyện Lô") && !item.Name.Contains("Tẩy Tâm"))
         {
             comboBox1.Items.Add(item.Name);
             oldKX.Name = item.Name;
             oldKX.id   = item.id;
         }
         listItemOld.Add(item);
     }
     comboBox1.SelectedIndex = 0;
 }
Exemple #4
0
    private void BanMT()
    {
        List <Player.Item> list = new List <Player.Item>();

        do
        {
            foreach (Player.Item item in listMT)
            {
                if (int.Parse(item.thanh) >= (int)numericUpDown1.Value && int.Parse(item.phuluc) >= (int)numericUpDown2.Value && int.Parse(item.MTdong1) >= (int)numericUpDown3.Value && int.Parse(item.MTdong2) >= (int)numericUpDown4.Value && int.Parse(item.MTdong3) >= (int)numericUpDown5.Value && int.Parse(item.MTdong4) >= (int)numericUpDown6.Value)
                {
                    button4.Invoke((MethodInvoker) delegate
                    {
                        button4.Text = "Auto Luyện";
                    });
                    isloop = false;
                    do
                    {
                        HookCall.CloseMenu(player.hWnd);
                        Thread.Sleep(100);
                    }while (AutoClient.BaseMenu(player.HProcess) != 0);
                    return;
                }
                list.Add(item);
            }
            foreach (Player.Item item2 in list)
            {
                HookCall.BanItem(player.hWnd, item2.id);
            }
            list.Clear();
            listMT.Clear();
            foreach (Player.Item item3 in AutoClient.GetItemList(player.HProcess))
            {
                if (int.Parse(item3.phuluc) != 0 && int.Parse(item3.phuluc) < 5 && item3.type == 2)
                {
                    listMT.Add(item3);
                }
            }
        }while (listMT.Count > 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++;
        }
    }
Exemple #6
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);
     }
 }
Exemple #7
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);
     }
 }
Exemple #8
0
    private void getMT()
    {
        int[] array = new int[4]
        {
            (int)numericUpDown3.Value,
            (int)numericUpDown4.Value,
            (int)numericUpDown5.Value,
            (int)numericUpDown6.Value
        };
        int num  = array[0];
        int num2 = 0;

        for (int i = 0; i < 4; i++)
        {
            if (array[i] > num)
            {
                num  = array[i];
                num2 = i;
            }
        }
        if (array[0] == 0 && array[1] == 0 && array[2] == 0 && array[3] == 0)
        {
            num2 = 4;
        }
        listView1.Items.Clear();
        listMT.Clear();
        List <Player.Item> list = new List <Player.Item>();

        switch (num2)
        {
        case 0:
            list.AddRange(from x in AutoClient.GetItemList(player.HProcess)
                          orderby x.MTdong1 descending
                          select x);
            break;

        case 1:
            list.AddRange(from x in AutoClient.GetItemList(player.HProcess)
                          orderby x.MTdong2 descending
                          select x);
            break;

        case 2:
            list.AddRange(from x in AutoClient.GetItemList(player.HProcess)
                          orderby x.MTdong3 descending
                          select x);
            break;

        case 3:
            list.AddRange(from x in AutoClient.GetItemList(player.HProcess)
                          orderby x.MTdong4 descending
                          select x);
            break;

        default:
            list.AddRange(from x in AutoClient.GetItemList(player.HProcess)
                          orderby x.phuluc descending
                          select x);
            break;
        }
        foreach (Player.Item item in list)
        {
            if (int.Parse(item.phuluc) != 0 && int.Parse(item.phuluc) < 5 && item.type == 2)
            {
                ListViewItem value = new ListViewItem(new string[7]
                {
                    item.Name,
                    item.thanh,
                    item.phuluc,
                    item.MTdong1,
                    item.MTdong2,
                    item.MTdong3,
                    item.MTdong4
                });
                listView1.Items.Add(value);
                listMT.Add(item);
            }
        }
    }