Sign in to follow this  
Followers 0
DarkProvex

help with a instruction

2 posts in this topic

#1 ·  Posted (edited)

hi to all ^^

im new in the forum and need your help.

im programming a bot for a videogame in autoit and not find the intruction for moving cursor to a text found in game screen, im work with memory address for detect text.

im attach the code for your analisys

#include <GUIConstants.au3>
#include <NomadMemory.au3>
#include <Array.au3>
#include <Misc.au3>
#include <string.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <Tesseract.au3>
#include <WindowsConstants.au3>
Opt("WinTextMatchMode", 2) 
Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 2)

WinWait("CABAL", "")
If Not WinActive("CABAL", "") Then 
WinActivate("CABAL", "")
WinWaitActive("CABAL", "")
Send("{UP 30}")
MouseWheel("down",25)
$dll = DllOpen("user32.dll")
GUICreate("Cabal AutoBOT 3.0 Final Version By Dark Provex")
$tittle_b = "CABAL AutoBOT V 3.0 Final Version By Dark Provex"
GUISetState ()
$Proceso1 = WinGetProcess("CABAL")
GUICtrlCreateLabel("Ingresa La Direccion Obtenida En Cheat Engine", 40, 30)
$Memoria = GUICtrlCreateInput( "0x",40, 50,100) ;aqui se insertaria la address a buscar
$Boton1 = GUICtrlCreateButton ("Presiona Para Buscar",  40, 80, 150)
$Boton2 = GUICtrlCreateButton ("Iniciar Bot",  120, 300, 150)
GUICtrlCreateLabel("En Este Momento Buscas Al Mob Llamado:",40,120)
$Mensaje1 = GUICtrlCreateLabel("",80, 150, 500,150)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Boton1
            $Mem_Abrir = _MemoryOpen($Proceso1) 
            $Mem_Leer = _MemoryRead(GUICtrlRead($Memoria), $Mem_Abrir, "char[17]") ;aqui se supone que se lee el valor
            GUICtrlSetFont(-1, 16, Default, "Arial")
            GUICtrlSetColor(-2, "0xff0000")
            GUICtrlSetData($Mensaje1,$Mem_Leer ) ; aqui deberia mostrar que bicho estas buscando
        
        Case $msg = $boton2
            $Pickup = 0
            Global $lastaction = 0
            $move = WinGetText("",$mem_leer)
    
                While $Pickup = 0
                Sleep ( 250 )
                    If _IsPressed("23", $dll) Then
                        If MsgBox(4, $tittle_b, "Estas Seguro Que Deseas Salir?                               ") == 6 Then
                            DllClose($dll)
                            _MemoryClose($Mem_Abrir)
                            Exit
                            ExitLoop
                        EndIf
                    Else
                        WinActivate("CABAL", "")
                    If StringInStr($mem_leer , "Garlie") Then
                        
                         Call("ataque")
                         
                         
                    Else
                        call("buscando")
                    endif
                    endif
                WEnd
            _MemoryClose($Mem_Abrir)
        EndSelect               

WEnd
EndIf

Func Buscando()
    
    $cabalx = 718
    $cabaly =  1024
    $Randomcabalx = Random(0,$cabalx,1) 
    $Randomcabaly = Random(0,$cabaly,1) 
    MouseClick("left",$Randomcabaly,$Randomcabalx) 
    
EndFunc


Func Ataque()
             
    Send("{space 5}")
    Send("1")
    sleep(10)
    Send("2")
    sleep(10)
    Send("3")
    sleep(10)
    send("1")
    sleep(10)
    send("2")
    sleep(10)
    Send("6")
    sleep(10)
    send("7")
    sleep(10)
    Send("8")

EndFunc

in this par i need insert the mouse movement and click

If StringInStr($mem_leer , "Garlie") Then
    Call("ataque")

im waiting for your response

thanks.

best regards and congratulations for this excelent forum.

Edited by DarkProvex

Share this post


Link to post
Share on other sites



im programming a bot for a videogame in autoit and not find the intruction for moving cursor to a text found in game screen, im work with memory address for detect text.

Please read the forum rules first.

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0