Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Mixing two functions in HOMM3

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
danny96
Newbie cheater
Reputation: 0

Joined: 10 Jul 2020
Posts: 20

PostPosted: Mon Mar 01, 2021 8:05 pm    Post subject: Mixing two functions in HOMM3 Reply with quote

Sorry if there is a same subject I even don't know how to find topic like that.The game is Heroes Might and Magic 3. Before I give details I want to explain my goal shortly.I have basic script that writes 99 to all skills of my hero when I interact a building (those buildings increase skills by one normally ) and also I have the opcode that every time I skip the day it writes my resources.My goal is ;

Every time I skip the day program must write 99 to my hero's skills.
"Skipping day-gaining resource " must do it's function in normal way but while it runs normally it must write skills with 99.I aware that this two things are different.Base adress is different.Maybe structure is different.How can I able to do this ?

_________________
_d_
Back to top
View user's profile Send private message
danny96
Newbie cheater
Reputation: 0

Joined: 10 Jul 2020
Posts: 20

PostPosted: Tue Mar 02, 2021 10:04 am    Post subject: Reply with quote

These are the opcodes that related to gaining gold when I skip the day .

heroes3.EXE+C8207:
004C81FF - B9 07000000 - mov ecx,00000007
004C8204 - 8B 3C 02 - mov edi,[edx+eax]
004C8207 - 01 38 - add [eax],edi <<
004C8209 - 83 C0 04 - add eax,04
004C820C - 49 - dec ecx

EAX=02D00BCC
EBX=02CE0048
ECX=00000001
EDX=0000006C
ESI=02D00BB4
EDI=000003E8
ESP=00189F74
EBP=00189F8C
EIP=004C8209

These are the opcodes that related to gaining power of magic when using building.

heroes3.EXE+A3E50:
004A3E48 - 8A 87 78040000 - mov al,[edi+00000478]
004A3E4E - FE C0 - inc al
004A3E50 - 88 87 78040000 - mov [edi+00000478],al <<
004A3E56 - 8B 0D A8CC6900 - mov ecx,[heroes3.EXE+29CCA8]
004A3E5C - A1 E8946900 - mov eax,[heroes3.EXE+2994E8]

EAX=00000004
EBX=075026A4
ECX=00189FC0
EDX=0671D9EC
ESI=02BE19D0
EDI=02D05664
ESP=00189BD0
EBP=00189BD8
EIP=004A3E56

I know that in second part [edi+478] is power of magic , [edi+476] is attack , [edi+477] is defence and [edi+479] is knowledge.

[ENABLE]

alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem:

originalcode:
add [eax],edi
add eax,04

exit:
jmp returnhere

"heroes3.EXE"+C8207:
jmp newmem
returnhere:


[DISABLE]

dealloc(newmem)
"heroes3.EXE"+C8207:
add [eax],edi
add eax,04
//Alt: db 01 38 83 C0 04

In my script I want adding those 4 skills in this script but I know that base register is different.Any solution ?

_________________
_d_
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites