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

    • Zombie Fortress: Trap Defense v0.8.0 [+6 Jailed Cheats]
      Modded/Hacked App: Zombie Fortress: Trap Defense By SayGames LTD
      Bundle ID: com.nlabsoft.zombiecrusher.s
      App Store Link: https://apps.apple.com/us/app/zombie-fortress-trap-defense/id6747713523?uo=4



      🤩 Hack Features

      - Add Cash
      - Add Diamond
      - Add Energy
      - Add Parts
      - Never Die
      - Add Battle Gold (Enable inside battle)
      • 3 replies
    • Zombie Fortress: Trap Defense v0.8.0 [+6 Cheats]
      Modded/Hacked App: Zombie Fortress: Trap Defense By SayGames LTD
      Bundle ID: com.nlabsoft.zombiecrusher.s
      App Store Link: https://apps.apple.com/us/app/zombie-fortress-trap-defense/id6747713523?uo=4



      🤩 Hack Features

      - Add Cash
      - Add Diamond
      - Add Energy
      - Add Parts
      - Never Die
      - Add Battle Gold (Enable inside battle)
      • 1 reply
    • Heroes Crew: Strategy Defense v1.1.5 [+6 Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
      • 31 replies
    • Heroes Crew: Strategy Defense v1.1.5 [+6 Jailed Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
      • 15 replies
    • Candy Pop Story : Match 3 v1.23.0722 [ +3 Cheats ] Auto Win
      Modded/Hacked App: Candy Pop Story : Match 3 By F.O.G LIMITED
      Bundle ID: com.gamoper.candysweetstory.ios
      App Store Link: https://apps.apple.com/us/app/candy-pop-story-match-3/id6670773988?uo=4


      🤩 Hack Features

      - Auto Win
      - Coins
      - Moves
      -
      • 6 replies
    • Candy Pop Story : Match 3 v1.23.0722 [ +3 Jailed ] Auto Win
      Modded/Hacked App: Candy Pop Story : Match 3 By F.O.G LIMITED
      Bundle ID: com.gamoper.candysweetstory.ios
      App Store Link: https://apps.apple.com/us/app/candy-pop-story-match-3/id6670773988?uo=4
       

      🤩 Hack Features

      - Auto Win
      - Coins
      - Moves
      • 6 replies
    • Boom Castle Tower Defense TD v1.5.2 [ +7 Jailed ] Easy Win
      Modded/Hacked App: Boom Castle: Tower Defense TD By Terahype s.r.o.
      Bundle ID: castle.heroes.tower.defense.kingdom.magic.battle.archer
      iTunes Store Link: https://apps.apple.com/us/app/boom-castle-tower-defense-td/id6502820312?uo=4


      Hack Features:

      - Enemy Status [ HP DEF ]

      - Base HP 

      - Battle Cost 0 

      - Stage Unlocked [ Play Any Stage ]

      - Battle Pass Unlocked 

      - Battle Pass Claim Unlimited [ Gems Gold ]

      - iGG Speed Hack Max 0 - 10 [ Skill CD - ATK Speed - Animation Speed - Wave Faster ]


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 48 replies
    • Boom Castle Tower Defense TD v1.5.2 [ +7 Cheats ] Easy Win
      Modded/Hacked App: Boom Castle: Tower Defense TD By Terahype s.r.o.
      Bundle ID: castle.heroes.tower.defense.kingdom.magic.battle.archer
      iTunes Store Link: https://apps.apple.com/us/app/boom-castle-tower-defense-td/id6502820312?uo=4


      Hack Features:
      - Enemy Status [ HP DEF ]

      - Base HP 

      - Battle Cost 0 

      -  Stage Unlocked [ Play Any Stage ]

      - Battle Pass Unlocked 

      - Battle Pass Claim Unlimited [ Gems Gold ]

      - iGG Speed Hack Max 0 - 10 [ Skill CD - ATK Speed - Animation Speed - Wave Faster ] 


      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/
      • 52 replies
    • Zombie Infinity v1.9.1 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Zombie Infinity By kamasu.jp Inc.
      Bundle ID: jp.kamasu.oread
      App Store Link: https://apps.apple.com/ph/app/zombie-infinity/id6736433765?uo=4


      🤩 Hack Features

      - ADS Pass

      - Energy Pass

      - Premium Pass

      - Currency

      - Hero Status [ HP - DMG ]
      • 4 replies
    • Zombie Infinity v1.9.1 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Zombie Infinity By kamasu.jp Inc.
      Bundle ID: jp.kamasu.oread
      App Store Link: https://apps.apple.com/ph/app/zombie-infinity/id6736433765?uo=4


      🤩 Hack Features

      - ADS Pass

      - Energy Pass

      - Premium Pass

      - Currency

      - Hero Status [ HP - DMG ]
      • 3 replies
    • Alien Survivor: Survival Arena v1.40.0 [ +7 Cheats ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4
       

      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      • 19 replies
    • Alien Survivor: Survival Arena v1.40.0 [ +7 Jailed ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4


      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Like
      • 32 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