Jump to content

2 posts in this topic

Recommended Posts

Posted

So i've been working on a mod menu for a couple days and I've tried working with instance variables but it just won't work, im trying to mod Pixel Gun 3D which is a Unity game and i've tested this on a jailbroken device

here is the HOOK function

uint64_t getOffset(uint64_t offset){
    return (long)_dyld_get_image_header(0) + offset;
}

#define HOOK(offset, ptr, orig) MSHookFunction((void *)getOffset(offset), (void *)ptr, (void **)&orig)

i also made sure i defined all the variables

int selectedBullet = 0;
bool shootBullet = false;

and here is the code for the hook

void(*oldWeaponSounds)(void* obj);
void WeaponSounds(void* obj){
    if(obj != nullptr){
        if (silentaim) {
            *(bool*)((uint64_t) obj + 0x191) = true; // isRoundMelee
            *(float*)((uint64_t) obj + 0x184) = 9999.0f; // radiusRoundMelee
        }


        if (shootBullet) {
            if (selectedBullet == 0) {
                *(bool*)((uint64_t) obj + 0x12B) = true; // bazooka
            } else if (selectedBullet == 1) { // laser
                *(bool*)((uint64_t) obj + 0x1BC) = true; // railgun
            } else if (selectedBullet == 2) { // shotgun
                *(bool*)((uint64_t) obj + 0x1A6) = true; // isShotgun
            } else if (selectedBullet == 3) { // harpoon
                *(bool*)((uint64_t) obj + 0x2A4) = true; // harpoon
            } else if (selectedBullet == 4) { // dash
                *(bool*)((uint64_t) obj + 0x294) = true; // isDash
            } else if (selectedBullet == 5) { // exploding bullets
                *(bool*)((uint64_t) obj + 0x1A5) = true; // bulletExplode
            }
        }
    oldWeaponSounds(obj);
    }
}

void Hooks() {
    HOOK(0x2DC1EB0, WeaponSounds, oldWeaponSounds);
}

the first parameter of the HOOK function is the Update function for the WeaponSounds class

	[FieldOffset(Offset = "0x191")]
	public bool isRoundMelee;
	[FieldOffset(Offset = "0x184")]
	public float radiusRoundMelee;

	[丌丈专三丌丞丈东丏("Bazooka")]
	public bool bazooka;
and so on
[Address(RVA = "0x2DC1EB0", Offset = "0x2DC1EB0", VA = "0x2DC1EB0")]
private void Update()
{
}

then I call the Hooks function at where the ImGui menu is drawn 

- (void)draw

{
    [self drawMenu];
    Hooks();
    [self nono];
    [self nosee];
}

and heres the code for the switch:

        if (ImGui::BeginTabItem(ENCRYPT("Gameplay"))) {
            const char* bulletTypes[] = { "Rocket", "Laser", "Shotgun", "Harpoon", "Dash", "Exploding Bullets"};

            ImGui::Text(ENCRYPT("Gameplay Mods"));

            ImGui::Checkbox("Silent Aim", &silentaim);

            ImGui::Checkbox("Shoot bullet: ", &shootBullet); ImGui::SameLine();
            if (ImGui::Combo(" ", &selectedBullet, bulletTypes, IM_ARRAYSIZE(bulletTypes))) {
                char buffer[512];
                snprintf(buffer, 512, "Index: %d\nSelected item: %s", selectedBullet, bulletTypes[selectedBullet]);
                showAlert("Info", buffer);
            }

            if (shootBullet && !shootBulletAlertShown) {
                char buffer[512];
                snprintf(buffer, 512, "Index: %d\nSelected item: %s", selectedBullet, bulletTypes[selectedBullet]);
                showAlert("Info", buffer);
                shootBulletAlertShown = true;
            }
            if (!shootBullet && shootBulletAlertShown) {
                shootBulletAlertShown = false;
            }

            ImGui::EndTabItem();
        }

Im 101% sure the offset to the update function is correct as i double checked multiple times and when the checkbox is ticked, nothing happens

IMG_9905.png

i also made sure the instance variables are correct and double checked multiple times, im not sure what i did wrong and would appreciate it if anyone knows whats going on with the code and please let me know in the replies if you need any more details the mod im working on is in objective c++ and uses the dear imgui from ocornut

  • Like 2

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

    • Zooba: Zoo Battle Royale Game v6.0.0 Jailed Cheats +2
      Modded/Hacked App: Zooba: Zoo Battle Royale Games By Wildlife Studios Limited
      Bundle ID: com.fungames.battleroyale
      iTunes Store Link: https://apps.apple.com/us/app/zooba-zoo-battle-royale-games/id1459402952?uo=4


      Hack Features:
      - Map Hacks
      - Allow Shoot in Water


      Jailbreak required hack(s): https://iosgods.com/topic/131104-arm64-zooba-zoo-battle-royale-game-cheats-all-versions-2/


      iOS Hack Download Link: https://iosgods.com/topic/131134-arm64-zooba-zoo-battle-royale-game-v320-jailed-cheats-2/
      • 1,369 replies
    • Cat Game - The Cats Collector! v1.98.29 Jailed Cheats +2
      Modded/Hacked App: Cat Game - The Cats Collector! By MinoMonsters Inc.
      Bundle ID: com.minogames.cats.beta
      App Store Link: https://apps.apple.com/us/app/cat-game-the-cats-collector/id1125011102?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Infinite Currencies

       

      Jailbroken Hack: https://iosgods.com/topic/105377-cat-game-the-cats-collector-cheats-auto-update-1/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/105379-cat-game-the-cats-collector-v19829-jailed-cheats-2/
      • 126 replies
    • [ ReDive TW ] 超異域公主連結!Re:Dive Cheats v5.5.0 +2
      Modded/Hacked App: 超異域公主連結!Re:Dive By So-net Entertainment Taiwan Limited
      Bundle ID: tw.sonet.princessconnect
      iTunes Store Link: https://apps.apple.com/tw/app/%E8%B6%85%E7%95%B0%E5%9F%9F%E5%85%AC%E4%B8%BB%E9%80%A3%E7%B5%90-re-dive/id1390473317?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

      - Multiply Attack
      - Multiply Defense

       

      Non-Jailbroken Hack: https://iosgods.com/topic/186660-redive-tw-%E8%B6%85%E7%95%B0%E5%9F%9F%E5%85%AC%E4%B8%BB%E9%80%A3%E7%B5%90%EF%BC%81redive-hack/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/134431-redive-tw-%E8%B6%85%E7%95%B0%E5%9F%9F%E5%85%AC%E4%B8%BB%E9%80%A3%E7%B5%90%EF%BC%81redive-cheats-v500-3/
      • 285 replies
    • Match Factory! v1.59.46 +3 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Match Factory! By Peak Games
      Bundle ID: net.peakgames.match
      iTunes Store Link: https://apps.apple.com/gb/app/match-factory/id6449094229?uo=4


      Hack Features:
      - Unlimited Everything -> Will increase instead of decrease. Use coins for energy.
      - Auto Win -> Pick up an item.
      - Unlimited Time -> Will not decrease.
      • 73 replies
    • Good Pizza, Great Pizza v5.43.0 +8 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Good Pizza, Great Pizza By TAPBLAZE, LLC
      Bundle ID: com.tapblaze.pizzabusiness
      iTunes Store Link: https://apps.apple.com/us/app/good-pizza-great-pizza/id911121200?uo=4


      Hack Features:
      - Unlimited Cash
      - Unlimited Diamonds
      - Unlimited Ad Tickets

      VIP
      -̶ ̶U̶n̶l̶i̶m̶i̶t̶e̶d̶ ̶P̶i̶z̶z̶a̶ ̶P̶a̶s̶s̶ ̶T̶o̶k̶e̶n̶s̶
      ̶-̶ ̶C̶h̶e̶f̶ ̶P̶a̶s̶s̶ ̶U̶n̶l̶o̶c̶k̶e̶d̶
      ̶-̶ ̶M̶a̶x̶ ̶P̶i̶z̶z̶a̶ ̶P̶a̶s̶s̶ ̶L̶e̶v̶e̶l̶
       ̶-̶ ̶S̶t̶a̶r̶t̶e̶r̶ ̶B̶u̶n̶d̶l̶e̶ ̶U̶n̶l̶o̶c̶k̶e̶d̶
      - Unlimited Paint Tickets
      - Unlimited Event Currency
      - Max Event Level
      - Unlimited Event Score
      - All Achievements Completed
      • 453 replies
    • Disney Emoji Blitz Game v74.0.0 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Disney Emoji Blitz Game By Jam City, Inc.
      Bundle ID: com.disney.emojimatch
      iTunes Store Link: https://apps.apple.com/us/app/disney-emoji-blitz-game/id1017551780
       

      Hack Features:
      - Unlimited Currencies -> Earn some.


      Jailbreak required hack(s): https://iosgods.com/topic/168886-disney-emoji-blitz-game-all-versions-1-cheats-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 224 replies
    • Tsukuyomi: The Divine Hunter v1.1.3 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Tsukuyomi: The Divine Hunter By COLOPL, Inc.
      Bundle ID: jp.colopl.mask
      App Store Link: https://apps.apple.com/us/app/tsukuyomi-the-divine-hunter/id6505051119?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 12 replies
    • EverMerge: Merge & Match Game v1.67.5 +30 Jailed Cheats [ Cheat Menu ]
      Modded/Hacked App: EverMerge: Merge & Match Game By Big Fish Games, Inc
      Bundle ID: com.bigfishgames.mergetalesios
      iTunes Store Link: https://apps.apple.com/us/app/evermerge-merge-match-game/id1446344746?uo=4

       


      🚀 Hack Features

      - Cheat Menu -> Head into Settings and toggle the Support button.
      • 9 replies
    • Dungeon's Call: Into the Abyss v1.0.7 +4 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dungeon's Call: Into the Abyss By Satoshi Masui
      Bundle ID: com.seg-soft.dungeonscall
      iTunes Store Link: https://apps.apple.com/us/app/dungeons-call-into-the-abyss/id6739310989?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Gems -> Will increase instead of decrease.
      • 8 replies
    • Arcane Knight : Idle RPG v1.0.45 +6 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Arcane Knight : Idle RPG By DongSik Moon
      Bundle ID: com.eastmoon.gk2live
      App Store Link: https://apps.apple.com/us/app/arcane-knight-idle-rpg/id6744289685?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Move Speed Multiplier
      - Freeze Coins
      - Freeze Gems
      • 14 replies
    • Super Marine Defense v1.4.0 +1 Jailed Cheat [ Damage ]
      Modded/Hacked App: Super Marine Defense By Game Duo Co.,Ltd.
      Bundle ID: net.gameduo.smd
      App Store Link: https://apps.apple.com/us/app/super-marine-defense/id6749679878?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      • 2 replies
    • OnceWorld v1.2.1 +2 Jailed Cheats [ Damage + More ]
      Modded/Hacked App: OnceWorld By PONIX LLC
      Bundle ID: work.ponix.onceworld
      App Store Link: https://apps.apple.com/us/app/onceworld/id6753948618?uo=4

       


      🤩 Hack Features

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