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 


{c++} how to check if all my DWORD keys are the same
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sat Jun 23, 2012 6:29 pm    Post subject: Reply with quote

bitwise xor

Was retarded of me anyway,

Code:
DWORD d =
        dwLootKey | dwAttackKey
        | dwHealthKey | dwManaKey
        | dwSkill1Key | dwSkill2Key
        | dwSkill3Key;


derp
Back to top
View user's profile Send private message MSN Messenger
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sat Jun 23, 2012 6:36 pm    Post subject: Reply with quote

since it is bitwise it is

01001 ^ 01011 = 00010

k I get it.


its ok with XOR, it won't work with OR

example why it wont work with OR

0101 | 0101 = 0101
0111 | 0101 = 0111

when for logic sake you need it to be 0000


which is correct with XOR
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Jun 24, 2012 1:53 am    Post subject: Reply with quote

Code:
bool bSame = ((dwLootKey & dwAttackKey & dwHealthKey & dwManaKey & ...) == dwLootKey);
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Sun Jun 24, 2012 5:03 pm    Post subject: Reply with quote

Code:
bool allSame = (((dwLootKey ^ dwAttackKey)|(dwLootKey ^ dwHealthKey)|(dwLootKey ^ dwManaKey)|(dwLootKey ^ dwSkill1Key)|(dwLootKey ^ dwSkill2Key)|(dwLootKey ^ dwSkill3Key)) == 0 );


this should do it
Back to top
View user's profile Send private message MSN Messenger
Womanizer
Grandmaster Cheater
Reputation: 2

Joined: 30 May 2009
Posts: 958

PostPosted: Sun Jun 24, 2012 6:47 pm    Post subject: Re: {c++} how to check if all my DWORD keys are the same Reply with quote

Shrooms wrote:
Code:
DWORD dwLootKey = 0x58;
DWORD dwAttackKey = 0x58;
DWORD dwHealthKey = 0x58;
DWORD dwManaKey = 0x58;
DWORD dwSkill1Key = 0x58;
DWORD dwSkill2Key = 0x58;
DWORD dwSkill3Key = 0x58;


What is a easy func to check if they are all the same key?

:oops:


By not giving a fuck

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 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