Sign in to follow this  
Followers 0
Harusal

Autopot Program, Help Please! =)

6 posts in this topic

I'm making a program to automatically use potions in a game. I'm having it switch to notepad when the health goes lower than the health i put in the input box as a test. But i can't seem to get it to work, any help would be greatly appreciated! :mellow:

Func AutoPot()
Global $OffsetArray[1]
$baseADDR = ("0x00B6AECC")
$OffsetArray[1] = ("00000594")
$PID = WinGetProcess("Game")
$Process = _MemoryOpen($PID)
$CurrentHP = _MemoryPointerRead($baseADDR, $Process, $OffsetArray)
_MemoryClose($ID)
While 1
If $HPInput < $CurrentHP Then
  WinActivate("Untitled - Notepad")
EndIf
WEnd
EndFunc

Share this post


Link to post
Share on other sites



Try

Func AutoPot()
Global $OffsetArray[2]
$baseADDR = "0x00B6AECC"
$OffsetArray[1] = "00000594"
$PID = WinGetProcess("Game")
$Process = _MemoryOpen($PID)
$CurrentHP = _MemoryPointerRead($baseADDR, $Process, $OffsetArray)
_MemoryClose($PID)
While 1
If $HPInput < $CurrentHP Then
  WinActivate("Untitled - Notepad")
EndIf
WEnd
EndFunc

Just fixed a few errors I saw right off.

Share this post


Link to post
Share on other sites

_MemoryOpen and _MemoryPointerRead are not valid commands. If you run the script dbzfanatic revised you will see the error message I get.

Also, you need to tell the script the run the function by putting AutoPot() right at the begining like this:

CODE
AutoPot()

Func AutoPot()

Global $OffsetArray[2]

$baseADDR = "0x00B6AECC"

$OffsetArray[1] = "00000594"

$PID = WinGetProcess("Game")

$Process = _MemoryOpen($PID)

$CurrentHP = _MemoryPointerRead($baseADDR, $Process, $OffsetArray)

_MemoryClose($PID)

While 1

If $HPInput < $CurrentHP Then

WinActivate("Untitled - Notepad")

EndIf

WEnd

EndFunc

This way the script doesn't just shut off, instead it enables the function given.

I am still working on revising this but any replys or suggestions would help. :mellow:

Share this post


Link to post
Share on other sites

_MemoryOpen and _MemoryPointerRead are not valid commands. If you run the script dbzfanatic revised you will see the error message I get.

Also, you need to tell the script the run the function by putting AutoPot() right at the begining like this:

CODE
AutoPot()

Func AutoPot()

Global $OffsetArray[2]

$baseADDR = "0x00B6AECC"

$OffsetArray[1] = "00000594"

$PID = WinGetProcess("Game")

$Process = _MemoryOpen($PID)

$CurrentHP = _MemoryPointerRead($baseADDR, $Process, $OffsetArray)

_MemoryClose($PID)

While 1

If $HPInput < $CurrentHP Then

WinActivate("Untitled - Notepad")

EndIf

WEnd

EndFunc

This way the script doesn't just shut off, instead it enables the function given.

I am still working on revising this but any replys or suggestions would help. :mellow:

You need to think before speaking. Those functions are contained in NomadMemory.au3 and this was a snippet of script,not the entire thing. When a function is not working it is best to post only the function and if a solution can not be found with that snippet then post the full script.

Share this post


Link to post
Share on other sites

I was not aware those functions were contained in NomadMemory.au3. Often I find it is easier to troubleshoot when you have the entire script rather than just a snippet.

Every good Auto Pot bot I know of runs separately to ensure that the user does not die. If it is implemented into the script then it better be a fast script otherwise it won't effectively keep you alive.

Share this post


Link to post
Share on other sites

Next time research or ask before saying they are not valid functions. With certain timer/adlib UDFs you can simulate multithreading (or get close) so this could be implemented within a larger script.

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  
Followers 0