Jump to content

Recommended Posts

Posted

Hiya,

My first time scriptin' here.

Could anyone help me with my script? It keeps complaining that, well, the topic says it all.

$i = 1
While $i = 1
Sleep(1500)
MouseMove(925, 486, 1)
MouseClick("left")
Sleep(4000)
$coord = PixelSearch(997, 514, 1051, 567, 0x0000FF)
If Not @error Then
  MouseMove(979, 448, 1)
  MouseClick("left")
  Sleep(4000)
  $coord = PixelSearch(777, 230, 897, 282, 0x0000FF)
  If Not @error Then
   MouseMove(779, 363, 1)
   MouseClick("left")
   Sleep(4000)
   $coord = PixelSearch(642, 466, 745, 555, 0x0000FF)
   If Not @error Then
    MouseMove(607, 358, 1)
    MouseClick("left")
    Sleep(4000)
    $coord = PixelSearch(391, 228, 597, 289, 0x0000FF)
    If Not @error Then
     $i = 2
    Else
     MouseMove(1027, 633)
     MouseClick("left")
     Sleep(1500)
     MouseClick("left")
   Else
    MouseMove(1027, 633)
    MouseClick("left")
    Sleep(1500)
    MouseClick("left")
  Else
   MouseMove(1027, 633)
   MouseClick("left")
   Sleep(1500)
   MouseClick("left")
Else
  MouseMove(1027, 633)
  MouseClick("left")
  Sleep(1500)
  MouseClick("left")
WEnd

The idea is to make a unique record at virtual Minigolf. First it hits the ball, checks if it's at the right place (due to randomness, the place varies a lot), and repeats. If it's not at the right place, it double clicks a certain spot to start a new game, and repeats the whole script. When it finally gets those hits right, the script stops ($i = 2).

So, any ideas?

(I hope the color code is right, pure blue or something.)

Posted

Hi Newpie,

also read the forum rules, as discussing automation of games is not permitted on these forums.

Thread reported.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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