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 


{questions}Stronghold crusader II Super Unit's
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Tue Dec 08, 2015 6:57 am    Post subject: {questions}Stronghold crusader II Super Unit's Reply with quote

Hi Again.
I have a questions.In trainer of cheat happens for Stronghold crusader II how caliber make script for Super Unit's.How to make script for Super Unit's in cheat engine.and make script for reset health to max {when that unit's was super , weak}.help me very thanks.
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Tue Dec 08, 2015 9:13 pm    Post subject: Reply with quote

Who can not help me?help help.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Dec 08, 2015 9:41 pm    Post subject: Reply with quote

You find the unit's health.
You find out what accesses that address when you select the unit.
You now have a pointer to the last selected unit.
You use that pointer to set the last unit's health to strong/weak.
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Tue Dec 08, 2015 9:52 pm    Post subject: Reply with quote

how make script for super unit's.how change value of health unit's when enable super unit's?
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Dec 08, 2015 10:14 pm    Post subject: Reply with quote

Code:
alloc(myvar)
registersymbol(myvar)
mov [myvar],eax

Code:
{$lua}
writeInteger(readPointer("myvar"),99999)
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Wed Dec 09, 2015 9:11 pm    Post subject: Reply with quote

Is it possible to place the lua from use assembly.
mean use only assembly.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Dec 09, 2015 9:39 pm    Post subject: Reply with quote

Code:
cmp byte ptr [trigger],1
je execute
jmp return

execute:
mov byte ptr [trigger],0
mov [myvar],#99999

Code:
[ENABLE]
trigger:
db 1
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Wed Dec 09, 2015 9:52 pm    Post subject: Reply with quote

Thanks.If max health value for unit's (max value for any unit : 3000 , 20000,...) To be different and we change max value to 99999.How To restore max value to before max health value for unit's (max value for any unit : 3000 , 20000,...) and how to make reset unit's script.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Dec 10, 2015 11:33 am    Post subject: Reply with quote

Well that's a bit more difficult. Unless the game keeps a duplicate value someplace, you will need to store it yourself.
In addition to that value, you'll have to store the address of the unit it belongs to.
So you would need to keep a separate, finite list of every unit you've touched.
It would be much simpler just to restore the health to an even 3000, no matter what it might have been before.
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Sat Dec 12, 2015 5:53 am    Post subject: Reply with quote

Yes,this is really difficult but if find max health script for any unit's(if have 15 unit's).then we can making script for reset unit?
Do really want to be making?
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Tue Dec 15, 2015 6:18 am    Post subject: Reply with quote

hellllllllllllllllllllllppp.please
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Dec 15, 2015 7:25 am    Post subject: Reply with quote

If max health value is provided inside of the structure, all you have to do is load that value. For example:

baseaddress+0 (whatever)
baseaddress+4 (current health value)
baseaddress+8 (max health value)

Even though the max health is different for each unit, the appropriate values will be loaded in to their current health value.
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Tue Dec 15, 2015 1:07 pm    Post subject: Reply with quote

Okay.but if health max value for 20 units was different.for example:unit1=3000 , unit2=5000 , unit3=20000 , unit4=1000 and some unit have like this max values.
If we changing script of max value for go to 99999 .Sure value of any unit chang to 99999.Now how to back max value wiht script to before max value Or => unit1=3000 , unit2=5000 , unit3=20000 , unit4=1000 and some unit have like this max values.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Dec 15, 2015 1:29 pm    Post subject: Reply with quote

In many games, you have health and max health (stored as separate values). I assumed that's what you were referring to. Usually, these values are only 4 bytes apart (or near one another) in the structure that handles health.

Normally, you would alter health value, but not change max health value unless you needed to. That's how you could change them back.

If that's not possible, a very easy way to do it would be to have several compares with each jumping to a section of code that changes the health to a specific value (e.g. original health + 999). Then, when you deactivate it, you can change health values back to their original values, based on what their new health values are. For example:

compare original health value
if value is 2000, jump to unit 1 section of code
if value is 3000, jump to unit 2 section of code
if value is 5000, jump to unit 3 section of code

unit 1 section of code:
mov health,2999

unit 2 section of code:
mov health,3999

unit 3 section of code:
mov health,5999

When you deactivate:

compare health to 2999
je to unit 1 reset

compare health to 3999,
je to unit 2 reset

compare health to 5999,
je to unit 3 reset

unit 1 reset:
mov health,2000

unit 2 reset:
mov health,3000

etc..

With this, it would be better to incorporate an enable/disable feature, as well as include more compares to deal with varying health values.

All of that said, however, your best bet would be to find an identifier (not the health value), that can be used to differentiate between units. That will solve your problem, entirely.
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Sun Dec 27, 2015 5:03 am    Post subject: Reply with quote

How save max and current value and change value of max and current health to 999999 in auto assembly with one hotkey. if for super unit.
load value max and current health before max and current value 999999 in auto assembly with second one hotkey. if for reset unit.
hellllllp me,please. Wink Very Happy
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
Goto page 1, 2  Next
Page 1 of 2

 
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