Jump to content

19 posts in this topic

Recommended Posts

Posted

Hey guys. After hours of coding and help from various people, I finally got my Patcher to compile. Problem is, the hack makes the game crash after I swipe two fruits.

 

My iPhone specs:

6+ running ARM64

 

Here's the code (Don't steal my offsets)

 

 

My Tweak.xm

#include <UIKit/UIKit.h>
#include <CoreFoundation/CoreFoundation.h>
#include <substrate.h>
#include <Foundation/Foundation.h>

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.goggwell.FruitNinja.plist"

inline bool GetPrefBool(NSString *key) {
    return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

bool (*old_IsTimedGamev)(void *ptr);
int (*old_WaveManager9SpawnBombEiP12SPAWNER_INFOi)(void *ptr);
int (*old_WaveManager17GetCriticalChanceEi)(void *ptr);
int (*old_Components5Score8LifeLostE8_Vector3IfEiP6Entity)(void *ptr);
bool (*old_Components5Score9IsNewBestEv)(void *ptr);
int (*old_AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE)(void *ptr);


bool IsTimedGamev(void *ptr) {
    if(GetPrefBool(@"kTimed")) {
        return FALSE;
    } else {
        return old_IsTimedGamev(ptr);
    }
}

int WaveManager9SpawnBombEiP12SPAWNER_INFOi(void *ptr) {
    if(GetPrefBool(@"kBomb")) {
        return 0;
    } else {
        return old_WaveManager9SpawnBombEiP12SPAWNER_INFOi(ptr);
    }
}

int WaveManager17GetCriticalChanceEi(void *ptr) {
    if(GetPrefBool(@"kCrit")) {
        return 100;
    } else {
        return old_WaveManager17GetCriticalChanceEi(ptr);
    }
}

int Components5Score8LifeLostE8_Vector3IfEiP6Entity(void *ptr) {
    if(GetPrefBool(@"kLost")) {
        return 0;
    } else {
        return old_Components5Score8LifeLostE8_Vector3IfEiP6Entity(ptr);
    }
}

int Components5Score9IsNewBestEv(void *ptr) {
    if(GetPrefBool(@"kBest")) {
        return TRUE;
    } else {
        return old_Components5Score9IsNewBestEv(ptr);
    }
}

int AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE(void *ptr) {
    if(GetPrefBool(@"kFee")) {
        return 0;
    } else {
        return old_AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE(ptr);
    }
}


__attribute__((constructor)) void DylibMain()
{

    MSHookFunction(MSFindSymbol(NULL,"__Z11IsTimedGamev"),(void *)IsTimedGamev,(void**)&old_IsTimedGamev);
    MSHookFunction(MSFindSymbol(NULL,"__ZN11WaveManager9SpawnBombEiP12SPAWNER_INFOi"),(void *)WaveManager9SpawnBombEiP12SPAWNER_INFOi,(void**)&old_WaveManager9SpawnBombEiP12SPAWNER_INFOi);
    MSHookFunction(MSFindSymbol(NULL,"__ZN11WaveManager17GetCriticalChanceEi"),(void *)WaveManager17GetCriticalChanceEi,(void**)&old_WaveManager17GetCriticalChanceEi);
    MSHookFunction(MSFindSymbol(NULL,"__ZN10Components5Score8LifeLostE8_Vector3IfEiP6Entity"),(void *)Components5Score8LifeLostE8_Vector3IfEiP6Entity,(void**)&old_Components5Score8LifeLostE8_Vector3IfEiP6Entity);
    MSHookFunction(MSFindSymbol(NULL,"__ZNK10Components5Score9IsNewBestEv"),(void *)Components5Score9IsNewBestEv,(void**)&old_Components5Score9IsNewBestEv);
    MSHookFunction(MSFindSymbol(NULL,"__ZN9AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE"),(void *)AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE,(void**)&old_AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE);

}
 

 

 

 

 

My Makefile (Tweak)

ARCHS = armv7 arm64
include theos/makefiles/common.mk

TWEAK_NAME = FruitNinja
FruitNinja_FILES = Tweak.xm

include $(THEOS_MAKE_PATH)/tweak.mk

after-install::
	install.exec "killall -9 SpringBoard"
SUBPROJECTS += fruitninja
include $(THEOS_MAKE_PATH)/aggregate.mk
 

 

 

 

 

My Makefile (Pref)

ARCHS = armv7 arm64
include theos/makefiles/common.mk

BUNDLE_NAME = FruitNinja
FruitNinja_FILES = FruitNinja.mm
FruitNinja_INSTALL_PATH = /Library/PreferenceBundles
FruitNinja_FRAMEWORKS = UIKit
FruitNinja_PRIVATE_FRAMEWORKS = Preferences

include $(THEOS_MAKE_PATH)/bundle.mk

internal-stage::
	$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
	$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/FruitNinja.plist$(ECHO_END)
 

 

 

 

 

My xxx.mm file

#import <Preferences/Preferences.h>



@interface FruitNinjaListController: PSListController {

}

@end



@implementation FruitNinjaListController

- (id)specifiers {

	if(_specifiers == nil) {

		_specifiers = [[self loadSpecifiersFromPlistName:@"FruitNinja" target:self] retain];

	}

	return _specifiers;

}



-(void)respring {

	 system("killall -9 SpringBoard");

      }



@end



// vim:ft=objc
 

 

 

 

 

My Pref PLIST

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>entry</key>
	<dict>
		<key>cell</key>
		<string>PSLinkCell</string>
		<key>icon</key>
		<string>icon.png</string>
		<key>label</key>
		<string>Fruit Ninja Hack</string>
	</dict>
	<key>items</key>
	<array>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kTimed</string>
			<key>label</key>
			<string>No Timer</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kBomb</string>
			<key>label</key>
			<string>No Bombs</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kCrit</string>
			<key>label</key>
			<string>(90%)Always Crit</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kLost</string>
			<key>label</key>
			<string>Lose No Life</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kBest</string>
			<key>label</key>
			<string>Always Best Score</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kWin</string>
			<key>label</key>
			<string>Always Win (unless you're noob)</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kFee</string>
			<key>label</key>
			<string>No Tournament Fee</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>com.goggwell.FruitNinja</string>
			<key>key</key>
			<string>kBeat</string>
			<key>label</key>
			<string>Beat Tournament</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSGroupCell</string>
			<key>label</key>
			<string>Hacked by Goggwell</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSButtonCell</string>
			<key>label</key>
			<string>Respring</string>
			<key>action</key>
			<string>respring</string>
		</dict>
	</array>
	<key>title</key>
	<string>Fruit Ninja Hack</string>
</dict>
</plist>  

 

 

 

If anyone could help me out that would be much appreciated :D

Posted

WaveManager9SpawnBombEiP12SPAWNER Is not an integer. BX LR or (void) WaveManager9SpawnBombEiP12SPAWNER { return; }

Posted

WaveManager9SpawnBombEiP12SPAWNER Is not an integer. BX LR or (void) WaveManager9SpawnBombEiP12SPAWNER { return; }

It worked on my Tweak though

Posted

Change *ptr to *self

Ok I'll try

 

 

Use what I have you for an example

I did, but it didn't compile and when it did, it crashed my game

Posted

Ok I'll try

 

 

I did, but it didn't compile and when it did, it crashed my game

Just use the code as an example. Nothing else. Also do what z0ne said, *self. It was in my example. Also it maybe your function.
Posted

try thes ...

 

if(GetPrefBool(@"kBomb")) {
return 0;

 

to

 

if(GetPrefBool(@"kBomb")) {
return -1;

 

and do't put popup MGS

 

hook appdelegate

-(void) bla bla ....

Posted

try thes ...

 

if(GetPrefBool(@"kBomb")) {

return 0;

 

to

 

if(GetPrefBool(@"kBomb")) {

return -1;

 

and do't put popup MGS

 

hook appdelegate

-(void) bla bla ....

I made one with 0 already. That's not the problem.
Posted

try thes ...

 

if(GetPrefBool(@"kBomb")) {

return 0;

 

to

 

if(GetPrefBool(@"kBomb")) {

return -1;

 

and do't put popup MGS

 

hook appdelegate

-(void) bla bla ....

 

That worked on my other tweak. I'm still trying to fix the code.

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
  • Our picks

    • Slay Quest v1.3.12 [+3 Cheats]
      Modded/Hacked App: Slay Quest By Quest Lab Games Korlatolt Felelossegu Tarsasag
      Bundle ID: com.questlab.slayquest
      App Store Link: https://apps.apple.com/us/app/slay-quest/id6670221918?uo=4



      🤩 Hack Features

      - Unlimited Resources
      - Never Die
      - One Hit Kill
       
      • 7 replies
    • Slay Quest v1.3.12 [+3 Jailed Cheats]
      Modded/Hacked App: Slay Quest By Quest Lab Games Korlatolt Felelossegu Tarsasag
      Bundle ID: com.questlab.slayquest
      App Store Link: https://apps.apple.com/us/app/slay-quest/id6670221918?uo=4

       

      🤩 Hack Features

      - Unlimited Resources
      - Never Die
      - One Hit Kill
      • 5 replies
    • Forest Survival - Zombie War v4.0 [+3 Cheats]
      Modded/Hacked App: Forest Survival - Zombie War By APPWILL COMPANY LTD
      Bundle ID: com.g1.forest.survival
      App Store Link: https://apps.apple.com/us/app/forest-survival-zombie-war/id6450904348?uo=4



      🤩 Hack Features

      - Enemy Can't Attack
      - Add Resources
      - Auto Win
       
      • 2 replies
    • Forest Survival - Zombie War v4.0 [+3 Jailed Cheats]
      Modded/Hacked App: Forest Survival - Zombie War By APPWILL COMPANY LTD
      Bundle ID: com.g1.forest.survival
      App Store Link: https://apps.apple.com/us/app/forest-survival-zombie-war/id6450904348?uo=4



      🤩 Hack Features

      - Enemy Can't Attack
      - Add Resources
      - Auto Win
      • 3 replies
    • NFL Rivals 26 Mobile Football v3.2.3 [ +3 Cheats ] AI Stupid
      Modded/Hacked App: NFL Rivals - Football Game By Mythical, Inc.
      Bundle ID: com.mythical.superteam
      iTunes Store Link: https://apps.apple.com/us/app/nfl-rivals-football-game/id1640028998?uo=4


      Hack Features:
      - AI ON Your Team 
      - Tackle 
      - No Interceptions
      • 66 replies
    • NFL Rivals 26 Mobile Football v3.2.3 [ +3 Jailed ] AI Stupid
      Modded/Hacked App: NFL Rivals - Football Game By Mythical, Inc.
      Bundle ID: com.mythical.superteam
      iTunes Store Link: https://apps.apple.com/us/app/nfl-rivals-football-game/id1640028998?uo=4


      Hack Features:

      - AI ON Your Team 
      - Tackle No
      - No Interceptions
      • 66 replies
    • Legend of Gladiator v1.7.0 [+5 Jailed Cheats]
      Modded/Hacked App: Legend of Gladiator By TapNation
      Bundle ID: com.onestepstudio.legendofgladiator
      App Store Link: https://apps.apple.com/us/app/legend-of-gladiator/id6745028264?uo=4



      🤩 Hack Features

      - Add Gems
      - Add Gold
      - Never Die
      - No Stamina Cost (Enable inside battle)
      - Remove Ads (Not rewarded)
      • 18 replies
    • Legend of Gladiator v1.7.0 [+5 Cheats]
      Modded/Hacked App: Legend of Gladiator By TapNation
      Bundle ID: com.onestepstudio.legendofgladiator
      App Store Link: https://apps.apple.com/us/app/legend-of-gladiator/id6745028264?uo=4

       

      🤩 Hack Features

      - Add Gems
      - Add Gold
      - Never Die
      - No Stamina Cost (Enable inside battle)
      - Remove Ads (Not rewarded)
      • 4 replies
    • Defense Legend 5: TD Strategy v1.0.44 [ +14 Cheats ] Currency Max
      Modded/Hacked App: Defense Legend 5: Survivor TD By GCENTER VIET NAM TECHNOLOGY JOINT STOCK COMPANY
      Bundle ID: com.Gcenter.DefenseLegend.TowerDefense.TD.survivor.V5
      App Store Link: https://apps.apple.com/us/app/defense-legend-5-survivor-td/id6449526611?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Unlimited Currency
      - Unlimited Resources
      - Heroes Unlocked
      - Heroes Skin Unlocked
      - Gun Unlocked
      - Unlimited Battle Items
      - Unlimited Skill Points
      - Premium Pass Active
      - Premium Pass / Claim Unlimited
      - Free Pass / Claim Unlimited
      - Unlimited Battle Cash / Sell Tower
      - Unlimited Tower Range
      • 2 replies
    • Defense Legend 5: TD Strategy v1.0.44 [ +14 Jailed ] Currency Max
      Modded/Hacked App: Defense Legend 5: Survivor TD By GCENTER VIET NAM TECHNOLOGY JOINT STOCK COMPANY
      Bundle ID: com.Gcenter.DefenseLegend.TowerDefense.TD.survivor.V5
      App Store Link: https://apps.apple.com/us/app/defense-legend-5-survivor-td/id6449526611?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Unlimited Currency
      - Unlimited Resources
      - Heroes Unlocked
      - Heroes Skin Unlocked
      - Gun Unlocked
      - Unlimited Battle Items
      - Unlimited Skill Points
      - Premium Pass Active
      - Premium Pass / Claim Unlimited
      - Free Pass / Claim Unlimited
      - Unlimited Battle Cash / Sell Tower
      - Unlimited Tower Range
      • 3 replies
    • Gear Truck! v1.0.20 [+3 Jailed Cheats]
      Modded/Hacked App: Gear Truck! By treeplla Inc.
      Bundle ID: com.tree.hybrid.geartank
      App Store Link: https://apps.apple.com/us/app/gear-truck/id6747216965?uo=4



      🤩 Hack Features

      - Never Die
      - High Wheel Speed Gain
      - One Hit Kill
      • 4 replies
    • Gear Truck! v1.0.20 [+3 Cheats]
      Modded/Hacked App: Gear Truck! By treeplla Inc.
      Bundle ID: com.tree.hybrid.geartank
      App Store Link: https://apps.apple.com/us/app/gear-truck/id6747216965?uo=4



      🤩 Hack Features

      - Never Die
      - High Wheel Speed Gain
      - One Hit Kill
       
      • 4 replies
×
  • 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