Hello guys, sorry for posting this request, but i tryied to figure out how to modify an autoit script for Wartune game,to remove some features, but after 1 month of trying to solve it, i couldnt find it.The game is compiled by a german guy, that`s why i cant understand very much from it, and i dared to ask help in here. Is a Sylph farm autoit script.
What i tryied to remove is an function that open a map and choose a random position on that map. That is kinda annoying because those random(or fixed,not sure) are dead spots, where the char stops do the job.
If anyone can help and need and screens from game play i can add them , i will appreciate any help.
And another problem is when char collect the sylphs, the hand that collect it is kinda far away from the pet to farm.
Here is the source:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
GUICreate("Bot for all Sylphs", 270, 240)
GUICtrlCreateLabel("Starting of Bot with clicking the button", 45, 10)
GUICtrlCreateLabel("Please set the char in the level", 50, 30)
GUICtrlCreateLabel("where you want to farm selected sylph", 45, 50)
GUICtrlCreateLabel("<P> - pausing script", 87, 80)
GUICtrlCreateLabel("<ESC> - exit script", 90, 100)
$irisbot = GUICtrlCreateButton("Iris-Bot", 60, 140, 150)
$faunbot = GUICtrlCreateButton("Pan-Bot", 60, 160, 150)
$amazonbot = GUICtrlCreateButton("Amazon Queen-Bot", 60, 180, 150)
$goblinbot = GUICtrlCreateButton("Goblin Eve-Bot", 60, 200, 150)
GUISetState(@SW_SHOW)
Global $Paused, $vab, $countdown = 0
HotKeySet("p", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d
$cccount = 0
While 1
$msg = GUIGetMsg()
Select
Case $msg = $irisbot
Sleep(5000)
While 1
Sleep(300)
If $vab == "kampfiris" Then
$vab = kampfiris();
Else
$vab = search_iris()
EndIf
WEnd
Case $msg = $faunbot
Sleep(5000)
While 1
Sleep(300)
If $vab == "kampffaun" Then
$vab = kampffaun();
Else
$vab = search_faun()
EndIf
WEnd
Case $msg = $amazonbot
Sleep(5000)
While 1
Sleep(300)
If $vab == "kampfamazon" Then
$vab = kampfamazon();
Else
$vab = search_amazon()
EndIf
WEnd
Case $msg = $goblinbot
Sleep(5000)
While 1
Sleep(300)
If $vab == "kampfgoblin" Then
$vab = kampfgoblin();
Else
$vab = search_goblin()
EndIf
WEnd
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
Func search_iris()
$varc = 0
$search = PixelSearch( 150, 150, 1020, 705, 0xd5f5cf )
$cccount = $cccount + 1
If IsArray($search) Then
$cccount = 0
ToolTip("")
MouseMove($search[0], $search[1], 1)
MouseClick("left")
sleep(7000)
$varc=1
ConsoleWrite("searching Iris")
$search_loot = PixelSearch( 350, 450, 1000, 680, 0x030303 )
If IsArray($search_loot) Then
ConsoleWrite('clicked sylph')
sleep(7000)
$vab = "kampfiris"
Else
if($varc == 1) Then
MouseMove(400, 400, 1)
WinSetOnTop('hello','',1)
EndIf
EndIf
Else
ConsoleWrite($varc)
EndIf
if($cccount > 50) Then
$map = PixelSearch( 1035, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
MouseClick("left",Random(415,675,1),Random(315,550 ,1))
sleep(7000)
$kreuz = PixelSearch( 900, 150, 1050, 250, 0xFF2014 )
If IsArray($kreuz) Then
MouseMove($map[0], $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
$cccount=0
Endif
Return $vab;
EndFunc
Func kampfiris()
;~ fighting function
ConsoleWrite('fighting')
$countdown = $countdown + 1
$search_kampf = PixelSearch( 350, 750, 900, 950, 0x080807 )
;(755,875,1220,935)
If IsArray($search_kampf) Then
Send("{3}")
Send("{SPACE}")
Send("{2}")
Send("{1}")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$end_kampf = PixelSearch( 100, 50, 270, 80, 0x800303 )
;(353,180,512,192)
If IsArray($end_kampf) Then
$vab = false
$countdown = 0
Endif
Elseif $countdown > 6 Then
;~ not in fight
$vab = false;
$countdown = 0
ConsoleWrite('not in fight');
EndIf
Return $vab;
EndFunc
Func search_faun()
$varc = 0
$search = PixelSearch( 150, 150, 1020, 705, 0x306313 )
$cccount = $cccount + 1
If IsArray($search) Then
$cccount = 0
ToolTip("")
MouseMove($search[0], $search[1], 1)
MouseClick("left")
sleep(7000)
$varc=1
ConsoleWrite("searching Pan")
;~ dont fight a monster which is in fight
$search_loot = PixelSearch( 350, 450, 1000, 680, 0x030303 )
If IsArray($search_loot) Then
ConsoleWrite('clicked sylph')
sleep(7000)
$vab = "kampffaun"
Else
if($varc == 1) Then
MouseMove(400, 400, 1)
WinSetOnTop('hello','',1)
EndIf
EndIf
Else
;~ Portal()
;~ sleep(1000)
ConsoleWrite($varc)
EndIf
if($cccount > 50) Then
$map = PixelSearch( 1035, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
MouseClick("left",Random(415,675,1),Random(315,550 ,1))
sleep(7000)
$kreuz = PixelSearch( 900, 150, 1050, 250, 0xFF2014 )
If IsArray($kreuz) Then
MouseMove($map[0], $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
$cccount=0
Endif
Return $vab;
EndFunc
Func kampffaun()
;~ fighting function
ConsoleWrite('fighting')
$countdown = $countdown + 1
$search_kampf = PixelSearch( 350, 750, 900, 950, 0x080807 )
;(755,875,1220,935)
If IsArray($search_kampf) Then
Send("{3}")
Send("{SPACE}")
Send("{2}")
Send("{1}")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$end_kampf = PixelSearch( 100, 50, 270, 80, 0x800303 )
;(353,180,512,192)
If IsArray($end_kampf) Then
$vab = false
$countdown = 0
Endif
Elseif $countdown > 6 Then
;~ nicht kampf
$vab = false;
$countdown = 0
ConsoleWrite('not in fight');
EndIf
Return $vab;
EndFunc
Func search_amazon()
$varc = 0
$search = PixelSearch( 150, 150, 1020, 705, 0xFFB790 )
$cccount = $cccount + 1
If IsArray($search) Then
$cccount = 0
ToolTip("")
MouseMove($search[0], $search[1], 1)
MouseClick("left")
sleep(7000)
$varc=1
ConsoleWrite("searching sylph")
;~ dont fight a monster which is in fight
$search_loot = PixelSearch( 350, 450, 1000, 680, 0x030303 )
If IsArray($search_loot) Then
ConsoleWrite('clicked sylph')
sleep(7000)
$vab = "kampfamazon"
Else
if($varc == 1) Then
MouseMove(400, 400, 1)
WinSetOnTop('hello','',1)
EndIf
EndIf
Else
;~ Portal()
;~ sleep(1000)
ConsoleWrite($varc)
EndIf
if($cccount > 50) Then
$map = PixelSearch( 1035, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
MouseClick("left",Random(415,675,1),Random(315,550 ,1))
sleep(7000)
$kreuz = PixelSearch( 900, 150, 1050, 250, 0xFF2014 )
If IsArray($kreuz) Then
MouseMove($map[0], $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
$cccount=0
Endif
Return $vab;
EndFunc
Func kampfamazon()
;~ fighting function
ConsoleWrite('fighting')
$countdown = $countdown + 1
$search_kampf = PixelSearch( 350, 750, 900, 950, 0x080807 )
;(755,875,1220,935)
If IsArray($search_kampf) Then
Send("{3}")
Send("{SPACE}")
Send("{2}")
Send("{1}")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$end_kampf = PixelSearch( 100, 50, 270, 80, 0x800303 )
;(353,180,512,192)
If IsArray($end_kampf) Then
$vab = false
$countdown = 0
Endif
Elseif $countdown > 6 Then
;~ nicht kampf
$vab = false;
$countdown = 0
ConsoleWrite('not in fight');
EndIf
Return $vab;
EndFunc
Func search_goblin()
$varc = 0
$search = PixelSearch( 150, 150, 1020, 705, 0xFF3D7A )
$cccount = $cccount + 1
If IsArray($search) Then
$cccount = 0
ToolTip("")
MouseMove($search[0], $search[1], 1)
MouseClick("left")
sleep(7000)
$varc=1
ConsoleWrite("searching sylph")
;~ dont fight a monster which is in fight
$search_loot = PixelSearch( 350, 450, 1000, 680, 0x030303 )
If IsArray($search_loot) Then
ConsoleWrite('clicked sylph')
sleep(7000)
$vab = "kampfgoblin"
Else
if($varc == 1) Then
WinSetOnTop('hello','',1)
EndIf
EndIf
Else
;~ Portal()
;~ sleep(1000)
ConsoleWrite($varc)
EndIf
if($cccount > 50) Then
$map = PixelSearch( 1035, 400, 1250, 600, 0xccffff )
If IsArray($map) Then
MouseMove($map[0]+5, $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
MouseClick("left",Random(415,675,1),Random(315,550 ,1))
sleep(7000)
$kreuz = PixelSearch( 900, 150, 1050, 250, 0xFF2014 )
If IsArray($kreuz) Then
MouseMove($map[0], $map[1]+2, 1)
MouseClick("left")
EndIf
sleep(7000)
$cccount=0
Endif
Return $vab;
EndFunc
Func kampfgoblin()
;~ fightin function
ConsoleWrite('fighting')
$countdown = $countdown + 1
$search_kampf = PixelSearch( 350, 750, 900, 950, 0x080807 )
;(755,875,1220,935)
If IsArray($search_kampf) Then
Send("{3}")
Send("{SPACE}")
Send("{2}")
Send("{1}")
Send("{up}")
Send("{down}")
Send("{left}")
Send("{right}")
$end_kampf = PixelSearch( 100, 50, 270, 80, 0x800303 )
;(353,180,512,192)
If IsArray($end_kampf) Then
$vab = false
$countdown = 0
Endif
Elseif $countdown > 6 Then
;~ nicht kampf
$vab = false;
$countdown = 0
ConsoleWrite('not in fight');
EndIf
Return $vab;
EndFunc
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist paused',0,0)
WEnd
ToolTip("")
EndFunc
Func Terminate()
Exit 0
EndFunc
Func ShowMessage()
MsgBox(4096,"","That's a message.")
EndFunc






