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

    • Falltopia: Epic Space Idle RPG v0.0.107 [ +12 Cheats ] Currency
      Modded/Hacked App: Falltopia: Epic Space Idle RPG By Pusilung HK Limited
      Bundle ID: com.threehp013.idle.plane.shooting.space.force.game
      App Store Link: https://apps.apple.com/ph/app/falltopia-epic-space-idle-rpg/id6748329424?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Speed Boost Active
      - Currency / NO Need
      - Resources / NO Need
      - Defensec Pass
      - Upgrade Pass
      - Season Pass
      - Battle Pass
      - Blessings Active
      - HP / Equip & Unequip
      - ATK / Equip & Unequip
      - Def / Equip & Unequip
      • 0 replies
    • Falltopia: Epic Space Idle RPG v0.0.107 [ +12 Jailed ] Currency
      Modded/Hacked App: Falltopia: Epic Space Idle RPG By Pusilung HK Limited
      Bundle ID: com.threehp013.idle.plane.shooting.space.force.game
      App Store Link: https://apps.apple.com/ph/app/falltopia-epic-space-idle-rpg/id6748329424?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Speed Boost Active
      - Currency / NO Need
      - Resources / NO Need
      - Defensec Pass
      - Upgrade Pass
      - Season Pass
      - Battle Pass
      - Blessings Active
      - HP / Equip & Unequip
      - ATK / Equip & Unequip
      - Def / Equip & Unequip
      • 0 replies
    • Dopamine Hit Cheats v3.5.0 +5
      Modded/Hacked App: Dopamine Hit By Mobigames INC.
      Bundle ID: com.mobigames.fakeroem
      App Store Link: https://apps.apple.com/us/app/dopamine-hit/id6736514242?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

      - God Mode
      - Multiply Attack
      - No Skills Cooldown
      - Freeze Currencies
      - PREMIUM

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/196879-dopamine-hit-cheats-v2120-5/
      • 46 replies
    • Royal Knights GO v1.1.29 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Royal Knights GO By Super Candy Inc.
      Bundle ID: com.supercandy.royalknights
      App Store Link: https://apps.apple.com/ph/app/royal-knights-go/id6478957981?uo=4

      🤩 Hack Features

      - Unlimited Gems / Linked With Store Rewards
      - Quest / Claim All
      - Premium & Stage Pass Unlocked
      - Hero Status / ATK HP DEF / Just Upgrade Faster Increase
      - Skill CD
      • 2 replies
    • Royal Knights GO v1.1.29 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Royal Knights GO By Super Candy Inc.
      Bundle ID: com.supercandy.royalknights
      App Store Link: https://apps.apple.com/ph/app/royal-knights-go/id6478957981?uo=4

      🤩 Hack Features

      - Unlimited Gems / Linked With Store Rewards
      - Quest / Claim All
      - Premium & Stage Pass Unlocked
      - Hero Status / ATK HP DEF / Just Upgrade Faster Increase
      - Skill CD
      • 3 replies
    • Among Us! Cheats v2025.9.9 +10
      Modded/Hacked App: Among Us! by InnerSloth LLC
      Bundle ID: com.innersloth.amongus
      iTunes Store Link: https://apps.apple.com/us/app/among-us/id1351168404?uo=4&at=1010lce4


      Hack Features:
      - All Skins Unlocked
      - All Pets Unlocked
      - All Hats Unlocked
      - No Ads
      - Custom Move Speed
      - Display Who is Impostor by faking them
      - No ban when quitting too much
      - Increase Light FOV
      - Destroy Room (Turn on the turn it off)
      - Instant Kill


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/132854-arm64-among-us-v202091-jailed-cheats-4/


      iOS Hack Download Link: https://iosgods.com/topic/132860-arm64-among-us-cheats-v202091-7/
      • 17,153 replies
    • Creature Hunter Idle v1.2.1 +4 Jailed Cheats [ Cheat Menu ]
      Modded/Hacked App: Creature Hunter Idle By DRAKEMOUNT
      Bundle ID: com.drakemount.creature.hunter
      App Store Link: https://apps.apple.com/us/app/creature-hunter-idle/id6743888703?uo=4

       
       

      🤩 Hack Features

      - Freeze Enemy -> They will still attack.
      - Speed Multiplier

      VIP
      - Auto Win
      - Cheat Menu -> Head into Settings > Accounts > Scroll down and tap on the Discord button.
      • 3 replies
    • Creature Hunter Idle v1.2.1 +4 Cheats [ Cheat Menu ]
      Modded/Hacked App: Creature Hunter Idle By DRAKEMOUNT
      Bundle ID: com.drakemount.creature.hunter
      App Store Link: https://apps.apple.com/us/app/creature-hunter-idle/id6743888703?uo=4

       
       

      🤩 Hack Features

      - Freeze Enemy -> They will still attack.
      - Speed Multiplier

      VIP
      - Auto Win
      - Cheat Menu -> Head into Settings > Accounts > Scroll down and tap on the Discord button.n.
      • 5 replies
    • Dragoneer Squad: Idle v1.0.15 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dragoneer Squad: Idle By DAERI SOFT
      Bundle ID: com.daerigame.dragon
      App Store Link: https://apps.apple.com/us/app/dragoneer-squad-idle/id6746182414?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 20 replies
    • Pudgy Party - Battle Royale v0.12.4 +7 Jailed Cheats [ Speed, Gravity + More ]
      Modded/Hacked App: Pudgy Party - Battle Royale By Mythical, Inc.
      Bundle ID: com.mythical.pudgyparty
      App Store Link: https://apps.apple.com/us/app/pudgy-party-battle-royale/id6744258913?uo=4

       
       

      🤩 Hack Features

      - Jump Height Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Gravity Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Speed Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Friction Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Freeze Bots
      - Dumb Bots
      - Free In-App Purchases
      • 11 replies
    • Pudgy Party - Battle Royale v0.12.4 +7 Cheats [ Speed, Gravity + More ]
      Modded/Hacked App: Pudgy Party - Battle Royale By Mythical, Inc.
      Bundle ID: com.mythical.pudgyparty
      App Store Link: https://apps.apple.com/us/app/pudgy-party-battle-royale/id6744258913?uo=4

       


      🤩 Hack Features

      - Jump Height Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Gravity Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Speed Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Friction Multiplier -> Affects bots too. Use with Freeze/Dumb Bots.
      - Freeze Bots
      - Dumb Bots
      - Free In-App Purchases
      • 22 replies
    • Dragoneer Squad: Idle v1.0.15 +3 Cheats [ Damage & Defence ]
      Modded/Hacked App: Dragoneer Squad: Idle By DAERI SOFT
      Bundle ID: com.daerigame.dragon
      App Store Link: https://apps.apple.com/us/app/dragoneer-squad-idle/id6746182414?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 31 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