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 


novice at assembler what am i doing wrong?

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

Joined: 12 Feb 2013
Posts: 22

PostPosted: Sat May 04, 2013 5:42 pm    Post subject: novice at assembler what am i doing wrong? Reply with quote

I'm trying to make it so if hp is lower then 36 raise it back to 36

I'm doing this for training purposes otherwise I would use nop

Here's what I got so far

Code:
[ENABLE]

alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(mytest)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
cmp [00E74C24],36  //compare value at adress to 36
jl mytest //if lower then goto test
jmp exit //else exit

originalcode:
{and al,00
add [eax],al
add [eax],al}

mytest:
mov [00E74C24],36 //making value at adress 36?

exit:
jmp returnhere


"DeSmuME.exe"+A74C24:
jmp newmem
nop
returnhere:


[DISABLE]
DeSmuME.exe+A74C24:
and al,00 
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat May 04, 2013 5:54 pm    Post subject: Reply with quote

You probably hooked piece of code that is never executed

(judging by original code: and al,00 ; add [eax],al ; add [eax],al )

_________________
Back to top
View user's profile Send private message MSN Messenger
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sat May 04, 2013 5:59 pm    Post subject: Reply with quote

Also use #36 instead of 36, because without # the number is used as hex and not decimal.
_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Spawnova
Newbie cheater
Reputation: 0

Joined: 12 Feb 2013
Posts: 22

PostPosted: Sat May 04, 2013 6:03 pm    Post subject: Reply with quote

I went to the address with static offset for player health in the memory viewer is that not correct?

also If i disable script it sets health to maxhealth

*edit I've done another search this time for all and found 3 offsets all of which are static and lead to same opcodes

thanks flash I thought that was the case but wasnt sure


Last edited by Spawnova on Sat May 04, 2013 6:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat May 04, 2013 6:13 pm    Post subject: Reply with quote

Now I see it:
00E74C24 = "DeSmuME.exe"+A74C24


Obviously, you are doing it wrong. And of course that 36 thing.
You should use
mov [00E74C24],(int)36
or
mov [00E74C24],#36

Do "what access" on your health address. You should get bunch of opcodes. Try first one, do code injection there (AA script).


But first, do some tutorials:
http://forum.cheatengine.org/viewtopic.php?t=542093
http://forum.cheatengine.org/viewtopic.php?t=558610

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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