Jump to content

I'm getting confused on making switches for my patcher


Incognite

8 posts in this topic

Recommended Posts

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

Link to comment
Share on other sites

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>
Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Our picks

    • Dark Slayer : AFK RPG v1.1.42 +2 Cheats [ God Mode ]
      Modded/Hacked App: Dark Slayer : AFK RPG By Gamepub CO., LTD
      Bundle ID: com.gamepub.zhteam
      iTunes Store Link: https://apps.apple.com/us/app/dark-slayer-afk-rpg/id6446265751?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - God Mode
      - Attack Speed Multiplier
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 200 replies
    • Hot in Hollywood v0.97 +1++ Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Hot in Hollywood By SodeePI Labs, LLC
      Bundle ID: com.sodeepilabs.glamsquad
      iTunes Store Link: https://apps.apple.com/gb/app/hot-in-hollywood/id1604253094?uo=4


      Hack Features:
      - Unlimited Currencies


      Jailbreak required hack(s): [Mod Menu Hack] Hot in Hollywood v0.90 +1++ 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/
        • Informative
        • Agree
        • Thanks
        • Like
      • 49 replies
    • Hot in Hollywood v0.97 +1++ Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Hot in Hollywood By SodeePI Labs, LLC
      Bundle ID: com.sodeepilabs.glamsquad
      iTunes Store Link: https://apps.apple.com/gb/app/hot-in-hollywood/id1604253094?uo=4


      Hack Features:
      - Unlimited Currencies


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Hot in Hollywood v0.90 +1++ 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/
        • Like
      • 6 replies
    • Nine Chronicles M v181.0.5 +2 Cheats [ Damage & Defence ]
      Modded/Hacked App: Nine Chronicles M By Planetarium Labs Pte. Ltd.
      Bundle ID: com.planetariumlabs.ninechroniclesmobile
      iTunes Store Link: https://apps.apple.com/us/app/nine-chronicles-m/id6462364578?uo=4


      Hack Features:
      - Damage Multiplier
      - Defence Multiplier

      Note - Make sure you have Shad0w tweak enabled & set to Cydia Substrate.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 44 replies
    • Whispers - Interactive Stories v2.0.4 +2 Jailed Cheats [ Free Choices ]
      Modded/Hacked App: Whispers: Interactive Stories By GAMEHAUS LIMITED
      Bundle ID: com.twincat.stories
      iTunes Store Link: https://apps.apple.com/us/app/whispers-interactive-stories/id1546336250
       

      Hack Features:
      - All Chapters Unlocked
      - Free Premium Choices


      Jailbreak required hack(s): [Mod Menu Hack] Whispers: Interactive Stories v1.4.9 +2 Cheats [ Free Choices ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 187 replies
    • Whispers - Interactive Stories v2.0.4 +2 Cheats [ Free Choices ]
      Modded/Hacked App: Whispers: Interactive Stories By GAMEHAUS LIMITED
      Bundle ID: com.twincat.stories
      iTunes Store Link: https://apps.apple.com/us/app/whispers-interactive-stories/id1546336250
       

      Hack Features:
      - All Chapters Unlocked
      - Free Premium Choices


      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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 130 replies
    • Star Trek Lower Decks Mobile v1.19.4 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Star Trek Lower Decks Mobile By Eastside Games
      Bundle ID: com.eastsidegames.lowerdecks
      iTunes Store Link: https://apps.apple.com/us/app/star-trek-lower-decks-mobile/id1570364249
       

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


      Jailbreak required hack(s): [Mod Menu Hack] Star Trek Lower Decks Mobile v1.6.1 +1++ 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/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 36 replies
    • Star Trek Lower Decks Mobile ( All Versions ) +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Star Trek Lower Decks Mobile By Eastside Games
      Bundle ID: com.eastsidegames.lowerdecks
      iTunes Store Link: https://apps.apple.com/us/app/star-trek-lower-decks-mobile/id1570364249


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease. This feature will auto update itself once a new version of the app is released!


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Star Trek Lower Decks Mobile v1.6.1 +1++ 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/
        • Informative
        • Thanks
        • Like
      • 14 replies
    • [ Sausage Man CN ] 香肠派对 v17.64 +9 Cheats
      Modded/Hacked App: 香肠派对 By X.D. Network Inc.
      Bundle ID: com.xd.Sausage
      iTunes Store Link: https://apps.apple.com/cn/app/%E9%A6%99%E8%82%A0%E6%B4%BE%E5%AF%B9/id1326730621?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - Rainbow Wall Hack
      - Walk On Water
      - Custom FOV
      - Custom Speed
      - No Recoil
      - No Shake
      - No Muzzle Flash
      - Superman
      - No Fire Sound
      - No Reload Sound
      - No Bow Sound
      Notes:
      - First time doing wall hack and is buggy, for some reason, the game stops registering players if they're not in your vision so it still useful to see enemies easily but works best against bots
      - FOV set it to around 100.
      - Speed, set it around 10 and see if the server registers your speed.


      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/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using Filza or iFile, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will need to press on 'Install' or 'Installer' from the options on your screen.
      STEP 5: Let Filza / iFile finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: If the hack is a Mod Menu, which is usually the case nowadays, the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down 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:
      - @Zahir


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 418 replies
    • MeChat v4.20.1 +1 Jailed Cheat [ Unlimited Gems ]
      Modded/Hacked App: MeChat By PlayMe Studio
      Bundle ID: world.playme.mechat
      iTunes Store Link: https://apps.apple.com/us/app/mechat/id1536157979
       

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


      Free Jailbreak required hack(s): [Mod Menu Hack] [Free] MeChat - Love Secrets v3.3.2 +1 Cheat [ Unlimited Gems ] - Free Jailbroken Cydia Cheats - iOSGods
      ViP Jailbreak required hack(s): [Mod Menu Hack] MeChat - Love Secrets v3.3.2 +1 Cheat [ Unlimited Gems ] - ViP 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 620 replies
    • [ VIP ] MeChat v4.20.1 +1 Cheat [ Unlimited Gems ]
      Modded/Hacked App: MeChat By PlayMe Studio
      Bundle ID: world.playme.mechat
      iTunes Store Link: https://apps.apple.com/us/app/mechat/id1536157979
       

      Hack Features:
      - Unlimited Gems -> Earn some then uninstall this hack. DO NOT SPEND ANY GEMS WHILST THIS FEATURE IS ENABLED!


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] MeChat - Love Secrets v3.3.2 +1 Jailed Cheat [ Unlimited Gems ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Free Jailbreak required hack(s): [Mod Menu Hack] [Free] MeChat - Love Secrets v3.3.2 +1 Cheat [ Unlimited Gems ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 92 replies
    • [ FREE ] MeChat v4.20.1 +1 Cheat [ Unlimited Gems ]
      Modded/Hacked App: MeChat By PlayMe Studio
      Bundle ID: world.playme.mechat
      iTunes Store Link: https://apps.apple.com/us/app/mechat/id1536157979
       

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


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] MeChat - Love Secrets v3.3.2 +1 Jailed Cheat [ Unlimited Gems ] - Free Non-Jailbroken IPA Cheats - iOSGods
      ViP Jailbreak required hack(s): [Mod Menu Hack] MeChat - Love Secrets v3.3.2 +1 Cheat [ Unlimited Gems ] - ViP 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 235 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