Jump to content

How to Add a PSSliderCell to Your PreferenceBundle


Rook

13 posts in this topic

Recommended Posts

Updated

Fy7mUys.png

In this tutorial, I will show you how you can add a PSSliderCell in your Patcher/PreferenceBundle project.

Step 1. Start a new theos project.

Step 2:

This is the code required in Tweak.xm:


#import <substrate.h>
#import <Foundation/Foundation.h>

#define PLIST_PATH @"/var/mobile/Library/Preferences/YOUR PLIST NAME HERE.plist"
 
inline bool GetPrefBool(NSString *key) {
	return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

inline int GetPrefInt(NSString *key) {
	return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] intValue];
}

%hook Coins
- (int)have {
	if(GetPrefBool(@"key1")) { // Your key name here
			int newValue = GetPrefInt(@"key1slider"); // Your key name here
			return newValue;
		} else {
			return %orig;
	}
}
%end

Step 3: Now in your preferences plist file, you will need to add two cells. One is a button to toggle the PSSliderCell on/of and the other is the PSSliderCell itself.


                <dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<false/>
			<key>defaults</key>
			<string>iosgods.com.pouslider</string>
			<key>key</key>
			<string>key1</string>
			<key>label</key>
			<string>Enable Coins Hack</string> <!-- The text of your switch -->
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSliderCell</string>
			<key>default</key>
			<integer>50</integer> <!-- Default value of the slider -->
			<key>defaults</key>
			<string>iosgods.com.pouslider</string> <!-- Your package name here -->
			<key>key</key>
			<string>key1slider</string> <!-- Your key name here -->
			<key>max</key>
			<real>99</real> <!-- Enter your maximum value here -->
			<key>min</key>
			<real>1</real> <!-- Enter your minimum value here -->
			<key>showValue</key> <!-- Show the value of the slider. true or false. -->
			<true/>
		</dict>

Now save and compile and you should be good to go!

If you have any questions or need any help, post down below. :)

Posted
This is very useful.

But my problem is that I want an example, parameters are offset attack function is 0x234567, I know that in most cases this is a floating-point functions, if I want to attack the original attack 1-10 times, how to write code tweak.xm Lane? This is the problem has been bothering me, I hope I can help DIDA@@DiDA

Posted

 

This is very useful.
But my problem is that I want an example, parameters are offset attack function is 0x234567, I know that in most cases this is a floating-point functions, if I want to attack the original attack 1-10 times, how to write code tweak.xm Lane? This is the problem has been bothering me, I hope I can help DIDA@@DiDA

 

You want to return a custom value in a function instead of a huge amount?

Posted

@DiDA i want to return several times attack values. such as ,if orig attack value is 1000,then return 2 times,it is 2000

.if return 5 times ,it is 1000*5=5000

players can select himself times to attack.

i want to you can give me code example.

I wonder if you know what I mean.

Posted

@DiDA i want to return several times attack values. such as ,if orig attack value is 1000,then return 2 times,it is 2000

.if return 5 times ,it is 1000*5=5000

players can select himself times to attack.

i want to you can give me code example.

I wonder if you know what I mean.

PM me. :)

Archived

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

  • Our picks

    • Demon RPG v1.12 [ +10 Cheats ] Currency Max
      Modded/Hacked App: Demon RPG By SeHyeon Im
      Bundle ID: com.Owings.DemonRPG
      App Store Link: https://apps.apple.com/us/app/demon-rpg/id1476965737?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Gold Increaser
      - OFFLINE-REWARD
      - HP Freeze
      Stats / Just Upgrade
      - ATK MAX
      - HP MAX
      - DEF MAX
      - CRITI-ATK
      - DMG-RED
      - HP-REG
      • 0 replies
    • Demon RPG v1.12 [ +10 Jailed ] Currency Max
      Modded/Hacked App: Demon RPG By SeHyeon Im
      Bundle ID: com.Owings.DemonRPG
      App Store Link: https://apps.apple.com/us/app/demon-rpg/id1476965737?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Gold Increaser
      - OFFLINE-REWARD
      - HP Freeze
      Stats / Just Upgrade
      - ATK MAX
      - HP MAX
      - DEF MAX
      - CRITI-ATK
      - DMG-RED
      - HP-REG
      • 0 replies
    • My Little Goddess : Idle RPG +3 Mods [ Damage & Defence ]
      Mod APK Game Name: My Little Goddess : Idle RPG By Pigames
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.pigames.mylittlegoddess

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Truck Simulator EVO: Drive USA v2.0 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Truck Simulator EVO: Drive USA By Marusac Alexandru Persoana Fizica Autorizata
      Bundle ID: com.ovilex.truckerzoneamericanroadways
      App Store Link: https://apps.apple.com/us/app/truck-simulator-evo-drive-usa/id6748637350?uo=4

      🤩 Hack Features

      - Unlimited Cash
      - Unlimited Gold
      • 1 reply
    • Truck Simulator EVO: Drive USA v2.0 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Truck Simulator EVO: Drive USA By Marusac Alexandru Persoana Fizica Autorizata
      Bundle ID: com.ovilex.truckerzoneamericanroadways
      App Store Link: https://apps.apple.com/us/app/truck-simulator-evo-drive-usa/id6748637350?uo=4

      🤩 Hack Features

      - Unlimited Cash
      - Unlimited Gold
      • 1 reply
    • Solitaire Truck Deluxe v3.2.1 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Solitaire Truck Deluxe By Beijing Multipoint Unlimited Network Technology Co., Ltd.
      Bundle ID: com.duole.solitaire.zen.home.design.patience.free.card.games
      App Store Link: https://apps.apple.com/us/app/solitaire-truck-deluxe/id6464568524?uo=4

      🤩 Hack Features

      - Auto ADS NO
      - Unlimited Gems
      - Unlimited Wrench
      - Unlimited Undo
      - Unlimited Hints
      • 1 reply
    • Solitaire Truck Deluxe v3.2.1 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Solitaire Truck Deluxe By Beijing Multipoint Unlimited Network Technology Co., Ltd.
      Bundle ID: com.duole.solitaire.zen.home.design.patience.free.card.games
      App Store Link: https://apps.apple.com/us/app/solitaire-truck-deluxe/id6464568524?uo=4
       

      🤩 Hack Features

      - Auto ADS NO
      - Unlimited Gems
      - Unlimited Wrench
      - Unlimited Undo
      - Unlimited Hints
      • 0 replies
    • DRAGON BALL Z DOKKAN BATTLE Japan (ドラゴンボールZ ドッカンバトル) v6.2.5 +7 Cheats!
      Modded/Hacked App: ドラゴンボールZ ドッカンバトル By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0211
      iTunes Link: https://itunes.apple.com/jp/app/ドラゴンボールz-ドッカンバトル/id951627670


      Hack Features
      - Unlimited HP  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Damage  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Defense  -  (Put .0 at the back of your value: 1000.0)
      - Dice Hack -  [ONLY RANGE BETWEEN 1 - 6 or it will crash]  -  (Put .0 at the back of your value: 4.0)
      - Dice Hack 1, 2, 3
      - Dice Hack 4, 5, 6
      - Auto Win Battles -> Disable if you get errors.
      PUT .0 at the back of all values!
      • 8,082 replies
    • Detective S: Mystery Puzzle v1.21.4 [ +4 APK MOD ] Currency Freeze
      Mod APK Game Name: Detective S: Mystery Puzzle
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.rawhand.dts.gl&hl=en

      🤩 Hack Features

      - Diamond Freeze
      - Gold Freeze
      - Heart Freeze
      - Fragment Freeze
      • 0 replies
    • Detective S: Mystery Game v1.21.3 [ +5 Cheats ] Currency Freeze
      Modded/Hacked App: Detective S: Mystery Game By Rawhand. Inc
      Bundle ID: com.rawhand.dts.ios
      App Store Link: https://apps.apple.com/us/app/detective-s-mystery-game/id1502345814?uo=4

      🤩 Hack Features

      - Diamond Freeze
      - Gold Freeze
      - Heart Freeze
      - Heart Unlimited
      - Fragment Freeze
      • 1 reply
    • Detective S: Mystery Game v1.21.3 [ +5 Jailed ] Currency Freeze
      Modded/Hacked App: Detective S: Mystery Game By Rawhand. Inc
      Bundle ID: com.rawhand.dts.ios
      App Store Link: https://apps.apple.com/us/app/detective-s-mystery-game/id1502345814?uo=4

      🤩 Hack Features

      - Diamond Freeze
      - Gold Freeze
      - Heart Freeze
      - Heart Unlimited
      - Fragment Freeze
      • 0 replies
    • Gale Knights Idle RPG +3 Mods [ Damage + More ]
      Mod APK Game Name: Gale Knights Idle RPG By LightCON Co.,Ltd.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=net.lightcon.windidle

       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      - No Skill Cooldown
      • 2 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