| masterchild How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 06 Mar 2017
 Posts: 2
 
 
 | 
			
				|  Posted: Sat Nov 21, 2020 5:18 am    Post subject: Imperivm Great Battles of Rome - INF Health - HELP |   |  
				| 
 |  
				| Hello there, I`ve read so many topics and found struggle with combining two structures in the auto assemble script.
 
 So the situation is the following:
 
 I`ve found the address of one of the mine units: 28E041B8
 After finding what is written on the address, the following is shown
 
 005A79FF - CC - int 3
 005A7A00 - 8B 44 24 04  - mov eax,[esp+04]
 005A7A04 - 89 81 C0000000  - mov [ecx+000000C0],eax <<
 005A7A0A - A1 20DD9E00 - mov eax,[gbr.exe+5EDD20]
 005A7A0F - 85 C0  - test eax,eax
 
 EAX=000000B1
 EBX=00000000
 ECX=28E040F8
 EDX=000000A3
 ESI=28E040F8
 EDI=000000B1
 ESP=0018F904
 EBP=28E040F8
 EIP=005A7A0A
 
 After using Data Dissect and enemy units, I`ve found that the
 ECX+C0 is the unit`s current HP
 ECX+C8 is the unit`s max HP
 ECX+DC is the unti`s ATK
 
 At the moment the ATK is not needed fot the script.
 
 Unfortunately in the Dissect Data there was not found any values of
 unit`s current player`s possesion.
 
 I`ve tried different methods and managed to find that falue but as address it is way too far behind. Using that same unit, the address was with value
 275E9C70. After looking at what was written on it, two things popped:
 
 First one
 005A82B7 - 89 58 3C  - mov [eax+3C],ebx
 005A82BA - 89 58 50  - mov [eax+50],ebx
 005A82BD - 89 58 40  - mov [eax+40],ebx <<
 005A82C0 - 89 58 44  - mov [eax+44],ebx
 005A82C3 - 89 58 48  - mov [eax+48],ebx
 
 EAX=275E9C30
 EBX=00000000
 ECX=0018F5DC
 EDX=275E9E14
 ESI=28E040F8
 EDI=28EA3B48
 ESP=0018F5C8
 EBP=28EA48F8
 EIP=005A82C0
 
 Second one
 00619A53 - 09 30  - or [eax],esi
 00619A55 - 8B 4C 24 0C  - mov ecx,[esp+0C]
 00619A59 - 89 4C 90 04  - mov [eax+edx*4+04],ecx <<
 00619A5D - FF 40 14  - inc [eax+14]
 00619A60 - 5E - pop esi
 
 EAX=275E9C6C
 EBX=00000000
 ECX=00000001
 EDX=00000000
 ESI=00000000
 EDI=28EA3B48
 ESP=0018F5B8
 EBP=28EA48F8
 EIP=00619A5D
 
 After using Data structures no information was there about unit`s hp and so on.
 
 If we go back, with the data structures of the unit`s HP i`ve managed to find only one difference with bot`s units which is ECX-1C8 = 0 for Player 1 (me) and 1 value for the rest (bots)
 
 I`ve tried a script like that:
 newmem:
 cmp [ecx-1C8],0 //check if ECX=0
 mov edx,[ecx+C8] //copy the max health on edx
 mov [ecx+C0],edx //copy edx to the health, so max health = health
 
 where edx is usually 0 ( in this case it is not ) but the game crashes.
 
 What would you suggest to do in this case?
 
 P.S. HUGE thanks in advance
 P.S.2. I am still learning so thanks for the understanding and showed patience
 
 EDIT:
 
 Here is what I managed to outcome at the moment:
 
 To put it simple, the second address (unit`s player possesion) will not be put in the script.
 
 As I said the unit`s address with negative offset 1C8 is always 0 (for the player) BUT this value is stored in different hex numbers.
 
 I`ve tried the following code:
 
 newmem:
 cmp [ecx-000001C8],2702B170
 jne code
 nop
 
 code:
 mov [ecx+000000C0],eax
 jmp return
 
 But nothing happens because the value is changed to 0003392C.
 
 By the way the address is a pointer that has a 0 value [in 4bit] but another numbers are stored in hex.
 
 I`ve tried the following code too:
 
 newmem:
 push edx
 lea edx,dword ptr[ecx-000001C8]
 cmp edx,0
 jne code
 nop
 pop edx
 
 But it crashes
     
 How can I do the script properly?
 |  |