Jump to content

Hooking problem teds template


Red16
Go to solution Solved by bR34Kr,

12 posts in this topic

Recommended Posts

Public void QuickSpawnItem(int item, optional int stack); // RVA: 100F2929C Offset: F2929C

 

 

void (*Player_QuickSpawnItem) (void *player, int item) = (void (*) (void *, int))getRealOffset(0x100F2929C);

void (*Player_Update) (void *player);

void _Player_Update (void *player){

int item = [[switches getValueFromSwitch:@"Spawn Item:"] intValue];

 

  if([switches isSwitchOn:@"Spawn Item:"]){

Player_QuickSpawnItem(player, item); 

  }      

 Player_Update(player);

}

 

void setup() {

//ADD YOUR HACKS UNDER THIS

 

 [switches addSwitch:@"Spawn Item:"

              description:@"Put item ID!];

 

dose anyone know why this is not working, it compiles i dont have any errors. The game doesn’t crash when i turn the switch on with my value it doesn’t crash nothing happens

 

i am in the right class

Updated by Red16
Link to comment
Share on other sites

18 minutes ago, bR34Kr said:

You check for a string "Spawn Item:" (Note the : ) while your switch has a name of "Spawn Item"

The "Spawn Item:" seems correct. But I'm unsure if that's just the switch title or also an identifier.

Link to comment
Share on other sites

8 minutes ago, DADi said:

The "Spawn Item:" seems correct. But I'm unsure if that's just the switch title or also an identifier.

Its just the switch title :)

14 minutes ago, bR34Kr said:

Are you sure that update function is being called?

Yea

Link to comment
Share on other sites

8 minutes ago, bR34Kr said:

Could you upload your Tweak.xm or part of it to somewhere so we get the full picture?

#import "Macros.h"

/**********************************

 

INSIDE THIS FUNCTION YOU'LL HAVE TO CREATE YOUR SWITCHES!

 

***********************************/

void (*Player_QuickSpawnItem) (void *player, int item) = (void (*) (void *, int))getRealOffset(0x100F2929C);

void (*Player_Update) (void *player);

void _Player_Update (void *player){

int item = [[switches getValueFromSwitch:@"Spawn Item:"] intValue];

 

  if([switches isSwitchOn:@"Spawn Item:"]){

Player_QuickSpawnItem(player, item); 

  }      

 Player_Update(player);

}

 

void setup() {

//ADD YOUR HACKS UNDER THIS.

 

  [switches addTextfieldSwitch:@"Spawn Item:"

              description:@"Put the item ID!"

                inputBorderColor:[UIColor colorWithRed:0.31 green:0.31 blue:0.78 alpha:1.0]];

//you can find examples on iOSGods where the topic is at.

 

}

 

void setupMenu() {

 

menu = [[Menu alloc]  initWithTitle:@"Terraria 1.3.0.7.5 ModMenu"

                        titleColor:[UIColor colorWithRed:0.36 green:0.36 blue:0.91 alpha:1.0]

                        titleFont:@"AppleSDGothicNeo-Regular"

                        credits:@"Mod Menu by Red16 for No Advertising Allowed.com Don’t share this without our community permissions\n\nTap the menu to close!"

                        headerColor:[UIColor colorWithRed:0.09 green:0.11 blue:0.16 alpha:1.0]

                        switchOffColor:[UIColor colorWithRed:0.07 green:0.09 blue:0.14 alpha:0.95]

                        switchOnColor:[UIColor colorWithRed:0.16 green:0.21 blue:0.28 alpha:0.85]

                        switchTitleFont:@"AppleSDGothicNeo-Regular"

                        switchTitleColor:[UIColor colorWithRed:0.36 green:0.36 blue:0.91 alpha:1.0]

                        infoButtonColor:[UIColor colorWithRed:0.36 green:0.36 blue:0.91 alpha:1.0]

                        maxVisibleSwitches:4 // Less than max -> blank space, more than max -> you can scroll!

                        menuWidth:270];

 

 

    //once menu has been initialized, it will run the setup functions. In the setup function, you create your switches!

    setup();

}

 

/*

    If the menu button doesn't show up; Change the timer to a bigger amount.

*/

static void didFinishLaunching(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef info) {

 

  timer(5) {

 

    SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];

 

    

 [alert addButton: @"No Advertising Allowed.com!" actionBlock: ^(void) {

      [[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"https://No Advertising Allowed.com"]];

      timer(2) {

        setupMenu();

      });        

    }];

 

    [alert addButton: @"Discord!" actionBlock: ^(void) {

      [[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"https://discordapp.com/invite/ukSGD7h"]];

      timer(2) {

        setupMenu();

      });        

    }];

 

    [alert addButton: @"Thanks!" actionBlock: ^(void) {

      timer(2) {

        setupMenu();

      });

    }];    

 

    alert.shouldDismissOnTapOutside = NO;

    alert.customViewColor = [UIColor colorWithRed:0.07 green:0.09 blue:0.14 alpha:1.0];  

    alert.showAnimationType = SCLAlertViewShowAnimationSlideInFromCenter;   

    

    [alert showSuccess: nil

            subTitle:@"Terraria - Mod Menu Cheats by Red16 for No Advertising Allowed.com!\n\nRead the hack's official topic on No Advertising Allowed.com for more information & updates!"

              closeButtonTitle:nil

                duration:99999999.0f];

 

  });

}

 

 

%ctor {

  CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), NULL, &didFinishLaunching, (CFStringRef)UIApplicationDidFinishLaunchingNotification, NULL, CFNotificationSuspensionBehaviorDeliverImmediately);

}

Link to comment
Share on other sites

  • Solution
5 minutes ago, Red16 said:

#import "Macros.h"

/**********************************

 

INSIDE THIS FUNCTION YOU'LL HAVE TO CREATE YOUR SWITCHES!

 

***********************************/

void (*Player_QuickSpawnItem) (void *player, int item) = (void (*) (void *, int))getRealOffset(0x100F2929C);

void (*Player_Update) (void *player);

void _Player_Update (void *player){

int item = [[switches getValueFromSwitch:@"Spawn Item:"] intValue];

 

  if([switches isSwitchOn:@"Spawn Item:"]){

Player_QuickSpawnItem(player, item); 

  }      

 Player_Update(player);

}

 

void setup() {

//ADD YOUR HACKS UNDER THIS.

 

  [switches addTextfieldSwitch:@"Spawn Item:"

              description:@"Put the item ID!"

                inputBorderColor:[UIColor colorWithRed:0.31 green:0.31 blue:0.78 alpha:1.0]];

//you can find examples on iOSGods where the topic is at.

 

}

 

void setupMenu() {

 

menu = [[Menu alloc]  initWithTitle:@"Terraria 1.3.0.7.5 ModMenu"

                        titleColor:[UIColor colorWithRed:0.36 green:0.36 blue:0.91 alpha:1.0]

                        titleFont:@"AppleSDGothicNeo-Regular"

                        credits:@"Mod Menu by Red16 for No Advertising Allowed.com Don’t share this without our community permissions\n\nTap the menu to close!"

                        headerColor:[UIColor colorWithRed:0.09 green:0.11 blue:0.16 alpha:1.0]

                        switchOffColor:[UIColor colorWithRed:0.07 green:0.09 blue:0.14 alpha:0.95]

                        switchOnColor:[UIColor colorWithRed:0.16 green:0.21 blue:0.28 alpha:0.85]

                        switchTitleFont:@"AppleSDGothicNeo-Regular"

                        switchTitleColor:[UIColor colorWithRed:0.36 green:0.36 blue:0.91 alpha:1.0]

                        infoButtonColor:[UIColor colorWithRed:0.36 green:0.36 blue:0.91 alpha:1.0]

                        maxVisibleSwitches:4 // Less than max -> blank space, more than max -> you can scroll!

                        menuWidth:270];

 

 

    //once menu has been initialized, it will run the setup functions. In the setup function, you create your switches!

    setup();

}

 

/*

    If the menu button doesn't show up; Change the timer to a bigger amount.

*/

static void didFinishLaunching(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef info) {

 

  timer(5) {

 

    SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];

 

    

 [alert addButton: @"No Advertising Allowed.com!" actionBlock: ^(void) {

      [[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"https://No Advertising Allowed.com"]];

      timer(2) {

        setupMenu();

      });        

    }];

 

    [alert addButton: @"Discord!" actionBlock: ^(void) {

      [[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"https://discordapp.com/invite/ukSGD7h"]];

      timer(2) {

        setupMenu();

      });        

    }];

 

    [alert addButton: @"Thanks!" actionBlock: ^(void) {

      timer(2) {

        setupMenu();

      });

    }];    

 

    alert.shouldDismissOnTapOutside = NO;

    alert.customViewColor = [UIColor colorWithRed:0.07 green:0.09 blue:0.14 alpha:1.0];  

    alert.showAnimationType = SCLAlertViewShowAnimationSlideInFromCenter;   

    

    [alert showSuccess: nil

            subTitle:@"Terraria - Mod Menu Cheats by Red16 for No Advertising Allowed.com!\n\nRead the hack's official topic on No Advertising Allowed.com for more information & updates!"

              closeButtonTitle:nil

                duration:99999999.0f];

 

  });

}

 

 

%ctor {

  CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), NULL, &didFinishLaunching, (CFStringRef)UIApplicationDidFinishLaunchingNotification, NULL, CFNotificationSuspensionBehaviorDeliverImmediately);

}

Doesn’t seem like you hook to the actual function inside your %ctor. You need to use the MSHookFunction function.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • Toram Online v4.0.30 - [ Custom Move Speed & More ]
      Modded/Hacked App: Toram Online By ASOBIMO,Inc.
      Bundle ID: com.asobimo.toramonline
      iTunes Store Link: https://itunes.apple.com/us/app/toram-online/id988683886?mt=8&uo=4&at=1010lce4
       

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - Custom Move Speed
      - God Mode 
      - Fast Attack Speed
      - Fast Cast Speed
      - Always Critical Chance
      - Never Miss Hit 
      - Mobs/Bosses Can't Avoid & Guard 
      - Quick Draw
      - Armor Break
      - Magic Wall - Stun + Full Map Hack 
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,397 replies
    • We Are Warriors! v1.25.0 Cheats +3
      Modded/Hacked App: We Are Warriors! By Lessmore UG haftungsbeschraenkt
      Bundle ID: com.vjsjlqvlmp.wearewarriors
      iTunes Store Link: https://apps.apple.com/us/app/we-are-warriors/id6466648550?uo=4

       

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Unlimited everything
      - Auto complete task
        • Like
      • 15 replies
    • We Are Warriors! v1.25.0 Cheats +3
      Modded/Hacked App: We Are Warriors! By Lessmore UG haftungsbeschraenkt
      Bundle ID: com.vjsjlqvlmp.wearewarriors
      iTunes Store Link: https://apps.apple.com/us/app/we-are-warriors/id6466648550?uo=4


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


      Hack Features:
      - Unlimited everything
      - Auto complete task
      • 14 replies
    • WAR OF THE VISIONS FFBE Cheats v8.6.0 +3 [ Multiply Damage & Defense ]
      Modded/Hacked App: FINAL FANTASY BE:WOTV By SQUARE ENIX Co., Ltd.
      Bundle ID: com.square-enix.WOTVffbeww
      iTunes Store Link: https://apps.apple.com/us/app/final-fantasy-be-wotv/id1484937345?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Full Map Movement


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/173485-final-fantasy-bewotv-v730-jailed-cheats-3/


      iOS Hack Download Link: https://iosgods.com/topic/173483-war-of-the-visions-ffbe-cheats-v740-3-multiply-damage-defense/
      • 124 replies
    • Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd v7.9.981 Cheats +4
      Modded/Hacked App: Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd
      Bundle ID: com.slash.girl.redfish
      iTunes Store Link: https://apps.apple.com/vn/app/slash-girl-endless-run/id1484766098?uo=4

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - No die
      - One hit
      - Freeze combo
      - Freeze lighting
      • 3 replies
    • Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd v7.9.981 Cheats +7
      Modded/Hacked App: Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd
      Bundle ID: com.slash.girl.redfish
      iTunes Store Link: https://apps.apple.com/vn/app/slash-girl-endless-run/id1484766098?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:
      - No die
      - One hit
      - Earn more currencies
      - Custom score
      - Freeze combo
      - Freeze lighting
      - Jump height
      • 32 replies
    • Blood Knight : 3D Idle RPG v2.98 Cheats +1
      Modded/Hacked App: Blood Knight : 3D Idle RPG By SUPERBOX. Inc
      Bundle ID: com.superbox.ios.blood
      iTunes Store Link: https://apps.apple.com/us/app/blood-knight-3d-idle-rpg/id6443827240?uo=4

       


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - High damage
      • 78 replies
    • Blood Knight : 3D Idle RPG v2.98 Cheats +1
      Modded/Hacked App: Blood Knight : 3D Idle RPG By SUPERBOX. Inc
      Bundle ID: com.superbox.ios.blood
      iTunes Store Link: https://apps.apple.com/us/app/blood-knight-3d-idle-rpg/id6443827240?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:
      - High damage
      • 37 replies
    • [ Dead by Daylight TW ] 黎明死線M - Envoy v1.0.32 +27 Cheats
      Modded/Hacked App: 黎明死線M - Envoy [ Dead by Daylight Mobile TW ] By Envoy Interactive Entertainment Co., Ltd.
      Bundle ID: com.netease.dbdtw
      iTunes Store Link: https://apps.apple.com/tw/app/%E9%BB%8E%E6%98%8E%E6%AD%BB%E7%B7%9Am-envoy/id1504610184?uo=4


      Hack Features:
      - No Skill Check
      - No Killer Attack/Miss Cooldown
      - Custom Speed
      - Killer Location Cham
      - Survivor Location Cham
      - Generator Cham
      - Totems Cham
      - Chest Cham
      - Portal Cham
      - Hatch Cham
      - Hooks Cham
      - Trap Cham
      - Escape Switch Cham
      - Normal Pallet Cham
      - Dream Pallet Cham
      - Lockers Cham
      - Survivor Trap Immunity
      - Instant Window Vault*
      - Instant Destroy Pallets*
      - Instant Pickup Downed Players*
      - Custom FOV
      - Disable Footsteps - use as a survivor.
      - No Nurse Fatigue
      - Instant Nurse Teleport
      - Nurse Teleport Through Anything
      - Better Aim Assist
      - No Heartbeat

      * Under one switch


      iOS Hack Download Link: https://iosgods.com/topic/164639-dead-by-daylight-tw-%E9%BB%8E%E6%98%8E%E6%AD%BB%E7%B7%9Am-envoy-v1024-27-cheats/
      • 95 replies
    • OUTERPLANE - Strategy Anime v1.1.92 Cheats +4
      Modded/Hacked App: OUTERPLANE - Strategy Anime By Smilegate Holdings, Inc.
      Bundle ID: com.smilegate.outerplane.stove.ios
      iTunes Store Link: https://apps.apple.com/us/app/outerplane-strategy-anime/id1630880836?uo=4

       

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


      Hack Features:
      - God mode
      - OHK
      - Unlimited AP
      - No CD skill
      • 71 replies
    • Boomerang RPG v1.0.18 Cheats +3
      Modded/Hacked App: Boomerang RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.boomerang
      iTunes Store Link: https://apps.apple.com/us/app/boomerang-rpg/id6472151756?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - God mode
      - High damage
      - Fast attack
      • 18 replies
    • Boomerang RPG v1.0.18 Cheats +3
      Modded/Hacked App: Boomerang RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.boomerang
      iTunes Store Link: https://apps.apple.com/us/app/boomerang-rpg/id6472151756?uo=4


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


      Hack Features:
      - God mode
      - Fast attack
      - High damage
      • 59 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