|
You last visited: Today at 12:45
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.
12/05/2013, 18:06
|
#271
|
elite*gold: 0
Join Date: Nov 2013
Posts: 26
Received Thanks: 8
|
You can always find the autoit symbol in the running processes and right mouse click and exit, or do it via task manager.
|
|
|
12/07/2013, 01:22
|
#272
|
elite*gold: 0
Join Date: May 2012
Posts: 6
Received Thanks: 0
|
when i use the daru bot on the right map it says checking for (all mobs names) and end with checking for searchicon but nothing happent after that nomatter how many times i press Q btw i only did what the read my file said do i need to change somting in the daru script for it to find like the directionairy where the pic are for those mobs or somthing els ? first time working with this sqript i normaly use autohotkeys so im not used to this program working
|
|
|
12/07/2013, 10:36
|
#273
|
elite*gold: 0
Join Date: Nov 2013
Posts: 8
Received Thanks: 0
|
Quote:
Originally Posted by kampfa
when i use the daru bot on the right map it says checking for (all mobs names) and end with checking for searchicon but nothing happent after that nomatter how many times i press Q btw i only did what the read my file said do i need to change somting in the daru script for it to find like the directionairy where the pic are for those mobs or somthing els ? first time working with this sqript i normaly use autohotkeys so im not used to this program working
|
What I did it was I go in full screen on map and find one mob and click on it and then I save image and edit in photoshop so I get the Attack button out and I change him whit then attack button in file and I simple open scripts edit what map ,.. and go full screen and press q and he begin serach and he start attacking so its prfect now
Only problem is he dont click recruit troops so it farm without army
|
|
|
12/07/2013, 11:15
|
#274
|
elite*gold: 0
Join Date: Jan 2011
Posts: 5
Received Thanks: 0
|
whys there such little support for something so great can someone tell me where i can get an update on this bot that actually works with lvl 40 troops and sand for 1360x768 or even 1920x1080 i could really really use this.
|
|
|
12/08/2013, 15:54
|
#275
|
elite*gold: 0
Join Date: Nov 2013
Posts: 3
Received Thanks: 0
|
Hi.
This works for me with Sands, on Firefox, in fullscreen mode.
All i changed are the coords for Sands and re-did the images.
Think you can do the same for the lvl40 troops. I never have tried the recruiting options.
Code:
;===========================================================================================================
;@Author Ewvyx I wrote this so please don't slap your name on it (v1.1.0a).
;@Author telboy007 Added GUI and expanded for (eventually) all maps and troops (v1.1.1a).
;Thanks to fred3200 for the Sands bmps
;
;This script searches through the wilds of Erandel (and other maps now! ;) ) and fights Managogs for Daru Pearls
;v1.1.0a was designed for a 1920x1080 display
;v1.1.1a was designed for a 1680x1050 display (so err... thats progress for you I suppose!)
;Works best if you start in the top left most corner of the wilds map (less wait time for your character to move to the first found managog)
#RequireAdmin
#include <ImageSearch.au3>
#include <GUIConstantsEx.au3>
;===========================================================================================================
;Global Variables (DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING)
;X Coords Input on 1920x1080 : 1518x198
;Y Coords Input on 1920x1080 : 1553x198
$Version = "1.1.1b"
Global $Paused
Global $gX = 0
Global $gY = 0
Global $c1X = 0
Global $c1Y = 0
Global $c2X = 0
Global $c2Y = 0
Global $success = False ;boolean for various checks
Global $managogFound = False ;flag for when a managog is found by _ImageSearch
Global $tolFail = 0 ;tolerance failures for _ImageSearch
Global $troopRecruitY = 0 ;Y coordinate of specified troop portrait in recruit troops window
Global $searchCoordsFound = False
$bmpLocation = @ScriptDir & "\Pics"
$managogsDir = "Managogs"
$buttonsDir = "Buttons"
;===========================================================================================================
;GUI Defined Variables
Global $mapname = "Sands"
Global $mapX = 0
Global $mapY = 0
Global $collectTreasure = True
Global $hpPack = False
Global $troops = "Warlock"
Global $defaultCheckRate = .3
;===========================================================================================================
;Map movement and sizes
;sets up the default map movements
Global $yaxis = "down" ;tells the script to move up or down the map
Global $xaxis = "right" ;tells the script to move right or left across the maps
Global $newdir =""
;sets dimensions of map
Global $mapXstart=15
Global $mapYstart=8
;===========================================================================================================
;HotKeys
HotKeySet("{END}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("q","RunScript")
HotKeySet("x","ChangeCoords")
;===========================================================================================================
;~Functions
Func getinfoGUI()
Local $msg, $n1, $n2, $n3, $n4, $n5, $n6, $n7, $n8
GUICreate("Daru Farmbot v1.1.1b", 300, 200)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("Map",10,15)
$n1 = GUICtrlCreateCombo("Autaric", 60, 10,150)
GUICtrlSetData(-1, "Murken|Swamp|Sands|Erandel", $mapname)
GUICtrlCreateLabel("Troops",10,45)
$n2 = GUICtrlCreateCombo("Lancer", 60, 40,150)
GUICtrlSetData(-1, "Hunter|Paladin|Priest|Gryphon|Knight (not available yet)|Angel (not available yet)|Templar|Warlock", $troops)
GUICtrlCreateLabel("City x co-ord", 10, 75)
$n3 = GUICtrlCreateInput($mapX, 80, 70, 60)
GUICtrlCreateLabel("City y co-ord", 160, 75)
$n4 = GUICtrlCreateInput($mapY, 230, 70, 60)
$n5 = GUICtrlCreateCheckbox("Collect treasure", 10, 100, 120, 20)
$n6 = GUICtrlCreateCheckbox("Use HP pack", 10, 130, 120, 20)
GUICtrlCreateLabel("Managog Detection",10,165)
$n7 = GUICtrlCreateCombo("Slow", 130, 160, 80)
GUICtrlSetData(-1, "Fast", "Slow")
$n8 = GUICtrlCreateButton("Start", 240, 170, 50)
; Run the GUI until the dialog is closed
Do
$msg = GUIGetMsg()
If $msg = $n8 Then
$mapname = GUICtrlRead($n1, 1)
$troops = GUICtrlRead($n2, 1)
$mapX = GUICtrlRead($n3)
$mapY = GUICtrlRead($n4)
If GUICtrlRead($n5) = $GUI_UNCHECKED Then
$collectTreasure = False
Else
$collectTreasure = True
EndIf
If GUICtrlRead($n6) = $GUI_UNCHECKED Then
$hpPack = False
Else
$hpPack = True
EndIf
If GUICtrlRead($n7,1) = "Fast" Then
$defaultCheckRate = .1
Else
$defaultCheckRate = .3
EndIf
GUIDelete()
EndIf
Until $msg = $n8
;now we have the map we can set the correct end sizes
Select
Case $mapname = "Autaric"
Global $mapXend=1985
Global $mapYend=1991
Case $mapname = "Murken"
Global $mapXend=1585
Global $mapYend=1591
Case $mapname = "Swamp"
Global $mapXend=985
Global $mapYend=991
Case $mapname = "Sands"
Global $mapXend=785
Global $mapYend=791
Case $mapname = "Erandel"
Global $mapXend=585
Global $mapYend=591
EndSelect
EndFunc
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
Func Terminate()
Exit 0
EndFunc ;==>Terminate
Func CheckFor($directory,$img,$tolerance=50,$startX=0,$startY=0,$endX=@DesktopWidth,$endY=@DesktopHeight,$seconds=$defaultCheckRate)
$c = 0
MouseMove(0,(@DesktopHeight/2),0)
$string = $bmpLocation & "\" & $directory & "\" & $img & ".bmp"
If $img = "city" Then
$updateString = "Wilds View"
Else
$updateString = $img
EndIf
ToolTip("Checking for " & $updateString,0,0)
$tolerance = 50
If $directory = $managogsDir Then
$tolerance = 100
EndIf
If $img = "treasure" Then
$tolerance = 35
ElseIf $img = "attackingsword" Then
$tolerance = 70
EndIf
If $tolFail > 0 Then
$tolerance += $tolFail
EndIf
Do
$c += 1
Sleep(100)
If $c > ($seconds * 10) Then
Return False
EndIf
;Until _ImageSearchArea($string,1,$startX,$startY,$endX,$endY,$gX,$gY,$tolerance)
Until _ImageSearchArea($string,1,0,0,@DesktopWidth,@DesktopHeight,$gX,$gY,$tolerance)
Sleep(500)
Return True
EndFunc
Func ClickImage($directory,$img,$tolerance=50,$startX=0,$startY=0,$endX=@DesktopWidth,$endY=@DesktopHeight,$seconds=$defaultCheckRate)
If CheckFor($directory,$img,$tolerance,$startX,$startY,$endX,$endY,$seconds) Then
MouseClick("left",$gX,$gY,1,0)
Return True
Else
Return False
EndIf
EndFunc
Func HoverOverImage($directory,$img,$tolerance=50,$startX=0,$startY=0,$endX=@DesktopWidth,$endY=@DesktopHeight,$seconds=$defaultCheckRate)
If CheckFor($directory,$img,$startX,$startY,$endX,$endY,$seconds,$tolerance) Then
MouseMove($gX,$gY,0)
Sleep(2000)
Return True
Else
Return False
EndIf
EndFunc
Func ClickOffsetOfImage($direction,$offset,$directory,$img,$clicks=1,$tolerance=50,$startX=0,$startY=0,$endX=@DesktopWidth,$endY=@DesktopHeight,$seconds=$defaultCheckRate)
If CheckFor($directory,$img,$startX,$startY,$endX,$endY,$seconds,$tolerance) Then
If $direction = "right" Then
$gX += $offset
ElseIf $direction = "left" Then
$gX -= $offset
ElseIf $direction = "up" Then
$gY -= $offset
ElseIf $direction = "down" Then
$gY += $offset
EndIf
MouseClick("left",$gX,$gY,$clicks,0)
Return True
Else
Return False
EndIf
EndFunc
Func ChangeCoords()
;Changes map coordinates square by square. Moves left to right until the far right of the map, moves down one square and then
;moves from right to left until the far left of the map, it alternates this way until it hits the bottom of the map where it
;starts to move back up the map continuing until you quit the script or your account is banned for being a bot! :D
$wait = 2000 ;sleep (milliseconds) at the end of this function
If $yaxis = "down" Then
If $xaxis = "right" Then
If ($mapX + 30) < $mapXend Then
$mapX += 30
Else
$mapY += 17
$newdir = "left"
EndIf
EndIf
If $xaxis = "left" Then
If ($mapX - 30) > $mapXstart Then
$mapX -= 30
Else
$mapY += 17
$newdir = "right"
EndIf
EndIf
If $newdir <> "" Then $xaxis = $newdir
EndIf
If $yaxis = "up" Then
If $xaxis = "right" Then
If ($mapX + 30) < $mapXend Then
$mapX += 30
Else
$mapY -= 17
$newdir = "left"
EndIf
EndIf
If $xaxis = "left" Then
If ($mapX - 30) > $mapXstart Then
$mapX -= 30
Else
$mapY -= 17
$newdir = "right"
EndIf
EndIf
$xaxis = $newdir
EndIf
;check for y axis direction change
Select
Case ($mapY + 17) >= $mapYend
$yaxis = "up"
Case ($mapY - 17) <= $mapYstart
$yaxis = "down"
EndSelect
;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)
EndFunc
Func FindXCoordsFor($directory,$img)
If CheckFor($directory,$img) Then
Return $gX
Else
Return 0
EndIf
EndFunc
Func FindYCoordsFor($directory,$img)
If CheckFor($directory,$img) Then
Return $gY
Else
Return 0
EndIf
EndFunc
Func SearchForAttackSword()
;Searches for the sword icon. Used to make sure SearchForManagogs() actually found something.
If CheckFor($managogsDir,"attackingsword") Or CheckFor($managogsDir,"attackingsword2") Or CheckFor($managogsDir,"attackingsword3") Then
Return True
Else
Return False
EndIf
EndFunc
Func SearchForManagogs()
;Iterates through each managog bitmap until it finds one. Returns false if it doesn't.
Select
Case $mapname="Autaric"
If ClickImage($managogsDir,"autaric_1") Then
Return True
ElseIf ClickImage($managogsDir,"autaric_2") Then
Return True
ElseIf ClickImage($managogsDir,"autaric_3") Then
Return True
ElseIf ClickImage($managogsDir,"autaric_4") Then
Return True
ElseIf ClickImage($managogsDir,"autaric_5") Then
Return True
ElseIf ClickImage($managogsDir,"autaric_6") Then
Return True
ElseIf ClickImage($managogsDir,"autaric_7") Then
Return True
EndIf
Case $mapname="Murken"
If ClickImage($managogsDir,"murken_1") Then
Return True
ElseIf ClickImage($managogsDir,"murken_2") Then
Return True
ElseIf ClickImage($managogsDir,"murken_3") Then
Return True
ElseIf ClickImage($managogsDir,"murken_4") Then
Return True
ElseIf ClickImage($managogsDir,"murken_5") Then
Return True
ElseIf ClickImage($managogsDir,"murken_6") Then
Return True
ElseIf ClickImage($managogsDir,"murken_7") Then
Return True
ElseIf ClickImage($managogsDir,"murken_8") Then
Return True
ElseIf ClickImage($managogsDir,"murken_9") Then
Return True
ElseIf ClickImage($managogsDir,"murken_10") Then
Return True
EndIf
Case $mapname="Swamp"
If ClickImage($managogsDir,"swamp_1") Then
Return True
ElseIf ClickImage($managogsDir,"swamp_2") Then
Return True
ElseIf ClickImage($managogsDir,"swamp_3") Then
Return True
ElseIf ClickImage($managogsDir,"swamp_4") Then
Return True
ElseIf ClickImage($managogsDir,"swamp_5") Then
Return True
ElseIf ClickImage($managogsDir,"swamp_6") Then
Return True
ElseIf ClickImage($managogsDir,"swamp_7") Then
Return True
ElseIf ClickImage($managogsDir,"swamp_8") Then
Return True
EndIf
Case $mapname="Sands"
If ClickImage($managogsDir,"archer") Or ClickImage($managogsDir,"archer2") Or ClickImage($managogsDir,"archer3") Then
Return True
ElseIf ClickImage($managogsDir,"duel sword") Or ClickImage($managogsDir,"duel sword2") Or ClickImage($managogsDir,"duel sword3") Then
Return True
ElseIf ClickImage($managogsDir,"spear") Or ClickImage($managogsDir,"spear2") Or ClickImage($managogsDir,"spear3") Then
Return True
ElseIf ClickImage($managogsDir,"1sword") Or ClickImage($managogsDir,"1sword2") Or ClickImage($managogsDir,"1sword3") Then
Return True
ElseIf ClickImage($managogsDir,"sword2") Or ClickImage($managogsDir,"sword3") Then
Return True
ElseIf ClickImage($managogsDir,"paladin") Or ClickImage($managogsDir,"paladin2") Or ClickImage($managogsDir,"paladin3") Then
Return True
ElseIf ClickImage($managogsDir,"skell") Or ClickImage($managogsDir,"skell2") Or ClickImage($managogsDir,"skell3") Then
Return True
EndIf
Case $mapname="Erandel"
If ClickImage($managogsDir,"bear(black)") Or ClickImage($managogsDir,"bear(black)2") Then
Return True
ElseIf ClickImage($managogsDir,"bear(brown)") Then
Return True
ElseIf ClickImage($managogsDir,"goblin3") Or ClickImage($managogsDir,"goblin2") Or ClickImage($managogsDir,"goblin") Then
Return True
ElseIf ClickImage($managogsDir,"goblin(purple)") Then
Return True
ElseIf ClickImage($managogsDir,"griffon") Then
Return True
ElseIf ClickImage($managogsDir,"paladin") Or ClickImage($managogsDir,"paladin2") Then
Return True
EndIf
Case Else
Return False
EndSelect
;check for those caches!
If $collectTreasure Then
If ClickImage($managogsDir,"treasure2") Then
Return True
EndIf
EndIf
EndFunc
Func WaitForAttack()
;Waits for your character to get to the managog. If the attack button does not appear after 1 min, it will search for and click on the managog again.
If ClickImage($buttonsDir,"attack",0,0,@DesktopWidth,@DesktopHeight,1,50) Then
$success = True
Sleep(1000)
Else
$success = False
EndIf
EndFunc
Func CheckAFKMode()
;Ensures AFK mode is on for faster farming.
ClickImage($buttonsDir,"afkmode")
EndFunc
Func CheckWildsView()
;Returns True if the city button is in view, false if not.
If CheckFor($buttonsDir,"city") Then
Return True
Else
Return False
EndIf
EndFunc
Func CheckLowTroops()
;Ensures troop count doesn't drop too low.
If ClickImage($buttonsDir,"recruittroops") Then
Return True
Else
Return False
EndIf
EndFunc
Func CheckLowHP()
;Ensures HP doesn't drop too low.
If ClickImage($buttonsDir,"usehppack") Then
Return True
Else
Return False
EndIf
EndFunc
Func RecruitTroops()
;Recruits more troops
$troopPortrait = ""
Select
Case $troops = "Lancer"
$troopPortrait = "portrait_lancer"
Case $troops = "Hunter"
$troopPortrait = "portrait_hunter"
Case $troops = "Paladin"
$troopPortrait = "portrait_paladin"
Case $troops = "Priest"
$troopPortrait = "portrait_priest"
Case $troops = "Gryphon"
$troopPortrait = "portrait_gryphon"
Case $troops = "Knight"
$troopPortrait = "not_available_yet"
Case $troops = "Angel"
$troopPortrait = "not_available_yet"
Case $troops = "Templar"
$troopPortrait = "templarportrait"
Case $troops = "Warlock"
$troopPortrait = "warlockportrait"
EndSelect
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
Func UseHPPack()
;uses hp pack
If ClickImage($buttonsDir,"hppack") Then
ClickImage($buttonsDir,"use")
ClickImage($buttonsDir,"x")
Else
;can't find hp packs then turn this feature off
$hpPack = False
EndIf
EndFunc
Func RunScript()
;MsgBox (1,"Debug info 1","Map: " & $mapname & ", Troops: " & $troops & ", x co-ord: " & $mapX & ", y co-ord: " & $mapY)
;MsgBox (1,"Debug info 2","Map dimensions: " & $mapXstart & " : " & $mapXend & ", " & $mapYstart & " : " & $mapYend)
;MsgBox (1,"Debug info 3","Cache: " & $collectTreasure & ", Check: " & $defaultCheckRate)
;Main script activated by hotkey
While 1
If CheckWildsView() Then
Do
If ClickImage($buttonsDir,"attack") Then
Sleep(500)
ElseIf CheckLowTroops() Then
RecruitTroops()
ElseIf CheckLowHP() Then
UseHPPack()
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
;===========================================================================================================
;Main
getinfoGUI()
While 1
ToolTip("Press 'q' to begin...",0,0)
Sleep(100)
WEnd
|
|
|
12/08/2013, 21:46
|
#276
|
elite*gold: 0
Join Date: Dec 2013
Posts: 4
Received Thanks: 0
|
Does anyone have a autoit script to auto collect sylphs?
|
|
|
12/09/2013, 14:20
|
#277
|
elite*gold: 0
Join Date: Nov 2013
Posts: 26
Received Thanks: 8
|
Quote:
Originally Posted by thrusha420
whys there such little support for something so great can someone tell me where i can get an update on this bot that actually works with lvl 40 troops and sand for 1360x768 or even 1920x1080 i could really really use this.
|
Because since the original post the various people that have tried to help out have done so in their own time, and sometimes we run out.
I for one won't give a lifetime guarantee when I do my final version.
|
|
|
12/11/2013, 12:15
|
#278
|
elite*gold: 0
Join Date: Nov 2013
Posts: 3
Received Thanks: 1
|
Slyph bot script
In the German script P = Pause, ESC = close
Hi all. The Dura scripts all work fine but you need to redo the pics and you need to read the readme txt and do what it tells you.
|
|
|
12/11/2013, 15:10
|
#279
|
elite*gold: 0
Join Date: Nov 2013
Posts: 26
Received Thanks: 8
|
Yeah what he said.  Pinky promise that I will put out another version soon with the missing bits (although you will all probably need to redo the pics still).
|
|
|
12/14/2013, 14:20
|
#280
|
elite*gold: 0
Join Date: Nov 2013
Posts: 26
Received Thanks: 8
|
Post #224 latest and probably last version of my updated daru script.
|
|
|
12/15/2013, 11:57
|
#281
|
elite*gold: 0
Join Date: Aug 2013
Posts: 246
Received Thanks: 20
|
Anyone can share the German Version of it ?
|
|
|
12/15/2013, 18:31
|
#282
|
elite*gold: 0
Join Date: Dec 2013
Posts: 4
Received Thanks: 0
|
The iris bot works on Legend Online (Brazilian Wartune) too, thx!
|
|
|
12/15/2013, 22:51
|
#283
|
elite*gold: 0
Join Date: Dec 2013
Posts: 10
Received Thanks: 2
|
Iris Bot _ Confirmed : Through FaceBook no problems.
|
|
|
12/17/2013, 09:33
|
#284
|
elite*gold: 0
Join Date: Sep 2013
Posts: 10
Received Thanks: 1
|
When will there be a world boss bot? I am missing out both WB's due to timezone. It really sucks. Also make the world boss bot work on 2 screens (if possible). TY
|
|
|
12/18/2013, 03:09
|
#285
|
elite*gold: 0
Join Date: Dec 2013
Posts: 10
Received Thanks: 2
|
for the FAUN64 sylph bot ... can i get it scripted for 1280x1024 please
im getting no response on it clicking the sylphs
|
|
|
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 +1. The time now is 12:52.
|
|