Razielex Posted October 9, 2017 Share Posted October 9, 2017 Hi, my name is Kevin and i need help from someone who is more advanced in autoit and math. What i'm trying to do is to make mouse move from one point to another but not in stright line - I want to make "eclipse like" move from A to B. Here is video of what exactly i'm trying to make: I have a functional "Bot" that plays this in straight lines but i'm not good in math so i came here to ask for a little help. Please don't get me wrong.. I'm NOT trying to make an automated Bot to play this game (!osu) to get advantage and abuse autoit language in to making hacks. I only want bot that dances like this and then mirror them in the video editing software so it would look like this: https://www.youtube.com/watch?v=vynUmJwSzn0 . I always loved "cursor dancing". Here is code that moves mouse based on the locations of "notes" (Points where to click) expandcollapse popupfunc smoothmove($coords,$j,$firstms);make mouse move to the note dim $currcoord[3] dim $diff[3] dim $pixelsptms[3] if $j > 1 Then if mod($coords[$j-1][7][1],2) = 0 Then $currcoord[1] = $coords[$j-1][1][1] $currcoord[2] = $coords[$j-1][2][1] Else $currcoord[1] = $coords[$j-1][1][$coords[$j-1][1][0]] $currcoord[2] = $coords[$j-1][2][$coords[$j-1][2][0]] EndIf Else $currcoord[1] = mousegetpos(0) $currcoord[2] = mousegetpos(1) EndIf if $coords[$j][1][1] = $currcoord[1] then if $coords[$j][2][1] = $currcoord[2] then return 1 EndIf if $coords[$j][3][1] <= $firstms then return 1 $diff[1] = $coords[$j][1][1] - $currcoord[1] $diff[2] = $coords[$j][2][1] - $currcoord[2] $pixelsptms[1] = ($diff[1] / ($coords[$j][3][1]-$firstms)) * 12 $pixelsptms[2] = ($diff[2] / ($coords[$j][3][1]-$firstms)) * 12 dim $ready[5] $ready[1] = 2 $ready[2] = 3 $ready[3] = 2 $ready[4] = 3 $firstms += 12 $count = 0 while 1 DllCall($osumap[0], 'int', 'ReadProcessMemory', 'int', $osumap[1], 'int', $address[2], 'ptr', $bufferptr, 'int', $buffersize, 'int', '') $ms = DllStructGetData($buffer,1) if $ms >= $coords[$j][3][1] Then return 1 if $pixelsptms[1] < 0 Then if $currcoord[1] <= $coords[$j][1][1] Then $currcoord[1] = $coords[$j][1][1] $ready[3] = 1 $pixelsptms[1] = 0 EndIf Else if $currcoord[1] >= $coords[$j][1][1] Then $currcoord[1] = $coords[$j][1][1] $ready[3] = 1 $pixelsptms[1] = 0 EndIf EndIf if $pixelsptms[2] < 0 then if $currcoord[2] <= $coords[$j][2][1] Then $currcoord[2] = $coords[$j][2][1] $ready[4] = 1 $pixelsptms[2] = 0 EndIf Else if $currcoord[2] >= $coords[$j][2][1] Then $currcoord[2] = $coords[$j][2][1] $ready[4] = 1 $pixelsptms[2] = 0 EndIf EndIf if $ready[3] = $ready[4] Then return -1 if $ms >= $firstms Then $currcoord[1] += $pixelsptms[1] $currcoord[2] += $pixelsptms[2] $firstms += 12 mousemove($currcoord[1],$currcoord[2],0) EndIf WEnd EndFunc (This code isn't mine i downloaded it on some Russian site. Autor is unknown (i couldn't find him). Code was broken in many ways but i fixed it and got it working again) Can you please help me? Thank you for your time. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 9, 2017 Moderators Share Posted October 9, 2017 Razielex, Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation (regardless of the game) - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts