first off, I've read all the releated topics in the forum and i want to mantion ,that i'm not playing this old game on battle net or have the skills to code a bot ^^
Just wanted some nostalgic feeling from the old good days back, and playing in singleplayer for couple weeks. Now i was woundering if i can read the memory for health and mana and code something like "automatic take helath/mana potions" when health/mana drops to a certain level. Just a help for me because I'm playing on hardcore modus (as mantioned only singleplayer) So i have tried to reach the life adress but i became always a "0" as a respond! following code is working with all other games, but not with diablo .-.
so i#m really confused and frusrated. it should be so easy, as i said in other games it works like a charm.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
;GTA WORKS!
;value:=ReadMemory(0x023DB2FC,"GTA2")
;msgbox, %value%
;DIABLO ...
value:=ReadMemory(0x04ECC92C,"Diablo II")
msgbox, %value%
ReadMemory(MADDRESS,PROGRAM)
{
winget, pid, PID, %PROGRAM%
VarSetCapacity(MVALUE,4,0)
ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
Loop 4
result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
return, result
}
p.s. sorry for my poor english, I am obviosly not native speaker ^^ lol
thanks anyway
EDIT:
a user by the name FloowSnaake was arround in the old forums. Is he stil active in the new (could not find his profile)? Because i thing he might be the right person to ask for things like this (best example his POE Script)