📄 directxhook.pas.svn-base
字号:
mouse_event(MOUSEEVENTF_MOVE,dword(-1),0,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 3: begin //mouse should be back at starting pos so: //move the mouse up 1 notch in the vertical direction mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,0,1,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 4: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationvertical1point:=position.y-mousecallibrationpreviouspos.y; mouse_event(MOUSEEVENTF_MOVE ,0,dword(-1),0,0); //move back and wait for next frame inc(mousecallibrationmode); end; //----------------------------------------------- //2 //----------------------------------------------- 5: begin // move the mouse 2 points on the x axis mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,2,0,0,0); inc(mousecallibrationmode); end; 6: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationhorizontal2point:=position.x-mousecallibrationpreviouspos.x; mouse_event(MOUSEEVENTF_MOVE,dword(-2),0,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 7: begin //mouse should be back at starting pos so: //move the mouse up 2 points in the vertical direction mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,0,2,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 8: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationvertical2point:=position.y-mousecallibrationpreviouspos.y; mouse_event(MOUSEEVENTF_MOVE ,0,dword(-2),0,0); //move back and wait for next frame inc(mousecallibrationmode); end; //------------------------------------------------------ //5 //------------------------------------------------------ 9: begin // move the mouse 5 points on the x axis mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,5,0,0,0); inc(mousecallibrationmode); end; 10: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationhorizontal5point:=position.x-mousecallibrationpreviouspos.x; mouse_event(MOUSEEVENTF_MOVE,dword(-5),0,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 11: begin //mouse should be back at starting pos so: //move the mouse up 5 points in the vertical direction mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,0,5,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 12: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationvertical5point:=position.y-mousecallibrationpreviouspos.y; mouse_event(MOUSEEVENTF_MOVE ,0,dword(-5),0,0); //move back and wait for next frame inc(mousecallibrationmode); end; //------------------------------------------------------ //10 //------------------------------------------------------ 13: begin // move the mouse 10 points on the x axis mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,10,0,0,0); inc(mousecallibrationmode); end; 14: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationhorizontal10point:=position.x-mousecallibrationpreviouspos.x; mouse_event(MOUSEEVENTF_MOVE,dword(-10),0,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 15: begin //mouse should be back at starting pos so: //move the mouse up 10 points in the vertical direction mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,0,10,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 16: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationvertical10point:=position.y-mousecallibrationpreviouspos.y; mouse_event(MOUSEEVENTF_MOVE ,0,dword(-10),0,0); //move back and wait for next frame inc(mousecallibrationmode); end; //------------------------------------------------------ //20 //------------------------------------------------------ 17: begin // move the mouse 20 points on the x axis mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,20,0,0,0); inc(mousecallibrationmode); end; 18: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationhorizontal20point:=position.x-mousecallibrationpreviouspos.x; mouse_event(MOUSEEVENTF_MOVE,dword(-20),0,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 19: begin //mouse should be back at starting pos so: //move the mouse up 20 points in the vertical direction mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,0,20,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 20: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationvertical20point:=position.y-mousecallibrationpreviouspos.y; mouse_event(MOUSEEVENTF_MOVE ,0,dword(-20),0,0); //move back and wait for next frame inc(mousecallibrationmode); end; //---------------------------------------- //40 //---------------------------------------- 21: begin // move the mouse 40 points on the x axis mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,40,0,0,0); inc(mousecallibrationmode); end; 22: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationhorizontal40point:=position.x-mousecallibrationpreviouspos.x; mouse_event(MOUSEEVENTF_MOVE,dword(-40),0,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 23: begin //mouse should be back at starting pos so: //move the mouse up 40 points in the vertical direction mousecallibrationpreviouspos:=position; mouse_event(MOUSEEVENTF_MOVE ,0,40,0,0); //move back and wait for next frame inc(mousecallibrationmode); end; 24: begin //the mouse has been moved and this is a updated scene //newpos-oldpos = change mousecallibrationvertical40point:=position.y-mousecallibrationpreviouspos.y; mouse_event(MOUSEEVENTF_MOVE ,0,dword(-40),0,0); //move back and wait for next frame mousespeedx[1]:=abs(mousecallibrationhorizontal1point); mousespeedx[2]:=abs(mousecallibrationhorizontal2point); mousespeedx[5]:=abs(mousecallibrationhorizontal5point); mousespeedx[10]:=abs(mousecallibrationhorizontal10point); mousespeedx[20]:=abs(mousecallibrationhorizontal20point); mousespeedx[40]:=abs(mousecallibrationhorizontal40point); mousespeedx[3]:=mousespeedx[1]+mousespeedx[2]; mousespeedx[4]:=mousespeedx[3]+((mousespeedx[5]-mousespeedx[2]) / 3); tempsingle:=(mousespeedx[10]-mousespeedx[5])/5; for i:=6 to 9 do mousespeedx[i]:=mousespeedx[5]+(i-5)*tempsingle; tempsingle:=(mousespeedx[20]-mousespeedx[10])/10; for i:=11 to 19 do mousespeedx[i]:=mousespeedx[10]+(i-10)*tempsingle; tempsingle:=(mousespeedx[40]-mousespeedx[20])/20; for i:=21 to 39 do mousespeedx[i]:=mousespeedx[20]+(i-20)*tempsingle; //y mousespeedy[1]:=abs(mousecallibrationvertical1point); mousespeedy[2]:=abs(mousecallibrationvertical2point); mousespeedy[5]:=abs(mousecallibrationvertical5point); mousespeedy[10]:=abs(mousecallibrationvertical10point); mousespeedy[20]:=abs(mousecallibrationvertical20point); mousespeedy[40]:=abs(mousecallibrationvertical40point); mousespeedy[3]:=mousespeedy[1]+mousespeedy[2]; mousespeedy[4]:=mousespeedy[3]+((mousespeedy[5]-mousespeedy[2]) / 3); tempsingle:=(mousespeedy[10]-mousespeedy[5])/5; for i:=6 to 9 do mousespeedy[i]:=mousespeedy[5]+(i-5)*tempsingle; tempsingle:=(mousespeedy[20]-mousespeedy[10])/10; for i:=11 to 19 do mousespeedy[i]:=mousespeedy[10]+(i-10)*tempsingle; tempsingle:=(mousespeedy[40]-mousespeedy[20])/20; for i:=21 to 39 do mousespeedy[i]:=mousespeedy[20]+(i-20)*tempsingle; mousecallibrationactive:=false; //tell ce the callibration results keys.mousecallibrationhorizontal1point:=mousespeedx[1]; keys.mousecallibrationhorizontal2point:=mousespeedx[2]; keys.mousecallibrationhorizontal5point:=mousespeedx[5]; keys.mousecallibrationhorizontal10point:=mousespeedx[10]; keys.mousecallibrationhorizontal20point:=mousespeedx[20]; keys.mousecallibrationhorizontal40point:=mousespeedx[40]; keys.mousecallibrationvertical1point:=mousespeedy[1]; keys.mousecallibrationvertical2point:=mousespeedy[2]; keys.mousecallibrationvertical5point:=mousespeedy[5]; keys.mousecallibrationvertical10point:=mousespeedy[10]; keys.mousecallibrationvertical20point:=mousespeedy[20]; keys.mousecallibrationvertical40point:=mousespeedy[40]; if keys.cewindow<>0 then postmessage(keys.cewindow,wm_user+1,0,0); //the callibration values have been changed end; 25: begin cefont._Begin; r.left:=trunc(vp.Width/2)+10; r.Top:=trunc(vp.Height/2)-16; r.Right:=r.left+800; r.Bottom:=r.top+16; ts:=format('mousespeedx[1]=%.2f',[mousespeedx[1]]); cefont.DrawTextA(pchar(ts),length(ts),r,0,D3DCOLOR_ARGB(255,0,255,0)); r.Top:=r.top+16; r.Bottom:=r.Bottom+16; ts:=format('mousespeedx[2]=%.2f',[mousespeedx[2]]); cefont.DrawTextA(pchar(ts),length(ts),r,0,D3DCOLOR_ARGB(255,0,255,0)); r.Top:=r.top+16; r.Bottom:=r.Bottom+16; ts:=format('mousespeedx[5]=%.2f',[mousespeedx[5]]); cefont.DrawTextA(pchar(ts),length(ts),r,0,D3DCOLOR_ARGB(255,0,255,0)); r.Top:=r.top+16; r.Bottom:=r.Bottom+16; ts:=format('mousespeedx[10]=%.2f',[mousespeedx[10]]); cefont.DrawTextA(pchar(ts),length(ts),r,0,D3DCOLOR_ARGB(255,0,255,0)); r.Top:=r.top+16; r.Bottom:=r.Bottom+16; ts:=format('mousespeedx[20]=%.2f',[mousespeedx[20]]); cefont.DrawTextA(pchar(ts),length(ts),r,0,D3DCOLOR_ARGB(255,0,255,0)); r.Top:=r.top+16; r.Bottom:=r.Bottom+16; ts:=format('mousespeedx[40]=%.2f',[mousespeedx[40]]); cefont.DrawTextA(pchar(ts),length(ts),r,0,D3DCOLOR_ARGB(255,0,255,0)); cefont._End; mousecallibrationactive:=false; inc(mousecallibrationmode); end; else mousecallibrationactive:=false; end; end; end; mysprite._End; //messages if s<(autoaimtimer+2000) then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -