Jump to content

Vexhero

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Vexhero

  1. Hello! I have a script in autoit which I made yesterday and Im still getting the hang of autoit My question is, is there anyone here who would be able to explain how the convertion would go between AutoIt and C# when it comes to these lines of code, would I need to declare an array to show the $x & $y position? Also The LC is a function I have a bit down the code While (Not($it_full)) $pixels = PixelSearch(257, 181, 276, 202,0xA19695,10) ;Check color If NOT(@error) Then LC($pixels[0],$pixels[1]) EndIf $pixels = PixelSearch(693, 479, 729, 504,0x000001,3) ;Search If NOT(@error) Then ; MsgBox(0,"Title","Found It!") $it_full = True Sleep(8000) EndIf WEnd
  2. ;Basic Script HotKeySet("{ESC}", "myExit") ;This part right here, it spam clicks until the task is done, can I change the interval between every click somehow? ;---------------------- ;Time to start $task_started = False While (Not($task_started)) $pixels = PixelSearch(45, 164, 273, 145,0xDFC219,10) If NOT(@error) Then LC($pixels[0],$pixels[1]) EndIf $pixels = PixelSearch(696, 460, 711, 476,0x95947E,5) If NOT(@error) Then ; MsgBox(0,"Task done") $inventory_full = True Sleep(5000) EndIf WEnd ; ENDING ( LOOP ) ;---------------------- Func myExit() MsgBox(0, "Exiting", "The Bot Has Quit") Exit EndFunc
  3. That worked! But now it spam clicks the leftclick here $findFood = PixelSearch(556, 240, 738, 493,0xE44C1B,5) If NOT(@error) Then LC($findFood[0],$findFood[1]) EndIf Is there a way to change this so it only clicks once?
  4. Hello! So I am new to Autoit but I understand the syntax a bit (Coming from C#) And I created this function but for some reason it only clicks once (does the function one time) then it stops, why is that? HotKeySet("{ESC}", "myExit") Global $needrest = False; While 1 checkHealth() WEnd Func LC($x, $y) MouseClick("left", $x, $y, 1, 1) EndFunc Func ViewReset() MouseClick("left",551, 55,1,1) Send("{UP down}") EndFunc Func checkHealth() $needrest = True $hpBar = PixelSearch(724, 58, 726, 61, 0x8A0502, 1) ;MsgBox(0,"test", "Your health is full") if @error Then $findFood = PixelSearch(556, 240, 738, 493,0xE44C1B,5) If NOT(@error) Then LC($findFood[0],$findFood[1]) ;this is the thing it only does once I want the checkHealth() function to loop EndIf While($needrest) WEnd EndIf EndFunc Func myExit() MsgBox(0, "Exiting", "The Bot Has Quit") Exit EndFunc
×
×
  • Create New...