Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames
You last visited: Today at 10:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Wartune] E's AutoIt Scripts Daru Farmbot

Discussion on [Wartune] E's AutoIt Scripts Daru Farmbot within the Browsergames forum part of the Other Online Games category.

Reply
 
Old 05/29/2013, 21:17   #31
 
Ewvyx's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 22
Received Thanks: 45
Hmm, sounds like it still isn't finding the search icon (magnifying lens) then. I'm guessing it is just clicking in the top left corner then?
Ewvyx is offline  
Old 05/29/2013, 22:29   #32
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 18
what i did to get it to work

Code:
EndIf
	;MouseClick("left",$c1X,$c1Y,2,0)
	ClickOffsetOfImage("left",60,$buttonsDir,"searchicon",2)
	Send($mapX)
	;MouseClick("left",$c2X,$c2Y,2,0)
	ClickOffsetOfImage("left",30,$buttonsDir,"searchicon",2)
	Send($mapY)
	ClickImage($buttonsDir,"searchicon")
	Sleep($wait)
to

Code:
 
     MouseClick("left",832,21,2,0)
     Send($mapX)
     MouseClick("left",868,21,2,0)
     Send($mapY)
     MouseClick("left",900,21,2,0)
     Sleep($wait)

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.
VVayinsane is offline  
Old 05/29/2013, 22:47   #33
 
Ewvyx's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 22
Received Thanks: 45
Quote:
Originally Posted by VVayinsane View Post
what i did to get it to work

Code:
EndIf
	;MouseClick("left",$c1X,$c1Y,2,0)
	ClickOffsetOfImage("left",60,$buttonsDir,"searchicon",2)
	Send($mapX)
	;MouseClick("left",$c2X,$c2Y,2,0)
	ClickOffsetOfImage("left",30,$buttonsDir,"searchicon",2)
	Send($mapY)
	ClickImage($buttonsDir,"searchicon")
	Sleep($wait)
to

Code:
 
     MouseClick("left",832,21,2,0)
     Send($mapX)
     MouseClick("left",868,21,2,0)
     Send($mapY)
     MouseClick("left",900,21,2,0)
     Sleep($wait)

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.
Ewvyx is offline  
Old 05/30/2013, 18:26   #34
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 18
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?
VVayinsane is offline  
Old 05/30/2013, 23:38   #35
 
elite*gold: 0
Join Date: Feb 2012
Posts: 39
Received Thanks: 9
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
richardrah is offline  
Old 05/31/2013, 19:48   #36
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 18
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

Heres one of the lines

Code:
ClickOffsetOfImage("up",700,$buttonsDir,"searchicon",2)
I just keeped the name searchicon even though its not looking for the search icon on top
VVayinsane is offline  
Old 06/01/2013, 18:16   #37
 
Ewvyx's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 22
Received Thanks: 45
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.
Ewvyx is offline  
Old 06/01/2013, 19:13   #38
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 18
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
Look at

Code:
;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")
Edit the lines to look like the following

Code:
 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.

Ewvyx is great.....keep up the good work
VVayinsane is offline  
Thanks
1 User
Old 06/02/2013, 23:23   #39
 
elite*gold: 0
Join Date: Oct 2009
Posts: 14
Received Thanks: 0
hello im lf a working daru farm bot u guys have a script for it?
Zapfen20 is offline  
Old 06/03/2013, 04:54   #40
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1
Received Thanks: 0
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
matja is offline  
Old 06/03/2013, 07:53   #41
 
elite*gold: 0
Join Date: Jun 2012
Posts: 1
Received Thanks: 0
Quote:
Originally Posted by Ewvyx View Post
Initial Post
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.
perpetualduplicity is offline  
Old 06/03/2013, 15:38   #42
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 18
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.
Attached Images
File Type: bmp attack.bmp (2.5 KB, 238 views)
VVayinsane is offline  
Thanks
1 User
Old 06/03/2013, 15:44   #43
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 18
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
VVayinsane is offline  
Old 06/03/2013, 17:21   #44
 
Ewvyx's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 22
Received Thanks: 45
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 View Post
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.
Ewvyx is offline  
Old 06/05/2013, 21:16   #45
 
elite*gold: 0
Join Date: Jul 2011
Posts: 2
Received Thanks: 0
will you be adding a facebook compatible version soon? (It's Balenor i believe)
supje is offline  
Reply

Tags
aeria, autoit, script, wartune


Similar Threads Similar Threads
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



All times are GMT +2. The time now is 10:31.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.