1. 程式人生 > >原創,微信跳一跳外掛源碼、熱門遊戲,輕松上千分

原創,微信跳一跳外掛源碼、熱門遊戲,輕松上千分

鼠標右鍵 abs control set rsh ptr img left 版本

看到別人跳一跳搞了很多分。

我也跳一下。最高分才十幾分,被別人秒殺。

於是制作這個外掛,能夠輕松上千分。

原理很簡單,計算出兩點距離,測試出按下的時間,就可以了。

現在開始嘍

當然是免費!!!

軟件開發技術交流:自強不息QQ:1222698

(跳一跳技術交流就算了,我只玩了幾分鐘而已。)

第零步、看看效果,我幾分鐘就跳了2000多分。

技術分享圖片

技術分享圖片

第一步、下載安裝手遊助手,騰訊官網:http://syzs.qq.com/

技術分享圖片

第二步、安裝微信、登錄、手機驗證

技術分享圖片

第三步、打開遊戲,打開輔助工具

技術分享圖片技術分享圖片

第四步、把鼠標放在跳跳人的腳下,按下空格鍵

技術分享圖片

第五步、把鼠標放在目標位置,按下空格鍵

技術分享圖片

第六步、2018年,元旦快樂!

技術分享圖片

下載地址:https://files.cnblogs.com/files/bhss/%E8%B7%B3%E5%A4%A7%E7%A5%9E-v0.1.1.rar

源碼地址:https://files.cnblogs.com/files/bhss/%E8%B7%B3%E5%A4%A7%E7%A5%9E-v0.1.1.rar

源碼是vs2015開發,net2.0,可以用vs2005 2008 2010 2013 版本打開

源代碼講解

第1部分:熱鍵管理

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;

namespace Tyt
{

    public class AppHotKey
    {
        [DllImport("kernel32.dll")]
        public static extern uint GetLastError();
        //如果函數執行成功,返回值不為0。  
        //如果函數執行失敗,返回值為0。要得到擴展錯誤信息,調用GetLastError。  
        [DllImport("user32.dll", SetLastError = true)]
        public static extern bool RegisterHotKey(
            IntPtr hWnd,                //要定義熱鍵的窗口的句柄  
            int id,                     //定義熱鍵ID(不能與其它ID重復)            
            KeyModifiers fsModifiers,   //標識熱鍵是否在按Alt、Ctrl、Shift、Windows等鍵時才會生效  
            Keys vk                     //定義熱鍵的內容  
            );

        [DllImport("user32.dll", SetLastError = true)]
        public static extern bool UnregisterHotKey(
            IntPtr hWnd,                //要取消熱鍵的窗口的句柄  
            int id                      //要取消熱鍵的ID  
            );

        //定義了輔助鍵的名稱(將數字轉變為字符以便於記憶,也可去除此枚舉而直接使用數值)  
        [Flags()]
        public enum KeyModifiers
        {
            None = 0,
            Alt = 1,
            Ctrl = 2,
            Shift = 4,
            WindowsKey = 8
        }
        /// <summary>  
        /// 註冊熱鍵  
        /// </summary>  
        /// <param name="hwnd">窗口句柄</param>  
        /// <param name="hotKey_id">熱鍵ID</param>  
        /// <param name="keyModifiers">組合鍵</param>  
        /// <param name="key">熱鍵</param>  
        public static void RegKey(IntPtr hwnd, int hotKey_id, KeyModifiers keyModifiers, Keys key)
        {
            try
            {
                if (!RegisterHotKey(hwnd, hotKey_id, keyModifiers, key))
                {
                    if (Marshal.GetLastWin32Error() == 1409) { MessageBox.Show("熱鍵被占用 !"); }
                    else
                    {
                        MessageBox.Show("註冊熱鍵失敗!");
                    }
                }
            }
            catch (Exception) { }
        }
        /// <summary>  
        /// 註銷熱鍵  
        /// </summary>  
        /// <param name="hwnd">窗口句柄</param>  
        /// <param name="hotKey_id">熱鍵ID</param>  
        public static void UnRegKey(IntPtr hwnd, int hotKey_id)
        {
            //註銷Id號為hotKey_id的熱鍵設定  
            UnregisterHotKey(hwnd, hotKey_id);
        }
    }
}

  第2部分、按鍵管理

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace Tyt
{
    public class MouseHelper
    {
        [DllImport("user32.dll")]
        public static extern bool SetCursorPos(int X, int Y);



        [System.Runtime.InteropServices.DllImport("user32")]
        static extern int mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);

        const int MOUSEEVENTF_MOVE = 0x0001; //移動鼠標
        const int MOUSEEVENTF_LEFTDOWN = 0x0002; //模擬鼠標左鍵按下
        const int MOUSEEVENTF_LEFTUP = 0x0004; //模擬鼠標左鍵擡起
        const int MOUSEEVENTF_RIGHTDOWN = 0x0008; //模擬鼠標右鍵按下
        const int MOUSEEVENTF_RIGHTUP = 0x0010; //模擬鼠標右鍵擡起
        const int MOUSEEVENTF_MIDDLEDOWN = 0x0020; //模擬鼠標中鍵按下
        const int MOUSEEVENTF_MIDDLEUP = 0x0040; //模擬鼠標中鍵擡起
        const int MOUSEEVENTF_ABSOLUTE = 0x8000; //標示是否采用絕對坐標

        public static void Click()
        {
            mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        }
        public static void Move()
        {
            mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE, 0, 0, 0, 0);
        }
        public static void Down()
        {
            mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
        }
        public static void Up()
        {
            mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

        }


    }
}

  第3部分、核心代碼:跳一跳算法

        #region 基本操作
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            AppHotKey.RegKey(Handle, 1007, AppHotKey.KeyModifiers.None, Keys.Space);
        }
        protected override void WndProc(ref Message m)
        {
            const int WM_HOTKEY = 0x0312;
            switch (m.Msg)
            {
                case WM_HOTKEY:
                    switch (m.WParam.ToInt32())
                    {
                        case 1007:
                            Tiao();
                            break;
                    }
                    break;
            }
            base.WndProc(ref m);
        }

        #endregion

        #region 跳一跳
        void Tiao()
        {
            if (IsTiaoQian)
            {
                PointQian = new Point(Control.MousePosition.X, Control.MousePosition.Y);
            }
            else
            {
                TiaoHou();
            }
            IsTiaoQian = !IsTiaoQian;
        }
        void TiaoHou()
        {
                PointHou = new Point(Control.MousePosition.X, Control.MousePosition.Y);
            double len=Math.Sqrt((PointHou.X - PointQian.X) * (PointHou.X - PointQian.X) + 
                (PointHou.Y - PointQian.Y) * (PointHou.Y - PointQian.Y));
            int d= (int)(len * XiShu * 1000) ;
            if (d<=0)
            {
                MessageBox.Show("兩次點擊空格時,鼠標未移動。");
                return;
            }
            timer1.Interval = (int)(d * 1000);
            MouseHelper.SetCursorPos(PointHou.X, PointHou.Y);//開始跳
            MouseHelper.Down();
            timer1.Start();
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Stop();
            MouseHelper.Up();
        }
        #endregion

  

《完畢》

by 自強不息 qq1222698

原創,微信跳一跳外掛源碼、熱門遊戲,輕松上千分