meokhung Posted October 13, 2007 Share Posted October 13, 2007 when i play the game have 2 value HP/MP and i used Art money to find 2 address of memory 01420088 : 418 (HP capital) 0142071C : 2880 (MP capital) So, in Auto it, how can read the value in memory address like ArtMoney I want to write the program like this: Func AutoHealing () $HP=....<= read value from memory $MP=....<= read value from memory If $HP < 100 Then Send ($Key_Healing_HP) EndIf If $MP < 500 Then Send ($Key_Healing_MP) EndIf EndFunc [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
martin Posted October 13, 2007 Share Posted October 13, 2007 when i play the game have 2 value HP/MPand i used Art money to find 2 address of memory01420088 : 418 (HP capital)0142071C : 2880 (MP capital)So, in Auto it, how can read the value in memory address like ArtMoneyI want to write the program like this:Func AutoHealing () $HP=....<= read value from memory $MP=....<= read value from memory If $HP < 100 Then Send ($Key_Healing_HP) EndIf If $MP < 500 Then Send ($Key_Healing_MP) EndIfEndFuncWelcome to the forums. You need a memory udf such as Memory.au3. I use NomadMemory from here. because I found it easier to understand. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
meokhung Posted October 14, 2007 Author Share Posted October 14, 2007 Welcome to the forums. You need a memory udf such as Memory.au3. I use NomadMemory from here. because I found it easier to understand.I got it, really thank you!!! [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
Xand3r Posted October 14, 2007 Share Posted October 14, 2007 make sure you found all the pointers for thoose values or the script will only work once Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
meokhung Posted October 15, 2007 Author Share Posted October 15, 2007 Well, the script just read the exacly memory address, but when reload game, the address will be change...so anyone have idea about this? Maybe i need find the pointer point to address, is that correct? [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
MrDeltaX Posted October 15, 2007 Share Posted October 15, 2007 Yes that is correct.You can do it with Cheatengine (www.cheatengine.org) .CheatEngine is better than artmoney.Do the tutorial and you learn how to find the pointer. Link to comment Share on other sites More sharing options...
meokhung Posted October 16, 2007 Author Share Posted October 16, 2007 I got it and will try now, so thx. Anyone know, some game like Hero online, 9 Dragon... AutoIt Window Info can't detect the color, what is the problem? I try in game and got nothing, but when i move the mouse to desktop it run normal >.< [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
meokhung Posted October 16, 2007 Author Share Posted October 16, 2007 NomadMemory can read value at the Memory address Cheatengine can find the address and pointer But how can read the value in memory address by past the pointer Ex: Func RefillMoney() $ID=_MemoryOpen(0x00000848) $Address=0x09E2A194 $CurrentGold=_MemoryRead($Address,$ID) If $CurrentGold< 100000 Then _MemoryWrite($Address, $ID, 100000) EndIf _MemoryClose($ID) EndFunc This function work as well now, it can refill the money everytime it slower than 100k, but that is read from exact address. When i reset the game it will run incorrect. I use Cheatengine and found the pointer 0x00a1e0c4 offset 0x00000024C will point to 0x09E2A194 (current address save the Gold value) , and evrytime i reset game it still correct (alway the pointer point to the value in game and ofcause the memory has changed) So, in Autoit how to read the value by use pointer, pls help me! [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
DW1 Posted October 16, 2007 Share Posted October 16, 2007 (edited) With DMA (Dynamic Memory Allocation) values get loaded into ram in the order they request (very rarely the same value twice). The Pointer address' value IS the other "actual" address. Does this help? I THINK it would be something like this, but not positive:_MemoryRead(_MemoryRead($Address,$ID), $ID) EDIT: Please correct me if I am wrong Edited October 16, 2007 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
meokhung Posted October 16, 2007 Author Share Posted October 16, 2007 (edited) With DMA (Dynamic Memory Allocation) values get loaded into ram in the order they request (very rarely the same value twice). The Pointer address' value IS the other "actual" address. Does this help? I THINK it would be something like this, but not positive:_MemoryRead(_MemoryRead($Address,$ID), $ID) EDIT: Please correct me if I am wrong Thx you for your idea. It run as well now My code : Global $Pointer=0x00a1e0c4 Global $Offset=0x0000024c Func _FindNewAddress(ByRef $P,ByRef $OSet) $ID=_MemoryOpen(0x00000848) $New_Address=_MemoryRead($P,$ID) +$OSet _MemoryClose($ID) Return $New_Address EndFunc Func _RefillMoney() $ID=_MemoryOpen(0x00000848) $Address=_FindNewAddress($Pointer,$Offset) $MaxMoney=_MemoryRead($Address,$ID) If $MaxMoney < 100000 Then _MemoryWrite($Address, $ID, 100000) EndIf _MemoryClose($ID) EndFunc While 1 _RefillMoney() Sleep(1000) WEnd _MemoryClose($ID) BTW: When i code: $ID=_MemoryOpen(0x00000848) It will run correct, but if i code: $ID=_MemoryOpen("game.exe") It not work...?!? Edited October 16, 2007 by meokhung [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
DW1 Posted October 16, 2007 Share Posted October 16, 2007 (edited) $ID = _MemoryOpen(ProcessExists ( "game.exe" )) Does that work? ProcessExists should return the PID Edited October 16, 2007 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
meokhung Posted October 16, 2007 Author Share Posted October 16, 2007 (edited) It work as well now, but please tell me, why is that? Edited October 16, 2007 by meokhung [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
DW1 Posted October 16, 2007 Share Posted October 16, 2007 Because _MemoryOpen is looking for a PID (Process ID), you are pointing to a process, not the PID of the process. $ID=_MemoryOpen("game.exe") <--- points to process, so it will not work $ID=_MemoryOpen(ProcessExists("game.exe")) <----- Points to PID of process, so it works AutoIt3 Online Help Link to comment Share on other sites More sharing options...
AzKay Posted October 16, 2007 Share Posted October 16, 2007 NomadMemory can read value at the Memory addressCheatengine can find the address and pointerBut how can read the value in memory address by past the pointerEx:Func RefillMoney() $ID=_MemoryOpen(0x00000848) $Address=0x09E2A194 $CurrentGold=_MemoryRead($Address,$ID) If $CurrentGold< 100000 Then _MemoryWrite($Address, $ID, 100000) EndIf _MemoryClose($ID)EndFunc This function work as well now, it can refill the money everytime it slower than 100k, but that is read from exact address. When i reset the game it will run incorrect. I use Cheatengine and found the pointer 0x00a1e0c4 offset 0x00000024C will point to 0x09E2A194 (current address save the Gold value) , and evrytime i reset game it still correct (alway the pointer point to the value in game and ofcause the memory has changed)So, in Autoit how to read the value by use pointer, pls help me!I think, The reason when you restart the game, the gold is different. Because gold is server side, Not client side.Just a guess. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
DW1 Posted October 16, 2007 Share Posted October 16, 2007 Did he mean that the gold amount changes? or that the gold address changes? I think he meant address, but I could be wrong. Thought he was referring to DMA AutoIt3 Online Help Link to comment Share on other sites More sharing options...
meokhung Posted October 17, 2007 Author Share Posted October 17, 2007 I think, The reason when you restart the game, the gold is different. Because gold is server side, Not client side.Just a guess.Oop... this is the sample i write to learn how to read/write process valueAnd i write the program to auto train lv, not hack gold or something else [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
meokhung Posted November 10, 2007 Author Share Posted November 10, 2007 Global $Game_ID=WinGetProcess("Element Client - Duong Van Truong") ;Global $Game_ID=WinGetProcess("Element Client") I have problem: My program working now, but when i play 2 windows (same game) and each window will have diffiren name so i try use func WinGetProcess(window title) to get ProcessID like this Global $Game_ID=WinGetProcess("Element Client - Duong Van Truong") ;Global $Game_ID=WinGetProcess("Element Client") But both of them alway point to the first window (the first windows game i opened) How can write to play with 2 or more window (more process and same program) Thx you! [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
AzKay Posted November 10, 2007 Share Posted November 10, 2007 $var = WinList() For $i = 1 to $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) EndIf Next Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
meokhung Posted November 10, 2007 Author Share Posted November 10, 2007 Thank you, it work so good now. and onemore question Why some game i cant detect color by window info like: Hero Online, Cabal, 9 Dragon... [center]Không có việc gì khó, chỉ sợ làm không đượcĐào núi và lấp biển, quyết chí ắc bị điên[/center] Link to comment Share on other sites More sharing options...
Zod Posted January 26, 2008 Share Posted January 26, 2008 Thank you, it work so good now.and onemore questionWhy some game i cant detect color by window infolike: Hero Online, Cabal, 9 Dragon...Hi!I think that the problem is the ingame cursor.It can be a hardware-cursor or a software-cursor.In games with softwarecursors you will always get the colorvalue of thecursor itself and not of the pixel underneath the cursor.In some games you can change the cursor in the options menu. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now