Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <UDFb64.au3>
- #include <md5.au3>
- #include <ButtonConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- #include <MsgBoxConstants.au3>
- #include <StringConstants.au3>
- HotKeySet("{F4}", "exitt")
- HotKeySet("{F3}", "scaner")
- $mapa = inputBox("mapa","localização atual","0,0")
- HotKeySet("{up}", "cima")
- HotKeySet("{down}", "baixo")
- HotKeySet("{left}", "esquerda")
- HotKeySet("{right}", "direita")
- HotKeySet("{NUMPAD8}", "cima1")
- HotKeySet("{NUMPAD2}", "baixo1")
- HotKeySet("{NUMPAD4}", "esquerda1")
- HotKeySet("{NUMPAD6}", "direita1")
- $mapax = StringSplit($mapa, ',', $STR_ENTIRESPLIT)[1]
- $mapay = StringSplit($mapa, ',', $STR_ENTIRESPLIT)[2]
- $file = "trajeto.AU3"
- func exitt()
- Exit
- EndFunc
- func cima1()
- $mapay -=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- func baixo1()
- $mapay +=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- func esquerda1()
- $mapax -=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- func direita1()
- $mapax +=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- func scaner()
- $scaner1posx = "322"
- $scaner1posy = "109"
- $scaner1 = PixelGetColor($scaner1posx,$scaner1posy)
- MouseMove($scaner1posx,$scaner1posy,3)
- $scaner2posx = "985"
- $scaner2posy= "196"
- $scaner2 = PixelGetColor($scaner2posx,$scaner2posy)
- MouseMove($scaner2posx,$scaner2posy,3)
- $scaner3posx = "1094"
- $scaner3posy = "797"
- $scaner3 = PixelGetColor($scaner3posx,$scaner3posy)
- MouseMove($scaner3posx,$scaner3posy,3)
- $scaner4posx = "417"
- $scaner4posy = "828"
- $scaner4 = PixelGetColor($scaner4posx,$scaner4posy)
- MouseMove($scaner4posx,$scaner4posy,3)
- $scaner5posx = "656"
- $scaner5posy = "539"
- $scaner5 = PixelGetColor($scaner5posx,$scaner5posy)
- MouseMove($scaner5posx,$scaner5posy,3)
- ; $mapa = inputBox("mapa","localização atual",$mapax & "," & $mapay)
- $celula1 = $scaner1posx &" "& $scaner1posy &" "& hex($scaner1) &" "
- $celula2 = $scaner2posx &" "& $scaner2posy &" "& hex($scaner2) &" "
- $celula3 = $scaner3posx &" "& $scaner3posy &" "& hex($scaner3) &" "
- $celula4 = $scaner4posx &" "& $scaner4posy &" "& hex($scaner4) &" "
- $celula5 = $scaner5posx &" "& $scaner5posy &" "& hex($scaner5) &" "
- $mapa = $mapax & "," & $mapay
- $mapaencriptado = MD5($celula1&$celula2&$celula3&$celula4&$celula5)
- $file3 = FileOpen("trajeto.AU3", 0)
- $read = FileRead($file3)
- If StringRegExp($read, $mapaencriptado) Then
- ConsoleWrite("Nao gravado"& @LF)
- Else
- ConsoleWrite($mapaencriptado & @LF)
- ConsoleWrite($mapax & "," & $mapay & @LF)
- Filewriteline($file,$mapaencriptado & @LF&$mapa )
- ;$file2 = StringSplit(FileReadLine("trajeto.au3", 2), ',', $STR_ENTIRESPLIT)[1]
- ;ConsoleWrite($file2)
- ConsoleWrite("Gravado"& @LF)
- EndIf
- FileClose($file)
- EndFunc
- func cima()
- $gera = Random(1,2,1)
- if $gera = 1 then
- $cima = MouseClick("left",Random(122,600,1),Random(38,41,1),1)
- elseif $gera = 2 then
- $cima = MouseClick("left",Random(600,1000,1),Random(38,41,1),1)
- Endif
- ;Filewriteline($file,"cima")
- $mapay -=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- func baixo()
- $gera = Random(1,2,1)
- if $gera = 1 then
- $baixo = MouseClick("left",Random(122,600,1),855,1)
- elseif $gera = 2 then
- $baixo = MouseClick("left",Random(600,1000,1),855)
- Endif
- ;Filewriteline($file,"baixo")
- $mapay +=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- func esquerda()
- $gera = Random(1,2,1)
- if $gera = 1 then
- $esquerda = MouseClick("left",Random(72,75,1),Random(50,400,1),1)
- elseif $gera = 2 then
- $esquerda = MouseClick("left",Random(72,75,1),Random(400,750,1),1)
- Endif
- ;Filewriteline($file,"esquerda")
- $mapax -=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- func direita()
- $gera = Random(1,2,1)
- if $gera = 1 then
- $direita = MouseClick("left",1265,Random(50,400,1),1)
- elseif $gera = 2 then
- $direita = MouseClick("left",1265,Random(400,750,1),1)
- Endif
- ;Filewriteline($file,"direita")
- $mapax +=1
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- EndFunc
- #Region ### START Design ### Form=
- $map = GUICreate("scanner de mapas", 264, 90, 549, 698,-1,BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
- $bt1 = GUICtrlCreateButton("cima", 96, 8, 75, 25)
- $bt2 = GUICtrlCreateButton("baixo", 96, 56, 75, 25)
- $bt3 = GUICtrlCreateButton("esquerda", 16, 32, 75, 25)
- $bt4 = GUICtrlCreateButton("direita", 176, 32, 75, 25)
- $Label1 = GUICtrlCreateLabel($mapax & "," & $mapay, 192, 64, 51, 17)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Design ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $bt1
- cima()
- Case $bt2
- baixo()
- Case $bt3
- esquerda()
- Case $bt4
- direita()
- EndSwitch
- sleep(10)
- GUICtrlSetData($Label1 ,$mapax & "," & $mapay)
- WEnd
- ;~ While 1
- ;~ Sleep(100)
- ;~ WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement