Help! Help Hook Damage multiplier

Erothots

Platinian
Original poster
Oct 15, 2023
47
24
8
124
Hello everyone, can someone show me how to hook the Damage multiplier, I tried this
C++:
float (*old_atk)(void *instance);
float get_atk(void *instance) {
    if (instance != NULL && Atk > 1) {
        return (float) Atk;
    }
    return old_atk(instance);
}

HOOK_LIB("libil2cpp.so", "0xce0eb4", get_atk, old_atk);

case 11:
            Atk = value;
            break;

But the problem is that the Damage value will be equal to the slider value, instead of multiplied. Can anyone help me?
Sorry for using Google translate :pepe023:
 
  • Like
Reactions: 4f7tr6ytd47d
Show me the code after the fix & variable and you should try without slider see if its actually working

float (*old_atk)(void *instance);
float get_atk(void *instance) {
if (instance != NULL && Atk > 1) {
return (float) Atk;
}
return old_atk(instance) * (float)Atk;
}

Is that right? :pepe008:
 
float (*old_atk)(void *instance);
float get_atk(void *instance) {
if (instance != NULL && Atk > 1) {
return (float) Atk;
}
return old_atk(instance) * (float)Atk;
}

Is that right? :pepe008:


float (*old_atk)(void *instance);
float get_atk(void *instance) {
if (instance != NULL && Atk) {
return old_atk(instance) * (float)Atk;
}
return old_atk(instance) ;
}

try this
 
  • Like
Reactions: Erothots

About us

  • Welcome to platinmods.com! We are proud to present you the place which let's dreams come true! Focusing on quality and trust we have spend much time to build a gaming community fitting to your wishes and needs. Actually we offer you the finest MODs and Games of the Android section and we slowly expand to the iOS section as well. But games, Android MODs & iOS MODs are not the only things we can offer you. We have tutorials, tools, a very friendly, active and solid community which will help you with any problem you have =) Your happiness is our goal. We hope you enjoy!

Forum statistics

Threads
64,095
Messages
2,664,648
Members
4,325,608
Latest member
Faceriao992