Page 1 of 2
current Position ?
Posted: May 26th, 2008, 11:43 pm
by internessi
Hi, last year i made a few Bots for king.com
(GetPixel + Keybord/Mouse control), in one
Bot for Midias Links i retranslatet the pixel
of windspeed to string. I use vb.net express.
Now my idea: If we can get the UI to show
the current position -> we can build a nice
Bot with waypoints like wowglider without
a memory hack.
If this is not working, how else can i get
the current position?
[int]
Posted: May 27th, 2008, 11:19 am
by f8l3rr0r
If you can reverse engineer it, it's on the world map at the bottom left corner.
Posted: May 27th, 2008, 12:07 pm
by internessi
If you can reverse engineer it, it's on the world map at the bottom left corner.
On the map is the coords of mouse position... so you have to open
the map - find yourselve - get the mouse over it --> read the coords
Its more easy to press F9 and read the system chat... thats what
i am working on atm. Should i use Pixel OCR or can i sniff the chat?
Someone know how a memory hack works with api? Once i know
how to read - i will find out the Pointers. PM me PLZ.
[int]
Posted: May 27th, 2008, 5:32 pm
by code2007
U can read the game memory to get your x, y and z
working offsets on live servers
readmemory(0132894) + 2C = X
readmemory(0132894) + 34 = Y
readmemory(0132894) + 30 = Z
If you script in autoit you can do something like
Global $playerdma = 0x013A2894, $playerXoffset = 0x2C, $playerYoffset = 0x34, $playerZoffset =0x30, $playerSpeedoffset = 0x150
Global $playerNFDoffset = 0x184, $playerSJoffset = 0x17C, $PlayerHeadingoffset = 0x98
$Process = 'ageofconan.exe'
$PID = ProcessExists($Process)
$OpenProcess = MemOpen(0x38, False, $PID)
$playerX = Memread($OpenProcess,MemRead($OpenProcess, $playerdma , 'int', 4) + $playerXoffset, 'float',4)
$playerY = Memread($OpenProcess,MemRead($OpenProcess, $playerdma ,'int', 4) + $playerYoffset,'float',4)
$playerZ = MemRead($OpenProcess,MemRead($OpenProcess, $playerdma,'int', 4)+ $playerZoffset,'float',4)
$playerSpeed = MemRead($OpenProcess,MemRead($OpenProcess, $playerdma,'int', 4) + $playerSpeedoffset,'float',4)
$playerSJ = MemRead($OpenProcess,MemRead($OpenProcess, $playerdma,'int', 4) + $playerSJoffset,'int',4)
$playerNFD = MemRead($OpenProcess,MemRead($OpenProcess, $playerdma,'int', 4) + $playerNFDoffset,'int',4)
$playerHeading = MemRead($OpenProcess,MemRead($OpenProcess, $playerdma,'float', 4) + $PlayerHeadingoffset,'float',4)
MsgBox(0,"Test", "X: " & $playerX & ", Y: " & $playery & ", Z: " & $playerZ)
MemClose($OpenProcess)
Func MemRead($i_hProcess, $i_lpBaseAddress, $s_Type ,$i_nSize)
Local $hDll = DllOpen("kernel32.dll")
If @error Then
SetError(1)
Return 0
EndIf
Local $v_Struct = DllStructCreate ($s_Type&'[' & $i_nSize & ']')
Local $v_lpNumberOfBytesRead = ''
DllCall($hDll, 'int', 'ReadProcessMemory', 'int', $i_hProcess, 'int', $i_lpBaseAddress, 'int', DllStructGetPtr ($v_Struct, 1), 'int', $i_nSize, 'int', $v_lpNumberOfBytesRead)
If @error Then
SetError(1)
Return 0
EndIf
Local $v_Return = DllStructGetData ($v_Struct, 1)
$v_Struct=0
DllClose($hDll)
Return $v_Return
EndFunc
Func MemOpen($i_dwDesiredAccess, $i_bInheritHandle, $i_dwProcessId)
$ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', $i_dwDesiredAccess, 'int', $i_bInheritHandle, 'int', $i_dwProcessId)
If @error Then
SetError(1)
Return 0
EndIf
Return $ai_Handle[0]
EndFunc
Func MemClose($i_hProcess)
$av_CloseHandle = DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $i_hProcess)
Return $av_CloseHandle[0]
EndFunc
Func MemWrite($i_hProcess, $i_lpBaseAddress, $s_Type ,$v_Inject, $i_nSize)
Local $hDll = DllOpen("kernel32.dll")
If @error Then
SetError(1)
Return 0
EndIf
$v_lpNumberOfBytesRead = ''
Local $v_Struct = DllStructCreate ($s_Type&'[' & $i_nSize & ']')
DllStructSetData ($v_Struct, 1, $v_Inject)
$i_Call = DllCall($hDll, 'int', 'WriteProcessMemory', 'int', $i_hProcess, 'int', $i_lpBaseAddress, 'int', DllStructGetPtr ($v_Struct, 1), 'int', $i_nSize, 'int', $v_lpNumberOfBytesRead)
If @error Then
SetError(1)
Return 0
EndIf
$v_Struct=0
DllClose($hDll)
Return $i_Call[0]
EndFunc
Posted: May 27th, 2008, 9:58 pm
by internessi
NICE!
Thats what i was looking for the last weeks in .net Forum.
The translation from autoit to vb should be easy the key
is ReadProcessMemory...
Do you know offsets to other information?
How do you find new offsets if they change someting?
TNX! [int]
Posted: May 28th, 2008, 1:55 pm
by cuervogold
Code2007, you should have a free permaPrem account on this site.
Posted: May 28th, 2008, 6:43 pm
by code2007
$SuperJump = MemRead($OpenProcess, $playerdma + 0x17C,'int', 4)
$NoFallDamage = MemRead($OpenProcess, $playerdma + 0x184,'int', 4)
$playerspeed = MemRead($OpenProcess, $playerdma + 0x150,'float, 4)
other static offsets (working on live)
targetx: 25E2EE0
targety: 25E2EE4
targetz: 25E2EE8
internessi wrote:NICE!
Thats what i was looking for the last weeks in .net Forum.
The translation from autoit to vb should be easy the key
is ReadProcessMemory...
Do you know offsets to other information?
How do you find new offsets if they change someting?
TNX! [int]
Posted: May 28th, 2008, 6:53 pm
by code2007
you can search for known byte array or known values (speed values, 5 = on ground, 3 = on water, 3.5 = stealthed)
load the game with cheat engine, park your char on the ground, search for 5 (float), then go to the water enter 3, hit next scan, back on the ground, enter 5 -> next scan -> repeat... until you got a few offsets, highlight and add them to the bottom window then try to change their values from 5 to 1, move your char around, if your speed is slow down... congrats you found your speed offset.
Now take that offset - 150 (hex) = xxxxxxxx
now check the hex checkbox in CE, and search for that xxxxxxxx value, you should be found a green address that stores xxxxxxxx
so
playerdma = readmemory(green address, "int", 4)
playerdma + 150 = speed
playerdma + 2c = x
...... + 180 = no fall dmg
.....etc etc
"How do you find new offsets if they change someting?"
Posted: May 29th, 2008, 1:26 am
by internessi
code2007, if I were allowed, I would give you 1000 TUBucks.
PM me if you need a King.com bot ^^
TNX, for sharing the information, now i am able to start
coding a aoc bot in glider style.
[int]
Posted: May 29th, 2008, 3:23 am
by code2007
NP. someone bought aocglider.com
internessi wrote:code2007, if I were allowed, I would give you 1000 TUBucks.
PM me if you need a King.com bot ^^
TNX, for sharing the information, now i am able to start
coding a aoc bot in glider style.
[int]
Posted: May 29th, 2008, 9:53 am
by internessi
NP aocglider.de is still free.
[denic.de --> Die Domain "aocglider.de" ist nicht registriert.]
However, any programm named *glider is associated
with the glider developer Mercury. So if the bot is ready
for release - i will to think about a name...
[int]
Posted: May 29th, 2008, 11:15 am
by tault_w118cmh
Nice thread :0)
QUick question: Have you found the current "heading" of a player or direction?
I'm trying to get this thing working, but it's a pain trying to get everything working right using angles. Having a direction would be much easier.
Posted: May 29th, 2008, 12:03 pm
by calidork
yay, code2007
Smart combo progie needed for barbarian domination. I'll ivestigate more on this.
Posted: May 29th, 2008, 12:06 pm
by binafus
Was trying to the locs and keep getting zeros for the X, Y, and Z.
Did the memory locs change if so can I get them from someone.
Once I know I have things set up right will learn to get the memory locs for the X and Y cords.
Hard to do if I'm not sure if I have the script correct.
Posted: May 29th, 2008, 2:16 pm
by code2007
heading is PlayerDMA + 0x98
Tault_w118cmh wrote:Nice thread :0)
QUick question: Have you found the current "heading" of a player or direction?
I'm trying to get this thing working, but it's a pain trying to get everything working right using angles. Having a direction would be much easier.