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

    • Dawn of Ages: Medieval Games v2.0.4 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
      • 46 replies
    • Dawn of Ages: Medieval Games v2.0.4 +5 Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
      • 26 replies
    • DC: Dark Legion™ v2.1.22 [+2 Cheats]
      Modded/Hacked App: DC: Dark Legion™ By FunPlus International AG
      Bundle ID: com.kingsgroup.dcdl
      App Store Link: https://apps.apple.com/us/app/dc-dark-legion/id6479020757?uo=4

       

      Important


      Doesn't work on PvP contents.

      There is a high chance of ban. Not responsible for any bans. Do not use on main account.

      1- Enable Activate Cheat

      2- Enable both multiplier

       

       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier
      • 14 replies
    • DC: Dark Legion™  v2.1.22 [+2 Jailed Cheats]
      Modded/Hacked App: DC: Dark Legion™ By FunPlus International AG
      Bundle ID: com.kingsgroup.dcdl
      iTunes Store Link: https://apps.apple.com/us/app/dc-dark-legion/id6479020757?uo=4

      🤩 Hack Features
      - Damage Multiplier
      - Defense Multiplier
      • 117 replies
    • Lands of Jail v1.0.13 [+1 Jailed Cheats]
      Modded/Hacked App: Lands of Jail By SINGAPORE JUST GAME TECHNOLOGY PTE. LTD.
      Bundle ID: com.justgame.jails.global
      App Store Link: https://apps.apple.com/us/app/lands-of-jail/id6738469826?uo=4



      🤩 Hack Features

      - Enemy Can't Attack (Enable Before Enter the Stage)

      • 11 replies
    • Lands of Jail v1.0.13 [+1 Cheats]
      Modded/Hacked App: Lands of Jail By SINGAPORE JUST GAME TECHNOLOGY PTE. LTD.
      Bundle ID: com.justgame.jails.global
      App Store Link: https://apps.apple.com/us/app/lands-of-jail/id6738469826?uo=4



      🤩 Hack Features

      - Enemy Can't Attack (Enable Before Enter the Stage)
       
      • 19 replies
    • Hammer & Steel: idle business v0.12 [+5 Jailed Cheats]
      Modded/Hacked App: Hammer & Steel: idle business By GLOBAL ADVERTISING NETWORK LTD EOOD
      Bundle ID: hammer.and.steel.business.game
      App Store Link: https://apps.apple.com/us/app/hammer-steel-idle-business/id6742078527?uo=4



      🤩 Hack Features

      - Free IAP
      - Add Gold
      - Add Ore (Use it after tutorial)
      - No Fatique 
      - No Satiety
      • 0 replies
    • Hammer & Steel: idle business v0.12 [+5 Cheats]
      Modded/Hacked App: Hammer & Steel: idle business By GLOBAL ADVERTISING NETWORK LTD EOOD
      Bundle ID: hammer.and.steel.business.game
      App Store Link: https://apps.apple.com/us/app/hammer-steel-idle-business/id6742078527?uo=4



      🤩 Hack Features

      - Free IAP
      - Add Gold
      - Add Ore (Use it after tutorial)
      - No Fatique 
      - No Satiety
      • 0 replies
    • Waldur: Monster Hunt v1.8 [+2 Jailed Cheats]
      Modded/Hacked App: Waldur: Medieval Defense Game By GLOBAL ADVERTISING NETWORK LTD EOOD
      Bundle ID: waldur.tds.tactical.defense.war.strategy
      App Store Link: https://apps.apple.com/us/app/waldur-medieval-defense-game/id6739003797?uo=4

       

      🤩 Hack Features

      - Never Die
      - Add Currency


      • 3 replies
    • Waldur: Monster Hunt v1.8 [+2 Cheats]
      Modded/Hacked App: Waldur: Medieval Defense Game By GLOBAL ADVERTISING NETWORK LTD EOOD
      Bundle ID: waldur.tds.tactical.defense.war.strategy
      App Store Link: https://apps.apple.com/us/app/waldur-medieval-defense-game/id6739003797?uo=4

       

      🤩 Hack Features

      - Never Die
      - Add Currency

      • 3 replies
    • Go Go Werewolf! v1.3.4 [+3 Jailed Cheats]
      Modded/Hacked App: Go Go Werewolf! By Dejaime Antonio de Oliveira Neto
      Bundle ID: productions.artcode.ggw
      iTunes Store Link: https://apps.apple.com/us/app/go-go-werewolf/id6739493341?uo=4



      🤩 Hack Features

      - Never Die
      - Free Item Upgrade
      - Unlimited Coins (Enable and Finish Stage)
      • 10 replies
    • Go Go Werewolf! v1.3.4 [+3 Cheats]
      Modded/Hacked App: Go Go Werewolf! By Dejaime Antonio de Oliveira Neto
      Bundle ID: productions.artcode.ggw
      iTunes Store Link: https://apps.apple.com/us/app/go-go-werewolf/id6739493341?uo=4


      🤩 Hack Features

      - Never Die
      - Free Item Upgrade
      - Unlimited Coins (Enable and Finish Stage)
      • 5 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