Jump to content
Sign in to follow this  
Bchaos

Memory Or Pixle Help!

Recommended Posts

Bchaos

I Wrote a bot (Iam completly new to autoit btw) and i am trying to find a easy way to click on mobs ... The pixle bot i wrote isnt acurate >_<

So can any one help me with a acurate pixle bot or a simple memory bot (added to my code).

this is what i wrote -->

#include <GUIConstants.au3>
#include <NomadMemory.au3> ;because you need this for _memread functions




GUICreate("My GUI Button")
$Button_1 = GUICtrlCreateButton ("Check Memory Address ",  10, 30, 150)
$Label_1 = GUICtrlCreateLabel("(lvl)",20, 60)
$Label_2 = GUICtrlCreateLabel("(Enemy Selected? (1)=Nes (0)=No)",20, 80)
GUISetState ()

hotkeyset("{Insert}","pause")
hotkeyset("{=}","efaa")

func pause()
    while 1
    WEnd
    endfunc


while 1

global  $Mem_Address = 0x010CC480 ;the L C memory address for current level
global  $Mem_Address2 = 0x010CC0D4 
$Process1 = WinGetProcess("LastChaos - Aeria Games & Entertainment (Window 1024x768)") ;the window to get PID


    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ;ExitLoop
        Case $msg = $Button_1
            $Mem_Open = _MemoryOpen($Process1) ;must open before you can read address
            $Mem_Read = _MemoryRead($Mem_Address, $Mem_Open) ;reads value at memory address
            $Mem_Read2 = _MemoryRead($Mem_Address2, $Mem_Open) 
            
            GUICtrlSetData($Label_1,$Mem_Read) ; sets label to value of read memory
            GUICtrlSetData($Label_2,$Mem_Read2)
            
  while 2
   
   $R1=1
   send("{F9}")
   $R1=rotate()
  if $Mem_Open=0x00 then
    $R1=0
Else
    $R1=1
ENDIF

If $R1=0 then
    send("{F9}")
     efaa()
     sleep(1000)
        endif   
  
    ;if $Mem_Read2=0x01 then
        ;efaa() 
    ;endif
    _MemoryClose($Mem_Open) ;close it afterwards 
    wend
EndSelect       
wend


func rotate()
Opt("MouseClickDragDelay", 600)
    MouseClickDrag ("right", 505, 374, 720, 374 , 20 )
    send("{F9}")
    efaa()
    sleep(1000)
        
endfunc

func proceed()
    send("{F9}")
        send(efaa())
        ;sleep(1000)
    endfunc
        
        
        
;Else
         ;sleep(100)
     ;endif

     
func efaa()
$Process1 = WinGetProcess("LastChaos - Aeria Games & Entertainment (Window 1024x768)")
 Select
        Case $msg = $GUI_EVENT_CLOSE
          
        Case $msg = $Button_1
            $Mem_Open = _MemoryOpen($Process1) ;must open before you can read address
            $Mem_Read = _MemoryRead($Mem_Address, $Mem_Open) ;reads value at memory address
            $Mem_Read2 = _MemoryRead($Mem_Address2, $Mem_Open) 
;$Mem_Open=0


do
     Dim $cordinates = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0x5B9700)
      
      If Not @error Then
          
         MouseClick( "left", $cordinates[0]+48, $cordinates[1]+35, 1, 0)
         MouseClick( "left", $cordinates[0]+48, $cordinates[1]+34, 1, 0)
         MouseClick( "left", $cordinates[0]+48, $cordinates[1]+33, 1, 0)
         MouseClick( "left", $cordinates[0]+47, $cordinates[1]+30, 1, 0)
          MouseClick( "left", $cordinates[0]+48, $cordinates[1]+32, 1, 0)
         sleep(1500)
        
          ;MouseClick( "left", $cordinates[0]+48, $cordinates[1]+30, 1, 0)
          ;MouseClick( "left", $cordinates[0]+50, $cordinates[1]+30, 1, 0)
          
         send("{F3}")
         sleep(3000)
         send("{F9}")
     EndIf
     send("{F9}")
     sleep(5000)
     send("{F9}")
    sleep(1000)
          send("{F9}")
     If $Mem_Open = 0x00 Then rotate()
          send("{F9}")
          sleep(1000)
          send("{F9}")
          send("{F9}")
         ;endif
         rotate()
until $Mem_Open = 0x00 ;and rotate()
 
 _MemoryClose($Mem_Open) ;close it afterwards 
EndSelect   

 endfunc
 ;send("{F3}")
      ;sleep(1000)
        ;send("{F3}")
     ;sleep(1000)
        ;send("{F3}")

 ;$weaken=
 $miden=0x5B9700;Green

Theres alot of crap there but this is just a first draft.

Thanks.

And i would also like to thank the guys/guy who wrote NomadMemory ;-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.