Solved void

Status
Not open for further replies.

Viktorovich31

Platinian
Hello! Help me please. This code increases the coins in the game. After each stage, a lot of coins are added, and after several stages, when there are a lot of coins, the game just freezes. Help fix this so that a lot of coins are not added. Or freeze this value (999999)

Code:
void (*old_set_coinCount)(void *instance, int);
void set_coinCount(void *instance, int) {
    if (instance != NULL) {
    }
    old_set_coinCount(instance, 999999);
}
 
try this
C++:
void (*addcoin)(void *instance, int value);
void (*old_update)(void *instance);
void update(void *instance) {
if (instance != NULL) {
if (Coin) {
addcoin(instance, 99999);
  }
}
old_update(instance);
}

addcoin = (void(*)(void *,int))getAbsoluteAddress("libil2cpp.so", 0x81C4FC);
HOOK_LIB("libil2cpp.so","0x7C5D64", update, old_update);
 
try this
C++:
void (*addcoin)(void *instance, int value);
void (*old_update)(void *instance);
void update(void *instance) {
if (instance != NULL) {
if (Coin) {
addcoin(instance, 99999);
  }
}
old_update(instance);
}

addcoin = (void(*)(void *,int))getAbsoluteAddress("libil2cpp.so", 0x81C4FC);
HOOK_LIB("libil2cpp.so","0x7C5D64", update, old_update);
The class does not have an update method.
 
try this
C++:
void (*addcoin)(void *instance, int value);
void (*old_update)(void *instance);
void update(void *instance) {
if (instance != NULL) {
if (Coin) {
addcoin(instance, 99999);
  }
}
old_update(instance);
}

addcoin = (void(*)(void *,int))getAbsoluteAddress("libil2cpp.so", 0x81C4FC);
HOOK_LIB("libil2cpp.so","0x7C5D64", update, old_update);
Have a look, please! The money is kept here. How to break?
 

Attachments

  • Screenshot_20221201-014254_MT Manager.jpg
    Screenshot_20221201-014254_MT Manager.jpg
    147.6 KB · Views: 124
  • dump.zip
    dump.zip
    2.7 MB · Views: 88
void (*old_add)(void *instance, int value);
void add(void *instance, int value) {
if (instance != NULL) {
if (AddCoins) {
old_addkeys(instance, 1000000);
return;
}
}
old_add(instance, value);

HOOK_LIB("libil2cpp.so","0x7C5D64", add, old_add);
 
Bool AddCoins;

void (*old_add)(void *instance, int value);
void add(void *instance, int value) {
if (instance != NULL) {
if (AddCoins) {
old_addkeys(instance, 1000000);
return;
}
}
old_add(instance, value);
 
Thread will be set to "solved" and closed.
When you're not happy with that just send me a message and i will re-open the thread for you.

Thanks.
 
Status
Not open for further replies.
Back
Top Bottom