Jump to content
Sign in to follow this  
trippdoctor

Slugish Mouse Movement

Recommended Posts

trippdoctor

Ok well I have this script I wrote and the mouse seems to move slow slowing the process down. So could some one show and example of how to make this move faster?

;script below
Global $pix1
Global $pix2
Global $pix3
Global $pix4
Global $pix5
sleep(2000)
_makechar()
Func _makechar()
MouseClick("Left", 868, 578)
MouseClick("left", 553, 397)
Sleep(3000)
MouseClick("left", 875, 650)
mouseclick("left", 500, 655)
Send("Silverna")
sleep(2000)
If Hex(PixelGetColor(256, 445),6) = "FF3300" Then
Sleep(25)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(264, 442),6) = "6F6F6F" Then
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(229, 458),6) = "495E76" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(258, 462),6) = "506D6D" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(257, 444),6) = "000000" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(255, 434),6) = "9E9E9E" Then
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(1050)
MouseClick("Left", 792, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(249, 453),6) = "FFCC00" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(253, 449),6) = "000033" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(256, 443),6) = "784B01" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(259, 464),6) = "FFCC00" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(259, 446),6) = "FF66FF" Then
MouseClick("Left", 499, 338)
Sleep(1050)
MouseClick("Left", 499, 338)
Sleep(50)
MouseClick("Left", 949, 654)
ElseIf Hex(pixelGetColor(251, 439),6) = "D2221A" Then
MouseClick("Left", 499, 338)
Sleep(100)
MouseClick("Left", 949, 654)
EndIf
_loopstoptrail()
EndFunc
Func _loopstoptrail()
    Sleep(2000)
    _stoptrailer()
EndFunc
Func _stoptrailer()
    If Hex(pixelGetColor(177, 67),6) = "FFFFFF" Then
        MouseClick("Left", 177, 69);STOP TRAILER
        _moveme()
    ElseIf Hex(pixelGetColor(178, 72),6) = "E45600" Then
        MouseClick("Left", 177, 69);STOP TRAILER
        _moveme()
    Else
    _loopstoptrail()
    EndIf
EndFunc
Func _moveme()
MouseClick("Left", 556, 371)
Sleep(70)
MouseClick("Left", 657, 503)
Sleep(70)
MouseClick("Left", 1091, 557)
Sleep(8200)
MouseClick("Left", 1091, 557)
Sleep(8200)
MouseClick("Left", 813, 606)
Sleep(8200)
MouseClick("Left", 1005, 575)
Sleep(8200)
;Incarman Map (-1,3) Temple
MouseClick("Left", 1119, 593)
Sleep(8200)
;Incarman Map (0,3) exit Temple
MouseClick("Left", 1104, 521)
Sleep(8200)
;Incarman Map (1,3)
MouseClick("Left", 1115, 380)
Sleep(8200)
;Incarman Map (2,3)
MouseClick("Left", 1107, 343)
Sleep(8200)
;Incarman Map (3,3)
MouseClick("Left", 1116, 485)
Sleep(8200)
;Incarman Map (4,3)
MouseClick("Left", 397, 598)
Sleep(8200)
;Incarman Map (4,4)
MouseClick("Left",  901, 437)
Sleep(4000)
_groupus()
EndFunc

Func _groupus()
    MouseClick("left", 367, 760)
    MouseClick("right", 367, 760)
    MouseClick("left", 406, 748)
    Send("/w Tsunechika Hello")
    Send("{ENTER}")
    MouseClick("left", 241, 727)
    MouseClick("left", 302, 678)
    Sleep(250)
    MouseClick("left", 133, 781)
    MouseClick("left", 554, 352)
    MouseClick("left", 288,786)
    sleep(50)
    _khfinder()
EndFunc
Func _khfinder()
    $pix1 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0xCAC056)
    $pix2 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x6D9160)
    $pix3 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x7FA066)
    $pix4 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x91AD6B)
    $pix5 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0xD3DF65)
    If IsArray($pix1) Then ; If $pix1 is an array, then it found key holder
        MouseClick("left", $pix1[0], $pix1[1])
        MouseClick("Left", $pix1[0] + 10, $pix1[1] + 10)
        MouseClick("Left",  323, 376)
        _join()
    ElseIf IsArray($pix2) Then ; If $pix2 is an array, then it found key holder
        MouseClick("left", $pix2[0], $pix2[1])
        MouseClick("Left", $pix2[0] + 10, $pix2[1] + 10)
        MouseClick("Left",  323, 376)
        _join()
    ElseIf IsArray($pix3) Then ; If $pix3 is an array, then it found key holder
        MouseClick("left", $pix3[0], $pix3[1])
        MouseClick("Left", $pix3[0] + 10, $pix3[1] + 10)
        MouseClick("Left",  323, 376)
        _join()
    ElseIf IsArray($pix4) Then ; If $pix4 is an array, then it found key holder
        MouseClick("left", $pix4[0], $pix4[1])
        MouseClick("Left", $pix4[0] + 10, $pix4[1] + 10)
        MouseClick("Left",  323, 376)
        _join()
    ElseIf IsArray($pix5) Then ; If $pix5 is an array, then it found key holder
        MouseClick("left", $pix5[0], $pix5[1])
        MouseClick("Left", $pix5[0] + 10, $pix5[1] + 10)
        MouseClick("Left",  323, 376)
        _join()
    Else
        _moveme()
    EndIf
EndFunc
Func _join()
    MouseClick("Left", 121, 786)
    Sleep(1000)
    MouseClick("Left", 918, 382)
    MouseClick("Left", 928, 392)
    MouseClick("Left", 1048, 572)
    Sleep(1000)
    MouseClick("Left", 241, 785)
    MouseClick("Left", 1048, 572)
    MouseClick("Left", 121, 786)
    _check()
EndFunc
Func _check()
    If Hex(PixelGetColor(785, 748),6) = "FF6600" Then
        _attack()
    ElseIf Hex(PixelGetColor(795,740),6) = "FFFFFF" Then
        _attack()
    ElseIf Hex(PixelGetColor(708, 734),6) = "FF6A00" Then
        _attack()
    Else
        MouseClick("Left", 987, 483)
        MouseClick("left", 367, 760)
        MouseClick("right", 367, 760)
        MouseClick("left", 406, 748)
        Send("/sit")
        Send("{ENTER}")
        MouseClick("Left", 241,785)
        MouseClick("Left", 987, 483)
        _getkey()
    EndIf
EndFunc
Func _attack()
    Sleep(2500)
    If Hex(PixelGetColor(845, 694),6) = "161614" Then;Boozer
        MouseClick("Left", 845, 694)
        MouseClick("Left", 985, 581)
        _pass()
    ElseIf Hex(PixelGetColor(852, 692),6) = "7D7DAE" Then;Hang Over
        MouseClick("Left", 1067, 703)
        MouseClick("Left", 1029, 578)
        MouseClick("Left", 1067, 703)
        MouseClick("Left", 1029, 578)
        _pass()
    ElseIf Hex(PixelGetColor(1062, 696),6) = "0A0A0D" Then;Boozer
        MouseClick("Left", 845, 694)
        MouseClick("Left", 985, 581)
        _pass()
    ElseIf Hex(PixelGetColor(1067, 703),6) = "FBFBFB" Then;Hang Over
        MouseClick("Left", 1067, 703)
        MouseClick("Left", 1029, 578)
        MouseClick("Left", 1067, 703)
        MouseClick("Left", 1029, 578)
        _pass()
    Else
        If Hex(PixelGetColor(816, 697),6) = "FFFFFF" Then;Boozer
            MouseClick("Left", 845, 694)
            MouseClick("Left", 985, 581)
            _pass()
        Else
        MouseClick("Left", 1067, 703)
        MouseClick("Left", 1029, 578)
        MouseClick("Left", 1067, 703)
        MouseClick("Left", 1029, 578)
        _pass()
        EndIf
    EndIf
EndFunc
Func _pass()
    MouseClick("Left",794, 742);pass
    MouseClick("Left",241, 785);Chang window
    Sleep(3500)
    MouseClick("Left",794, 742);pass
    MouseClick("Left",121, 786);Chang window
    _check()
EndFunc
Func _getkey()
    $pix1 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0xCAC056)
    $pix2 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x6D9160)
    $pix3 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x7FA066)
    $pix4 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0x91AD6B)
    $pix5 = PixelSearch(0,0,@DesktopWidth, @DesktopHeight, 0xD3DF65)
    If IsArray($pix1) Then ; If $pix1 is an array, then it found key holder
        MouseClick("left", $pix1[0], $pix1[1])
        MouseClick("Left", $pix1[0] + 10, $pix1[1] + 10)
        MouseClick("Left",  643, 380)
        MouseClick("Left",  594, 234)
        _asktrade()
    ElseIf IsArray($pix2) Then ; If $pix2 is an array, then it found key holder
        MouseClick("left", $pix2[0], $pix2[1])
        MouseClick("Left", $pix2[0] + 10, $pix2[1] + 10)
        MouseClick("Left",  643, 380)
        MouseClick("Left",  594, 234)
        _asktrade()
    ElseIf IsArray($pix3) Then ; If $pix3 is an array, then it found key holder
        MouseClick("left", $pix3[0], $pix3[1])
        MouseClick("Left", $pix3[0] + 10, $pix3[1] + 10)
        MouseClick("Left",  643, 380)
        MouseClick("Left",  594, 234)
        _asktrade()
    ElseIf IsArray($pix4) Then ; If $pix4 is an array, then it found key holder
        MouseClick("left", $pix4[0], $pix4[1])
        MouseClick("Left", $pix4[0] + 10, $pix4[1] + 10)
        MouseClick("Left",  643, 380)
        MouseClick("Left",  594, 234)
        _asktrade()
    ElseIf IsArray($pix5) Then ; If $pix5 is an array, then it found key holder
        MouseClick("left", $pix5[0], $pix5[1])
        MouseClick("Left", $pix5[0] + 10, $pix5[1] + 10)
        MouseClick("Left",  643, 380)
        MouseClick("Left",  594, 234)
        _asktrade()
    Else
        _moveme()
    EndIf
EndFunc
Func _asktrade()
    MouseClick("left", 367, 760)
    MouseClick("right", 367, 760)
    MouseClick("left", 406, 748)
    Send("/w Tsunechika Hello")
    Send("{ENTER}")
    MouseClick("left", 241, 727)
    MouseClick("left", 276,708)
    Sleep(250)
    MouseClick("left", 133, 781)
    MouseClick("left", 554, 352)
    MouseClick("left", 288,786)
    sleep(50)
    _tradeus()
EndFunc
Func _tradeus()
    MouseClick("left", 770, 418)
    MouseClick("left", 621, 401)
    MouseClick("left", 755, 401)
    MouseClick("left", 768, 208)
    MouseClickDrag("left", 719, 258, 754, 463, 0)
    MouseClickDrag("left", 760, 245, 793, 464, 0)
    MouseClickDrag("left", 719, 258, 754, 463, 0)
    sleep(1000)
    MouseClick("left", 1020, 563)
    MouseClick("left", 121, 786)
    sleep(1000)
    MouseClick("left", 1020, 563)
    MouseClick("left", 241, 785)
    _charselecter()
EndFunc
Func _charselecter()
    MouseClick("left", 1110, 56)
    MouseClick("left", 641, 279)
    MouseClick("left", 553, 375)
    Sleep(6500)
    MouseMove(305, 445, 0)
    MouseClick("left")
    Sleep(400)
    MouseClick("left")
    _loopwaiting()
EndFunc
Func _loopwaiting()
    _checkwaiting()
EndFunc
Func _checkwaiting()
    If Hex(PixelGetColor(632, 409),6) = "E72EFD" Then
        Sleep(25)
        _makechar()
    ElseIf Hex(PixelGetColor(635, 386),6) = "E72EFD" Then
        Sleep(25)
        _makechar()
    Else
        Sleep(2000)
        _loopwaiting()
    EndIf
EndFunc

Share this post


Link to post
Share on other sites
CodeMaster Rapture

From the helpfile:

"speed [optional] the speed to move the mouse in the range 1 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly. Default speed is 10."

Try changing your MouseClick($x,$y) to MouseClick($x,$y,0)

-CMR

Share this post


Link to post
Share on other sites
trippdoctor

That only works on mouse move and mouse drag thanks for trying to help any one else have so Ideas?

Share this post


Link to post
Share on other sites
BrettF

That only works on mouse move and mouse drag thanks for trying to help any one else have so Ideas?

That is the only way the mouse is being moved, or am I missing something?

Share this post


Link to post
Share on other sites
MikeP

He's talking about MouseClick because he tried this (as CMR suggested):

MouseClick(x, y, 0) to speed the mouse ... the problem is he forgot before the speed parameter there's a "number of clics" parameter and it should be written like this :

MouseClick(x, y, 1, 0)

99% sure it's his problem :) (ok I admit.. that's because I made the mistake too long ago haha)

Edited by MikeP

Share this post


Link to post
Share on other sites
trippdoctor

He's talking about MouseClick because he tried this (as CMR suggested):

MouseClick(x, y, 0) to speed the mouse ... the problem is he forgot before the speed parameter there's a "number of clics" parameter and it should be written like this :

MouseClick(x, y, 1, 0)

99% sure it's his problem :) (ok I admit.. that's because I made the mistake too long ago haha)

Ok I didn't know that there was a number of clicks before I could adjust the speed thanks.

Edited by trippdoctor

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×