Jump to content

Patcher error


Go to solution Solved by Rook,

25 posts in this topic

Recommended Posts

Posted (edited)

Hi guys

 

I am on iPad Air 9.3.3 with a THEOS from Dhowett.

 

I made a patcher for a game using Flex Converter and a tutorial on the site (in order to show options). Patcher compiles successfully and installs with Error Code 0. However there is no effect on the app itself.

 

I can see the list in preferences but it doesnt effect the game. If i turn it on in flex however, it works

 

Any tips? I already checked for bundle identifiers. They are correct (checked from info.plist)

 

Linked prefbundle and tweak.xm http://www.mediafire.com/file/f979l7tcjlbu80e/TankNations.zip

Updated by Archangel04
Posted (edited)

You didn't link it properly in your pref bundle, post your tweak.xm and your pref plist here

Updated by Crypto
Posted

You didn't link it properly in your pref bundle, post your tweak.xm and your pref plist here

okay

You didn't link it properly in your pref bundle, post your tweak.xm and your pref plist here

done

Posted (edited)

Tweak.xm

 

#define PLIST_PATH @"/var/mobile/Library/PreferenceBundles/tnprefbundle.bundle/tnprefbundle.plist"

 

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

%hook CurrencyStoreLayer

-(void) boltButtonTouch:(int)arg1 withGemCost:(int)arg2 {

arg1 = 9999999;

arg2 = 1;

if(GetPrefBool(@"kInfiniteBolts")) {

}

return %orig;

}

%end

 

%hook GameRules

-(int) getGemCostForFuel:(int)arg1 {

if(GetPrefBool(@"kFuelrefill")) {

return 1;

}

return %orig;

}

%end

 

%hook GameRules

-(int) getGemCostForTickets:(int)arg1 {

if(GetPrefBool(@"kArenaTickets")) {

return 1;

}

return %orig;

}

%end

 

%hook MakePartsLayer

-(BOOL) canAffordToUsePartMaker:(int)arg1 {

if(GetPrefBool(@"kParts")) {

return TRUE;

}

return %orig;

}

%end

 

%hook TankPartPlayerItem

-(int) quality {

if(GetPrefBool(@"kQuality")) {

return 5;

}

return %orig;

}

%end

 

%hook TankPartData

-(unsigned int) level {

if(GetPrefBool(@"kLevel")) {

return 5;

}

return %orig;

}

%end

 

%hook TankPartData

-(void) setLevel:(int)arg1 {

arg1 = 10;

if(GetPrefBool(@"kLevel")) {

}

return %orig;

}

%end

 

%hook PlayerLevelInfo

-(int) gemReward {

if(GetPrefBool(@"kGem")) {

return 9999;

}

return %orig;

}

%end

 

%hook MissionTemplate

-(int) fuelCost {

if(GetPrefBool(@"kFuelcost")) {

return 1;

}

return %orig;

}

%end

 

%hook TankPartData

-(int) energyCost {

if(GetPrefBool(@"kInfiniteenergy")) {

return 0;

}

return %orig;

}

%end

 

%hook PlayerData

-(BOOL) hasBoltDoubler {

if(GetPrefBool(@"kBoltDoubler")) {

return TRUE;

}

return %orig;

}

%end

 

%hook LootDropItem

-(BOOL) shouldRewardOnDefeat {

if(GetPrefBool(@"kRewardsdefeat")) {

return TRUE;

}

return %orig;

}

%end

 

%hook PlayerLevelInfo

-(BOOL) doesRefillFuel {

if(GetPrefBool(@"krefillsfuel")) {

return TRUE;

}

return %orig;

}

%end

 

%hook PlayerLevelInfo

-(BOOL) doesAddTankSlot {

if(GetPrefBool(@"kaddstankslot")) {

return TRUE;

}

return %orig;

}

%end

 

 

 

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>items</key>

<array>

<dict>

<key>cell</key>

<string>PSGroupCell</string>

<key>label</key>

<string>Tank Nations cheats by iOSGods</string>

</dict>

<dict>

<key>action</key>

<string>apply</string>

<key>cell</key>

<string>PSButtonCell</string>

<key>label</key>

<string>Credits</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kInfiniteBolts</string>

<key>label</key>

<string>Infinite Bolts (buy for 1 gem in shop)</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kFuelrefill</string>

<key>label</key>

<string>Fuel refill costs 1 gem</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kArenaTickets</string>

<key>label</key>

<string>Arena Tickets cost 1 gem</string>

</dict>

<dict>

<key>cell</key>o

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kParts</string>

<key>label</key>

<string>Can purchase parts anytime (ignore error message)</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kQuality</string>

<key>label</key>

<string>All tank parts are 5* quality</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kLevel</string>

<key>label</key>

<string>All tank parts are level 10</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kGem</string>

<key>label</key>

<string>Level up reward is 9999 gems</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kFuelcost</string>

<key>label</key>

<string>Fuel cost 1 for all levels</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kInfiniteenergy</string>

<key>label</key>

<string>Infinite energy (can use weapons/move unlimited times)</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kBoltDoubler</string>

<key>label</key>

<string>DOUBLE bolt rewards (untested)</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kRewardsdefeat</string>

<key>label</key>

<string>Loot even on loss</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>krefillsfuel</string>

<key>label</key>

<string>Levelup refills fuel</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.archangel.tnprefbundle</string>

<key>key</key>

<string>kaddstankslot</string>

<key>label</key>

<string>Levelup adds tank slot (till max)</string>

</dict>

</array>

<key>title</key>

<string>Tank Nations Cheats</string>

</dict>

</plist>

 

 

I already tried PreferenceLoader in first line of Tweak.xm and just Preferences as well

Updated by Archangel04
Posted (edited)

First problem I see :

 

%hook CurrencyStoreLayer

-(void) boltButtonTouch:(int)arg1 withGemCost:(int)arg2 {

arg1 = 9999999;

arg2 = 1;

if(GetPrefBool(@"kInfiniteBolts")) {

}

return %orig;

}

%end

 

 

This : if(GetPrefBool(@"kInfiniteBolts")) { <------- needs to be below your method/class which is : -(void) boltButtonTouch:(int)arg1 withGemCost:(int)arg2 {

 

 

Error 2 : (BOOL) needs to be changed to (bool)

 

 

Your pref plist looks fine

Updated by Crypto
Posted

First problem I see :

%hook CurrencyStoreLayer

-(void) boltButtonTouch:(int)arg1 withGemCost:(int)arg2 {

arg1 = 9999999;

arg2 = 1;

if(GetPrefBool(@"kInfiniteBolts")) {

}

return %orig;

}

%end

This : if(GetPrefBool(@"kInfiniteBolts")) { <------- needs to be below your method/class which is : -(void) boltButtonTouch:(int)arg1 withGemCost:(int)arg2 {

Error 2 : (BOOL) needs to be changed to (bool)

Your pref plist looks fine

Its still not working for the other ones. Even the fuelcost (which works in flex) isnt working here
Posted

Its still not working for the other ones. Even the fuelcost (which works in flex) isnt working here

All of them aren't working? Or a few?

Posted

All of them aren't working? Or a few?

Ive tried everything except the level up and the arena tickers. Fuel isnt working, buy parts isnt working. Then the level hack isnt working

Posted

You didn't give any value to arg1 :

 

 

%hook MakePartsLayer

-(BOOL) canAffordToUsePartMaker:(int)arg1 {

if(GetPrefBool(@"kParts")) {

return TRUE;

}

return %orig;

}

%end

 

 

You didn't give any value to arg1 :

 

%hook GameRules

-(int) getGemCostForTickets:(int)arg1 {

if(GetPrefBool(@"kArenaTickets")) {

return 1;

}

return %orig;

}

%end

 

 

Actually, you didn't return any value to arguments lol I just noticed :p

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

    • SuperStar STARSHIP Cheats v3.24.3 +3
      Modded/Hacked App: SuperStar STARSHIP By Dalcomsoft Inc.
      Bundle ID: com.dalcomsoft.sss
      iTunes Store Link: https://apps.apple.com/us/app/superstar-starship/id1480181152?uo=4


      Hack Features:
      - Never Lose
      - Auto Dance
      - Always S.Perfect


      iOS Hack Download Link: https://iosgods.com/topic/164185-superstar-starship-cheats-v378-3/
      • 127 replies
    • Merge Studio: Fashion Makeover v3.5.0 +50++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Merge Studio: Fashion Makeover By Paxie Games Oyun ve Yazilim Anonim Sirketi
      Bundle ID: com.paxiegames.mergestudio
      iTunes Store Link: https://apps.apple.com/us/app/merge-studio-fashion-makeover/id1615964753?uo=4


      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Jailbreak required hack(s): [Mod Menu Hack] Merge Studio: Fashion Makeover v2.3.0 +50++ Cheats [ Debug Menu ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 54 replies
    • Merge Studio: Fashion Makeover v3.5.0 +50++ Cheats [ Debug Menu ]
      Modded/Hacked App: Merge Studio: Fashion Makeover By Paxie Games Oyun ve Yazilim Anonim Sirketi
      Bundle ID: com.paxiegames.mergestudio
      iTunes Store Link: https://apps.apple.com/us/app/merge-studio-fashion-makeover/id1615964753?uo=4


      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Merge Studio: Fashion Makeover v2.3.0 +50++ Jailed Cheats [ Debug Menu ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 45 replies
    • Royal Kingdom v17794 +4 Jailed Cheats [ Coins + More ]
      Modded/Hacked App: Royal Kingdom By Dream Games
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/ph/app/royal-kingdom/id1606549505
       

      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Boosters
      - Freeze Moves


      Jailbreak required hack(s): [Mod Menu Hack] Royal Kingdom v3987 +4 Cheats [ Unlimited Coins ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 116 replies
    • Royal Kingdom v17794 +4 Cheats [ Coins + More ]
      Modded/Hacked App: Royal Kingdom By Dream Games
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/ph/app/royal-kingdom/id1606549505
       

      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Boosters
      - Freeze Moves


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Royal Kingdom v3987 +4 Jailed Cheats [ Unlimited Coins ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 65 replies
    • Duskwood - Detective Story v1.10.17 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Duskwood - Detective Story By Everbyte GmbH
      Bundle ID: com.everbytestudio.interactive.text.chat.story.rpg.cyoa.duskwood
      iTunes Store Link: https://apps.apple.com/us/app/duskwood-detective-story/id1479430106?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Hearts -> Earn or spend some.
      - Free In-App Purchases -> Toggle via iGMenu.


      Jailbreak required hack(s): [Mod Menu Hack] Duskwood - Detective Story v1.10.14 +3 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 54 replies
    • Duskwood - Detective Story v1.10.17 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Duskwood - Detective Story By Everbyte GmbH
      Bundle ID: com.everbytestudio.interactive.text.chat.story.rpg.cyoa.duskwood
      iTunes Store Link: https://apps.apple.com/us/app/duskwood-detective-story/id1479430106?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Hearts -> Earn or spend some.
      - Free In-App Purchases


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Duskwood - Detective Story v1.10.14 +3 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 22 replies
    • Idle Zombie Miner: Gold Tycoon v2.212.1660 +1++ Jailed Cheat [ Currencies ]
      Modded/Hacked App: Idle Zombie Miner: Gold Tycoon By VISTREX LIMITED
      Bundle ID: com.zombie.idleminertycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-zombie-miner-gold-tycoon/id6471983323?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Idle Zombie Miner: Gold Tycoon v2.53.1001 +1++ Cheat [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 81 replies
    • Idle Zombie Miner: Gold Tycoon v2.212.1660 +1++ Cheat [ Currencies ]
      Modded/Hacked App: Idle Zombie Miner: Gold Tycoon By VISTREX LIMITED
      Bundle ID: com.zombie.idleminertycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-zombie-miner-gold-tycoon/id6471983323?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Idle Zombie Miner: Gold Tycoon v2.53.1001 +1++ Jailed Cheat [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 58 replies
    • Loot Heroes v1.4.7 +8 Jailed Cheats [ Unlimited Currencies + More ]
      Modded/Hacked App: Loot Heroes: Fantasy RPG Games By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes-fantasy-rpg-games/id6642699678?uo=4


      Hack Features:
      - Freeze Currencies
      - Unlimited Currencies [ VIP ]
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - Auto Win [ VIP ]
      - Battle Pass Unlocked [ VIP ]


      Jailbreak required hack(s): [Mod Menu Hack] Loot Heroes v1.1.5 +8 Cheats [ Unlimited Currencies + More ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 71 replies
    • Loot Heroes v1.4.7 +8 Cheats [ Unlimited Currencies + More ]
      Modded/Hacked App: Loot Heroes By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes/id6642699678?uo=4


      Hack Features:
      - Freeze Currencies
      - Unlimited Currencies [ VIP ]
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - Auto Win [ VIP ]
      - Battle Pass Unlocked [ VIP ]


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 202 replies
    • AltLife - Life Simulator v43 +2 Jailed Cheats [ Unlimited Money ]
      Modded/Hacked App: AltLife - Life Simulator By Mark Benyei
      Bundle ID: com.qmzapps.altlife
      App Store Link: https://apps.apple.com/us/app/altlife-life-simulator/id1567044511?uo=4

       


      🤩 Hack Features

      - Unlimited Money -> Will increase instead of decrease.
      - Premium Enabled
      • 0 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