Code: Select all
alloc(main,2000)
alloc(lastCursorPos,8)
alloc(dist,8)
createthread(main)
label(jump1)
label(jump2)
main:
cmp [mm8.exe+FC3F4],0 //IF WindowFocus==0 then return to begin
je main
cmp [mm8.exe+1A85FC],1 //IF InRoom==1 jump to begin
je main
cmp [mm8.exe+C09048],1 // -||-
je main
cmp [mm8.exe+11A5F4],0 //IF Ingame==0 jump to begin
je main
cmp [mm8.exe+18A9CC],1 // IF in MainMenu then go to start
je main
push eax
mov eax,[mm8.exe+C08FE0]
mov [lastCursorPos],eax
mov eax,[mm8.exe+C08FE4]
mov [lastCursorPos+4],eax //Save 1st cursor position
push #1
call Sleep
mov eax,[mm8.exe+C08FE0]
sub eax,[lastCursorPos]
mov [dist],eax
mov eax,[mm8.exe+C08FE4]
sub eax,[lastCursorPos+4]
mov [dist+4],eax
//Counting dist
mov eax,[dist]
sub [mm8.exe+724400],eax
cmp [mm8.exe+724400],#2048
jl jump1
sub [mm8.exe+724400],#2048
jump1:
cmp [mm8.exe+724400],#0
jge jump2
add [mm8.exe+724400],#2048
jump2:
mov eax,[dist+4]
sub [mm8.exe+724404],eax //Set proper angles
pop eax
mov [lastCursorPos],#319
mov [lastCursorPos+4],#239
mov [mm8.exe+C08FE0],#319
mov [mm8.exe+C08FE4],#239
push #239
push #319
call SetCursorPos //Set Cursor to center
jmp main //end if
HF