Jump to content

what am i missing?


 Share

Recommended Posts

ok let me explain what i am tring to do.i play a game called muonline nad from time to time i get dced from the server.i made a autoit script to relog me back in when this happens.the sript works well the first time,but if i get dced again.then sometimes when it should left click it doesnt.and it random where this happens in the script.

i am a noob learning this stuff.i have looked on forums and the help file for answers and found nothing.

so could you please take a look at my code and see why this happens.

thanks

Sleep(10000)
    MouseClick("right")
    Sleep(500)
    MouseClick("left")
    MouseClick("left")
    Sleep(100)
    MouseClick("left", 38, 17, 2, 10)
    Sleep(5000)
    MouseClick("left", 510, 584, 1, 10)
    Sleep(30000)
    MouseClick("left", 239, 242, 1, 10)
    Sleep(1000)
    MouseClick("left", $Sx, $Sy, 1, 10)
    Sleep(1000)
    Send($pass)
    Sleep(1000)
    MouseClick("left", 412, 428, 1, 10)
    Sleep(10000)
    MouseClick("left", $cx, $cy, 2, 10)
    Sleep(5000)
    MouseMove( 426, 275)
    Sleep(200)
    Send($ass)
Edited by Gijoe
Link to comment
Share on other sites

ok let me explain what i am tring to do.i play a game called muonline nad from time to time i get dced from the server.i made a autoit script to relog me back in when this happens.the sript works well the first time,but if i get dced again.then sometimes when it should left click it doesnt.and it random where this happens in the script.

i am a noob learning this stuff.i have looked on forums and the help file for answers and found nothing.

so could you please take a look at my code and see why this happens.

thanks

MouseClick("left", 38, 17, 2, 10)
    Sleep(5000)
    MouseClick("left", 510, 584, 1, 10)
    Sleep(30000)
    MouseClick("left", 239, 242, 1, 10)
    Sleep(1000)
    MouseClick("left", $Sx, $Sy, 1, 10)
For starters I would ask myself what is causing the server to disconnect. Can you recreate the condition that always results in your being disconnected? If so then go after stopping the disconnects because once you're stopped them there will be no need to relogin. Secondly you say that sometimes the script randomly doesn't left click when it should. I'm thinking this is plausible but unlikey. For the most part the computer is going to execute your code exactly as written. The question becomes is the code written correctly.

If I had to guess, part of the problem of the script appearing to not left click when you think it should is linked to your random use of the Sleep() command. Remember 1 second = Sleep(1000); you have a Sleep(30000) or 30 second pause between to left click commands.

In the beginning Sleep() was one of my favorite commands, but my using it to wait for a webpage or certain condition to be in place before moving on started giving me headaches. The MouseClicks were sometimes too early or too late. Then thanks to searching this forum I learned about PixelChecksum (see help and search forum) and my life has become so much better and less dependent on Sleep().

For example the following scans an area and waits until that area has changed. Help has a good examply you can play with too.

$checksum = PixelChecksum(20,110,170,130)
While $checksum = PixelChecksum(20,110,170,130)
    Sleep(800)
WEnd

Hope this helps and good luck!

Link to comment
Share on other sites

thank you for the reply.

As for the server dc its random i can go for days with no dc.Also there is a hack in this game that is a payed hack that gives them the ablity to dc players to steal there spot.

Asi stated i am still learning this and sleep command was what seemed right at the time.i will check out your advice for it seems much better way than mine.i was using the long waits waiting on the game to load before it started the next task.

i will take your example and search help to try to understand the pixelchecksum.

Link to comment
Share on other sites

ok here is what i have so far,but still i get random no clicks.

$pass = pass
$checksum = PixelChecksum(884,21,903,30)
While $checksum = PixelChecksum(884,21,903,30)
    Sleep(800)
WEnd
$checksum2 = PixelChecksum(717,60,755,73)
While $checksum2 = PixelChecksum(717,60,755,73)
    Sleep(800)
WEnd
$checksum3 = PixelChecksum(717,60,755,73)
While $checksum3 = PixelChecksum(717,60,755,73)
    Sleep(800)
WEnd
$checksum4 = PixelChecksum(717,60,755,73)
While $checksum4 = PixelChecksum(717,60,755,73)
    Sleep(800)
WEnd

    MouseClick("left", 239, 242, 1, 10)
    Sleep(800)
        MouseClick("left", 377, 451, 1, 10)
    Sleep(800)
        Send($pass)
    Sleep(1000)
Edited by Gijoe
Link to comment
Share on other sites

well i really dont see how this could help.while Mu is loading i have serveral screen changes , so pixelchecksum is passed to fast.MU has a loading screen before getting to select server screen.plus my resoultion changes when game starts from 768x1024 to 600x800

Morning Gijoe! I'm not a gamer and am not familar with this MU you speak of, guess the two go hand in hand, eh? Then again life is filled with these thiefs, we just choose which ones we keep in our lives.

Unless the the gui for MU is in a constant state of flux, I still think pixelchecksum could work for you. What you want to do is combine this command with a few Sleep() command to allow for the resolution to change (or you could code that if an If...Then statement or a Do...Until. Like:

$myRes = @DesktopWidth & " x " & @DesktopHeight
$muRes = "600 x 800"
Do
    Sleep(500)
Until $myRes = $muRes
Sleep(1000)
$checksum = PixelChecksum(20,110,170,130)
While $checksum = PixelChecksum(20,110,170,130)
    Sleep(500)
WEnd
Sleep(1000)
MouseClick("left"........)ƒoÝŠ÷ Ù8^‘ì­¢Øb³¥•·Ÿ¢¼¨ºÚ0j×!¶ jg º'è­©Ú­æ­…«]¡ë'ßÛ…©àyCS ¼¨»kz·šw+h±éݶŒ¢ë
XœŒ(ºWb™¨"ëaz·¡jËhmë(™êÞ‚*'Š{az¢¶­Ê‹œ¢é]~‡.²‰ÎDz¢çâÛajÛ)¢ßëz¨Ÿ¥•·²¢êÏ‹¥
œ’˦rŠ+vÀèŸmºÇ¶Ó]t×½5ßKa¢Ç°z·¦ÉÊ(­Û¢¹²jše‰Æ­Š‰Ç¢—­†+!zZljw`Š÷²¢ë(™ëaŠx-£
+‘ú蘠 l¢z-zØ^Ó~¦¹¬ŠÊ'—&§{¦¦W²¢éšÊwžvÚ)•¬š®‹§w­‡Mú›$^±©Ýšä^²Ú zØ­¶Œ(®G(®·œ¶ˆ¶h †ÙÞyÛhmç!jxvÚ-…çè–Z0Šx"žŠÝz»hŠäjëhŠ×6$myRes = @DesktopWidth & @DesktopHeight
$muRes = "600800"

EDIT: I see that you posted some new code with multiple PixelChecksum statements. Good job on not using my 20,110,170,130! Begin that I'm not a player of these game I'm probably not the best qualified to help ya. I would imagine the multiple PixelChecksums are not necessary. Look for that one sweet spot and build your region around that.

Also know that some folks here don't appreciate others using AutoIt to violate EULA or cheat/beat the system. On other topis in this forum I've read that certain online games have a game guard to prevent scripts/cheating. Perhaps search and read these type of threads and identify the "friendlies" and ask them their thoughs.

Edited by ssubirias3
Link to comment
Share on other sites

well mu screen changes 4 times before it gets to server screen.where all my left clicks will start.

And mu does allow bots aslong as it is simple right click and pickup bots.and not speed hacks or dc hacks as they have now.

i know most here dont like using autoit for game bots,but it is a very good way to learn how to use autoit.

if i am breaking any rules please excpet my apologies and delete this thread.

i just cant seem to see why it doesnt left click sometimes

Edited by Gijoe
Link to comment
Share on other sites

well mu screen changes 4 times before it gets to server screen.where all my left clicks will start.

i just cant seem to see why it doesnt left click sometimes

Ok Gijoe... hopefully this will do it for ya. I don't mind trying to write the code for you since this is helping me learn along side of you. I'm sure some of the old timers are having a grand ole time saying, "get a load of this, the blind leading the blind!"

Couple of thought on your last two posts. If you see the mouse move the correct number of times then rest assured the MouseClicks are being sent to the coords. One thing I had to do when sending MouseClicks to a java applet I was using was to slow down the clicks using MouseClickDownDelay.

Have a try with this. It should work but I'm no expert at this stuff.

Opt("MouseClickDownDelay", 200)

Dim $pass = "pass", $i = 0, $pxlck = 0

For $i = 0 To 3
    Sleep(1000)
    Switch $pxlck
        Case 1
            $checksum = PixelChecksum(884,21,903,30)
            While $checksum = PixelChecksum(884,21,903,30)
                Sleep(800)
            WEnd
        Case 2, 3, 4
            $checksum = PixelChecksum(717,60,755,73)
            While $checksum = PixelChecksum(717,60,755,73)
                Sleep(800)
            WEnd
    EndSwitch
    If $i >= 4 Then
        $pxlck = 0
    Else
        $pxlck += 1
    EndIf
Next
Sleep(1000)

;; Removed your speed of 10 since this is the default
;; speed if a value is not specified
MouseClick("left", 239, 242, 1)
Sleep(1000)
MouseClick("left", 377, 451, 1)
Sleep(1000)
Send($pass)
Sleep(1000)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...