The mouse isnt even moving when its looking for searchicon. I tried a different picture but didnt help. The small correction gets it to work.
Yes hard coding the mouseclicks is a work around but it won't work for everyone. The original code searches for the searchicon.bmp and then clicks 60 pixels to the left of it, then does the same thing 30 pixels to the left of it. If you are not seeing this result, it is because the image search on the searchicon.bmp is failing. Feel free to edit it however suits you but I want to make sure the everyday user understands what is going on and that changing it to your mouseclicks is not going to necessarily help them if they are having the same issue.
Good news...I believe i got all the mobs on the 21-30 map..still maken sure everything is clicking like it should. I am still unable todo the searchicon but i keep on trying different pictures to see if i cant get something to work but so far nothing...anyone who tried the new bot get this issue?
Nice going VVayinsane What resolution are you working at? I'm on 1366X768 and not having any luck and I'm quite new to Autoit. Fingers crossed both Evwyx and yourself can work it out and restore my sanity lol
Trying to make a small change. it will take me a while to figure a way but im hopping you can help and make it shorter. But the issue im haven is everything works find but when it goes to attack it will stop bellow the mob and sword will go away. It will then move to a new location and that mob will be skipped and it will go to the next coords and start over. How can i get it to re attack the mob. I notice in the code if false it will then click the attack. How can i just have it rescan then if becomes false a second time then it will click over to attack.
Code:
Until SearchForAttackSword() = False Or ClickImage($buttonsDir,"attack") = True
ElseIf $managogFound = False And SearchForManagogs() Then
ToolTip("Managog found!",0,0)
Sleep(1000)
$managogFound = True
Do
WaitForAttack()
Until SearchForAttackSword() = False Or ClickImage($buttonsDir,"attack") = True
ElseIf $managogFound = True And $success = False Then
$managogFound = False
ChangeCoords()
ElseIf $managogFound = False Then
ChangeCoords()
Ive been playing around with it alittle but have not come up with a solution..
fyi the mobs arnt easy...I am getting maybe 2 mobs that wont always be clicked or the pictures are given me false postive. If you want i can send you what i have. Send me a with your e-mail and ill send you what i have. Im locking on majority of the mobs.
I think i have a work around that will work for everyone. Getting the bot to search cords. The searchicon idea you have is not working. The left 60 and 30 will work for everyone no matter the resolution of the screen right. If so i believe i found a work around that should work for everyone. My way around is going up off of a image at the bottom of the screen. I got it working and if numbers for left on someone else computer then the numbers going up should work for everyone as well no matter if
The character not attacking is a problem with wartune itself. I didn't bother writing in anything for it to recheck because your character usually ends up obstructing the managog anyway so you wouldn't be able to find it.
Thats a good point...most of the time he is not..thats cool if it doesnt have one...
For people who cant get to the bot to work..small guide to get the right x and y for the game.
Open the game and go to wild.
Double click the mouse position ( is where you click darudaru).
Go back to game and make sure its fullscreen
Then go to game and put game as full screen. Put your mouse over the x coords. Press Q and the coords need for that spot will be shown. Write that number down. Then put your mouse over the y and write that down. That will be your x coords. Now put your mouse over the compass and press Q again. Now open darudaru either in note pad or use autoit. Go to
Code:
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("up",700,$buttonsDir,"searchicon3",2)
Send($mapX)
;MouseClick("left",$c2X,$c2Y,2,0)
ClickOffsetOfImage("up",700,$buttonsDir,"searchicon2",2)
Send($mapY)
ClickImage($buttonsDir,"searchicon")
Sleep($wait)
EndFunc
EndIf
MouseClick("left",832,21,2,0) ;<=== change the 832,21 as your x and y coords you found earlyer for the X
Send($mapX)
MouseClick("left",868,21,2,0) ;<=== change the 808,21 as your x and y coords you found earlyer for the Y
Send($mapY)
MouseClick("left",900,21,2,0) <=== change the 900,21 as your x and y coords you found earlyer for the compass location
Sleep($wait)
EndFunc
Save the file and open it up.
Go into game and make sure its fullscreen cause if you dont it wont work( at least for me)
Press Q and you will see the mouse click the x put in numbers, y put in numbers then click search.
Ewvyx has made a great bot but the searchicon always failed no matter what i did. If i use any other picture at the top of the screen like a buff icon for examble it will fail as well.
Hey, i have tested your scripts on resolution 1680x1050 and the coordinates are off. I managed to get the map working for darudaru but when the target is located, the attack popup shows and just stays there. Any suggestions how to fix that?
I also tried farm script and only works for the trees. I noticed in code you search for images what to pick up. How do you specify the area?
Well i hope you can get scripts to work on my resolution as well. tnx in advance and keep up the good work
Just wanted to say thanks for this, I was literally hard-coding all mouse coordinates to do just this because I'm not a wizard with AutoIT in the slightest. I realize you probably have tons of projects, and I've hardcoded this feature in the meantime, but do you think that you could add planting support in the future?
That is, once myFarm is harvested, replant based on inventory position 1 or whatever other variable one would like? Would be nifty. Reached my first "Max Harvested for today" message lol, didn't even know it existed.
Kudos!
----
Yeah later on today for some reason it's not picking up any images whatsoever. I recaptured a few bmps since I'm on 1600x900 and it worked through about one full cycle, and then stopped picking them up again. I don't know what the heck happened. All of my settings are exactly the same.
Once the bot finds the target and the attack windows shows the issue to fix that is to take a new picuter of it. The new image i use is attached so put the image in Pics/buttons file and replace the old one.
perpetualduplicity, i really dont use that one cause i rather have the bot farming wilds for me then my farm while im afk. Ill look at it later and see whats going on.
perpetualduplicity, can you give more detail. Does the bot still keep clicking the next page or will it not go back to your farm and start over or does it just stop all together
I am back from vacation, I will try to work on issues this week. If the attack popup is not getting clicked (the button that says "attack") then the attack.bmp is not being found. There is a way to search a specific area and that is the ImageSearchArea call within CheckFor(). After matja mentioned this, I remembered that this may have been set to search the 1900x1080 game area which might cause issues with other resolutions. Un-comment the line above the ImageSearchArea function call and comment out the bottom one:
Code:
;Until _ImageSearchArea($string,1,$startX,$startY,$endX,$endY,$gX,$gY,$tolerance)
Until _ImageSearchArea($string,1,216,180,1723,1002,$gX,$gY,$tolerance)
to:
Code:
Until _ImageSearchArea($string,1,$startX,$startY,$endX,$endY,$gX,$gY,$tolerance)
;Until _ImageSearchArea($string,1,216,180,1723,1002,$gX,$gY,$tolerance)
This will search the entire screen area (based on your resolution). You can narrow this area down with coordinates for startX, startY, endX, and endY. Just use the mouse position script to find the top left corner (startX,startY) and the bottom right corner (endX,endY) of your wartune app.
Quote:
Originally Posted by perpetualduplicity
Just wanted to say thanks for this, I was literally hard-coding all mouse coordinates to do just this because I'm not a wizard with AutoIT in the slightest. I realize you probably have tons of projects, and I've hardcoded this feature in the meantime, but do you think that you could add planting support in the future?
That is, once myFarm is harvested, replant based on inventory position 1 or whatever other variable one would like? Would be nifty. Reached my first "Max Harvested for today" message lol, didn't even know it existed.
Kudos!
----
Yeah later on today for some reason it's not picking up any images whatsoever. I recaptured a few bmps since I'm on 1600x900 and it worked through about one full cycle, and then stopped picking them up again. I don't know what the heck happened. All of my settings are exactly the same.
Thanks for the feedback Yes, I plan on having planting support soon. Once I get the .ini file working with all the user defined variables, I will roll out this. I will even allow you to specify how many of each kind of seed you want.
I'm not sure about it finding it one time and not the other
The one thing to keep in mind about the images is the background is usually different for each instance of the icons on the screen so you have to get a small snippet of the picture that doesn't change at all.
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