|
You last visited: Today at 05:10
Advertisement
autoIt + cheat Engine
Discussion on autoIt + cheat Engine within the AutoIt forum part of the Coders Den category.
12/14/2015, 03:12
|
#1
|
elite*gold: 0
Join Date: Oct 2005
Posts: 33
Received Thanks: 1
|
autoIt + cheat Engine
I'm in a game Priston Tale 2
using cheat engine and WEP pro
cheatengine managed to find the real life character models
enter the char that always gives me between real life what I need now is
how to create a dll to alter the game in tutotial to Reproduce does but with a game
MSD but not online game
what I wanted was to make a *** or mode autopotion
with Wep Pro also found an interesting coisa
scanning packages found a way to target the mob gives me without me alle beside her and then come with me if I vay the average of all other
the trouble is that every time I leave the game generates another code and I do not know
how to do that in Cheat Engine I can not grab the real target
alguem joins lend a hand?
and to share more information I sent videos of how I got there
I want the real thing is to create an intelligent bot using potion with% HP and MP
and that no other mobs atake but slowly
|
|
|
12/14/2015, 16:31
|
#2
|
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
|
First u need your health address and target mob address here is a tutorial on how to find pointers so u will have the correct address everytime you restart the game:

When you are done with that making a bot easy in autoit is easy your algorithm will be something like this:
1º Mob Selected? you can determinate that when mob health value is not 0
2º Need heal or mp ? HP below some value, same with MP
3º Can fight? If mob is selected and your HP/MP are OK then Fight
3.1 Mob not selected. Go select mob
3.2 HP/MP below some value. Go use potion
|
|
|
12/15/2015, 01:29
|
#3
|
elite*gold: 0
Join Date: Oct 2005
Posts: 33
Received Thanks: 1
|
Quote:
Originally Posted by elmarcia
First u need your health address and target mob address here is a tutorial on how to find pointers so u will have the correct address everytime you restart the game:

When you are done with that making a bot easy in autoit is easy your algorithm will be something like this:
1º Mob Selected? you can determinate that when mob health value is not 0
2º Need heal or mp ? HP below some value, same with MP
3º Can fight? If mob is selected and your HP/MP are OK then Fight
3.1 Mob not selected. Go select mob
3.2 HP/MP below some value. Go use potion
|
:RE thank you for your attention
If I have HP codes and what I need is how to create the interface choices scripts and codes
I am watching a video on how to create a full BOT is good but I just want 2 or 3 aver thing there as you will share it out and hopefully help me complete the codes:las manos hacia abajo :
|
|
|
12/15/2015, 16:49
|
#4
|
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
|
Some piece of code
Code:
#include "NomadMemory.au3"
$ProcessName = "Tutorial-i386.exe" ;change process name
$PID = ProcessExists($ProcessName)
$open = _MemoryOpen($PID)
$ModuleAddress=_MemoryModuleGetBaseAddress($PID, $ProcessName)
$BaseAddress = $ModuleAddress + 0x231300 ;from CE will be something like Tutorial-i386.exe + 231300 - this our base address to read from pointers
;EX
;Local $offset[2] ;Offset[0] Nothing, don't use
;$offset[1] = Dec(480) ;1 level pointer in this case
;$read = _MemoryPointerRead($BaseAddress,$open,$offset) ;returns an array with the offsets and the value in the last position
; $read[UBound($read)-1] this is if we want to read the value
#cs
In a game maybe u get the base address with CE and offsets so,
Lets say our base address is Priston Tale.exe + 0x12345
and you find that your HP value is far away 3 pointers
$BaseAddress = $ModuleAddr + 0x12345
global $offset[4] = ["",dec(123),dec(456),dec(789)]
$read = _MemoryPointerRead($BaseAddress,$open,$offset)
$HPValue = $read[ubound($read)-1]
#ce
Global Const $minHPValue = 2500
Global Const $minMPValue = 200
Global Const $HPPotionKey = "{q}"
Global Const $MPPotionKey = "{e}"
Global Const $attack1Key = "{1}"
Global Const $SelectMobKey = "{TAB}"
Global $HPOffset[4] = ["",Dec(123),Dec(456),Dec(789)] ;change your offset of course...
Global $MPOffset[4] = ["",Dec(123),Dec(456),Dec(789)]
Global $MobOffset[4] = ["",Dec(123),Dec(456),Dec(789)]
Global $status = -1
Global $myHP,$myMP,$mobHP
Func UpdateData()
$myHP = _MemoryPointerRead($BaseAddress,$open,$HPOffset,"long")
$myMP = _MemoryPointerRead($BaseAddress,$open,$MPOffset,"long")
$mobHP = _MemoryPointerRead($BaseAddress,$open,$MobOffset,"long")
EndFunc
Func getStatus() ;how this works, first check if hp or mp is low, then check if mob is selected, finally if don't select mob and fight
UpdateData()
If $myHP < $minHPValue Or $myMP < $minMPValue Then Return 1 ;while fighting should check HP/MP too so
If $mobHP <> 0 Then Return 2 ;if mob is selected
Return 3 ;mob not selected / HP/MP okay
EndFunc
Func UsePotion()
If $myHP < $minHPValue Then Send($HPPotionKey)
If $myMP < $minMPValue Then Send($MPPotionKey)
EndFunc
Func Fight()
Send($attack1Key)
EndFunc
Func SelectMob()
Send($SelectMobKey);or u can send a packet to select mob with tcpsend
EndFunc
While Sleep(20) ;Main loop
$status = getStatus()
Switch $status
Case 1 ;Low hp/mp
UsePotion()
ToolTip("Using potion",0,0,"STATUS")
Case 2 ;Mob selected HP/MP okay
Fight()
ToolTip("Fighting",0,0,"STATUS")
Case 3 ;Mob not selected HP/MP okay
SelectMob()
ToolTip("Searching Mob",0,0,"STATUS")
EndSwitch
WEnd
NomadMemory.au3
Code:
#include-once
#region _Memory
;==================================================================================
; AutoIt Version: 3.1.127 (beta)
; Language: English
; Platform: All Windows
; Author: Nomad
; Requirements: These functions will only work with beta.
;==================================================================================
; Credits: wOuter - These functions are based on his original _Mem() functions.
; But they are easier to comprehend and more reliable. These
; functions are in no way a direct copy of his functions. His
; functions only provided a foundation from which these evolved.
;==================================================================================
;
; Functions:
;
;==================================================================================
; Function: _MemoryOpen($iv_Pid[, $iv_DesiredAccess[, $iv_InheritHandle]])
; Description: Opens a process and enables all possible access rights to the
; process. The Process ID of the process is used to specify which
; process to open. You must call this function before calling
; _MemoryClose(), _MemoryRead(), or _MemoryWrite().
; Parameter(s): $iv_Pid - The Process ID of the program you want to open.
; $iv_DesiredAccess - (optional) Set to 0x1F0FFF by default, which
; enables all possible access rights to the
; process specified by the Process ID.
; $iv_InheritHandle - (optional) If this value is TRUE, all processes
; created by this process will inherit the access
; handle. Set to 1 (TRUE) by default. Set to 0
; if you want it FALSE.
; Requirement(s): None.
; Return Value(s): On Success - Returns an array containing the Dll handle and an
; open handle to the specified process.
; On Failure - Returns 0
; @Error - 0 = No error.
; 1 = Invalid $iv_Pid.
; 2 = Failed to open Kernel32.dll.
; 3 = Failed to open the specified process.
; Author(s): Nomad
; Note(s):
;==================================================================================
Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $iv_InheritHandle = 1)
If Not ProcessExists($iv_Pid) Then
SetError(1)
Return 0
EndIf
Local $ah_Handle[2] = [DllOpen('kernel32.dll')]
If @Error Then
SetError(2)
Return 0
EndIf
Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $iv_InheritHandle, 'int', $iv_Pid)
If @Error Then
DllClose($ah_Handle[0])
SetError(3)
Return 0
EndIf
$ah_Handle[1] = $av_OpenProcess[0]
Return $ah_Handle
EndFunc
;==================================================================================
; Function: _MemoryRead($iv_Address, $ah_Handle[, $sv_Type])
; Description: Reads the value located in the memory address specified.
; Parameter(s): $iv_Address - The memory address you want to read from. It must
; be in hex format (0x00000000).
; $ah_Handle - An array containing the Dll handle and the handle
; of the open process as returned by _MemoryOpen().
; $sv_Type - (optional) The "Type" of value you intend to read.
; This is set to 'dword'(32bit(4byte) signed integer)
; by default. See the help file for DllStructCreate
; for all types. An example: If you want to read a
; word that is 15 characters in length, you would use
; 'char[16]' since a 'char' is 8 bits (1 byte) in size.
; Return Value(s): On Success - Returns the value located at the specified address.
; On Failure - Returns 0
; @Error - 0 = No error.
; 1 = Invalid $ah_Handle.
; 2 = $sv_Type was not a string.
; 3 = $sv_Type is an unknown data type.
; 4 = Failed to allocate the memory needed for the DllStructure.
; 5 = Error allocating memory for $sv_Type.
; 6 = Failed to read from the specified process.
; Author(s): Nomad
; Note(s): Values returned are in Decimal format, unless specified as a
; 'char' type, then they are returned in ASCII format. Also note
; that size ('char[size]') for all 'char' types should be 1
; greater than the actual size.
;==================================================================================
Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
If Not IsArray($ah_Handle) Then
SetError(1)
Return 0
EndIf
Local $v_Buffer = DllStructCreate($sv_Type)
If @Error Then
SetError(@Error + 1)
Return 0
EndIf
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If Not @Error Then
Local $v_Value = DllStructGetData($v_Buffer, 1)
Return $v_Value
Else
SetError(6)
Return 0
EndIf
EndFunc
;==================================================================================
; Function: _MemoryWrite($iv_Address, $ah_Handle, $v_Data[, $sv_Type])
; Description: Writes data to the specified memory address.
; Parameter(s): $iv_Address - The memory address which you want to write to.
; It must be in hex format (0x00000000).
; $ah_Handle - An array containing the Dll handle and the handle
; of the open process as returned by _MemoryOpen().
; $v_Data - The data to be written.
; $sv_Type - (optional) The "Type" of value you intend to write.
; This is set to 'dword'(32bit(4byte) signed integer)
; by default. See the help file for DllStructCreate
; for all types. An example: If you want to write a
; word that is 15 characters in length, you would use
; 'char[16]' since a 'char' is 8 bits (1 byte) in size.
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; @Error - 0 = No error.
; 1 = Invalid $ah_Handle.
; 2 = $sv_Type was not a string.
; 3 = $sv_Type is an unknown data type.
; 4 = Failed to allocate the memory needed for the DllStructure.
; 5 = Error allocating memory for $sv_Type.
; 6 = $v_Data is not in the proper format to be used with the
; "Type" selected for $sv_Type, or it is out of range.
; 7 = Failed to write to the specified process.
; Author(s): Nomad
; Note(s): Values sent must be in Decimal format, unless specified as a
; 'char' type, then they must be in ASCII format. Also note
; that size ('char[size]') for all 'char' types should be 1
; greater than the actual size.
;==================================================================================
Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')
If Not IsArray($ah_Handle) Then
SetError(1)
Return 0
EndIf
Local $v_Buffer = DllStructCreate($sv_Type)
If @Error Then
SetError(@Error + 1)
Return 0
Else
DllStructSetData($v_Buffer, 1, $v_Data)
If @Error Then
SetError(6)
Return 0
EndIf
EndIf
DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If Not @Error Then
Return 1
Else
SetError(7)
Return 0
EndIf
EndFunc
;==================================================================================
; Function: _MemoryClose($ah_Handle)
; Description: Closes the process handle opened by using _MemoryOpen().
; Parameter(s): $ah_Handle - An array containing the Dll handle and the handle
; of the open process as returned by _MemoryOpen().
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; @Error - 0 = No error.
; 1 = Invalid $ah_Handle.
; 2 = Unable to close the process handle.
; Author(s): Nomad
; Note(s):
;==================================================================================
Func _MemoryClose($ah_Handle)
If Not IsArray($ah_Handle) Then
SetError(1)
Return 0
EndIf
DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
If Not @Error Then
DllClose($ah_Handle[0])
Return 1
Else
DllClose($ah_Handle[0])
SetError(2)
Return 0
EndIf
EndFunc
;==================================================================================
; Function: SetPrivilege( $privilege, $bEnable )
; Description: Enables (or disables) the $privilege on the current process
; (Probably) requires administrator privileges to run
;
; Author(s): Larry (from autoitscript.com's Forum)
; Notes(s):
; http://www.autoitscript.com/forum/index.ph...st&p=223999
;==================================================================================
Func SetPrivilege( $privilege, $bEnable )
Const $TOKEN_ADJUST_PRIVILEGES = 0x0020
Const $TOKEN_QUERY = 0x0008
Const $SE_PRIVILEGE_ENABLED = 0x0002
Local $hToken, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv
$nTokens = 1
$LUID = DLLStructCreate("dword;int")
If IsArray($privilege) Then $nTokens = UBound($privilege)
$TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
$NEWTOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
$hCurrProcess = DLLCall("kernel32.dll","hwnd","GetCurrentProcess")
$SP_auxret = DLLCall("advapi32.dll","int","OpenProcessToken","hwnd",$hCurrProcess[0], _
"int",BitOR($TOKEN_ADJUST_PRIVILEGES,$TOKEN_QUERY),"int*",0)
If $SP_auxret[0] Then
$hToken = $SP_auxret[3]
DLLStructSetData($TOKEN_PRIVILEGES,1,1)
$nTokenIndex = 1
While $nTokenIndex <= $nTokens
If IsArray($privilege) Then
$priv = $privilege[$nTokenIndex-1]
Else
$priv = $privilege
EndIf
$ret = DLLCall("advapi32.dll","int","LookupPrivilegeValue","str","","str",$priv, _
"ptr",DLLStructGetPtr($LUID))
If $ret[0] Then
If $bEnable Then
DLLStructSetData($TOKEN_PRIVILEGES,2,$SE_PRIVILEGE_ENABLED,(3 * $nTokenIndex))
Else
DLLStructSetData($TOKEN_PRIVILEGES,2,0,(3 * $nTokenIndex))
EndIf
DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,1),(3 * ($nTokenIndex-1)) + 1)
DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,2),(3 * ($nTokenIndex-1)) + 2)
DLLStructSetData($LUID,1,0)
DLLStructSetData($LUID,2,0)
EndIf
$nTokenIndex += 1
WEnd
$ret = DLLCall("advapi32.dll","int","AdjustTokenPrivileges","hwnd",$hToken,"int",0, _
"ptr",DllStructGetPtr($TOKEN_PRIVILEGES),"int",DllStructGetSize($NEWTOKEN_PRIVILEGES), _
"ptr",DllStructGetPtr($NEWTOKEN_PRIVILEGES),"int*",0)
$f = DLLCall("kernel32.dll","int","GetLastError")
EndIf
$NEWTOKEN_PRIVILEGES=0
$TOKEN_PRIVILEGES=0
$LUID=0
If $SP_auxret[0] = 0 Then Return 0
$SP_auxret = DLLCall("kernel32.dll","int","CloseHandle","hwnd",$hToken)
If Not $ret[0] And Not $SP_auxret[0] Then Return 0
return $ret[0]
EndFunc ;==>SetPrivilege
;=================================================================================================
; Function: _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset[, $sv_Type])
; Description: Reads a chain of pointers and returns an array containing the destination
; address and the data at the address.
; Parameter(s): $iv_Address - The static memory address you want to start at. It must be in
; hex format (0x00000000).
; $ah_Handle - An array containing the Dll handle and the handle of the open
; process as returned by _MemoryOpen().
; $av_Offset - An array of offsets for the pointers. Each pointer must have an
; offset. If there is no offset for a pointer, enter 0 for that
; array dimension.
; $sv_Type - (optional) The "Type" of data you intend to read at the destination
; address. This is set to 'dword'(32bit(4byte) signed integer) by
; default. See the help file for DllStructCreate for all types.
; Requirement(s): The $ah_Handle returned from _MemoryOpen.
; Return Value(s): On Success - Returns an array containing the destination address and the value
; located at the address.
; On Failure - Returns 0
; @Error - 0 = No error.
; 1 = $av_Offset is not an array.
; 2 = Invalid $ah_Handle.
; 3 = $sv_Type is not a string.
; 4 = $sv_Type is an unknown data type.
; 5 = Failed to allocate the memory needed for the DllStructure.
; 6 = Error allocating memory for $sv_Type.
; 7 = Failed to read from the specified process.
; Author(s): Nomad
; Note(s): Values returned are in Decimal format, unless a 'char' type is selected.
; Set $av_Offset like this:
; $av_Offset[0] = NULL (not used)
; $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
; $av_Offset[2] = Offset for pointer 2
; etc...
; (The number of array dimensions determines the number of pointers)
;=================================================================================================
Func _MemoryPointerRead($iv_Address, $ah_Handle, $av_Offset, $sv_Type = 'dword')
If IsArray($av_Offset) Then
If IsArray($ah_Handle) Then
Local $iv_PointerCount = UBound($av_Offset) - 1
Else
SetError(2)
Return 0
EndIf
Else
SetError(1)
Return 0
EndIf
Local $iv_Data[2], $i
Local $v_Buffer = DllStructCreate('dword')
For $i = 0 To $iv_PointerCount
If $i = $iv_PointerCount Then
$v_Buffer = DllStructCreate($sv_Type)
If @error Then
SetError(@error + 2)
Return 0
EndIf
$iv_Address = '0x' & Hex($iv_Data[1] + $av_Offset[$i])
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @error Then
SetError(7)
Return 0
EndIf
$iv_Data[1] = DllStructGetData($v_Buffer, 1)
ElseIf $i = 0 Then
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @error Then
SetError(7)
Return 0
EndIf
$iv_Data[1] = DllStructGetData($v_Buffer, 1)
Else
$iv_Address = '0x' & Hex($iv_Data[1] + $av_Offset[$i])
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @error Then
SetError(7)
Return 0
EndIf
$iv_Data[1] = DllStructGetData($v_Buffer, 1)
EndIf
Next
$iv_Data[0] = $iv_Address
Return $iv_Data
EndFunc ;==>_MemoryPointerRead
;=================================================================================================
; Function: _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data[, $sv_Type])
; Description: Reads a chain of pointers and writes the data to the destination address.
; Parameter(s): $iv_Address - The static memory address you want to start at. It must be in
; hex format (0x00000000).
; $ah_Handle - An array containing the Dll handle and the handle of the open
; process as returned by _MemoryOpen().
; $av_Offset - An array of offsets for the pointers. Each pointer must have an
; offset. If there is no offset for a pointer, enter 0 for that
; array dimension.
; $v_Data - The data to be written.
; $sv_Type - (optional) The "Type" of data you intend to write at the destination
; address. This is set to 'dword'(32bit(4byte) signed integer) by
; default. See the help file for DllStructCreate for all types.
; Requirement(s): The $ah_Handle returned from _MemoryOpen.
; Return Value(s): On Success - Returns the destination address.
; On Failure - Returns 0.
; @Error - 0 = No error.
; 1 = $av_Offset is not an array.
; 2 = Invalid $ah_Handle.
; 3 = Failed to read from the specified process.
; 4 = $sv_Type is not a string.
; 5 = $sv_Type is an unknown data type.
; 6 = Failed to allocate the memory needed for the DllStructure.
; 7 = Error allocating memory for $sv_Type.
; 8 = $v_Data is not in the proper format to be used with the
; "Type" selected for $sv_Type, or it is out of range.
; 9 = Failed to write to the specified process.
; Author(s): Nomad
; Note(s): Data written is in Decimal format, unless a 'char' type is selected.
; Set $av_Offset like this:
; $av_Offset[0] = NULL (not used, doesn't matter what's entered)
; $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
; $av_Offset[2] = Offset for pointer 2
; etc...
; (The number of array dimensions determines the number of pointers)
;=================================================================================================
Func _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data, $sv_Type = 'dword')
If IsArray($av_Offset) Then
If IsArray($ah_Handle) Then
Local $iv_PointerCount = UBound($av_Offset) - 1
Else
SetError(2)
Return 0
EndIf
Else
SetError(1)
Return 0
EndIf
Local $iv_StructData, $i
Local $v_Buffer = DllStructCreate('dword')
For $i = 0 to $iv_PointerCount
If $i = $iv_PointerCount Then
$v_Buffer = DllStructCreate($sv_Type)
If @Error Then
SetError(@Error + 3)
Return 0
EndIf
DllStructSetData($v_Buffer, 1, $v_Data)
If @Error Then
SetError(8)
Return 0
EndIf
$iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @Error Then
SetError(9)
Return 0
Else
Return $iv_Address
EndIf
ElseIf $i = 0 Then
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @Error Then
SetError(3)
Return 0
EndIf
$iv_StructData = DllStructGetData($v_Buffer, 1)
Else
$iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
If @Error Then
SetError(3)
Return 0
EndIf
$iv_StructData = DllStructGetData($v_Buffer, 1)
EndIf
Next
EndFunc
;===================================================================================================
; Function........: _MemoryGetBaseAddress($ah_Handle, $iHD)
;
; Description.....: Reads the 'Allocation Base' from the open process.
;
; Parameter(s)....: $ah_Handle - An array containing the Dll handle and the handle of the open
; process as returned by _MemoryOpen().
; $iHD - Return type:
; |0 = Hex (Default)
; |1 = Dec
;
; Requirement(s)..: A valid process ID.
;
; Return Value(s).: On Success - Returns the 'allocation Base' address and sets @Error to 0.
; On Failure - Returns 0 and sets @Error to:
; |1 = Invalid $ah_Handle.
; |2 = Failed to find correct allocation address.
; |3 = Failed to read from the specified process.
;
; Author(s).......: Nomad. Szhlopp.
; URL.............: http://www.autoitscript.com/forum/index.php?showtopic=78834
; Note(s).........: Go to Www.CheatEngine.org for the latest version of CheatEngine.
;===================================================================================================
Func _MemoryModuleGetBaseAddress($iPID, $sModule)
If Not ProcessExists($iPID) Then Return SetError(1, 0, 0)
If Not IsString($sModule) Then Return SetError(2, 0, 0)
Local $PSAPI = DllOpen("psapi.dll")
;Get Process Handle
Local $hProcess
Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020) ; CREATE_THREAD, QUERY_INFORMATION, VM_OPERATION, VM_READ, VM_WRITE
If $iPID > 0 Then
Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID)
If $hProcess[0] Then
$hProcess = $hProcess[0]
EndIf
EndIf
;EnumProcessModules
Local $Modules = DllStructCreate("ptr[1024]")
Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0)
If $aCall[4] > 0 Then
Local $iModnum = $aCall[4] / 4
Local $aTemp
For $i = 1 To $iModnum
$aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260)
If $aTemp[3] = $sModule Then
DllClose($PSAPI)
Return Ptr(DllStructGetData($Modules, 1, $i))
EndIf
Next
EndIf
DllClose($PSAPI)
Return SetError(-1, 0, 0)
EndFunc
You now have to work by yourself this should be enough for u to begin
|
|
|
12/16/2015, 06:06
|
#5
|
elite*gold: 0
Join Date: Oct 2005
Posts: 33
Received Thanks: 1
|
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <Memory.au3>
#include <EditConstants.au3>
#include <GUIEdit.au3>
#include <WindowsConstants.au3>
;para vercion esta 009 6:53 linea 12 , 15
;--Lib
$PlayerClass_read = IniRead("Skills.ini", "Class", "Names", "")
$ProcName = IniRead("Config.ini", "System", "ProzessID", "")
;--Lib_Pointer
$p_base_HP = "0x" & IniRead("poiter.ini", "pointer", "base_HP", "")
$p_base_HP_offset_1 = "0x" & IniRead("pointer.ini", "pointer", "base_HP_offset_1", "")
Global $iPID, $StaticOffset, $hOpen, $iBase
$iPID = ProcessExists($ProcName) ;-- nombre del juego
SetPrivilege("SeDebugPrivilege", 1)
$hOpen = _MemoryOpen($iPID)
$iBase = _MemoryModuleGetBaseAddress($iPID, $ProcName) ;-- nombre del juego
$MainGUI = GUICreate("Priston tale BOT", 300, 660)
$Charname_Label = GUICtrlCreateLabel("<(LVL) CHARNAME>", 10, 10, 200)
$Charname_String = GUICtrlCreateLabel("", 10, 5)
GUICtrlSetState($Charname_String, $GUI_HIDE)
GUICtrlCreateLabel("HP:", 10, 40)
$HP_Progress = GUICtrlCreateProgress(35, 37, 150, 20)
$HP_Label = GUICtrlCreateLabel("0 / 0 (0%)", 195, 40, 120)
GUICtrlCreateLabel("MP:", 10, 70)
$MP_Progress = GUICtrlCreateProgress(35, 67, 150, 20)
$MP_Label = GUICtrlCreateLabel("0 / 0 (0%)", 195, 70, 120)
$DebugLog = GUICtrlCreateEdit("", 10, 100, 280, 100, $ES_AUTOVSCROLL + $WS_VSCROLL, $WS_EX_CLIENTEDGE)
GUICtrlSetState ($DebugLog, $GUI_DISABLE)
$DebugLog_Clean = GUICtrlCreateButton("Ventan vazian", 10, 200, 140, 20)
$DebugLog_Settings = GUICtrlCreateButton("Ajustes", 150, 200, 140, 20)
$RUN = GUICtrlCreateButton("Bot Start", 10, 220, 280, 20)
$STOP = GUICtrlCreateButton("Bot Stop", 10, 220, 280, 20)
GUICtrlSetState ($STOP, $GUI_HIDE)
GUICtrlCreateTab(5, 250, 292, 406)
GUICtrlCreateTabItem("Info")
GUICtrlCreateTabItem("Scaning")
;==HealthPoints
$HP_Activate = GUICtrlCreateCheckbox("HP de su sangre ...", 10, 280, 280)
GUICtrlSetFont("HP_Activate", 10)
GUICtrlSetState($HP_Activate, $GUI_CHECKED)
$HP_Alternate = GUICtrlCreateSlider(10, 310, 200, 20)
GUICtrlSetLimit($HP_Alternate, 99, 1)
GUICtrlSetData($HP_Alternate, 50)
$HP_Alternate_Value = GUICtrlCreateLabel(GUICtrlRead($HP_Alternate) & "%", 220, 310)
$HP_Combo = GUICtrlCreateCombo("Regen", 10, 340,110)
GUICtrlSetData($HP_Combo, "Potion Smell|Potion Medion")
$HP_upSelect_Combo = GUICtrlCreateCombo("<Combo>", 130, 340, 80)
GUICtrlSetData($HP_upSelect_Combo, "SHIFT|STRG|ALT")
;-- GUICtrlSetState($HP_upSelect_Combo, $GUI_DISABLE) no funciono
GUICtrlCreateLabel("+", 220, 345, 10)
$HP_Select_Combo = GUICtrlCreateCombo("1", 230, 340, 50)
GUICtrlSetData($HP_Select_Combo, "2|3|4|5|6|7|8|9|0|'|¡")
;-- GUICtrlSetState($HP_Select_Combo, $GUI_DISABLE) no funciono
;==ManaPoints
$MP_Activate = GUICtrlCreateCheckbox("MP de su sangre ...", 10, 370, 280)
GUICtrlSetFont("MP_Activate", 10)
GUICtrlSetState($MP_Activate, $GUI_CHECKED)
$MP_Alternate = GUICtrlCreateSlider(10, 410, 200, 20)
GUICtrlSetLimit($MP_Alternate, 99, 1)
GUICtrlSetData($MP_Alternate, 20)
$MP_Alternate_Value = GUICtrlCreateLabel(GUICtrlRead($MP_Alternate) & "%", 220, 415)
$MP_Combo = GUICtrlCreateCombo("Regen", 10, 435,110)
GUICtrlSetData($MP_Combo, "Potion Smell|Potion Medion")
$MP_upSelect_Combo = GUICtrlCreateCombo("<Combo>", 130, 435, 80)
GUICtrlSetData($MP_upSelect_Combo, "SHIFT|STRG|ALT")
GUICtrlCreateLabel("+", 220, 438, 10)
$MP_Select_Combo = GUICtrlCreateCombo("1", 230, 435, 50)
GUICtrlSetData($MP_Select_Combo, "2|3|4|5|6|7|8|9|0|'|¡")
;/==BotAction
$Close_Activate = GUICtrlCreateCheckbox("Acción bot, si...", 10, 460, 280)
GUICtrlSetFont($Close_Activate, 10)
$Close_Combo = GUICtrlCreateCombo("NIVEL", 10, 490, 100)
$equal = GUICtrlCreateLabel("=", 120, 492)
GUICtrlSetFont($equal, 10)
GUICtrlSetData($Close_Combo, "Small HP|Medium potion HP|BIG potion HP|Uhzeit")
$Close_Input = GUICtrlCreateInput("", 140, 490, 70)
$Then = GUICtrlCreateLabel("GO...", 10, 520, 130)
GUICtrlSetFont($Then, 10)
$Close_F_Combo = GUICtrlCreateCombo("EXIT GAME", 100, 520, 80)
GUICtrlSetData($Close_F_Combo, "OFF GAME|Pausa")
$Pickup_Activate = GUICtrlCreateCheckbox("cancel Item", 10, 550)
GUICtrlSetState($Pickup_Activate, $GUI_CHECKED)
$Pickup_Combo = GUICtrlCreateCombo("1", 100, 550)
GUICtrlSetData($Pickup_Combo, "2|3|4|5|6|7|8|9|0|'|¡")
;/==ZoomHack
$ZoomHack_Enable = GUICtrlCreateCheckbox("ZoomHack", 10, 580)
$ZoomHack_Slider = GUICtrlCreateSlider(80, 580, 200, 20)
GUICtrlSetLimit($ZoomHack_Slider, 100, 0)
GUICtrlSetData($ZoomHack_Slider,50)
GUICtrlCreateTabItem("Atack")
$Attack_Activate = GUICtrlCreateCheckbox("Atack", 10, 280)
GUICtrlSetState($Attack_Activate, $GUI_CHECKED)
$Attack_Combo = GUICtrlCreateCombo("1", 80, 280)
GUICtrlSetData($Attack_Combo, "2|3|4|5|6|7|8|9|0|'|¡|F1|F2|F3|F4|F5|F6|F7|F8|F9| F10|F11|F12")
$Attack_Skill = GUICtrlCreateCheckbox("Skills Ativas", 160, 280)
GUICtrlSetState($Attack_Skill, $GUI_CHECKED)
$PickUP_Activate = GUICtrlCreateCheckbox("Pikup", 10, 300)
GUICtrlSetState($Attack_Activate, $GUI_CHECKED)
$PickUP_Combo = GUICtrlCreateCombo("2", 80, 300)
GUICtrlSetData($PickUP_Combo, "1|3|4|5|6|7|8|9|0|'|¡|F1|F2|F3|F4|F5|F6|F7|F8|F9| F10|F11|F12")
$PickUP_Skill = GUICtrlCreateCheckbox("Skills Ativas", 160, 300)
GUICtrlSetState($PickUP_Skill, $GUI_CHECKED)
$Skill_use_1 =GUICtrlCreateCheckbox("skill 1", 10, 330-4)
$Skill_1 = GUICtrlCreateCombo("1", 70,330-3, 140)
GUICtrlSetData($Skill_1, "2|3|4|5|6|7|8|9|0|'|¡|F1|F2|F3|F4|F5|F6|F7|F8|F9| F10|F11|F12")
$Skill_use_1 =GUICtrlCreateCheckbox("skill 1", 10, 330-4)
$Skill_2 = GUICtrlCreateCombo("1", 70,350-3, 140)
GUICtrlSetData($Skill_2, "2|3|4|5|6|7|8|9|0|'|¡|F1|F2|F3|F4|F5|F6|F7|F8|F9| F10|F11|F12")
$Skill_use_2 =GUICtrlCreateCheckbox("skill 2", 10, 350-4)
$Skill_3 = GUICtrlCreateCombo("1", 70,380-3, 140)
GUICtrlSetData($Skill_3, "2|3|4|5|6|7|8|9|0|'|¡|F1|F2|F3|F4|F5|F6|F7|F8|F9| F10|F11|F12")
$Skill_use_3 =GUICtrlCreateCheckbox("skill 3", 10, 380-4)
$Skill_4 = GUICtrlCreateCombo("1", 70,400-3, 140)
GUICtrlSetData($Skill_4, "2|3|4|5|6|7|8|9|0|'|¡|F1|F2|F3|F4|F5|F6|F7|F8|F9| F10|F11|F12")
$Skill_use_4 =GUICtrlCreateCheckbox("skill 4", 10, 400-4)
$Skill_5 = GUICtrlCreateCombo("1", 70,420-3, 140)
GUICtrlSetData($Skill_5, "2|3|4|5|6|7|8|9|0|'|¡|F1|F2|F3|F4|F5|F6|F7|F8|F9| F10|F11|F12")
$Skill_use_4 =GUICtrlCreateCheckbox("skill 5", 10, 420-4)
GUISetState (@SW_SHOW, $MainGUI)
;--DebugSettingsGUI 005 4:58
$DebugSettingsGUI = GUICreate("Ajustes - Debug", 200, 300, -1, -1, $WS_POPUP)
$DebugSettingsCheck_Quit = GUICtrlCreateButton("Schlieben", 10, 270, 180, 20)
$DebugSettingsCheckMob = GUICtrlCreateCheckbox("musterprüfung", 10, 10)
$DebugSettingsCheckSkillUsage = GUICtrlCreateCheckbox("Fahigkeiten", 10, 30)
$DebugSettingsLoot = GUICtrlCreateCheckbox("PIKUP Items",10, 50)
Func _CheckAll()
;--HP_Check
$base_HP1 = $iBase + $p_base_HP
$base_HP2 = _MenoryRead($base_HP1, $hOpen) + $p_base_HP_offset_1
$base_HPFinal = _MenoryRead ($base_HP2, $hOpen)
;--SP_Check
;--TargetFuncion
msgBox(0, "", $base_HPFinal)
Exit
EndFunc
GUISetState(@SW_HIDE, $DebugSettingsGUI)
While 1
$msg = GUIGetMsg()
if $msg = $GUI_EVENT_CLOSE Then ExitLoop
Select
Case $msg = $RUN
GUICtrlSetState($RUN, $GUI_DISABLE)
_CheckAll
Case $msg = $STOP
GUICtrlSetState($STOP, $GUI_HIDE)
GUICtrlSetState($RUN, $GUI_SHOW)
Case $msg = $DebugLog_Clean
GUICtrlSetData($DebugLog, "")
Case $msg = $DebugLog_Settings
GUISetState(@SW_SHOW, $DebugSettingsGUI)
Case $msg = $DebugSettingsCheck_Quit
GUISetState(@SW_HIDE, $DebugSettingsGUI)
Case $msg = $HP_Alternate
GUICtrlSetData($HP_Alternate_Value, GUICtrlRead($HP_Activate) & " %")
Case $msg = $HP_Alternate
If GUICtrlRead($MP_Alternate) = 1 Then
GUICtrlSetState($MP_Alternate, $GUI_ENABLE)
GUICtrlSetState($MP_Combo, $GUI_ENABLE)
If GUICtrlRead($HP_Combo) = "USE POTION" Then
GUICtrlSetState($HP_Select_Combo, $GUI_ENABLE)
GUICtrlSetState($HP_upSelect_Combo, $GUI_ENABLE)
EndIf
Else
GUICtrlSetState($HP_Alternate, $GUI_DISABLE)
GUICtrlSetState($HP_Combo, $GUI_DISABLE)
GUICtrlSetState($HP_Select_Combo, $GUI_DISABLE)
GUICtrlSetState($HP_upSelect_Combo, $GUI_DISABLE)
EndIf
Case $msg = $HP_Combo
If GUICtrlRead($HP_Combo) = "USe POTION" Then
GUICtrlSetState($HP_Select_Combo, $GUI_ENABLE)
GUICtrlSetState($HP_upSelect_Combo, $GUI_ENABLE)
Else
GUICtrlSetState($HP_Select_Combo, $GUI_DISABLE)
GUICtrlSetState($HP_upSelect_Combo, $GUI_DISABLE)
EndIf
Case $msg = $MP_Alternate
GUICtrlSetData($MP_Alternate_Value, GUICtrlRead($MP_Activate) & " %")
EndSelect
wEnd
now I get error codes add HP
|
|
|
12/18/2015, 20:06
|
#6
|
elite*gold: 0
Join Date: Oct 2005
Posts: 33
Received Thanks: 1
|
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\aion_1.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <nomadmemory.au3>
#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Marian\Desktop\autoit un so\Magic Aion\GUI\GUI.kxf
$Form1_1 = GUICreate("Game.exe", 633, 447, 192, 124)
$Progress1 = GUICtrlCreateProgress(24, 128, 233, 25)
$Adresse1 = 0x2B444AB8;
$Adresse2 = 0x77756D00
$Open = _memoryopen(ProcessExists("GAME.exe"))
$MaxLeben = _MemoryRead($Adresse1, $Open, 'dword')
$MomentanesLeben = _MemoryRead($Adresse2, $Open, 'dword')
GuiCtrlSetData($Progress1,$MomentanesLeben*100/$Maxleben)
$Progress2 = GUICtrlCreateProgress(24, 192, 233, 25)
$Progress3 = GUICtrlCreateProgress(24, 256, 241, 25)
$Progress4 = GUICtrlCreateProgress(24, 328, 433, 17)
$Label2 = GUICtrlCreateLabel("Target", 448, 81, 35, 17)
$Progress5 = GUICtrlCreateProgress(368, 128, 249, 25)
$Button1 = GUICtrlCreateButton("Run bot", 24, 400, 153, 33, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Player", 24, 80, 33, 17)
$Button2 = GUICtrlCreateButton("UMA PAGINA PARA IR Homepage", 432, 8, 145, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Forum", 432, 40, 145, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Exit", 464, 400, 145, 33, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Settings", 248, 400, 153, 33, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("HP", 104, 96, 19, 17)
$Label4 = GUICtrlCreateLabel("MP", 104, 168, 20, 17)
$Label5 = GUICtrlCreateLabel("GK", 104, 232, 19, 17)
$Label6 = GUICtrlCreateLabel("EP", 104, 304, 18, 17)
$Label3 = GUICtrlCreateLabel("AQUI EL JUEGO ONLINE", 24, 8, 219, 26)
GUICtrlSetFont(-1, 12, 400, 0, "Minion Pro Cond")
GUICtrlSetColor(-1, 0x000080)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
case $Button4
Exit
case $Button2
ShellExecute("aqui una pagina")
case $Button3
ShellExecute("Aqui otra pagina")
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
I have these codes after days without sleep
I have you pointer HP , MP, mob TARGET
now I just need to put in the autoit someone can help plz
$Form1_1 = GUICreate("PT2.exe", 306, 594, 489, 62)
$Slider1Hpbar = GUICtrlCreateSlider(55, 8, 188, 30)
GUICtrlSetLimit(-1, 289, 219)
GUICtrlSetData(-1, 255)
GUICtrlCreateLabel("Hp Hero :", 8, 10, 50, 17)
$Slider2Mpbar = GUICtrlCreateSlider(55, 40, 188, 30)
GUICtrlSetLimit(-1, 289, 219)
GUICtrlSetData(-1, 235)
GUICtrlCreateLabel("Mp Hero :", 8, 42, 51, 17)
;================================================= ===============================
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Hero Setting", 8, 80, 225, 155)
$CheckboxAutoHp = GUICtrlCreateCheckbox("Auto Hp Potion Key :", 24, 104, 118, 17)
GUICtrlSetState(-1, 1)
$CheckboxAutoMp = GUICtrlCreateCheckbox("Auto Mp Potion Key :", 24, 130, 118, 17)
GUICtrlSetState(-1, 4)
$CheckboxSelectEnemy = GUICtrlCreateCheckbox("Select Enemy", 24, 156, 97, 17)
GUICtrlSetState(-1, 1)
$CheckboxAttack = GUICtrlCreateCheckbox("Attack", 24, 182, 97, 17)
GUICtrlSetState(-1, 1)
$CheckboxMoveView = GUICtrlCreateCheckbox("Move View", 24, 208, 97, 17)
GUICtrlSetState(-1, 1)
$Combo1 = GUICtrlCreateCombo("F5", 144, 104, 40, 25)
$Combo2 = GUICtrlCreateCombo("F6", 144, 130, 40, 25)
;================================================= ===============================
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Skill Setting", 8, 240, 259, 158)
$Checkboxskill1 = GUICtrlCreateCheckbox("Skill 1 key :", 24, 264, 70, 17)
GUICtrlCreateLabel("Deley (Sec.)", 144, 267, 62, 17)
$Input1 = GUICtrlCreateInput("1", 208, 264, 40, 21)
$Checkboxskill2 = GUICtrlCreateCheckbox("Skill 2 key :", 24, 295, 70, 17)
GUICtrlCreateLabel("Deley (Sec.)", 144, 298, 62, 17)
$Input2 = GUICtrlCreateInput("2", 208, 295, 40, 21)
$Checkboxskill3 = GUICtrlCreateCheckbox("Skill 3 key :", 24, 326, 70, 17)
GUICtrlCreateLabel("Deley (Sec.)", 144, 329, 62, 17)
$Input3 = GUICtrlCreateInput("3", 208, 326, 40, 21)
$Checkboxskill4 = GUICtrlCreateCheckbox("Skill 4 key :", 24, 357, 70, 17)
GUICtrlCreateLabel("Deley (Sec.)", 144, 360, 62, 17)
$Input4 = GUICtrlCreateInput("4", 208, 357, 40, 21)
$Combo3 = GUICtrlCreateCombo("1", 96, 264, 40, 25)
$Combo4 = GUICtrlCreateCombo("2", 96, 295, 40, 25)
$Combo5 = GUICtrlCreateCombo("3", 96, 326, 40, 25)
$Combo6 = GUICtrlCreateCombo("4", 96, 357, 40, 25)
;================================================= ===============================
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Buff Skill Setting", 8, 404, 289, 94)
$CheckboxBuff1 = GUICtrlCreateCheckbox("Buff Skill 1 key :", 24, 432, 95, 17)
GUICtrlSetState(-1, 1)
$Combo7 = GUICtrlCreateCombo("0", 122, 432, 40, 25)
GUICtrlCreateLabel("Deley (Sec.)", 168, 435, 62, 17)
$Input5 = GUICtrlCreateInput("120", 232, 432, 50, 21)
$CheckboxBuff2 = GUICtrlCreateCheckbox("Buff Skill 2 key :", 24, 463, 95, 17)
$Combo8 = GUICtrlCreateCombo("9", 122, 463, 40, 25)
GUICtrlCreateLabel("Deley (Sec.)", 168, 466, 62, 17)
$Input6 = GUICtrlCreateInput("130", 232, 463, 50, 21)
;================================================= ===============================
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("Priston 2", 8, 504, 289, 80)
GUICtrlSetFont(-1, 16, 400, 0, "LoNyTooNS")
GUICtrlSetColor(-1, 0x000000)
GUICtrlCreateLabel("tecla = PAUSE", 16, 528, 230, 30)
GUICtrlSetFont(-1, 14, 400, 0, "LoNyTooNS")
GUICtrlCreateLabel("tecla = para END", 16, 550, 150, 30)
GUICtrlSetFont(-1, 14, 400, 0, "LoNyTooNS")
GUISetState(@SW_SHOW)
;================================================= ===============================
;============================User Command=========================================
Global $Paused
Global $HpHero = 1
Global $MpHero = 1
Global $HpMon = 1
Global $Enemy = 0
Global $Skill = 0
Global $Power = 1
Global $times = TimerInit()
HotKeySet("{Pause}", "TogglePause")
HotKeySet("{END}", "Terminate")
;============================Check Program=========================================
Sleep(500)
;============================Run&Stop Program=======================================
TogglePause()
Func TogglePause()
$Paused = NOT $Paused
While $Paused
Sleep(100)
ToolTip(">>Stop<<",226,39)
WEnd
ToolTip("",0,0)
Sleep(100)
EndFunc
Func Terminate()
Exit 0
EndFunc
Func _Run()
WinActivate("PT2.exe")
Return
EndFunc
;================================================= ===============================
;=============================Function Event=========================================
Func Check_HpHero()
$Pixel = PixelGetColor(GUICtrlRead($Slider1Hpbar),69)
If $Pixel <> 0x290000 Then
$HpHero = 0
Else
$HpHero = 1
EndIf
EndFunc
Func Check_MpHero()
$Pixel1 = PixelGetColor(GUICtrlRead($Slider2Mpbar),86)
If $Pixel1 <> 0x290000 Then
$MpHero = 0
Else
$MpHero = 1
EndIf
EndFunc
Func Check_Mon()
PixelSearch(560,56,718,60,0xFF0000,10)
If @error Then
$HpMon = 0
Else
$HpMon = 1
EndIf
EndFunc
Func Attack_Mon()
PixelSearch(560,56,718,60,0xFF0000,10)
If Not @error Then
$Enemy = 1
Else
$Enemy = 0
EndIf
EndFunc
Func Attack_Skill()
$Pixel2 = PixelGetColor(714,54)
If $Pixel2 = 0xDEDADA Then
$Skill = 1
Else
$Skill = 0
EndIf
EndFunc
Func Power_Low()
$Diff = Int(TimerDiff($times)/1000)
$Pixel3 = PixelGetColor(293,135)
If $Pixel3 <> 0x01B1B1 And $Enemy = 0 And $HpMon = 0 Then
ToolTip(">>Sleep<<",226,39)
Send("{1}")
$Power = 0
If Mod($Diff,10/1) = 0 Then Send ("{Tab}")
Else
$Pixel3 = PixelGetColor(317,135)
if $Pixel3 = 0x01B1B1 Then $Power = 1
EndIf
EndFunc
Func System_Run()
Check_HpHero()
Sleep(100)
Check_MpHero()
Sleep(100)
Check_Mon()
Sleep(100)
Attack_Mon()
Sleep(100)
Attack_Skill()
Sleep(100)
Power_Low()
Sleep(100)
EndFunc
;================================================= ===============================
;================================System Main=======================================
_Run()
Sleep(500)
System_Run()
While True
If Not WinActive("PT2.exe") Then Exit 0
$Diff = Int(TimerDiff($times)/1000)
If Mod($Diff, GUICtrlRead($Input5)/1) = 0 and GUICtrlRead($CheckboxBuff1)=1 Then send ("{"& GUICtrlRead($Combo7)&"}")
If Mod($Diff, GUICtrlRead($Input6)/1) = 0 and GUICtrlRead($CheckboxBuff2)=1 Then send ("{"& GUICtrlRead($Combo8)&"}")
If (GUICtrlRead($CheckboxAutoHp)=1 And $HpHero = 0) Then
Auto_Hp()
EndIf
If (GUICtrlRead($CheckboxAutoMp)=1 And $MpHero = 0) Then
Auto_Mp()
EndIf
If (GUICtrlRead($CheckboxSelectEnemy)=1 And $Power = 1 And $HpMon = 0) Then
Send("{E Up}")
Select_Mon()
Else
If (GUICtrlRead($CheckboxAttack)=1 And $Enemy = 1) Then
Attack()
EndIf
EndIf
Sleep(100)
System_Run()
WEnd
;================================================= ===============================
;=============================OutPut Function=========================================
Func Auto_Hp()
ToolTip(">>Auto Hp<<",226,39)
Send("{"& GUICtrlRead($Combo1)&"}")
Sleep(200)
EndFunc
Func Auto_Mp()
ToolTip(">>Auto Mp<<",226,39)
Send("{"& GUICtrlRead($Combo2)&"}")
Sleep(200)
EndFunc
Func Select_Mon()
ToolTip(">>CAZA<<",226,39)
Send("{TAB}")
Sleep(100)
If (GUICtrlRead($CheckboxMoveView) = 1) Then
Send("{1}")
Sleep(50)
Send("{1}")
Sleep(100)
EndIf
EndFunc
Func Attack()
ToolTip(">>Atack<<",229,39)
Send("{1}")
Sleep(100)
While Sleep(100)
$Diff = Int(TimerDiff($times)/1000)
Send("{1}")
If Mod($Diff, GUICtrlRead($Input1)/1) = 0 and GUICtrlRead($Checkboxskill1)=1 And $Skill = 1 Then send ("{"& GUICtrlRead($Combo3)&"}")
If Mod($Diff, GUICtrlRead($Input2)/1) = 0 and GUICtrlRead($Checkboxskill2)=1 And $Skill = 1 Then send ("{"& GUICtrlRead($Combo4)&"}")
If Mod($Diff, GUICtrlRead($Input3)/1) = 0 and GUICtrlRead($Checkboxskill3)=1 And $Skill = 1 Then send ("{"& GUICtrlRead($Combo5)&"}")
If Mod($Diff, GUICtrlRead($Input4)/1) = 0 and GUICtrlRead($Checkboxskill4)=1 And $Skill = 1 Then send ("{"& GUICtrlRead($Combo6)&"}")
Return
WEnd
EndFunc
this is another
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\aion_1.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <nomadmemory.au3>
#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\Marian\Desktop\autoit un so\Magic Aion\GUI\GUI.kxf
$Form1_1 = GUICreate("Game.exe", 633, 447, 192, 124)
$Progress1 = GUICtrlCreateProgress(24, 128, 233, 25)
$Adresse1 = 0x2B444AB8;
$Adresse2 = 0x77756D00
$Open = _memoryopen(ProcessExists("GAME.exe"))
$MaxLeben = _MemoryRead($Adresse1, $Open, 'dword')
$MomentanesLeben = _MemoryRead($Adresse2, $Open, 'dword')
GuiCtrlSetData($Progress1,$MomentanesLeben*100/$Maxleben)
$Progress2 = GUICtrlCreateProgress(24, 192, 233, 25)
$Progress3 = GUICtrlCreateProgress(24, 256, 241, 25)
$Progress4 = GUICtrlCreateProgress(24, 328, 433, 17)
$Label2 = GUICtrlCreateLabel("Target", 448, 81, 35, 17)
$Progress5 = GUICtrlCreateProgress(368, 128, 249, 25)
$Button1 = GUICtrlCreateButton("Run bot", 24, 400, 153, 33, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Player", 24, 80, 33, 17)
$Button2 = GUICtrlCreateButton("UMA PAGINA PARA IR Homepage", 432, 8, 145, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Forum", 432, 40, 145, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Exit", 464, 400, 145, 33, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Settings", 248, 400, 153, 33, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("HP", 104, 96, 19, 17)
$Label4 = GUICtrlCreateLabel("MP", 104, 168, 20, 17)
$Label5 = GUICtrlCreateLabel("GK", 104, 232, 19, 17)
$Label6 = GUICtrlCreateLabel("EP", 104, 304, 18, 17)
$Label3 = GUICtrlCreateLabel("AQUI EL JUEGO ONLINE", 24, 8, 219, 26)
GUICtrlSetFont(-1, 12, 400, 0, "Minion Pro Cond")
GUICtrlSetColor(-1, 0x000080)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
case $Button4
Exit
case $Button2
ShellExecute("aqui una pagina")
case $Button3
ShellExecute("Aqui otra pagina")
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
plz healp me
|
|
|
12/18/2015, 22:50
|
#7
|
elite*gold: 0
Join Date: Apr 2011
Posts: 363
Received Thanks: 167
|
Code:
Global Const $percent = 0.5; 50% hp
Global Const $minMPValue = 200
Global Const $HPPotionKey = "{q}"
Global Const $MPPotionKey = "{e}"
Global Const $attack1Key = "{1}"
Global Const $SelectMobKey = "{TAB}"
Global $status = -1
Global $myHP,$myMP,$mobHP
$Adresse1 = 0x2B444AB8;
$Adresse2 = 0x77756D00
$Open = _memoryopen(ProcessExists("GAME.exe"))
Func UpdateData()
$MaxHP = _MemoryRead($Adresse1, $Open, 'dword')
$minHPValue = $MaxHP*$percent
$myHP = _MemoryRead($Adresse2, $Open, 'dword')
;$myMP = _MemoryPointerRead($BaseAddress,$open,$MPOffset,"long")
;$mobHP = _MemoryPointerRead($BaseAddress,$open,$MobOffset,"long")
EndFunc
Func getStatus() ;how this works, first check if hp or mp is low, then check if mob is selected, finally if don't select mob and fight
UpdateData()
If $myHP < $minHPValue then return 1;Or $myMP < $minMPValue Then Return 1 ;while fighting should check HP/MP too so
If $mobHP <> 0 Then Return 2 ;if mob is selected
Return 3 ;mob not selected / HP/MP okay
EndFunc
Func UsePotion()
If $myHP < $minHPValue Then Send($HPPotionKey)
If $myMP < $minMPValue Then Send($MPPotionKey)
EndFunc
Func Fight()
Send($attack1Key)
EndFunc
Func SelectMob()
Send($SelectMobKey);or u can send a packet to select mob with tcpsend
EndFunc
While Sleep(20) ;Main loop
$status = getStatus()
Switch $status
Case 1 ;Low hp/mp
UsePotion()
ToolTip("Using potion",0,0,"STATUS")
Case 2 ;Mob selected HP/MP okay
Fight()
ToolTip("Fighting",0,0,"STATUS")
Case 3 ;Mob not selected HP/MP okay
SelectMob()
ToolTip("Searching Mob",0,0,"STATUS")
EndSwitch
WEnd
U should get MP and mobHP addresses, don't have time for now to make a gui.
|
|
|
12/19/2015, 03:57
|
#8
|
elite*gold: 0
Join Date: Oct 2005
Posts: 33
Received Thanks: 1
|
that's my point of hp and the other is my target pointer shows me when I select the hp MOBs or Player
target mobs or players
|
|
|
 |
Similar Threads
|
Cheat Engine aobscan in Autoit
08/21/2022 - AutoIt - 3 Replies
Moin Leute, ich wollte mal nachfragen ob es in Autoit möglich ist, eine Cheat Engine aob script zu injecten.
Hier ist der Script den ich gerne injecten würde:
//code from here to '' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
label(whatever)
|
Cheat Engine aobscan in Autoit
11/27/2013 - General Coding - 3 Replies
Moin Leute, ich wollte mal nachfragen ob es in Autoit möglich ist, eine Cheat Engine aob script zu injecten.
Hier ist der Script den ich gerne injecten würde:
//code from here to '' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
label(whatever)
|
Cheat Engine adresse in Autoit ??
07/18/2011 - AutoIt - 4 Replies
Hallo alle zusammen :)
Was ihr vorher wissen solltet :
-kommt mir nicht mit sowas wie "Google doch selbst". Ich google und stöber alle Foren seit genau 11 Stunden durch. Bin auf einige Tutorials gekommen, doch bin nicht sehr weiter gekommen.
Ich habe ein kleines Problem.
Ich würde gerne einen kleinen Hack schreiben.
|
kan man bei autoit cheat engine ??
01/09/2010 - AutoIt - 3 Replies
so kan man bei autoit cheat engine value einbinden??
das zb ein knopf wen drauf geklikt wird waffe +9 sind??moklich??
lg gael1509
|
cheat engine / autoit
04/12/2009 - AutoIt - 4 Replies
hey leute
ich hab bei cheat engine jetzt 10 verschiedene werte.
ich möchte jetzt mit autoit ein programm schreiben, dass so lange alle 2 sekunden auf einen button klickt, (pixel: 655, 425) bis irgendeiner der werte auf 12 ist. dann soll er einfach aufhören zu klicken.
wie geht das? kann mir einer helfen bitte?
|
All times are GMT +1. The time now is 05:10.
|
|