C 實現微信跳一跳的外掛程式

2021-08-14 19:45:21 字數 2756 閱讀 2114

#include #include "atlimage.h"  

#include #include#include#define width (720/2)

#define height (1280/2)

hdc hdc,memdc; //視窗繪圖控制代碼

hwnd hwnd;

hbitmap bmp; //空位圖

hbitmap bmp; //截圖

cimage image;

bool init(hwnd hwnd);

void run(hwnd hwnd);

lresult callback wndproc(hwnd hwnd, uint message, wparam wparam, lparam lparam);

int winapi winmain(hinstance hinstance, hinstance prehinstance,

lpstr lpcmdline, int nshowcmd)

; //定義乙個視窗

wnd.cbsize = sizeof(wndclas***); //視窗應該占用記憶體

wnd.hinstance = hinstance; //程式的當前例項控制代碼

wnd.style = cs_dropshadow;

wnd.hbrbackground = (hbrush)5; //背景顏色

wnd.hcursor = loadcursor(null, idc_arrow);//滑鼠樣式

wnd.hicon = null; //程式的圖示

wnd.cbcl***tra = 0; //程式的附加記憶體

wnd.cbwndextra = 0; //視窗的附加記憶體

wnd.lpszmenuname = null; //選單

wnd.lpszclassname = l"jump"; //視窗的類名稱

wnd.lpfnwndproc = wndproc; //視窗的過程函式

registerclas***(&wnd); //檢查視窗是否可用

system("mode con cols=5 lines=5 ");

hwnd hwnd = createwindow(l"jump", l"跳一跳外掛程式", ws_caption | ws_sysmenu,

1100, 1,200, 0,

null, null, hinstance, null);

showwindow(hwnd, nshowcmd);

updatewindow(hwnd);

if (!init(hwnd))

return 0;

msg msg = ;

while (msg.message != wm_quit)

else

run(hwnd);

} unregisterclass(null, wnd.hinstance); //程式準備結束,登出視窗類

return 0;

}lresult callback wndproc(hwnd hwnd, uint message, wparam wparam, lparam lparam)

return defwindowproc(hwnd, message, wparam, lparam);

}//遊戲的初始化

bool init(hwnd hwnd)

void getrgb(const colorref color, byte &r, byte &g, byte &b)

//把背景改為純色

void turncolor(hdc &memdc)

}point endpt = , stratpt = ;

void identification(hdc &memdc)

} if (!find) break;

} //找下乙個物體中點

int tempx=0;

for (int y = endpt.y+10; y < endpt.y + 60; y++)

break;

}} if (find)

break;

}//找人的位置

colorref blk = 0;

for (int y = (int)(height*0.35); y < (int)(height*0.75); y++)

for (int x = int(width*0.2); x < int(width*0.8); x++)

; int dis = (int)(sqrt((stratpt.x - endpt.x)*(stratpt.x - endpt.x) +

(stratpt.y - endpt.y)*(stratpt.y - endpt.y)) * 3 * 1.35);

srand((unsigned int)time(null));

int arr[4];

for (int i = 0; i < 4; i++)

arr[i] = rand() % 300;

sprintf_s(str, "adb shell input swipe %d %d %d %d %d",arr[0],arr[1]+200,arr[2],arr[3]+300, dis);

system(str);

sleep(dis);

return;}}

}}}

void run(hwnd hwnd)

微信跳一跳python 微信跳一跳Python

1 安裝python,我用的是python2.7 5.安裝pillow,放在scripts資料夾中,通過 pip install pillow安裝 6.安裝adb工具包,可以直接放在專案 的資料夾裡面,或者放在c盤目錄不過要配置一下環境變數,我這裡是直接放在專案 資料夾中。內建了cmd 命令 7.把...

微信跳一跳輔助

background pos distance to time ratio 1.35 screenshot path tempfile.gettempdir screenshot.png def calculate jump distance im image.open screenshot pat...

python 微信跳一跳

因為是基於python的指令碼所以要先安裝python 這裡有教程 點選這裡 安裝好之後開始下面的操作 這裡是對adb的解釋 2.安裝好之後將安裝路徑配置到環境變數中 注意 路徑後加 英文格式的 號,例如d adb 3.快捷鍵win r開啟cmd win鍵即ctrl和alt中間那個鍵 輸入 adb出...