Samyjohn Posted February 24, 2020 Posted February 24, 2020 I've putting a script for a fishing bot within a game, and the fishing game has a mini-game to catch the fish. you have to keep the snare within the green areas until the fish reaches the yellow arrow. and you do that by holding left mouse button to pull it to the right, otherwise it gets pulled to the left. I've tried using PixelChecksum to check for for pixel change on the ends of the bar in order to keep the snare in the middle. but i can't get it to work. i have some experience with Autoit, but nothing compared to you guys. Could you guys help point me in the right direction? This is my old script but I've managed to break it and i don't know what the issue is. If its unfix-able please point me on how i could tackle this. expandcollapse popupHotKeySet("{F2}","start") HotKeySet("{F4}","stop") Global $polow = False Global $klikanie=False Global $fishing = False Global $greenLine = False Global $rybka = False Global $go = False Global $repeat = False Global $pixBlue=PixelSearch (1202, 417, 1202, 420,0x2B5895, 5) while 1 sleep(100) WEnd func start() While (1) WinActivate("Albion Online Client") sleep(3000) MouseClick("left",1099, 456,1 ,1 ) $polow = True while ($polow) Sleep(100) begin() Sleep(1000) $fishing=True WEnd while ($fishing) splawik() $go = True WEnd sleep(50) while ($go) minigra() sleep(500) WEnd sleep(2000) Send("{F2}") ExitLoop WEnd EndFunc func begin() sleep(100) MouseMove(1511, 324) MouseDown("PRIMARY") MouseMove(1511, 324) Sleep(450) MouseMove(1511, 324) MouseUp("PRIMARY") MouseMove(1511, 324) $polow = False EndFunc func splawik() $pixRed=PixelSearch (1587, 215, 1707, 319 ,0x942315, 10) if @error Then sleep(100) MouseClick("left") Sleep(100) $fishing = False Else sleep(50) EndIf EndFunc func minigra() $pixBlue = True if not (@error) Then $greenLine = true line() Else ; MsgBox(1,"title") $greenLine = False Sleep(50) $go = False Sleep(100) ;ExitLoop [1] MsgBox(1"balamamama") EndIf EndFunc func line() while($greenLine) $pixGreen=PixelSearch (1309, 392, 1323, 408 ,0xF0DBC0, 20) if (@error) Then ;ElseIf Not (@error) Then MouseDown("PRIMARY") sleep(500) MouseUp("PRIMARY") Else MouseClick("left") Sleep(500) EndIf WEnd EndFunc func stop() Exit EndFunc
Moderators JLogan3o13 Posted February 24, 2020 Moderators Posted February 24, 2020 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 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts