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 


[help] asm "if" "else"

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
RAKO
Master Cheater
Reputation: 0

Joined: 26 Jun 2006
Posts: 454

PostPosted: Mon Jul 07, 2008 12:27 am    Post subject: [help] asm "if" "else" Reply with quote

in an effort to try and improove some maple story hacks I wanted to use "if" and "else" so I could set a value to 1 and the hack would be on or set it to 0 and the hack would be off.
now I could just make a ggcrc but when you can just bypass that by applying the hacks before gg starts it just makes it easier.
so can you help me make an "if" and "else" in asm then once the game is running all I have to do is change the value from 1 to 0 with a program I make to turn hacks off without editing memory.

_________________
Dark Byte wrote:
Who knows, perhaps i'm a maple gm!!!!
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Mon Jul 07, 2008 4:47 am    Post subject: Reply with quote

Code:
cmp [somedword],1 // your switch
je dostuff
//here goes the else thing
jmp end
dostuff: // A label
// heres the if == 1
jmp end
Or something? O_o I mean that include this code in every hack you're using, then just modify the value of somedword.

Related a bit: I've posted a guide how to do this with jump in game a long long time ago. You could try looking for it if you've time. I'm too lazy to find it :)
Back to top
View user's profile Send private message
Chaosis13
Master Cheater
Reputation: 0

Joined: 14 Aug 2007
Posts: 372

PostPosted: Mon Jul 07, 2008 7:24 am    Post subject: Reply with quote

Try a meso drop scrpt... You drop a # of mesos, then the script gets activated. Then drop another, and it gets deactivated. Or you could use if, else statements in a C++ DLL.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Jul 07, 2008 9:05 am    Post subject: Reply with quote

Jani wrote:
Code:
cmp [somedword],1 // your switch
je dostuff
//here goes the else thing
jmp end
dostuff: // A label
// heres the if == 1
jmp end
Or something? O_o I mean that include this code in every hack you're using, then just modify the value of somedword.

Related a bit: I've posted a guide how to do this with jump in game a long long time ago. You could try looking for it if you've time. I'm too lazy to find it Smile


if it was a simple boolean check, why don't you just do

Code:
cmp [somedword], 1
jne end
//if it equals put stuff here

_________________
Back to top
View user's profile Send private message
RAKO
Master Cheater
Reputation: 0

Joined: 26 Jun 2006
Posts: 454

PostPosted: Mon Jul 07, 2008 7:37 pm    Post subject: Reply with quote

Jani wrote:
Code:
cmp [somedword],1 // your switch
je dostuff
//here goes the else thing
jmp end
dostuff: // A label
// heres the if == 1
jmp end
Or something? O_o I mean that include this code in every hack you're using, then just modify the value of somedword.

Related a bit: I've posted a guide how to do this with jump in game a long long time ago. You could try looking for it if you've time. I'm too lazy to find it Smile


thanks for this.

i am planing on including this in all hacks so i can just turn them on and off without a ggcrc. hopefully I can get an external program to work but if not ill just use a dll.

_________________
Dark Byte wrote:
Who knows, perhaps i'm a maple gm!!!!
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Mon Jul 07, 2008 7:40 pm    Post subject: Reply with quote

GGCRC checks to see if any memory has been changed. No matter what method you use, GG will detect a change in the memory it scans.
_________________
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Tue Jul 08, 2008 5:12 am    Post subject: Reply with quote

lurc wrote:
if it was a simple boolean check, why don't you just do

Code:
cmp [somedword], 1
jne end
//if it equals put stuff here
Short answer: he wanted if-else. Longer answer: If you're codecaving and don't want anything modified, you've to run the code which you wrote over with your codecave jmp. Eg. Patching
Code:
DEADBEEF:
mov eax,edx
xor ecx,ecx
pop edx
with
Code:
ccave:
cmp [somedword],1 // your switch
je dostuff
mov eax,edx // THESE ARE
xor ecx,ecx // THE BYTES
pop edx // WRITTEN OVER EARLIER.
jmp end
dostuff: // A label
// heres the if == 1
jmp end

DEADBEEF:
jmp ccave
end:


Well.. If the over written byte code is used in both, if-else, then I'd be smart to write an epilogue (where the overwritten code is) and jmp to there from the cmp and dostuff.
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 programming 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