Jump to content

Help ! increase attack rather than unlimited attack


Go to solution Solved by Guest,

15 posts in this topic

Recommended Posts

Posted

@shmoo This is my tweak.if i wanna add attack to it.I changed it like this, right?

and i can see ".0f" end of 150,what is it means?

thx so much

 

#import "writeData.h"

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.Fruit.TinyTroopers2.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
 
%ctor {
if(GetPrefBool(@"coins"))
{
writeData(0x1E73CE, 0x0F60);
} else {
 
}
 
if(GetPrefBool(@"kGems"))
{
writeData(0x1EB290, 0x3968);
} else {
 
}
 
 
 
}

change to

 

#import "writeData.h"

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <substrate.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.Fruit.TinyTroopers2.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
 
float (*attackOld)(void *self);
 
float attack(void *self) {
 
        return 150.0f;
}
 
%ctor {
if(GetPrefBool(@"coins"))
{
writeData(0x1E73CE, 0x0F60);
} else {
 
}
 
if(GetPrefBool(@"kGems"))
{
writeData(0x1EB290, 0x3968);
} else {
 
}
 
if(GetPrefBool(@"kAttack"))
{
        MSHookFunction((void*)(0x23B148+1),(void*)attack,(void**)&attackOld);
}
 
 
 
 
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines