Jump to content

My code wont work, just need tips and support - (Locked)


Recommended Posts

The first parts of my code work fine up until the For loop and it just doesn't continues. Any tips or things i need to fix. I'm pretty new to coding in AutoIt but i have some experience in Java. I dont need anybody to rewrite my code, just tips.

----------------------------------------------------------------------------

WinActivate("RareSpawnKnd")

Func _SmilodonCheck()
   If PixelSearch(516,543,581,503, 0x1DFE7E) Then
   MouseClick("left",970,930) Else
   (For $x = 1 to 6;
   MouseClick ("left",1743,936))
   EndIf
EndFunc

Func _ChromanticoreCheck()
   If PixelSearch(687,669,749,621, 0x8FCA00) Then
   MouseClick("left",970,930) Else
   (For $x = 1 to 6;
   MouseClick ("left",1743,936))
   EndIf
EndFunc

Func _PopupCheck()
   If PixelSearch (0,0,1192,792, 0xD3D7DE) Then
   MouseClick("left",1192,792)
   EndIf
EndFunc

Func _OutPopupCheck()
   If PixelSearch (0,0,1403,163, 0xFDF18F) Then
   MouseClick("left",1523,187)
   EndIf
EndFunc

Func _LoadCheck()
   If PixelSearch (0,0,1271,374, 0xFDF18F) Then
   Sleep(5000)
   EndIf
EndFunc

sleep(250)

while 1
MouseClick("left",930,500)
sleep(500)
MouseClick("left",1260,600)
sleep(500)
MouseClick("left",1580,830)
sleep(150)
MouseClick("left",1580,830)
sleep(150)
MouseClick("left",1580,830)
sleep(150)
MouseClick("left",970,930)

   For $x = 1 to 6                                             ; I believe this is where the problem is but im not sure
      Call _PopupCheck()
      Call _LoadCheck()
      Call _SmilodonCheck()
      Call _ChromanticoreCheck()
      Sleep(7000)
   Next

MouseClick("left",1082,794)
Sleep(200)

Call _OutPopupCheck()

WEnd

Link to comment
Share on other sites

  • Developers

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 - 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.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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