[Wartune] E's AutoIt Scripts Daru Farmbot

07/16/2013 03:39 osled04#136
hi guys can anyone give me tips on how to make this bot work? i did exactly what i show on read me but it just idle on searchicon. can someone enlight me? thanks
07/16/2013 12:59 dizzy_bg#137
go to monster but no atack ? anybody helo window atack stay and no press atack
07/17/2013 11:54 danny_x#138
everything seems to work like a charm. it seems the problem was that editing the script verry late i put the click coords as an argument, but checking again after u posted i figured it out, so thank you. it might still have some mineo bugs maybe i need to take new screens if it doesent recognise them because i didnt have the time to fully test it. but i can manage that. so ty again
07/17/2013 18:33 saladar2013#139
I have it working in 1920x1080 it will not find a managog or if it goes to attack it does not find the enter. Can someone help me figure out as to why.
07/18/2013 00:35 danny_x#140
Quote:
Originally Posted by saladar2013 View Post
I have it working in 1920x1080 it will not find a managog or if it goes to attack it does not find the enter. Can someone help me figure out as to why.
slow a bit the image search time and maybe take new screens of the managog
and take another screen(bmp) of the atack button or use the mouse position and change the function to click atack button
07/18/2013 01:33 Luciferos#141
I've eliminated another problem with the current download of the script. This is probably just from lack of testing, however, the function "ChangeCoords" comes as-is like this:

Func ChangeCoords()
;Changes map coordinates square by square. Moves left to right then moves down one square and goes left to right again.
$wait = 2000 ;sleep (milliseconds) at the end of this function
If $mapX < 585 Then
$mapX += 30
Else
$wait = 2000
$mapX = 15
If $mapY < 591 Then
$mapY += 17
EndIf
EndIf
;MouseClick("left",$c1X,$c1Y,2,0)
ClickOffsetOfImage("left",60,$buttonsDir,"searchic on",2)
Send($mapX)
;MouseClick("left",$c2X,$c2Y,2,0)
ClickOffsetOfImage("left",30,$buttonsDir,"searchic on",2)
Send($mapY)
ClickImage($buttonsDir,"searchicon")
Sleep($wait)

In this segment:

If $mapX < 585 Then
$mapX += 30
Else
$wait = 2000
$mapX = 15
If $mapY < 591 Then
$mapY += 17
EndIf
EndIf

It tells the script to check and see if the map x coordinate is below 585, if so, add 30, if not, reset the map x coordinate to 15, and then check the y coordinate. Then, if the y coordinate is less than 590, it tells it to add 17 to the y coordinate, but doesn't tell it what to do if the y-coordinate is MORE than 590, as it does for an x-coordinate over 585. Basically, the map will infinitely cycle left to right at the bottom of the map, never returning to the top. Here's the fix:

If $mapX < 585 Then
$mapX += 30
Else
$wait = 2000
$mapX = 15
If $mapY < 591 Then
$mapY += 17
Else
$wait = 2000
$mapY = 8

EndIf
EndIf

I italicized the snippet of code that needs to be added to make the script return to the top once it is done scanning the bottom row.

Edit: oops, I see some intrepid trailblazer forged this path before me. Regardless, I'm going to leave this up here for people like me who skip to the end of a good book.
07/19/2013 00:04 drelder2#142
So i am having trouble getting anything to work on my farm bot it just scrolls through the friends pages not collecting or doing anything other then changing the page and then for my wilds i run to random spots where it sasys there is a mongolo even though there is nothing there and it doesnt put in any new coords and my map doesnt move im runnint 1920x1080 and currently testing this on the sands
07/19/2013 02:23 Luciferos#143
I've detected a new problem that defies my very limited coding ability. The ClickOffsetOfImage function seems to be incapable of returning a False value like ClickImage does. ClickImage works like so:

Func ClickImage($directory,$img,$tolerance=50,$startX=0 ,$startY=0,$endX=@DesktopWidth,$endY=@DesktopHeigh t,$seconds=$defaultCheckRate)
If CheckFor($directory,$img,$tolerance,$startX,$start Y,$endX,$endY,$seconds) Then
MouseClick("left",$gX,$gY,1,0)
Return True
Else
Return False
EndIf
EndFunc

Basically, check for [some image], if you see that image, do some stuff and return a True boolean, otherwise return a False boolean. And here is ClickOffsetOfImage:

Func ClickOffsetOfImage($direction,$offset,$directory,$ img,$clicks=1,$tolerance=50,$startX=0,$startY=0,$e ndX=@DesktopWidth,$endY=@DesktopHeight,$seconds=$d efaultCheckRate)
If CheckFor($directory,$img,$startX,$startY,$endX,$en dY,$seconds,$tolerance) Then
If $direction = "right" Then
$gX += $offset
ElseIf $direction = "left" Then
$gX -= $offset
ElseIf $direction = "up" Then
$gY -= $offset
ElseIf $direction = "down" Then
$gY += $offset
EndIf
MouseClick("left",$gX,$gY,$clicks,0)
Return True
Else
Return False
EndIf
EndFunc

Same basic setup. Check for the image, if you see it, do some stuff, then return a True. Otherwise, do nothing and return a False.

However, the latter function will not return a False statement for me, causing the script to hang. I am trying to use it to speed up the script immensely and improve its recognition to nearly 100%. If my ClickOffset.... function detects the image on-screen, it clicks where I need it to, goes into WaitForAttack, attacks the managog, everything is wonderful. So clearly, the Return True works. However, if there is no managog on-screen, it simply hangs on that function indefinitely; it cannot arrive at the Else > Return False, which comes right after the Return True that is working.

The only difference is the embedded If statement. Is the compiler ending the original If statement with the embedded EndIf, preventing the script from knowing what to do with the Else statement? Any advice from real coders would be appreciated.
07/20/2013 20:39 dredd19#144
can anyone post script for fetid swamp? i tried to edit the script but my hero only stays at one place and never moves.
07/21/2013 08:52 drelder2#145
that has nothing to do with the map but with your files or cript instead even changing maps the screen should change anf the version does work with swamp
07/24/2013 18:44 Blackshark01#146
Quote:
Originally Posted by Luciferos View Post
I've eliminated another problem with the current download of the script. This is probably just from lack of testing, however, the function "ChangeCoords" comes as-is like this:

Func ChangeCoords()
;Changes map coordinates square by square. Moves left to right then moves down one square and goes left to right again.
$wait = 2000 ;sleep (milliseconds) at the end of this function
If $mapX < 585 Then
$mapX += 30
Else
$wait = 2000
$mapX = 15
If $mapY < 591 Then
$mapY += 17
EndIf
EndIf
;MouseClick("left",$c1X,$c1Y,2,0)
ClickOffsetOfImage("left",60,$buttonsDir,"searchic on",2)
Send($mapX)
;MouseClick("left",$c2X,$c2Y,2,0)
ClickOffsetOfImage("left",30,$buttonsDir,"searchic on",2)
Send($mapY)
ClickImage($buttonsDir,"searchicon")
Sleep($wait)

In this segment:

If $mapX < 585 Then
$mapX += 30
Else
$wait = 2000
$mapX = 15
If $mapY < 591 Then
$mapY += 17
EndIf
EndIf

It tells the script to check and see if the map x coordinate is below 585, if so, add 30, if not, reset the map x coordinate to 15, and then check the y coordinate. Then, if the y coordinate is less than 590, it tells it to add 17 to the y coordinate, but doesn't tell it what to do if the y-coordinate is MORE than 590, as it does for an x-coordinate over 585. Basically, the map will infinitely cycle left to right at the bottom of the map, never returning to the top. Here's the fix:

If $mapX < 585 Then
$mapX += 30
Else
$wait = 2000
$mapX = 15
If $mapY < 591 Then
$mapY += 17
Else
$wait = 2000
$mapY = 8

EndIf
EndIf

I italicized the snippet of code that needs to be added to make the script return to the top once it is done scanning the bottom row.

Edit: oops, I see some intrepid trailblazer forged this path before me. Regardless, I'm going to leave this up here for people like me who skip to the end of a good book.
=> post #114
07/27/2013 04:18 kaanctn#147
Anyone is upload a video how is work ??
07/27/2013 12:36 Maffiagang#148
How sad, i see the developer of this script has abandoned it...
07/27/2013 14:34 Hailraiser#149
hi i have a problem whit the search icon in erandel
have to switch in full screen that what happend but he cant find the search icon =/
07/27/2013 20:35 sronce#150
need to show steps on how to get it to run for dummys lol if i get it running ill donate good lol

need to have a vid for noobs to install and run this script me and my clan will donate good for an ez working version