int(*old_get_PointsKillMultiplier)(void *this_);
int get_PointsKillMultiplier(void *this_) {
int userAmount = [[switches getValueFromSwitch:@"Custom Points:"] intValue];
if([switches isSwitchOn:@"Custom Points:"]) {
return userAmount;
}
return old_get_PointsKillMultiplier(this_);
}
int(*old_get_GemsRewardForKill)(void *this_);
int get_GemsRewardForKill(void *this_) {
int userAmount = [[switches getValueFromSwitch:@"Custom Gems:"] intValue];
if([switches isSwitchOn:@"Custom Gems:"]) {
return userAmount;
}
return old_get_GemsRewardForKill(this_);
}
void setup() {
HOOK(0x1015AD440, get_PointsKillMultiplier, old_get_PointsKillMultiplier);
HOOK(0x1015A9F84, get_GemsRewardForKill, old_get_GemsRewardForKill);
[switches addTextfieldSwitch:@"Custom Points:"
description:@"Here you can enter your own points amount!"
inputBorderColor:[UIColor colorWithRed:0.74 green:0.00 blue:0.00 alpha:1.0]];
[switches addTextfieldSwitch:@"Custom Gems:"
description:@"Here you can enter your own coins amount!"
inputBorderColor:[UIColor colorWithRed:0.74 green:0.00 blue:0.00 alpha:1.0]];
}
try this, hope it work