Jump to content

Please help me with this some FLEX code


Go to solution Solved by xC3FFF0E,

8 posts in this topic

Recommended Posts

Posted

Guys, can have some help with this MS hook code? I try to convert from FLEX to PrefBundle tweak. I use PFHeader nic template from iOSGODS.

Here is the code from FLEX that I wanna write to Tweak.xm:

 

1. unsigned int

Target Class
SomeClass

Target Method
-(void) someMethod: (unsigned int)

Return Value (void)
pass-through

Argument #1 (unsigned int)
100

2. void with FALSE/TRUE value

Target Class
SomeClass

Target Method
someMethod

Return Value (void)
TRUE

3. void with integer value

Target Class
SomeClass

Target Method
someMethod:

Return Value (void)
0

4. void with NULL value

Target Class
SomeClass

Target Method
someMethod:likeThis:

Return Value (void)
NULL 

5. long long method

Target Class
_SomeClass

Target Method
-(long long) someMethod

Return Value (long long)
1

And here is my Tweak.xm code, pelase correct me if me wrong.

1. unsigned int
 

%hook SomeClass
-(void)someMethod:(unsigned int) myvalue {
if(GetPrefBool(@"k1")){
myvalue = 100;
}
%orig(myvalue);
}
%end

2. void with TRUE/FALSE value

%hook SomeClass
- someMethod {
if(GetPrefBool(@"k2")) {
return true;
}
return %orig;
}
%end

3. void with integer value

%hook SomeClass
- someMethod {
if(GetPrefBool(@"k3")) {
return: 0;
}
return %orig;
}
%end

4. void with NULL value

%hook SomeClass
- someMethod:likeThis: {
if(GetPrefBool(@"k3")) {
return null;
}
return %orig;
}
%end

5. long long method

%hook _SomeClass
-(long long) someMethod {
if(GetPrefBool(@"k4")) {
return:1;
}
return %orig;
}
%end

Please correct my code. Sorry if there are annoying code, I just wanna learn. Thank you.

Posted

I think your codes are alright. Let's wait for someone with better knowledge on this one, as I am rusty. :3

 

Thank you, but when I compile the tweak is not working.   (y)  :sad:

Posted

Unsigned int :

there shouldnt be any space between (unsigned int) and myvalue

%hook SomeClass
-(void)someMethod:(unsigned int)myvalue {
if(GetPrefBool(@"k1")){
myvalue = 100;
}
%orig;
}
%end
Posted

There's an issue compiling or the hack doesn't work?

No error while compiling, but the hack doesn't work ????

 

Unsigned int :

there shouldnt be any space between (unsigned int) and myvalue

%hook SomeClass
-(void)someMethod:(unsigned int)myvalue {
if(GetPrefBool(@"k1")){
myvalue = 100;
}
%orig;
}
%end

Thank you, I'll try ????????????

  • Solution
Posted

You can never ever, override a "void". Just remember that.

 

And also, don't use "myvalue" it might not work in some cases. Though, you can use, "argument".

 

Here's some example:

 

%hook SomeClass

-(void)someMethod:(unsigned int)arguement {

if(GetPrefBool(@"k1")){

arguement = 100;

}

return %orig;

}

%end

 

--------------------------

 

One last thing, "void" can never be override as "null" whereas "null" is equivalent to 0 or none.

 

You can only use "null -> nil" and "%orig" to "(:id)"

 

Here's some example:

 

%hook SomeClass

-(void)someMethod:(id)arguement {

if(GetPrefBool(@"k1")){

arguement = %orig; <----- this identify as the ":(id)". "%orig" means 'return to original state' and "nil" means 'wipe the current value'.

}

return %orig; <----- this identify as the "-(void)"

}

%end

Posted

You can never ever, override a "void". Just remember that.

 

And also, don't use "myvalue" it might not work in some cases. Though, you can use, "argument".

 

Here's some example:

 

%hook SomeClass

-(void)someMethod:(unsigned int)arguement {

if(GetPrefBool(@"k1")){

arguement = 100;

}

return %orig;

}

%end

 

--------------------------

 

One last thing, "void" can never be override as "null" whereas "null" is equivalent to 0 or none.

 

You can only use "null -> nil" and "%orig" to "(:id)"

 

Here's some example:

 

%hook SomeClass

-(void)someMethod:(id)arguement {

if(GetPrefBool(@"k1")){

arguement = %orig; <----- this identify as the ":(id)". "%orig" means 'return to original state' and "nil" means 'wipe the current value'.

}

return %orig; <----- this identify as the "-(void)"

}

%end

Thank you very much! ????

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

    • Rumble Bag: Bag Fight Hero v1.8.02 [ +7 APK MOD ] Currency Freeze
      Mod APK Game Name: Rumble Bag: Bag Fight Hero
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.defense.bag.fight.mergegame&hl=en

       

      🤩 Hack Features

      - ADS No / Free Rewards
      - ViP Active / Check Store
      - Currency Freeze / Disable Before The Battle
      - Weapon Unlocked
      - Merge Anything Weapons / Max LvL 5 Merging Above Disable Weapons
      - Silver Coins / End Wave Earn
      - DMG / Merge Weapons

       

      ⬇️ Android Mod APK Download Link


      Hidden Content

      Download Modded APK







       

      📖 Android Installation Instructions

      STEP 1: Download the modded APK file from the link above using your preferred Android browser or download manager.
      STEP 2: Once the download is complete, open your file manager and locate the downloaded .apk file (usually in the Downloads folder).
      STEP 3: Tap the APK file, then select Install. If prompted, enable Install from Unknown Sources in your device settings.
      STEP 3A: If the mod includes an OBB file, extract it if it’s inside an archive. Then move the folder to: /Android/obb/
      STEP 3B: If the mod includes a DATA file, extract it if it’s archived. Then move the folder to: /Android/data/
      STEP 4: Once installed, open the game and toggle your desired cheats & features through the APK mod menu. Enjoy!

       

      NOTE: If you have any questions or issues, read our Frequently Asked Questions topic. If you still need help, post your issue below and we’ll assist you as soon as possible. If the mod works for you, please share your feedback to help other members!

       

      🙌 Credits

      - IK_IK

       

      📷 Cheat Video/Screenshots

      N/A

       

       iOS & iPadOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.
      • 1 reply
    • Fighter Jet Combat : Warzone v1.1.0 [ +2 APK MOD ] Currency Max
      Mod APK Game Name: Fighter Jet Combat : Warzone
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.ovilex.flightcombat&hl=en

       

      🤩 Hack Features

      - Unlimited Gold / After Hack Disable
      - Unlimited Cash / After Hack Disable
      • 0 replies
    • Chum Chum Blast! v1.13.795 [ +9 APK MOD ] Auto Win
      Mod APK Game Name: Chum Chum Blast!
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.ritzdeligames.eraserblast&hl=en

       

      🤩 Hack Features

      - Auto Win
      - ADS Ticket
      - Coins / Golden Pass To Get
      - Unlimited Stars
      - Unlimited Booster
      - Lives Inf
      - Moves Unlimited
      - Golden Pass
      - Free & Golden Pass / Claim Unlimited 

       

      ⬇️ Android Mod APK Download Link


      Hidden Content

      Download Modded APK







       

      📖 Android Installation Instructions

      STEP 1: Download the modded APK file from the link above using your preferred Android browser or download manager.
      STEP 2: Once the download is complete, open your file manager and locate the downloaded .apk file (usually in the Downloads folder).
      STEP 3: Tap the APK file, then select Install. If prompted, enable Install from Unknown Sources in your device settings.
      STEP 3A: If the mod includes an OBB file, extract it if it’s inside an archive. Then move the folder to: /Android/obb/
      STEP 3B: If the mod includes a DATA file, extract it if it’s archived. Then move the folder to: /Android/data/
      STEP 4: Once installed, open the game and toggle your desired cheats & features through the APK mod menu. Enjoy!

       

      NOTE: If you have any questions or issues, read our Frequently Asked Questions topic. If you still need help, post your issue below and we’ll assist you as soon as possible. If the mod works for you, please share your feedback to help other members!

       

      🙌 Credits

      - IK_IK

       

      📷 Cheat Video/Screenshots

      N/A

       

       iOS & iPadOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.
      • 0 replies
    • Hunters Origin v1.2.9 +9 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Hunters Origin By BoomBit, Inc.
      Bundle ID: com.hunters.legacy
      iTunes Store Link: https://apps.apple.com/pl/app/hunters-origin/id6473918865

       
       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      - Skip Tutorial

      VIP
      - Gold Modifier
      - Diamonds Modifier
      - Seasonal Points Modifier
      - Speed Multiplier
      - XP Multiplier
      - VIP Enabled
      - Premium Pass Enabled
      - No Clip
      - Cheat Mode

      You risk your account being banned using this cheat. Play it safe and you should be okay.
      If you expose yourself using cheats then that's on you.
      • 144 replies
    • Chum Chum Blast & Sort v1.13.796 [ +7 Cheats ] Auto Win
      Modded/Hacked App: Chum Chum Blast By Ritz Deli Games, Inc.
      Bundle ID: com.ritzdeligames.eraserblast
      iTunes Store Link: https://apps.apple.com/us/app/chum-chum-blast/id1497403262?uo=4


      🤩 Hack Features

      - Coins [ Win Match After Disable ]

      - Stars [ Win Match After Disable ]

      - Dice [ Win Match After Disable ]

      - Moves Inf

      - Lives Inf

      - ADS Ticket

      - Auto Win
      • 18 replies
    • Chum Chum Blast & Sort v1.13.796 [ +7 Jailed ] Auto Win
      Modded/Hacked App: Chum Chum Blast By Ritz Deli Games, Inc.
      Bundle ID: com.ritzdeligames.eraserblast
      iTunes Store Link: https://apps.apple.com/us/app/chum-chum-blast/id1497403262?uo=4
       

      🤩 Hack Features

      - Coins [ Win Match After Disable ]

      - Stars [ Win Match After Disable ]

      - Dice [ Win Match After Disable ]

      - Moves Inf

      - Lives Inf

      - ADS Ticket

      - Auto Win
      • 17 replies
    • Planet Miner: Idle Action Game v0.4.1 [ +18 Cheats ] Currency Max
      Modded/Hacked App: Planet Miner: Idle Action Game By Gryphon Games UG (haftungsbeschrankt)
      Bundle ID: com.gryphongames.planetminer
      App Store Link: https://apps.apple.com/us/app/planet-miner-idle-action-game/id6755299482?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Unlimited Gems
      - Unlimited Coins / Linked DMG
      - Unlimited Skill Token / Linked DMG & Prestige
      - Lucky Draw Cost 0
      :: Status ViP ::
      - Faster Remove Planet / Linked DMG
      - Unlimited Rocket Spawn
      - Unlimited DMG
      - Unlimited HP
      - Unlimited DEF
      - Unlimited Life steal
      - Unlimited DMG Reduction
      - Unlimited Criti DMG
      - Unlimited Criti Chance
      - Unlimited Elite Ship DMG
      - Unlimited Elite Ship HP
      - Unlimited Elite Ship Chance
      - Muliti Ship Chance

      Note:- Just One Upgrade Status
      • 1 reply
    • Planet Miner: Idle Action Game v0.4.1 [ +18 Jailed ] Currency Max
      Modded/Hacked App: Planet Miner: Idle Action Game By Gryphon Games UG (haftungsbeschrankt)
      Bundle ID: com.gryphongames.planetminer
      App Store Link: https://apps.apple.com/us/app/planet-miner-idle-action-game/id6755299482?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Unlimited Gems
      - Unlimited Coins / Linked DMG
      - Unlimited Skill Token / Linked DMG & Prestige
      - Lucky Draw Cost 0
      :: Status ViP ::
      - Faster Remove Planet / Linked DMG
      - Unlimited Rocket Spawn
      - Unlimited DMG
      - Unlimited HP
      - Unlimited DEF
      - Unlimited Life steal
      - Unlimited DMG Reduction
      - Unlimited Criti DMG
      - Unlimited Criti Chance
      - Unlimited Elite Ship DMG
      - Unlimited Elite Ship HP
      - Unlimited Elite Ship Chance
      - Muliti Ship Chance

      Note:- Just One Upgrade Status
      • 1 reply
    • Matching Story v1.55.01 [ +6 Cheats ] Auto Win
      Modded/Hacked App: Matching Story By VERTEX GAMES PTE. LTD.
      Bundle ID: matching.story
      iTunes Store Link: https://apps.apple.com/ph/app/matching-story/id1558803930?uo=4


      🤩 Hack Features

      - Auto Win

      - Coins

      - Diamonds [ Win Match Linked With Moves ]

      - Lives

      - Booster

      - Moves
        • Thanks
      • 78 replies
    • Matching Story v1.55.01 [ +6 Jailed ] Auto Win
      Modded/Hacked App: Matching Story By VERTEX GAMES PTE. LTD.
      Bundle ID: matching.story
      iTunes Store Link: https://apps.apple.com/ph/app/matching-story/id1558803930?uo=4

       
      🤩 Hack Features

      - Auto Win

      - Coins

      - Diamonds [ Win Match Linked With Moves ]

      - Lives

      - Booster

      - Moves
        • Agree
      • 80 replies
    • Mech Assemble v1.6.35 Jailed Cheats +5
      Modded/Hacked App: Mech Assemble By ONEMT PTE. LTD.
      Bundle ID: com.ios.mecharogue.online
      App Store Link: https://apps.apple.com/us/app/mech-assemble/id6739125107?uo=4



      🤩 Hack Features

      - High Defense
      - No Reload
      • 122 replies
    • Shuffleboard Club: PvP Arena v1.0.0 +50++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Shuffleboard Club: PvP Arena By BoomBit, Inc.
      Bundle ID: shuffle.board.sports.club.games
      App Store Link: https://apps.apple.com/us/app/shuffleboard-club-pvp-arena/id6744823998?uo=4

       

      🤩 Hack Features

      - Debug Menu -> Head into Settings and toggle the Music slider.
      • 1 reply
×
  • 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