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

    • Sheep Dash-Farm Animal Escape (Auto Update) Jailed Cheats +3
      Modded/Hacked App: Sheep Dash-Farm Animal Escape By WINLON PTE. LTD.
      Bundle ID: com.sheeprun.chick.farm
      App Store Link: https://apps.apple.com/us/app/sheep-dash-farm-animal-escape/id6754862574?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 Coins
      - Infinite Boosters
      - No Ads

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/214481-sheep-dash-farm-animal-escape-auto-update-jailed-cheats-3/
        • Winner
        • Like
      • 0 replies
    • Dragon's Rush +3++ Mods [ Damage & Defence ]
      Mod APK Game Name: Dragon's Rush By TsyaTsya
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.tsyatsya.dragonsrush

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Currencies -> Earn or spend some.
        • Haha
        • Like
      • 0 replies
    • Disney Magic Match 3D +4 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Disney Magic Match 3D By Jam City, Inc.
      Bundle ID: com.jamcity.pdt
      App Store Link: https://apps.apple.com/us/app/disney-magic-match-3d/id6468690398?uo=4

       


      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Lives
      - Unlimited Pre-Game Boosters
      - Unlimited In-Game Boosters
        • Like
      • 8 replies
    • Vampire Survivors +4 Mods [ Damage & Defence ]
      Mod APK Game Name: Vampire Survivors By Poncle
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.poncle.vampiresurvivors

       

      🤩 Hack Features

      - Damage Multiplier 
      - Defence Multiplier
      - God Mode
      - Unlock All Weapons -> Head over to Options and toggle the Sounds button.
        • Agree
        • Thanks
        • Winner
        • Like
      • 2 replies
    • Vampire Survivors +4 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Vampire Survivors By Poncle
      Bundle ID: com.poncle.VampireSurvivors
      iTunes Store Link: https://apps.apple.com/us/app/vampire-survivors/id6444525702
       

      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - All Weapons Unlocked -> Head over to Options and toggle the Sounds button.


      Jailbreak required hack(s): [Mod Menu Hack] Vampire Survivors v1.6.104 +5 Cheats [ Damage & Defence ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 157 replies
    • Idle Gas Station Tycoon +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Idle Gas Station Tycoon By Lime Games LLC
      Bundle ID: com.limegames.idlegas
      iTunes Store Link: https://apps.apple.com/us/app/idle-gas-station-tycoon/id6446057753?uo=4


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Gems -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Idle Gas Station Tycoon v1.2 +2 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Like
      • 6 replies
    • Loot Heroes: Fantasy RPG Games +28 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Loot Heroes: Fantasy RPG Games By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes-fantasy-rpg-games/id6642699678?uo=4


      Hack Features:
      - Freeze Everything -> Currencies, Hero Cards, Hero Skill Points will all freeze.
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - No Attack Delay
      - All Critical Hits
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - Nickname Edit Unlocked
      - No Nickname Filter
      - No Guild Name Filter
      - No Dash Cooldown
      - Unlimited Boosters
      - Auto Play
      - No Camp Upgrade Cost
      - Unlimited Bolts
      - No Ads

      VIP
      - Unlimited Everything -> Currencies, Hero Cards, Hero Skill Points will all increase instead of decrease.
      - Currency Modifier -> Earn or spend some.
      - Unlimited Hero Cards -> Earn some.
      - Unlimited Hero Skill Points -> Earn some.
      - Trophy Modifier -> Earn or lose some to stick to the leaderboard.
      - Guild Score Modifier -> Earn some.
      - Unlimited Event Score -> Earn some.
      - Max Hero Mastery Level
      - Auto Win
      - Battle Pass Unlocked
      - VIP Enabled
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 248 replies
    • Merge City - Travel & Story v1.3.1 [ +3 APK MOD ] Currency Max
      Mod APK Game Name: Merge City - Travel & Story
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.bigcool.puzzle.merge.city&hl=en

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Cash
      - Energy / Buy With Gold
      • 0 replies
    • Merge City: Travel & Story v1.3.1 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Merge City: Travel & Story By Hangzhou Mengku Technology Co., Ltd.
      Bundle ID: com.bigcool.puzzle.merge.city
      App Store Link: https://apps.apple.com/us/app/merge-city-travel-story/id6760990504?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Cash
      - Unlimited Energy
      • 2 replies
    • Merge City: Travel & Story v1.3.1 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Merge City: Travel & Story By Hangzhou Mengku Technology Co., Ltd.
      Bundle ID: com.bigcool.puzzle.merge.city
      App Store Link: https://apps.apple.com/us/app/merge-city-travel-story/id6760990504?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Cash
      - Unlimited Energy
      • 1 reply
    • Idle Berserker Legend Of Kali +2 Mods [ Damage + More ]
      Mod APK Game Name: Idle Berserker Legend Of Kali By A1GAMES
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.a1gamesstudio.berserker

       

      🤩 Hack Features

      - Damage Multiplier
      - No Skill Cooldown
      • 1 reply
    • Backpack Legends Adventure RPG +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Backpack Legends Adventure RPG By ONDI TECHNOLOGY JSC
      Bundle ID: com.ondi.pack.adventure
      App Store Link: https://apps.apple.com/us/app/backpack-legends-adventure-rpg/id6755376569?uo=4

       

      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
        • Thanks
        • Winner
        • Like
      • 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