If you need position, you can take it from MovementClass .. just search this forum and modify script to use ACD or Actor class ...
If you need position, you can take it from MovementClass .. just search this forum and modify script to use ACD or Actor class ...
Quick question, I can try to figure out the rest myself. ... I'm getting "Variable Used Without Being Declared" on line 160 with a "_MemoryRead"
Im on x64 Win7, and I've read that I have to change a few things around to get it to work right. Is this correct? Is this built for x86 and I need to add a few if/tens to the function to get it to work with x64?
I'm quite rusty with autoit
You prolly missed #include <NomadMemory.au3> or if it is writen, then you didnt download the mentioned script
i'm having trouble understanding how interactGUID() works, can anyone point me in the right direction? a description of what the _MemoryWrite()'s are actually accomplishing would be helpful. I'm translating this code into another language and I can print out actors and move to coordinates, but the GUID interaction simply won't work for me and I don't know where to start debugging.
all of my addresses and offsets are the same as in the posted script; perhaps a few of the addresses/offsets related to Interaction have changed? similar to the $CurrentX,Y,Z offsets being updated? any help would be appreciated.
Thanks dan934, that worked for me. I successfully made a bot that paths coordinates and attacks monsters but I'm having trouble 'clicking' an object like dank cellar. It doesn't have a GUID so I'm assuming interactGUID will not work for it. Does anyone know if the script can be modified to do this? I'm not that great at memory editing..
wtb simpe code to read player HP / Status..
Example for the previous patch 1.0.2.9991. Just change Base addres and few offsets
Example 1:
Example 2. For these example u need NomadMemory. au3 v3.1.127 :Code:#include "NomadMemory.au3" global $sModule = "Diablo III.exe" global $ProcessID = WinGetProcess("Diablo III") SetPrivilege("SeDebugPrivilege", 1) global $DllInformation = _MemoryOpen($ProcessID) global $baseADDR = _MemoryModuleGetBaseAddress($ProcessID, $sModule) $Base =$baseADDR+0x00FF8864 MsgBox(0,"Base",hex($Base)) local $temp = _MemoryRead($Base, $DllInformation, 'ptr') ;Тут и далее читаем как 'ptr', так как они указывают не на финальное значение а на промежуточный адрес который мы должны увидеть как Hex MsgBox(0,"$temp",hex($temp)) local $temp2 = _MemoryRead($temp + dec('40'), $DllInformation, 'ptr') MsgBox(0,"$temp2",hex($temp2)) local $temp3 = _MemoryRead($temp2 + dec('c8'), $DllInformation, 'ptr') MsgBox(0,"$temp3",hex($temp3)) local $temp4 = _MemoryRead($temp3 + dec('c'), $DllInformation, 'ptr') MsgBox(0,"$temp4",hex($temp4)) Local $temp5 = _MemoryRead($temp4 + dec('294'), $DllInformation, 'ptr') MsgBox(0,"$temp5",hex($temp5)) Local $temp6 = _MemoryRead($temp5 + dec('38'), $DllInformation, 'float') ;Финальное значение (Текущий показатель HP). Хранится во 'float'. Читаем так же MsgBox(0,"$temp6",$temp6)
Comment to the picture:Code:#include "NomadMemory.au3" SetPrivilege("SeDebugPrivilege", 1) global $sModule = "Diablo III.exe" global $ProcessID = WinGetProcess("Diablo III") ;~ MsgBox(0,"$ProcessID", $ProcessID) SetPrivilege("SeDebugPrivilege", 1) global $DllInformation = _MemoryOpen($ProcessID) ;~ MsgBox(0,"DLL",$DllInformation) global $baseADDR = _MemoryModuleGetBaseAddress($ProcessID, $sModule) ;~ MsgBox(0,"$baseADDR",$baseADDR) $Base =$baseADDR+0x00FF8864 ;~ MsgBox(0,"Base",hex($Base)) Global $TargetHP_cur_offset[6] = [0, 0x40, 0xC8, 0xC, 0x294, 0x38] $test = _MemoryPointerRead($Base, $DllInformation, $TargetHP_cur_offset, "float") MsgBox(0,"$HP_Cur",$test[1])
1 = 2 = 3
3 + 4 = 5
5 + 6 = 7
7 + 8 = 9
9 + 10 = 11
11 + 12 = 13
13 = 14
...
Profit!
Last edited by Belfigor; 06-22-2012 at 07:59 AM.
For interacting with dank cellar i use the following code, it moves mouse and when mouse becomes hand it clicks:
It would be awesome if u will post a short function that returns (x, y, z) coordinates of character.PHP Code:
game_status::game_status ()
{
/// Get your device contexts.
_hdc_screen = GetDC (NULL);
_hdc_mem = CreateCompatibleDC (_hdc_screen);
/// Create the bitmap to use as a canvas.
_hbm_canvas = CreateCompatibleBitmap (_hdc_screen, 256, 256);
/// Select the bitmap into the device context.
_hbm_old = SelectObject (_hdc_mem, _hbm_canvas);
}
game_status::~game_status (void)
{
SelectObject (_hdc_mem, _hbm_old);
DeleteObject (_hbm_canvas);
DeleteDC (_hdc_mem);
ReleaseDC (NULL, _hdc_screen);
}
cursor_types game_status::cursor_type ()
{
// Get information about the global cursor.
CURSORINFO cur_info;
cur_info.cbSize = sizeof(cur_info);
GetCursorInfo (&cur_info);
// Draw the cursor into the canvas.
DrawIcon (_hdc_mem, 0, 0, cur_info.hCursor);
// Get the color of the pixel you're interested in.
COLORREF clr = GetPixel(_hdc_mem, 18, 18);
switch (clr)
{
case (0x97AEC9):
return DEFAULT;
case (0xD1ECFF):
return HAND;
case (0x14CE7):
return SWORD;
case (0x577CAB):
return TRADE;
default:
return QUEST;
}
}
Cannot post code, forum tells me thet post denied. Look in attachment AutoIt code that will show you your character x,y,z coords
is this the same as:PHP Code:
$Base =$baseADDR+0x00E40D94
Global $offX[6] = [0, 0x10, 0x4, 0x4, 0x50, 0x38]
$test = _MemoryPointerRead($Base, $DllInformation, $offX, "float")
my bot is on pure C++, cuz i don't like autoit virtual machine.PHP Code:
DWORD value;
DWORD numBytesRead;
ReadProcessMemory(handle, (LPCVOID)(baseAddr + 0x00E40D94), &value, sizeof(DWORD), &numBytesRead);
value+=0x10;
ReadProcessMemory(handle, (LPCVOID)value, &value, sizeof(DWORD), &numBytesRead);
value+=0x4;
ReadProcessMemory(handle, (LPCVOID)value, &value, sizeof(DWORD), &numBytesRead);
value+=0x4;
ReadProcessMemory(handle, (LPCVOID)value, &value, sizeof(DWORD), &numBytesRead);
value+=0x50;
ReadProcessMemory(handle, (LPCVOID)value, &value, sizeof(DWORD), &numBytesRead);
value+=0x38;
float x_coord;
ReadProcessMemory(handle, (LPCVOID)value, &x_coord, sizeof (float), &numBytesRead);
Last edited by pawnbot; 06-22-2012 at 11:03 AM. Reason: mistake
I dont know anythig but autoit because i am too nooby. But it seems look like my code. I think itis moore looks like this:
Here is orientation, on the image. At 1st i think that it is regular, but angle is realy looks like u post it, but the x,y is like on the image. I have made little experiment and it showd on the paper. From there i understood the orientation. It is "The Slaughtered Calf Inn" in the 1st act. If u repeat it i think u will think same as me.Code:#include "NomadMemory.au3" global $sModule = "Diablo III.exe" global $ProcessID = WinGetProcess("Diablo III") SetPrivilege("SeDebugPrivilege", 1) global $DllInformation = _MemoryOpen($ProcessID) global $baseADDR = _MemoryModuleGetBaseAddress($ProcessID, $sModule) $Base =$baseADDR+0x00E40D94 local $temp = _MemoryRead($Base, $DllInformation, 'ptr') ;Тут и далее читаем как 'ptr', так как они указывают не на финальное значение а на промежуточный адрес который мы должны увидеть как Hex local $temp2 = _MemoryRead($temp + dec('10'), $DllInformation, 'ptr') local $temp3 = _MemoryRead($temp2 + dec('4'), $DllInformation, 'ptr') local $temp4 = _MemoryRead($temp3 + dec('4'), $DllInformation, 'ptr') Local $temp5 = _MemoryRead($temp4 + dec('50'), $DllInformation, 'ptr') Local $temp6 = _MemoryRead($temp5 + dec('38'), $DllInformation, 'float') ;Финальное значение (Текущий показатель HP). Хранится во 'float'. Читаем так же MsgBox(0,"$temp6",$temp6)
P.S. And on the picture, all coords is shown like Y.X. Just when i maped all of this room, i understood that it must be swapped like X.Y.
For example 143/96 is in Y/X coords. For normal X/Y coords it will looks like 90/143
P.S.S. Oh, there is some tobacco pieces on the paper
Last edited by Belfigor; 06-22-2012 at 11:52 AM.
Omg last night, so many helpful posts. Thanks all of you guys.