Jump to content

I'm getting confused on making switches for my patcher


Go to solution Solved by Rook,

8 posts in this topic

Recommended Posts

Posted

Hi guys! I don't have much explaining to do because the title says most of it. But, I have been spending hours on making my first patcher. I understand 99% of it but the last "1%" is on making the switches. I am a little confused on how it works. So I was wondering if someone could explain a bit on how to do it? Also, what I need to add a switch :) 

 

First Off, this is how my tweak.xm looks like. It's basically ready to go (As always please don't steal it :p )

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.iOSGods.crazykingshacks.plist"

 

inline bool GetPrefBool(NSString *key)

{

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

}

 

%hook GameState

 

-(int)total_stars {

if(GetPrefBool(@"kUnlimited Stars")) {

return 999999999;

}

return %orig;

}

 

-(int)total_crowns {       

if(GetPrefBool(@"kUnlimited Crowns")) {

return 999999999;

}

return %orig;

}

 

-(int)energy {

if(GetPrefBool(@"kUnlimited Energy")) {

return 999999999;

}

return %orig;

}

 

-(int)tickets {

if(GetPrefBool(@"kUnlimited Tickets")) {

return 999999999;

}

return %orig;

}

 

-(int)energy_play_cost_level {

if(GetPrefBool(@"kNo Energy Cost")) {

return 0;

}

return %orig;

}

 

-(int)gems {

if(GetPrefBool(@"kUnlimited Gems")) {

return 999999999;

}

return %orig;

}

 

-(int)twinkle_stars {

if(GetPrefBool(@"kUnlimited Twinkle Stars")) {

return 999999999;

}

return %orig;

}

 

%end

 

%hook FlurryUtil

 

+(BOOL)deviceIsJailbroken {

if(GetPrefBool(@"kDisable JB Protection")) {

return FALSE;

}

return %orig;

}

 

+(BOOL)appIsCracked {

if(GetPrefBool(@"kNo Cracked App Protection")) {

return FALSE;

}

return %orig;

}

 

%end

 

%hook Tower

 

-(float)reload_max {

if(GetPrefBool(@"kNo Reload*")) {

return 1;

}

return %orig;

}

 

-(float)card_cooldown {

if(GetPrefBool(@"kNo Card Cooldown*")) {

return 1;

}

return %orig;

}

 

%end

 

%hook TowerUpgradeLevel

 

-(int)cost {

if(GetPrefBool(@"kFree Tower Upgrade")) {

return 0;

}

return %orig;

}

 

%end

 

%hook HeroIcon

 

-(int)revive_cost {

if(GetPrefBool(@"kFree Revives")) {

return 0;

}

return %orig;

}

 

%end

 

%hook Friend

 

-(int)borrow_cost {

if(GetPrefBool(@"kFree Borrowing")) {

return 0;

}

return %orig;

}

 

%end

 

%hook UnitType

 

-(float)health_spawn {

if(GetPrefBool(@"kOne Hit Kill*")) {

return 1;

}

return %orig;

}

 

-(float)health {

if(GetPrefBool(@"kGod Mode")) {

return 999999999;

}

return %orig;

}

 

%end

 

 

 

So yeah It's All Ready! But again, I don't know how to apply all those hacks into switches. I honestly don't know how to explain but I think I know a little. Okay look, so here is the .plist right? Take a look. 

 

Red text will be my comments 

<?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>footerText</key>

      <string>This text will appear under your first switch.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kKey</string>

      <key>label</key>

      <string>Switch Text 1</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

      <key>footerText</key>

      <string>This text will appear under your second switch.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kGems</string>

      <key>label</key>

      <string>Switch Text 2</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

      <key>footerText</key>

      <string>This text will appear under your third switch.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kLives</string>

      <key>label</key>

      <string>Switch Text 3</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

      <key>footerText</key>

      <string>This text will appear under your fourth switch.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kLives</string>             /// This got me extremely curious making me think that maybe I replace everything after "k" with my my hacks in tweak.xm like kUnlimited Coins

      <key>label</key>

      <string>Switch Text 4</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSTextCell</string>

      <key>label</key>

      <string>Made by Tustin.</string>

    </dict>

    <dict>

      <key>action</key>

      <string>link</string>

      <key>cell</key>

      <string>PSButtonCell</string>

      <key>icon</key>

      <string>[email protected]</string>

      <key>label</key>

      <string>Visit iOSGods.com</string>

    </dict>

  </array>

  <key>title</key>

  <string>CrazyKingsPatcher</string>

</dict>

</plist>

 

Please if you could help please do as it will be highly appreciated! Or if you need to see anything else tell me as well and I will add it ASAP

Posted

Each switch relys on a key. You include the key for each switch made and function in the tweak.xm.

  • Solution
Posted

Here's an example of how to add a key to a switch:

 

Tweak.xm:

%hook GameState
 
-(int)total_stars {
if(GetPrefBool(@"kstars")) { //same key as in preference.plist
return 999999999;
}
return %orig;
}

Preference:

<dict>
      <key>cell</key>
      <string>PSGroupCell</string>
      <key>footerText</key>
      <string>Hello! The switch above gives you unlimited Stars!</string>
    </dict>
    <dict>
      <key>cell</key>
      <string>PSSwitchCell</string>
      <key>default</key>
      <false/>
      <key>defaults</key>
      <string>com.iOSGods.crazykingshacks</string>
      <key>key</key>
      <string>kstars</string> //same key used as in tweak.xm
      <key>label</key>
      <string>Unlimited stars!</string> //This is the text next to the switch
    </dict>
Posted (edited)

why don't i get notifications when some one replies to my topics  <_< anyways, thanks @DiDA and @Chrizk0   

 

LOVE YOU GUYS

Updated by Tustin
Posted

why don't i get notifications when some one replies to my topics  <_< anyways, thanks @DiDA and @Chrizk0   

 

LOVE YOU GUYS

Yes, just like here on the forum

 

You open a tag then you must close the tag for it to work. :)

Posted

Yes, just like here on the forum

 

You open a tag then you must close the tag for it to work. :)

hold on i think i missed something look. i filled out most of them but look at the red text, it does not have the "text under switch" thing 

 

<?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>footerText</key>

      <string>This text will appear under your first switch.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kUnlimited Stars</string>

      <key>label</key>

      <string>Unlimited Stars</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

      <key>footerText</key>

      <string>Gives you 999,999,999 stars! But stays at that value.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kUnlimited Crowns</string>

      <key>label</key>

      <string>Unlimited Crowns</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

      <key>footerText</key>

      <string>Gives you 999,999,999 crowns! But stays at that value.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kUnlimited Energy</string>

      <key>label</key>

      <string>Unlimited Energy</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

      <key>footerText</key>

      <string>Gives you 999,999,999 energy! But stays at that value.</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSSwitchCell</string>

      <key>default</key>

      <false/>

      <key>defaults</key>

      <string>com.iOSGods.crazykingshacks</string>

      <key>key</key>

      <string>kUnlimited Tickets</string>

      <key>label</key>

      <string>Unlimited Tickets</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSGroupCell</string>

    </dict>

    <dict>

      <key>cell</key>

      <string>PSTextCell</string>

      <key>label</key>

      <string>Made by Tustin.</string>

    </dict>

    <dict>

      <key>action</key>

      <string>link</string>

      <key>cell</key>

      <string>PSButtonCell</string>

      <key>icon</key>

      <string>[email protected]</string>

      <key>label</key>

      <string>Visit iOSGods.com</string>

    </dict>

  </array>

  <key>title</key>

  <string>CrazyKingsPatcher</string>

</dict>

</plist>

was i supposed to add another switch? this

 

<dict>

<key>cell</key>

<string>PSGroupCell</string>

<key>footerText</key>

<string>Hello! The switch above gives you unlimited Stars!</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>com.iOSGods.crazykingshacks</string>

<key>key</key>

<string>kstars</string> //same key used as in tweak.xm

<key>label</key>

<string>Unlimited stars!</string> //This is the text next to the switch

</dict>

Posted

You can add it without a problem:

<dict>
      <key>cell</key>
      <string>PSGroupCell</string>
      <key>footerText</key>
      <string>Gives you xxxxxxx Tickets!! But stays at that value.</string>
    </dict>
    <dict>
      <key>cell</key>
      <string>PSSwitchCell</string>
      <key>default</key>
      <false/>
      <key>defaults</key>
      <string>com.iOSGods.crazykingshacks</string>
      <key>key</key>
      <string>kUnlimited Tickets</string>
      <key>label</key>
      <string>Unlimited Tickets</string>
    </dict>

I also suggest you use the keys all lowercase and no spaces because you might make a type and you'll just make it harder for you to make the patcher. :)

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

    • Soul Idle : Two Sides of Girls Cheats v1.1.13 +3
      Modded/Hacked App: Soul Idle : Two Sides of Girls By Pole Position Games Inc.
      Bundle ID: com.poleposition.iOSGirls
      iTunes Store Link: https://apps.apple.com/us/app/soul-idle-two-sides-of-girls/id6504546717?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Dumb Enemies


      Non-Jailbroken & No Jailbreak required hack(s): 
       

      iOS Hack Download Link: https://iosgods.com/topic/186233-soul-idle-two-sides-of-girls-cheats-v102-3/
      • 31 replies
    • Screw Tap Jam - Screw Sort 3D Cheats v2.300 +3
      Modded/Hacked App: Screw Tap Jam™ - Screw Sort 3D By Wonder Rush Technology Limited
      Bundle ID: com.screw.jam.tap
      iTunes Store Link: https://apps.apple.com/us/app/screw-tap-jam-screw-sort-3d/id6670189511?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - PREMIUM
      - Infinite Coins
      - Infinite Boosters (Able to use even without having enough)

       

      Non-Jailbroken Hack: https://iosgods.com/topic/193632-screw-tap-jam-screw-sort-3d-v2200-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/193631-screw-tap-jam-screw-sort-3d-cheats-v2200-3/
      • 1 reply
    • My Talking Tom Friends Cheats v25.1.3 +2
      Modded/Hacked App: My Talking Tom Friends By Outfit7 Limited
      Bundle ID: com.outfit7.mytalkingtomfriends
      iTunes Store Link: https://apps.apple.com/us/app/my-talking-tom-friends/id1473424857?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Infinite Coins
      - No Ads

      Non-Jailbroken Hack: https://iosgods.com/topic/128377-my-talking-tom-friends-v392-jailed-cheats-2/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/128376-my-talking-tom-friends-cheats-v2510-2/
      • 146 replies
    • Jetpack Joyride Cheats v1.99.3 +8
      Modded/Hacked App: Jetpack Joyride By Halfbrick
      Bundle ID: com.halfbrick.jetpack
      iTunes Store Link: https://apps.apple.com/us/app/jetpack-joyride/id457446957?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Infinite Coins
      - High Score
      - God Mode
      - Free Shopping
      - Coin Magnet Enabled
      - Increased Magnet Range
      - All Items Owned
      - All Gadgets Unlocked

       

      Non-Jailbroken Hack: https://iosgods.com/topic/119791-jetpack-joyride-v1971-jailed-cheats-8/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/119788-jetpack-joyride-cheats-v1972-8/
      • 494 replies
    • Idle Theme Park - Tycoon Game Cheats v6.8.2 +1
      Modded/Hacked App: Idle Theme Park - Tycoon Game by Digital Things Sociedad Limitada
      Bundle ID: com.codigames.idle.theme.park.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/idle-theme-park-tycoon-game/id1460772578?uo=4&at=1010lce4


      Hack Features:
      - Infinite Cash


      iOS Hack Download Link: https://iosgods.com/topic/116320-arm64-idle-theme-park-tycoon-game-cheats-v210-1/
      • 551 replies
    • Fortress Saga: AFK RPG Cheats v1.8.03 +5
      Modded/Hacked App: Fortress Saga: AFK RPG By cookapps
      Bundle ID: com.cookapps.bm.fortresssaga
      iTunes Store Link: https://apps.apple.com/us/app/fortress-saga-afk-rpg/id6446308106?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier
      - Freeze Currencies
      - PREMIUM
      - No Ads

       

      Non-Jailbroken Hack: https://iosgods.com/topic/184193-fortress-saga-afk-rpg-v1800-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/178933-fortress-saga-afk-rpg-cheats-v1801-5/
      • 351 replies
    • Cats & Soup Cheats v2.67.1 +2
      Modded/Hacked App: Cats & Soup By HIDEA Co.,Ltd
      Bundle ID: com.hidea.cat
      iTunes Store Link: https://apps.apple.com/us/app/cats-soup/id1581431235?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Infinite Currencies
      - Unlocked All Specials and No Ads

       

      Non-Jailbroken Hack: https://iosgods.com/topic/157486-cats-soup-v2630-jailed-cheats-2/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/157484-cats-soup-cheats-v2640-2/
      • 296 replies
    • HomeScapes v7.9.3 Jailed Cheats +3
      Modded/Hacked App: Homescapes By PLR Worldwide Sales Limited
      Bundle ID: com.playrix.gardenscapes-sweethome
      iTunes Store Link: https://apps.apple.com/us/app/homescapes/id1195621598?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Infinite Moves
      - Infinite Boosters
      - Infinite Coins (Spend some)
      - Infinite Lives (Won't substract when you failed level)
      - Complete tasks without needing stars - Game Breaking for sure
      - Unlock Season Pass (by @NoFearGG) -- Go click the purchase button. It'll look like nothing happened. Leave season pass area. And go back. It'll show unlocked. And be saved that way


      🍏 Jailbreak iOS hacks: https://iosgods.com/topic/75434-homescapes-cheats-v776-5/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/71443-homescapes-v776-jailed-cheats-3/
      • 2,419 replies
    • BitLife - Life Simulator Cheats v3.18.2 +2
      Modded/Hacked App: BitLife - Life Simulator by Candywriter, LLC
      Bundle ID: com.wtfapps.apollo16
      iTunes Store Link: https://apps.apple.com/us/app/bitlife-life-simulator/id1374403536?uo=4&at=1010lce4


      Hack Features:
      - Infinite Cash
      - Free Bitizen Purchase (Press Cancle) - Work for All Versions


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/84167-arm64-bitlife-life-simulator-v1412-jailed-cheats-2/


      Hack Download Link: https://iosgods.com/topic/84223-arm64-bitlife-life-simulator-cheats-all-versions-2/
      • 3,530 replies
    • GardenScapes Cheats v8.7.0 +5
      Modded/Hacked App: Gardenscapes By Playrix Games
      Bundle ID: com.playrix.gardenscapes-m3-ios
      iTunes Store Link: https://itunes.apple.com/us/app/gardenscapes/id1105855019?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Moves
      - Inifnite Boosters (Won't subtract when use)
      - Infinite Lives
      - Infinite Coins (Spend some/ Get some) - Not recommended cause sometimes it will bug your gameplay
      - Infinite Stars (Complete tasks without needing stars) - GAMEBREAKING FOR SURE  



      Hack Download Link: https://iosgods.com/topic/75340-arm64-gardenscapes-cheats-v280-5-vip/


      Credits:
      - @Laxus
      - @RudePerson For Inspiring Me
      • 2,891 replies
    • Beach Buggy Racing 2 Cheats v2025.04.13 +2
      Modded/Hacked App: Beach Buggy Racing 2 by Vector Unit Inc
      Bundle ID: com.vectorunit.cobalt
      iTunes Store Link: https://itunes.apple.com/us/app/beach-buggy-racing-2/id1399253988?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite PowerUp Parts
      - Infinite Gems (Spend some/ Get some)
      - Infinite Coins (Use Gems to Convert)



      Hack Download Link: https://iosgods.com/topic/86113-arm64-beach-buggy-racing-2-cheats-v101-3/
      • 434 replies
    • EGGRYPTO: Hatch! Own! Monster vv1.98.3 +2 Jailed Cheats
      Modded/Hacked App: EGGRYPTO: Hatch! Own! Monster By Kyuzan Inc.
      Bundle ID: com.kyuzan.eggrypto
      iTunes Store Link: https://apps.apple.com/us/app/eggrypto-hatch-own-monster/id1450911855?uo=4

       

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App







       

      📖 PC Installation Instructions

      STEP 1: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see our iOSGods App IPA Download Tutorial which includes a video example.
      STEP 2: Download Sideloadly and install it on your Windows or Mac.
      STEP 3: Open Sideloadly on your computer, connect your iOS device, and wait until your device name appears in Sideloadly.
      STEP 4: Once your iDevice is recognized, drag the modded .IPA file you downloaded and drop it into the Sideloadly application.
      STEP 5: Enter your Apple Account email, then press “Start.” You’ll then be asked to enter your password. Go ahead and provide the required information.
      STEP 6: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 7: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles / VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 8: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A
      • 3 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