|
You last visited: Today at 04:23
Advertisement
[AutoIt] Bezier Mouse Movement
Discussion on [AutoIt] Bezier Mouse Movement within the General Gaming Discussion forum part of the General Gaming category.
08/14/2009, 12:08
|
#1
|
elite*gold: 0
Join Date: Jan 2008
Posts: 113
Received Thanks: 56
|
[AutoIt] Bezier Mouse Movement
It was originally written for GuildWars in mind, and their anti-macro detection.
Code:
Dim $PtX[4]
Dim $PtY[4]
Dim $MaxPt = 3
Func Factorial($n)
$value = 1
For $i = 2 To $n
$value = $value * $i
Next
Return $value
EndFunc
Func Y($t)
$value = 0
For $i = 0 To $MaxPt
$value = $value + $PtY[$i] * Blend($i, $MaxPt, $t)
Next
Return $value
EndFunc
Func X($t)
$value = 0
For $i = 0 To $MaxPt
$value = $value + $PtX[$i] * Blend($i, $MaxPt, $t)
Next
Return $value
EndFunc
Func MouseClickEx($btn, $x, $y, $num)
MouseBezier($x, $y)
MouseClick($btn, $x, $y, $num)
EndFunc
Func MouseBezier($ex, $ey)
$pos = MouseGetPos()
If IsArray($pos) Then
If $pos[0] < $ex Then
$PtX[0] = $pos[0]
$PtX[1] = $pos[0] * Random(2, 3)
$PtX[2] = $PtX[1]
$PtX[3] = $ex
Else
$PtX[0] = $pos[0]
$PtX[1] = $pos[0] / Random(2, 3)
$PtX[2] = $PtX[1]
$PtX[3] = $ex
EndIf
If $pos[1] < $ey Then
$PtY[0] = $pos[1]
$PtY[1] = $pos[1]
$PtY[2] = $pos[1] * Random(2, 3)
$PtY[3] = $ey;
Else
$PtY[0] = $pos[1]
$PtY[1] = $pos[1]
$PtY[2] = $pos[1] / Random(2, 3)
$PtY[3] = $ey;
EndIf
MouseCurve(0, 1)
EndIf
EndFunc
Func MouseCurve($start_t, $stop_t)
$dt = 0.01
$t = $start_t + $dt
While $t < $stop_t
MouseMove(X($t), Y($t),1)
$t = $t + $dt
Wend
;MouseMove(X($start_t), Y($stop_t),1)
EndFunc
Func Blend($i, $n, $t)
Return Factorial($n) / Factorial($i) / Factorial($n - $i) * $t ^ $i * (1 - $t) ^ ($n - $i)
EndFunc
;MouseBezier(640, 512)
|
|
|
|
Similar Threads
|
Massive fps drop due to mouse movement
08/29/2010 - Silkroad Online - 1 Replies
Hi, I'm going away for 5 days so as a last hope I decided to post this here. Recently I've been having fps drop on silkroad, and basically every game I run in D3D. I don't know much about computers nor do I know what D3D really is but, I tried to run counter strike in D3D (normally it's opengl and runs fine) and it gave me the same problem.
Now if I just use the keyboard, the fps lock. Even if I turn the camera around and stuff. But if I move my mouse a bit, even when standing still, it goes...
|
Autoit/AutoHotkey hooking the mouse
10/03/2009 - Aion - 3 Replies
I am running EU/US Aion 1.5 so no game guard. I am still having trouble sending mouse clicks to Aion the mouseclick("right") function works fine oustide the game but if I <alt> <tab> in it seems to get blocked. I am a bi t puzzled as the freeware mouse driver that I use to re-map extra mouse buttons works. Of course I have tried removing the mouse driver completely to ensure there is no clash. Any one have any ideas? Cheers.
|
Wallhack movement bugs out when moving with mouse?
09/23/2008 - Dekaron Private Server - 8 Replies
i made a wallhakc that workd, but when i try to move via the mouse, my char starts moving really fast across the map in different directions, anyone know what i did wrong?
|
Autoit Ctrl+left mouse udf
04/25/2008 - CO2 Bots & Macros - 1 Replies
So i made a udf (user-defined-function) in Autoitv3 for sending "Ctrl_down + LeftMouse_Down" event to the conquer window (or really any other window), this can be used to make a character jump in conquer while the program is minimized or hidden
Heres an Example:
#Include <UPSmouse.au3>
ctrlmouse("","","#327701 ", 120, 150) (credits to Evan, Valik and original author) << i just translated it into a udf
The UDF (UPSmouse.au3) and a Example script and program are included in the rar
|
how to send contorl+mouse click in autoit
09/07/2005 - AutoIt - 0 Replies
Hi,
I am wondering how to send contorl+left mouse click in autoit.
What I do now:
AutoItSetOption ( "SendKeyDownDelay", 10)
Send("^")
MouseClick("left",Random&a mp;#40;0,1024,1),Random(0,700,1&am p;#41;,1,1)
AutoItSetOption ( "SendKeyDownDelay", 1)
|
All times are GMT +2. The time now is 04:23.
|
|