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

    • Vampirio: Defend & Survive v1.1.7 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Vampirio: Defend & Survive By Outfit7 Neo Limited
      Bundle ID: com.outfit7neo.onehelsing
      App Store Link: https://apps.apple.com/ph/app/vampirio-defend-survive/id6670539564?uo=4

       

      🤩 Hack Features

      - Currency Max [ Disable After Get ]
      - Resources Max [ Use Only Resources - Disable After Get ] Becasue Linked Population When You Build Disable OtherWise Crash

      • 6 replies
    • Vampirio: Defend & Survive v1.1.7 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Vampirio: Defend & Survive By Outfit7 Neo Limited
      Bundle ID: com.outfit7neo.onehelsing
      App Store Link: https://apps.apple.com/ph/app/vampirio-defend-survive/id6670539564?uo=4


      🤩 Hack Features

      - Currency Max [ Disable After Get ]
      - Resources [ Use Only Resources - Disable After Get ] Becasue Linked Population When You Build Disable OtherWise Crash
      • 8 replies
    • Jolly Match 3 - Puzzle Game v1.0.1895 [ +5 Cheats ] Auto Win
      Modded/Hacked App: Jolly Match 3 - Puzzle Game By Jollyco LLC
      Bundle ID: com.jollyco.jollybattlematch3
      App Store Link: https://apps.apple.com/us/app/jolly-match-3-puzzle-game/id1554274735?uo=4


      🤩 Hack Features

      - Auto Win

      - Coins

      - Stars

      - Lives

      - Booster
      • 2 replies
    • Jolly Match 3 - Puzzle Game v1.0.1895 [ +5 Jailed ] Auto Win
      Modded/Hacked App: Jolly Match 3 - Puzzle Game By Jollyco LLC
      Bundle ID: com.jollyco.jollybattlematch3
      App Store Link: https://apps.apple.com/us/app/jolly-match-3-puzzle-game/id1554274735?uo=4


      🤩 Hack Features

      - Auto Win

      - Coins

      - Stars

      - Lives

      - Booster
      • 2 replies
    • Mortal Kombat v6.3.0 +9 FREE Cheats
      Modded/Hacked App: Mortal Kombat by Warner Bros. Entertainment
      Bundle ID: com.wb.MK.Brawler2015
      iTunes Store Link: https://apps.apple.com/us/app/mortal-kombat/id949701151


      Hack Features:
      - Auto-Win (Press the pause button)
      - Instantly Kill individual Enemy Characters (Press the pause button)
      - Force Swap Enemy Characters (Press the pause button)
      - Easy Enemy (1 hit KO) (Press the pause button)
      - Cheat Menu (only few few features work for now, i'll see what i can do) (Press the pause button)


      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/
      • 4,993 replies
    • Family Island — Farm game v2025146.1.75628 Jailed Cheats +1
      Modded/Hacked App: Family Island™ — Farm game by Melsoft
      Bundle ID: com.MelsoftGames.FamilyIsland
      iTunes Store Link: https://apps.apple.com/us/app/family-island-farm-game/id1464689103?uo=4&at=1010lce4


      Hack Features:
      - Cheat Engine Enabled


      iOS Hack Download Link: https://iosgods.com/topic/115337-arm64-family-island-%E2%80%94-farm-game-v20190824862-jailed-cheats-1/
      • 2,307 replies
    • Train of Hope: Survival Game v1.8.2 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Train of Hope: Survival Game By Samfinaco LLC
      Bundle ID: com.samfinaco.tos
      iTunes Store Link: https://apps.apple.com/us/app/train-of-hope-survival-game/id6636482655?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Resources -> Will increase instead of decrease.
      - Unlimited Hero Experience -> Will increase instead of decrease.
      • 43 replies
    • Train of Hope: Survival Game v1.8.2 +5 Cheats [ Damage & Defence ]
      Modded/Hacked App: Train of Hope: Survival Game By Samfinaco LLC
      Bundle ID: com.samfinaco.tos
      iTunes Store Link: https://apps.apple.com/us/app/train-of-hope-survival-game/id6636482655?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Resources -> Will increase instead of decrease.
      - Unlimited Hero Experience -> Will increase instead of decrease.
      • 39 replies
    • Final Outpost v2.3.19 [+3 Jailed Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4



      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
      • 20 replies
    • Final Outpost v2.3.19 [+3 Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4

       

      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
      • 15 replies
    • Feed the Deep v1.0.6 [+6 Jailed Cheats]
      Modded/Hacked App: Feed the Deep By L MUSCAT ENTERPRISES PTY LTD
      Bundle ID: com.Luke-Muscat.FtD
      App Store Link: https://apps.apple.com/us/app/feed-the-deep/id6745767745?uo=4



      🤩 Hack Features

      - Free IAP
      - Never Die
      - Add Gold (Enable inside game)
      - Add Orb (Enable inside game)
      - Add Ammo (Enable inside game)
      - Unlimited Oxygen
      • 6 replies
    • Feed the Deep v1.0.6 [+6 Cheats]
      Modded/Hacked App: Feed the Deep By L MUSCAT ENTERPRISES PTY LTD
      Bundle ID: com.Luke-Muscat.FtD
      App Store Link: https://apps.apple.com/us/app/feed-the-deep/id6745767745?uo=4


       

      🤩 Hack Features

      - Free IAP
      - Never Die
      - Add Gold (Enable inside game)
      - Add Orb (Enable inside game)
      - Add Ammo (Enable inside game)
      - Unlimited Oxygen
      • 4 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