[Wartune] E's AutoIt Scripts Daru Farmbot

05/27/2013 06:37 Ex-Convict#16
What display resolution are you running? = 1920x1080
What browser are you running? = Chrome (100% zoom)
Are you running Wartune in fullscreen (it shouldn't be)? = windowmode
Did you press q after you ran the script? = YES.

Anything i should edit?
darudaru is just searching for 2hrs nothing happens, thats my concern mate :)

and im playing WTune at FB.
05/27/2013 07:30 Ewvyx#17
Quote:
Originally Posted by Ex-Convict View Post
What display resolution are you running? = 1920x1080
What browser are you running? = Chrome (100% zoom)
Are you running Wartune in fullscreen (it shouldn't be)? = windowmode
Did you press q after you ran the script? = YES.

Anything i should edit?
darudaru is just searching for 2hrs nothing happens, thats my concern mate :)

and im playing WTune at FB.
Are you in Erandel? If not, the bitmaps may not work properly for you.
The variables should be fine the way they are defaulted but you can try increasing the $defaultCheckRate to give the image search more time to find the managogs. It is defaulted at .1, try changing it to .3 or higher (I wouldn't go any higher than 1 as that would take 10 seconds to search).
Does the script change the map coordinates for you? Like does the screen change at all or is it just searching the same screen? If the map coordinates don't change, you won't find anything. So when you say nothing happens, do you mean literally just that? This is a fix I'm working towards with the map coordinates. Right now these are hardcoded in with these coordinates:
1518,198 and 1553,198 in the ChangeCoords() function. If you know the coordinates (on your screen) of the two spots where you type in the map coordinates (top right corner to the left of the magnifying lens) you can replace these coordinates: (around line 114)

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",1518,198,2,0) ;<=== change these coords
	Send($mapX)
	MouseClick("left",1553,198,2,0) ;<=== change these coords
	Send($mapY)
	ClickImage($buttonsDir,"searchicon")
	Sleep($wait)
EndFunc
Until I get a more dynamic way to find these coordinates for everyone's display resolution, you will have to change the hardcoded numbers.
05/27/2013 07:38 Ex-Convict#18
Evrytime you go to diff lvl map u shld edit the scrpt? shld i dl a pic of the mob that are not on this script ah ok didnt see that its for the ERANDEL MAP only. :(

[Wartune] E's AutoIt Scripts Daru Farmbot

Hey guys! This my official release of my Wartune Scripts that I have been working on. The scripts I have written include:

DaruDaru
A wilds farm bot that will search and destroy managogs/treasure caches while you sleep!

;================================================= ================================================== ========
;@Author Ewvyx I wrote this so please don't slap your name on it.

;This script searches through the wilds of Erandel and fights Managogs

really sorry didnt read it. :(
05/27/2013 07:51 Ewvyx#19
Quote:
Originally Posted by Ex-Convict View Post
Evrytime you go to diff lvl map u shld edit the scrpt? shld i dl a pic of the mob that are not on this script ah ok didnt see that its for the ERANDEL MAP only. :(
Ya the mobs are different on each map so it is going to be a matter of gathering good images of all of them before I can start making the script compatible with other maps. As I said before, it is very tricky to get good pictures b/c the background changes and the mobs are animated. So the best pictures to use in the script are portions of the mobs that don't move on the screen.

This project is still in the works but has been taking a back seat to other pertinent projects that have buyers waiting on them so I apologize for the time with which it will take me to put out updates but I will try to have a major update before next Thursday that addresses the hardcoded coordinates.
05/28/2013 09:15 VVayinsane#20
Questiong, The map im in shouldnt really matter cause the coordinates i am at are the same as the script right? It wont move the map. It just keeps the mouse in the middle left side of the screen. It will cycle between wild view and attacking. When at full screen it will cycle between all the other commands like mobs. Screen still wont move. I changed the resolution of my screen to match what im using. I also use the x86. I am trying to just get everything to move before i move to the next step. which is attacking but ill just trying to get one thing working at a time. An idea what im missing or not seeing in the script?
05/28/2013 11:44 Ewvyx#21
Quote:
Originally Posted by VVayinsane View Post
Questiong, The map im in shouldnt really matter cause the coordinates i am at are the same as the script right? It wont move the map. It just keeps the mouse in the middle left side of the screen. It will cycle between wild view and attacking. When at full screen it will cycle between all the other commands like mobs. Screen still wont move. I changed the resolution of my screen to match what im using. I also use the x86. I am trying to just get everything to move before i move to the next step. which is attacking but ill just trying to get one thing working at a time. An idea what im missing or not seeing in the script?
Yes it does matter which map you are on because it only searches for managogs from the Erandel region.

As far as the map not moving, however, that is still dealing with the issue of the hardcoded coordinates I spoke of earlier. This will be addressed in the next patch.
05/28/2013 13:44 VVayinsane#22
I figured it out..bot working great..still need to edit the mobs in my location 21 - 30 but got one mob down...bots great once the bug was worked out.. Still need to edit other stuff but the moving the screen, searching, attacking works... The troops and other stuff are not at this time but ill see what i can do there..;)
05/28/2013 21:15 Ewvyx#23
Quote:
Originally Posted by VVayinsane View Post
I figured it out..bot working great..still need to edit the mobs in my location 21 - 30 but got one mob down...bots great once the bug was worked out.. Still need to edit other stuff but the moving the screen, searching, attacking works... The troops and other stuff are not at this time but ill see what i can do there..;)
If you wouldn't mind sharing the bitmaps that you get to work with your set up, I would greatly appreciate it. I will use them for future releases so that the script can be used in other areas other than just Erandel. :D
05/29/2013 02:12 VVayinsane#24
Sure. I felt i would help everyone with the issue with the bot. please follow the steps to get the bot to work if he is just standing and doing nothing (he may be clicking the screen but you may not see it but he is.... Open

file darudaru in notepad or something else 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",1518,198,2,0) ;<=== change these coords
	Send($mapX)
	MouseClick("left",1553,198,2,0) ;<=== change these coords
	Send($mapY)
	ClickImage($buttonsDir,"searchicon")
	Sleep($wait)
EndFunc
Change the numbers to click on the x and y at the upper right hand corner of your screen. May work for you, dont know... I use 1024x768

My correction are

Code:
 
MouseClick("left",832,21,,2,0) ;<=== change these coords
Send($mapX)
MouseClick("left",868,21,2,0) ;<=== change these coords
Send($mapY
The second thing is getting the bot to click the search icon. No matter how many times i did the picture it would not work. So i just removed

Code:
	ClickImage($buttonsDir,"searchicon")
replaced it with

Code:
	MouseClick("left",900,21,2,0)
which is the location of my search icon.

Also once you click a mob and he goes to attack. He wont click the attack button. You will need to change that. Got that working on my end just need to find the mobs. Im, still getting use to finding out what body parts work best so once i get them all Finnish i will put and update on here. This will be for mobs in map 21 - 30 fyi

Happy farming
05/29/2013 02:27 Ewvyx#25
Quote:
Originally Posted by VVayinsane View Post
Sure. I felt i would help everyone with the issue with the bot. please follow the steps to get the bot to work if he is just standing and doing nothing (he may be clicking the screen but you may not see it but he is.... Open

file darudaru in notepad or something else 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",1518,198,2,0) ;<=== change these coords
	Send($mapX)
	MouseClick("left",1553,198,2,0) ;<=== change these coords
	Send($mapY)
	ClickImage($buttonsDir,"searchicon")
	Sleep($wait)
EndFunc
Change the numbers to click on the x and y at the upper right hand corner of your screen. May work for you, dont know... I use 1024x768

My correction are

Code:
 
MouseClick("left",832,21,,2,0) ;<=== change these coords
Send($mapX)
MouseClick("left",868,21,2,0) ;<=== change these coords
Send($mapY
The second thing is getting the bot to click the search icon. No matter how many times i did the picture it would not work. So i just removed

Code:
	ClickImage($buttonsDir,"searchicon")
replaced it with

Code:
	MouseClick("left",900,21,2,0)
which is the location of my search icon.

Also once you click a mob and he goes to attack. He wont click the attack button. You will need to change that. Got that working on my end just need to find the mobs. Im, still getting use to finding out what body parts work best so once i get them all Finnish i will put and update on here. This will be for mobs in map 21 - 30 fyi

Happy farming
Good explanation, glad someone was able to figure it out from what I said.

You might also get a bitmap of your search icon and attack button. The bitmaps don't always translate well for other resolutions. I will be updating tonight with a change that should get the coordinates for you instead of having it hardcoded. With the coordinates you have, it seems they are the same distance away as my resolution. Hopefully that isn't just a coincidence.

In the near future, the script will start discriminating between resolutions and I will have separate picture directories for each as I get them.
05/29/2013 16:41 VVayinsane#26
I see the update but doesnt work for me but the other one does..when i get time ill look though the code and get it to work. since the other one works for me im sticking with that one. I got about 90 percent of the mobs to be locked on and the treasure chest ( had to redo that one). Once i get them all ill send you the pics. Ones im still working on is the skillitons with shield and without and the wolf. Trying to get it not to click the ground thinking its mob so i have been trying to get different portions and see if they work. Im getting close to getting that map for you.
05/29/2013 16:45 Ewvyx#27
Quote:
Originally Posted by VVayinsane View Post
I see the update but doesnt work for me but the other one does..when i get time ill look though the code and get it to work. since the other one works for me im sticking with that one. I got about 90 percent of the mobs to be locked on and the treasure chest ( had to redo that one). Once i get them all ill send you the pics. Ones im still working on is the skillitons with shield and without and the wolf. Trying to get it not to click the ground thinking its mob so i have been trying to get different portions and see if they work. Im getting close to getting that map for you.
It is most likely due to the fact that it could never find the "searchicon" for you. If you get your own bitmap of that, I'm sure the new code would work. Just replace "searchicon.bmp" in the Buttons folder (also include that with the other pics you will be sending).

Thanks for the assist on these.
05/29/2013 18:20 VVayinsane#28
Did not work for me...I just edit the script like i did before and got it working. Ill play with it later and get it to play with the mobs i have already edited and see how it runs.
05/29/2013 19:40 Ewvyx#29
Quote:
Originally Posted by VVayinsane View Post
Did not work for me...I just edit the script like i did before and got it working. Ill play with it later and get it to play with the mobs i have already edited and see how it runs.
What doesn't work about it? Is it just not typing in the coordinates in the right spot or does it not find the searchicon still? Just trying to pin point the reason.
05/29/2013 21:11 VVayinsane#30
nothing..nothing gets typed and its not even clicking the search bar