Skip to content
Guest Big Announcement

[MSHook] Return int as bool

Featured Replies

Hey, so, I'm hacking a game, and need to return these functions as bool:

CProgressUtilImpl::IsLevelUnlocked(int) 

As you can see it is classified as an int by IDA...

 

How do I write it to return as a boolean?

static bool UnlockLevel() {
return true;
}
%ctor {
MSHookFunction(MSFindSymbol(NULL, "____ZNK17CProgressUtilImpl15IsLevelUnlockedEi"),(bool*)UnlockLevel, NULL); 
}

 

 

Dosnt work, what do I do?

 

Change the bool (bold text in the code) to int, or what?

Updated by Guest

*2 hours later*

 

BUMP!

You can try return 1 or 0.

 

I tried >_< For some reason, none of the functions I hack make any difference... tried many, and yes, I know it's bundle id is right, I added a alert. :(

Updated by Guest

Nothing at all?

 

Which game is it?

 

Candy Crush ._.

 

So weird..nothing changes...

Trying using GDB just doesn't work, it sucks... sometimes it won't notice if the value changes or not, even though it is the right offset and I have tested it with GamePlayer, sometimes it just give weird errors, something with wasabi or whatever, lol... so yea.. fck GDB.

Candy Crush ._.

 

So weird..nothing changes...Trying using GDB just doesn't work, it sucks... sometimes it won't notice if the value changes or not, even though it is the right offset and I have tested it with GamePlayer, sometimes it just give weird errors, something with wasabi or whatever, lol... so yea.. fck GDB.

seND me your tweak file I will fix it in abit if you want

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.