Func RecruitTroops()
;Recruits more troops
$troopPortrait = ""
If $troops = "templar" Then
$troopPortrait = "templarportrait"
ElseIf $troops = "warlock" Then
$troopPortrait = "warlockportrait"
EndIf
Do
ClickImage($buttonsDir,"scrollarrow(down)")
Until CheckFor($buttonsDir,$troopPortrait)
$troopRecruitY = $gY
ClickImage($buttonsDir,"recruit",0,$troopRecruitY, @DesktopWidth,@DesktopHeight,0.5,50)
ClickImage($buttonsDir,"ok")
ClickImage($buttonsDir,"x")
EndFunc
to:
Func RecruitTroops()
;Recruits more troops
MouseMove (x,y,0) ;change x,y for coords just a little up the scrolldown arrow
MouseDown ("left")
Sleep (5000)
MouseUp ("left")
Sleep (1000)
MouseClick ("left",x,y,1,0) ;x,y = coords of "recruit" button on "recruit troops" windows
ClickImage($buttonsDir,"ok")
ClickImage($buttonsDir,"x")
EndFunc
this should scrolldown till you see warlock then click on the good "recruit" button
First, thanks for the bot....2nd i want to ask for help, because i dont know how to edit scripts....farm bot is working on harvest and recharging toa but not in weeds and revive. what seems the problem.
p.s. i didnt do anything in the scripts i just followed the readme.txt file
finally got it to work with farming wilds for daru. thanks alot i just cant get it to support my resolution, but hey. i wont be looking at my screen anyways when its running. and again. Thanks alot !
1366x768 farming bot would be great. I dont know alot about coding, but it should't be hard to change resolutions there... I've tried this one, but it just clicks next page.
its all about images detection, so anyone who has issues with the bot,
take screenshot and cutout the required images.
overwrite the xisting. Farmbot woks fine for me, it does everything. Beware there is a limit of 200 Farm exp / day
This occurs when the wrong .DLL is being referenced (based on x86 or 64-bit OS) or when the .DLL is not in the proper file. Make sure you copy the contents of the System32 folder into your C:\Windows\System32 A reboot may be required.
I'm still getting this error, even after placing the DLLs into my System32.
Scratch that. I'm running 64-bit Win7, I had to place the DLLs into my 'SysWOW64' folder, (as well?) No restart required.
Also, I don't know much (read: anything) about scripting, but based on your description of how the program finds the managogs it's searching for, and how your function for inputting coordinates goes a certain number of pixels from an image it finds (the search icon), could you become more universal to all the maps by searching the red text 'Wandering Managog' which is on every managog, then tell it to click x,y pixels away from that text? Or would the various background 'noise' of the pixels behind the words mess that up?
Edit: the edges of the Wandering Managog block of text show the background behind it, but the center of each of the words appears to be a solid image with an unchanging grey/black shaded background. If this truly doesn't change from mob to mob, could you use a sliver from the middle of the word Wandering or Managog to let your script locate any managog?
Hooookay. So I've gotten this working for me by hard-coding my search icon button and coordinate fields. A few things to the designer:
1) I couldn't get it to auto detect my searchicon, I used both your bmp and took my own from a screen shot. It would just hang on 'searching for searchicon' part of the script, and never do anything. As I said, hard coding fixed that but just curious why it might not be recognizing. I'm running chrome in 1280x1024, but it is capable of recognizing the other images just fine.
2) I can't take the interval $defaultCheckRate below .1 or it is unable to detect the wildsview, and therefore just loops searching for wildsview and afkmode. Is it possible to get below this to speed up the process, is it my hardware, or can I assume that you having the interval already at .1 means that that is just the limitation of the software?
3) I was watching my new screen save you programmed for me and saw it frequently pass over both managogs and treasure chests. I realized that this is because they move (their bitmaps change, and the program may not detect them in the very brief interval it is scanning the screen for them). The occasional clouds that pass over the wilds map also mess it up, or when the managogs are underneath your chat box or Campaign button...etc. There's nothing that can be done about that. However, I tested my earlier idea of screen-shotting and extracting a sliver from the middle of the word 'Wandering' that is above the head of EVERY managog on every map, is exactly the same on each one, and doesn't move. I tested it repeatedly and found 100% image recognition, on every map. The problem I am running into is, I don't know how to tell the game to click an offset down and to the right from my bmp in order to actually click the managog's picture, it's trying to click the word, which shows the mob's stats but isn't clickable to attack.
4) In addition, with this method the script only has to check for the attack swords, the Wandering image, and the Treasure image (the treasure chest twinkles, which messes up bmp recognition on it, so I took a sliver screen shot from its title too). This reduces the number of checks from over a dozen to about 4 or 5 between moving the map, which would make the script run more quickly and find managogs more quickly (as well as more reliably).
So I am just trying now to figure out how to tell the thingy to offset its click to click on the picture of the mob instead of the word above the mob. ANy help would be appreciated.
hy guys. i changed the bmps, i managed to get it to click the search icon and coordonates(since it could not find the search icon) but it doesent change the coordonates it keeps clicking the magnifying glass and take it from the top but since the coordonates doesent change the image and hero stays in the same place. annything else seems to work perfect, if there is a managog in the screen it atacks it.
i use chrome, full screen, with a resolution of 1366 x 768 on erandel map (lvl 51+). if annyone knows how to fix it or has similar setings and the script worcks for him/her please let me know
hy guys. i changed the bmps, i managed to get it to click the search icon and coordonates(since it could not find the search icon) but it doesent change the coordonates it keeps clicking the magnifying glass and take it from the top but since the coordonates doesent change the image and hero stays in the same place. annything else seems to work perfect, if there is a managog in the screen it atacks it.
i use chrome, full screen, with a resolution of 1366 x 768 on erandel map (lvl 51+). if annyone knows how to fix it or has similar setings and the script worcks for him/her please let me know
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 < 585 Then
$mapY += 17
EndIf
EndIf MouseClick("left",1091,173,2,0) ;<=== change these coords
Send($mapX)
MouseClick("left",1123,173,2,0) ;<=== change these coords
Send($mapY)
MouseClick("left",1156,173,2,0) ;<=== change these coords
Sleep($wait)
EndFunc
This is how the function should look if you're providing the coordinates yourself, modified function is italicized. Replace 1091,173 with the coordinates of your x-coordinate input field, 1123,173 with your y-coordinate input field, and 1156,173 with the coordinates of your search icon.
If this is what you basically already have, watch your mouse cursor when it goes to do the input and make sure it's clicking the fields properly, if it's on the edge of the input fields, it may not be actually clicking the input field, adjust the coordinates slightly as necessary.
Also, on line 145, I lowered the tolerance for the game resetting the y axis from 591 to 585, because for some reason it was hanging on my computer and not resetting back to the top.
S4 Farmbot mit autoit 08/09/2011 - AutoIt - 6 Replies also ich bin anfänger und versuche gerade einen farmbot zu machen !
und das problem ist das der bot nicht in im client von s4 klicken oder schreiben kann .
Muss ich da was spezielles dafür machen? help pls !
AutoIT scripts 11/21/2009 - AutoIt - 22 Replies Hi,
also ich hatte mal vor nach PHP noch ne andere scriptsprache zu lernen und bin dann bei AutoIT gelandet^^
Ich hab mich mal nen bisschen eingelesen wollte allerdings nich nur die theorie machen, sondern auch an der praxis lernen. ;)
Von daher wollt ich fragen ob ihr eure .au3 scripts hochladen könnt, damit ich und die anderen dies interessiert von euch noch einiges lernen können :P
Freu mich über eure Hilfe
MfG .nAno