[Wartune] E's AutoIt Scripts Daru Farmbot

06/17/2013 02:42 lunaticfringe44#91
Quote:
Originally Posted by Gurnnink View Post
Using DaruDaru...work perfect for me with lock in co-ords of mouse...altough i would like to have one things better....and thats speed. Scrolling/searching is too slow. What should i change to make it faster?

Code:
$defaultCheckRate = .1 ;smaller the number, the faster the image checks are.  increase if managogs aren't being found.
If i change number in this line, lets see even to .099 i get nowhere,its just using "searching attack button/wilds" and not scrolling or looking for managogs :-(...anyway,noob here :-) so be kind at me ...
that happens to me when im in windowed mode.. but only with my 32bit system..not on 64bit for some reason. seems like its not picking up the bmp of your wilds screen..not sure which button it looks for.

as far as speed goes..fix that other issue and youll see the search speed

Ive got fetid swamp of daru bmps working great if anyone needs the images and script...doesnt click ground doesnt miss hardly any troops.

working on troops and health regen now.

if your having trouble what i did and this is important...dont use three different images for one npc..take one "unique" bmp and make sure its a good pic that gets found 1/3 of the times when using picfind script...then use that same image 3 times just name 1 2 and 3...and set your search speed to 1...that runs at the same speed as the animations...so ive found that it will pick it up 95% of the time. ive gotten it to find the bouncing eye 100% of the time and on that one theres no still parts so.also when using bmps dont use anything that resembles any other area of the map or buttons on your scrn...make sure its a unique area of the mob and size is a big part..adjust your screen size up or down to match as best you can so it can fnd. pm me your email and ill send u the images the images i have work great on 1900x1200 -1900-1080 and 1600-900
06/18/2013 02:19 VVayinsane#92
Hey everyone, sorry i have not been on much. Im trying to edit the script to search faster. Im almost got it working right. Haven a few issues but I have a feeling ill get it working right. Once i get if working right lll post. What im doing is if no mob is seen like its name then it wont search mobs. It will cut the time down a lot. Only other issue is that chests wont be seen but i dont care about chests right now only mobs cause i want dura.

After i posted this..i think i got it...... If no mob is seen it will bypass the search for mob and go to the next coords. If a mob is seen it will search. Unfortunately chests arnt going to be seen so if you dont care about them so much then use my script. Im going to be testing it tonight and tomorrow if all works well ill give post corrections that are needed.
06/18/2013 02:50 VVayinsane#93
I know people dont want to wait. Try it out and let me know what you think.

Go to the following in the script.

Code:
Func RunScript()
	;Main script activated by hotkey
	While 1
		If CheckWildsView() Then
			Do
				If ClickImage($buttonsDir,"attack") Then
					Sleep(500)
				ElseIf CheckLowTroops() Then
					RecruitTroops()
				ElseIf SearchForAttackSword() Then
					Do
						WaitForAttack()
					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()
				EndIf
			Until $success = True
			If $success = True Then
				$managogFound = False
				CheckAFKMode()
			EndIf
		Else
			$success = False
			$managogFound = False
			CheckAFKMode()
		EndIf	
	WEnd
EndFunc
Copy and past bellow

Code:
Func RunScript()
	;Main script activated by hotkey
	While 1
		If CheckWildsView() Then
			Do
				If ClickImage($buttonsDir,"attack") Then
					Sleep(500)
				ElseIf CheckLowTroops() Then
					RecruitTroops()
				ElseIf SearchForAttackSword() Then
					Do
						WaitForAttack()
					Until SearchForAttackSword() = False Or ClickImage($buttonsDir,"attack") = True
				ElseIf CheckFor($managogsDir,"mob") = True Or CheckFor($managogsDir,"chest") = True And SearchForManagogs() Then
					ToolTip("Managog found!",0,0)
					Sleep(1000)
					$managogFound = True
					Do
						WaitForAttack()
					Until SearchForAttackSword() = False Or ClickImage($buttonsDir,"attack") = True
				ElseIf CheckFor($managogsDir,"mob") = True Or CheckFor($managogsDir,"chest") = True And $success = False Then
					$managogFound = False
					ChangeCoords()
				ElseIf $managogFound = False Then
					ChangeCoords()
				EndIf
			Until $success = True
			If $success = True Then
				$managogFound = False
				CheckAFKMode()
			EndIf
		Else
			$success = False
			$managogFound = False
			CheckAFKMode()
		EndIf	
	WEnd
EndFunc
Once that is done. Take the picture i have attached and put it in your Managogs folder.

Ive also edit it to also look for the chest and mob and if nothing is found it will skip searching for them and go to the next coords. if a chest or mob is on the screen then it will search managogs..... This will make the bot faster. helps this help people..
06/18/2013 22:52 mqis#94
Will test out the new code :)
06/19/2013 00:04 VVayinsane#95
Anyone has any feedback? Quick fix you need to add anouther mob line. Bellow is a second lvl picture. named mob2. So bellow is a fix

Code:
Do
						WaitForAttack()
					Until SearchForAttackSword() = False Or ClickImage($buttonsDir,"attack") = True
				ElseIf CheckFor($managogsDir,"mob") = True Or CheckFor($managogsDir,"mob2") = True Or CheckFor($managogsDir,"chest") = True And SearchForManagogs() Then
					ToolTip("Managog found!",0,0)
					Sleep(1000)
					$managogFound = True
					Do
						WaitForAttack()
					Until SearchForAttackSword() = False Or ClickImage($buttonsDir,"attack") = True
				ElseIf CheckFor($managogsDir,"mob") = True Or CheckFor($managogsDir,"mob2") = True Or CheckFor($managogsDir,"chest") = True And $success = False Then
					$managogFound = False
					ChangeCoords()
				ElseIf $managogFound = False Then
					ChangeCoords()
06/19/2013 02:55 NIGHTMAREboss#96
can anyone make this script work on a 1680 x 1050 screen on chrome? please? :)
06/19/2013 15:51 VVayinsane#97
Nightmareboss....Please can you read the forums..Dont feel like double posting
06/19/2013 17:35 lunaticfringe44#98
Quote:
Originally Posted by NIGHTMAREboss View Post
can anyone make this script work on a 1680 x 1050 screen on chrome? please? :)

dont worrys so much about scrn res..mess around with the zoom try it in windowed mode and try diff size windows aswell

btw Wavv good idea...whered u come up with that.......
06/19/2013 22:55 VVayinsane#99
Just idea, trying to improve on Ewvyx awesome work. Anouther script im working on is every 4 hours it will stop farming darus and go to your farm, pick, plant and then go back to farming. Hope to get it working soon.
06/20/2013 06:50 jualsempolan#100
Only guild spinner work but slow :(
please edit the script for 1024x768
playing wartune at r2games
thanks
06/20/2013 16:43 VVayinsane#101
Jualsempolan I use that server and you have to edit the coords. if you read the forums you would relise that..bellow is a fix for you.

Open the daru daru go to

Func ChangeCoords()

make it look like bellow

Code:
$wait = 2000 ;sleep (milliseconds) at the end of this function
	If $mapX < 989 Then
		$mapX += 15
	Else
		$wait = 2000
		$mapX = 10
		If $mapY < 992 Then			
			$mapY += 17
		EndIf
	 EndIf
	 MouseClick("left",832,21,2,0) ;<=== change these coords
         Send($mapX)
         MouseClick("left",868,21,2,0) ;<=== change these coords
         Send($mapY)
	 MouseClick("left",900,21,2,0)
	 Sleep($wait
EndFunc)
You only need to edit the mouseclick lines
06/20/2013 17:52 RolloMan#102
Quote:
Originally Posted by VVayinsane View Post
Jualsempolan I use that server and you have to edit the coords. if you read the forums you would relise that..bellow is a fix for you.

Open the daru daru go to

Func ChangeCoords()

make it look like bellow

Code:
$wait = 2000 ;sleep (milliseconds) at the end of this function
	If $mapX < 989 Then
		$mapX += 15
	Else
		$wait = 2000
		$mapX = 10
		If $mapY < 992 Then			
			$mapY += 17
		EndIf
	 EndIf
	 MouseClick("left",832,21,2,0) ;<=== change these coords
         Send($mapX)
         MouseClick("left",868,21,2,0) ;<=== change these coords
         Send($mapY)
	 MouseClick("left",900,21,2,0)
	 Sleep($wait
EndFunc)
You only need to edit the mouseclick lines
How do I know whice cords I need write in?
like I click on mob and h show me crods and I write in or what?
06/20/2013 18:02 VVayinsane#103
we have the same screen res. The coords should work
06/20/2013 18:44 jualsempolan#104
Quote:
Originally Posted by VVayinsane View Post
Jualsempolan I use that server and you have to edit the coords. if you read the forums you would relise that..bellow is a fix for you.

Open the daru daru go to

Func ChangeCoords()

make it look like bellow

Code:
$wait = 2000 ;sleep (milliseconds) at the end of this function
	If $mapX < 989 Then
		$mapX += 15
	Else
		$wait = 2000
		$mapX = 10
		If $mapY < 992 Then			
			$mapY += 17
		EndIf
	 EndIf
	 MouseClick("left",832,21,2,0) ;<=== change these coords
         Send($mapX)
         MouseClick("left",868,21,2,0) ;<=== change these coords
         Send($mapY)
	 MouseClick("left",900,21,2,0)
	 Sleep($wait
EndFunc)
You only need to edit the mouseclick lines

thanks VVayinsane
but its still wrong correction
so i made little correction

Code:
$wait = 2000 ;sleep (milliseconds) at the end of this function
	If $mapX < 989 Then
		$mapX += 15
	Else
		$wait = 2000
		$mapX = 10
		If $mapY < 992 Then			
			$mapY += 17
		EndIf
	 EndIf
	 MouseClick("left",832,21,2,0) ;<=== change these coords
         Send($mapX)
         MouseClick("left",868,21,2,0) ;<=== change these coords
         Send($mapY)
	 MouseClick("left",900,21,2,0)
	 Sleep($wait)
EndFunc
and must in fullscreen
06/21/2013 14:59 KilleN^#105
Everything works fantastic. My problem now is that once I get to the bottom of the map the script keeps looping over and over on the bottom Y coords. It obviously cant go down further. Is there a way to begin the script over from the beginning?