Jump to content

H5GG Enhanced Menu Tutorial - JSPlug-in Advanced


Happy Secret

41 posts in this topic

Recommended Posts

This is my game looks like

 

public class GWEconomyModel // TypeDefIndex: 9184
{
	public int LoyaltyBonusPerDay_Gold; // 0x288
}

and my plug-in code 

 

try {
    script = initializeUnitySupport();
    aryObj = script.call("findUnityObjectOfType", ["$GWEconomyModel", true]);
    
    if (!aryObj) {
        alert("Cannot find object to cheat. Engine stopped.");
    } else if (aryObj.length == 0) {

          var GWEconomyModel = new UnityObject(aryObj[0])
          GWEconomyModel.loadFields(['DelveAttemptsPerDay'])
          var DelveAttemptsPerDay = new UnityObject(GWEconomyModel.DelveAttemptsPerDay)
          DelveAttemptsPerDay = 50

        //CharacterMotor.loadFields(['DelveAttemptsPerDay'])
        //var DelveAttemptsPerDay = aryObj[0].DelveAttemptsPerDay
        alert(aryObj.length)
        
    }

} catch (e) {
    //reset Unity Support
    gIl2cppInit = false;
    var script = initializeUnitySupport();
    alert("Unity support crashed and reset complete");
}

 

 

The result is app always crash at var GWEconomyModel = new UnityObject(aryObj[0])
the aryObj.length is always 0, but not able to load the field.

 

Can you correct my understand and educate how to fix this error?

 

 

Link to comment
Share on other sites

1 hour ago, ada1016 said:

This is my game looks like

 

public class GWEconomyModel // TypeDefIndex: 9184
{
	public int LoyaltyBonusPerDay_Gold; // 0x288
}

and my plug-in code 

 

try {
    script = initializeUnitySupport();
    aryObj = script.call("findUnityObjectOfType", ["$GWEconomyModel", true]);
    
    if (!aryObj) {
        alert("Cannot find object to cheat. Engine stopped.");
    } else if (aryObj.length == 0) {

          var GWEconomyModel = new UnityObject(aryObj[0])
          GWEconomyModel.loadFields(['DelveAttemptsPerDay'])
          var DelveAttemptsPerDay = new UnityObject(GWEconomyModel.DelveAttemptsPerDay)
          DelveAttemptsPerDay = 50

        //CharacterMotor.loadFields(['DelveAttemptsPerDay'])
        //var DelveAttemptsPerDay = aryObj[0].DelveAttemptsPerDay
        alert(aryObj.length)
        
    }

} catch (e) {
    //reset Unity Support
    gIl2cppInit = false;
    var script = initializeUnitySupport();
    alert("Unity support crashed and reset complete");
}

 

 

The result is app always crash at var GWEconomyModel = new UnityObject(aryObj[0])
the aryObj.length is always 0, but not able to load the field.

 

Can you correct my understand and educate how to fix this error?

 

 

Have you try using Unity Static Analyser to see if you can find that object? 

Normally we need to find one related on scene object that you can get object with Unity's Object.FindObjectOfType. Then use it as root to navigate to your desired object. 

In my example, I do not directly use findUnityObjectOfType to reach ItemStat. Instead, I use Gameplay.m_ItemStat to connect Gameplay object (on scene) to ItemStat(not on scene). Then I can create Unity Object on ItemStat.

On scene is a logical one. You cannot guess if it is available especially for those virtual / intangible things. 

Use Unity Static Analyser to test it out. If you can use Unity Static Analyser to directly retrieve object, that mean you can use get the object with findUnityObjectOfType.

Another note is, as whether on scene or not is important. So, be cautious on where you trigger to cheat...Some object only available on certain screen/scene. Say the some shop related object would only available when you open the shop UI in the game. 

All in all, test it with Unity Static Analyser first...confirmed you can cheat the value you want before you try to prepare the cheat with JSPlug-in. Some games create lots of copy of a game value. You might not cheat the value if you modify the wrong one. 

Link to comment
Share on other sites

9 hours ago, Happy Secret said:

Have you try using Unity Static Analyser to see if you can find that object? 

Normally we need to find one related on scene object that you can get object with Unity's Object.FindObjectOfType. Then use it as root to navigate to your desired object. 

In my example, I do not directly use findUnityObjectOfType to reach ItemStat. Instead, I use Gameplay.m_ItemStat to connect Gameplay object (on scene) to ItemStat(not on scene). Then I can create Unity Object on ItemStat.

On scene is a logical one. You cannot guess if it is available especially for those virtual / intangible things. 

Use Unity Static Analyser to test it out. If you can use Unity Static Analyser to directly retrieve object, that mean you can use get the object with findUnityObjectOfType.

Another note is, as whether on scene or not is important. So, be cautious on where you trigger to cheat...Some object only available on certain screen/scene. Say the some shop related object would only available when you open the shop UI in the game. 

All in all, test it with Unity Static Analyser first...confirmed you can cheat the value you want before you try to prepare the cheat with JSPlug-in. Some games create lots of copy of a game value. You might not cheat the value if you modify the wrong one. 

thanks @Happy Secret

Still much to learn..  I made a recording on what I am experiencing below and found two new things

1. I was able to locate GWEconomyModel as class in UA, but when I click, it always goes to something else (e.g GWGameState). Please see the clip at 17 second.  What does this tells me?  Please educate

2. I love your tutorial, but if possible, can you share what the code looks like at dump.cs that leads you made aware that instead of tracking GamePlay directly, it is Gameplay.m_ItemStat that you are interested?  Wanted to learn you thinking path as well.

 

Thank you so much

 

 

Link to comment
Share on other sites

5 hours ago, ada1016 said:

1. I was able to locate GWEconomyModel as class in UA, but when I click, it always goes to something else (e.g GWGameState). Please see the clip at 17 second.  What does this tells me?  Please educate

 

Pink Color means it can be reached in one Hop, but not directly. For those can reach directly, it will be in Yellow.

In GWGameState, if you scroll down the field list, there is one row highlight in yellow. That is the field that point to GWEconomyModel. If the address there is not bill/0x0, click on it. It will bring you to the GWEconomyModel object view.

Try edit the gold value there by clicking on the 0x288 offset, it will bring up editor. Just put in the number you want. See if it work in game, try spending gold etc, if you conclude the cheat is working fine.

Go back to your script, use GWGameState as the base object to navigate to what you need 

Link to comment
Share on other sites

On 9/1/2023 at 2:07 PM, Happy Secret said:

Pink Color means it can be reached in one Hop, but not directly. For those can reach directly, it will be in Yellow.

In GWGameState, if you scroll down the field list, there is one row highlight in yellow. That is the field that point to GWEconomyModel. If the address there is not bill/0x0, click on it. It will bring you to the GWEconomyModel object view.

Try edit the gold value there by clicking on the 0x288 offset, it will bring up editor. Just put in the number you want. See if it work in game, try spending gold etc, if you conclude the cheat is working fine.

Go back to your script, use GWGameState as the base object to navigate to what you need 

Thank you.. I had very weak sense of Unity Game development, sorry for my further more question....

Objective: change the remaining attempts of a dungen

from Dump.cs, I captured this

public class GWGameState : MonoBehaviour // TypeDefIndex: 9219
{
:
public int DelveAttempts { get; }
public int get_DelveAttempts() { }
:
}

 

my Plug.js code

try {
    script = initializeUnitySupport();
    //[STEP 2][MODIFY]Change the root object of interest, which should able to link to your other cheat object
    aryObj = script.call("findUnityObjectOfType", ["$GWGameState", true]);
    
    if (!aryObj || aryObj.length == 0) {
    }
    
    for (let i = 0; i < aryObj.length; i++) {    
        let GWGameState = new UnityObject(aryObj[i]);
        GWGameState.loadFields(['int32 DelveAttempts']);
        GWGameState.loadMethods(["int32 get_DelveAttempts()"]);
        GWGameState.DelveAttempts=5
        alert("GWGameState (" + aryObj[i].toString(16) + ") with UnityObject:" + GWGameState.DelveAttempts+"get_DelveAttempts="+GWGameState.get_DelveAttempts())
        GWGameState.loadFields(['int32 DelveAttempts']);
        alert(GWGameState.DelveAttempts)
        
    }


} catch (e) {
    //reset Unity Support
    gIl2cppInit = false;
    var script = initializeUnitySupport();
}

 

Result

GWGameState (0x13125ba80) with UnityObject: 5. get_DelveAttempts=3

Unity support crashed and reset completeTypeError: Attempting to change the setter of an unconfigurable property.

 

I believe I didn't change the object value at all, I just changed the object that I initiated, can you please educate ?

 

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, ada1016 said:
public int DelveAttempts { get; }
public int get_DelveAttempts() { }

You can see it only provide getter but there is no setter. That is why, you cannot change the Attempts. You need to find if there are other method allow you to change the Attempts.

 

Can you change attempts using Unity Object explorer or Unity Static Analyzer? 

Link to comment
Share on other sites

4 minutes ago, Happy Secret said:

You can see it only provide getter but there is no setter. That is why, you cannot change the Attempts. You need to find if there are other method allow you to change the Attempts.

 

Can you change attempts using Unity Object explorer or Unity Static Analyzer? 

No, I cannot change via US Analyser as well. But I should be able to find the address and patch it. So.. if the value cannot be change by UA, it cannot be altered by plugin?

 

 

Link to comment
Share on other sites

6 minutes ago, ada1016 said:

No, I cannot change via US Analyser as well. But I should be able to find the address and patch it. So.. if the value cannot be change by UA, it cannot be altered by plugin?

 

 

sorry, ,really interested in this but really got a lot to learn.

The more I play with this, the more unknown I realises.    

 

Q:Is this script worked like one time thing? That, the script only get executed when the code path get there, and you have to run the script before it trigger.  For some method that happened at battle, such as adjust mana when take damage, you cannot use this script as it does not work like a hook.  Is this understand correct?

 

Q: if a method has game object in parameter, how do I loadMethods it?e.g.

public void AdjustPlayerMana(int playerIndex, int[] manaCollected, ref bool activateManaMatchTraits, bool collectedFromBoard = False, bool wasMatch = False, PuzzleTroop pAdjustmentCause) { }

thank you for your time.

Link to comment
Share on other sites

9 hours ago, ada1016 said:

No, I cannot change via US Analyser as well. But I should be able to find the address and patch it. So.. if the value cannot be change by UA, it cannot be altered by plugin?

 

 

Normally, if you cannot change value with Unity Static Analyzer, you would also can do simple memory patch with JSPlug-in.

However, you could try using method call.

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

    • SuperStar SMTOWN Cheats v3.16.0 +3
      Modded/Hacked App: SuperStar SMTOWN By Dalcomsoft Inc.
      Bundle ID: kr.co.dalcomsoft.superstar.i
      iTunes Store Link: https://apps.apple.com/us/app/superstar-smtown/id890937532?uo=4


      Hack Features:
      - Auto Dance
      - Never Lose Combo


      iOS Hack Download Link: https://iosgods.com/topic/161038-superstar-smtown-cheats-v378-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 111 replies
    • Zooba: Zoo Battle Royale Game v4.37.1 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,067 replies
    • Cooking Diary Restaurant Game v2.27.0 Jailed Cheats +3
      Modded/Hacked App: Cooking Diary® Restaurant Game by MyTona Pte Ltd
      Bundle ID: com.mytonallc.cookingdiary
      iTunes Store Link: https://apps.apple.com/us/app/cooking-diary-restaurant-game/id1214763610?uo=4&at=1010lce4


      Hack Features:
      - Infinite Currencies (Get some)
      - Freeze Boosters


      iOS Hack Download Link: https://iosgods.com/topic/110310-arm64-cooking-diary-restaurant-game-v1160-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 595 replies
    • NARUTO X BORUTO NINJA VOLTAGE Cheats v11.4.1 +4 Cheats
      Modded/Hacked App: NARUTO X BORUTO NINJA VOLTAGE by BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0306
      iTunes Store Link: https://apps.apple.com/us/app/naruto-x-boruto-ninja-voltage/id1290010412?uo=4&at=1010lce4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Instant Skill
      - Infinite Mana


      iOS Hack Download Link: https://iosgods.com/topic/128155-arm64-naruto-x-boruto-ninja-voltage-cheats-v600-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 993 replies
    • Matchington Mansion v1.158.0 Jailed Cheats +3
      Modded/Hacked App: Matchington Mansion By Magic Tavern, Inc.
      Bundle ID: com.matchington.mansion
      iTunes Store Link: https://apps.apple.com/us/app/matchington-mansion/id1216575026?uo=4


      Hack Features:
      - Infinite Moves
      - Infinite Booster
      - Infinite Lives
       


      Jailbreak required hack(s): https://iosgods.com/topic/75127-arm64-matchington-mansion-cheats-all-versions-5/#


      Hack Download Link: https://iosgods.com/topic/75130-arm64-matchington-mansion-v1970-jailed-cheats-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 584 replies
    • The Simpsons™: Tapped Out v4.67.5 +3 Cheats
      Modded/Hacked App: The Simpsons™: Tapped Out By Electronic Arts Inc.
      Bundle ID: com.ea.simpsonssocial.inc2
      iTunes Store Link: https://apps.apple.com/us/app/the-simpsons-tapped-out/id497595276?uo=4


      Hack Features:
      - Free Store
      - Free Skipping
      - Extra Rewards (Receive when enter the game)


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/83384-the-simpsons%E2%84%A2-tapped-out-v4648-3-cheats-for-jailed-idevices/


      Hack Download Link: https://iosgods.com/topic/79480-the-simpsons%E2%84%A2-tapped-out-v4648-3-cheats/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 3,301 replies
    • My Fantasy: Choose Your Story v2.9.3 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: My Fantasy: Choose Your Story By GM UNICORN CORPORATION LIMITED
      Bundle ID: gmem.episode
      iTunes Store Link: https://apps.apple.com/us/app/my-fantasy-choose-your-story/id1491717191


      Hack Features:
      - Unlimited Tickets -> Use some.
      - Unlimited Diamonds -> Use some.
      - Premium Enabled


      Jailbreak required hack(s): [Mod Menu Hack] My Fantasy: Choose Your Story v2.2.5 +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
        • Thanks
        • Winner
        • Like
      • 133 replies
    • My Fantasy: Choose Your Story v2.9.3 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: My Fantasy: Choose Your Story By GM UNICORN CORPORATION LIMITED
      Bundle ID: gmem.episode
      iTunes Store Link: https://apps.apple.com/us/app/my-fantasy-choose-your-story/id1491717191
       

      Hack Features:
      - Unlimited Tickets -> Use some.
      - Unlimited Diamonds -> Use some.
      - Premium Enabled


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] My Fantasy: Choose Your Story v2.2.5 +2 Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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
      • 79 replies
    • Zombie Idle Defense v2.5.4 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Zombie Idle Defense By THAI DONG COMPANY LIMITED
      Bundle ID: com.tdcgame.idle.zombie
      iTunes Store Link: https://apps.apple.com/us/app/zombie-idle-defense/id1509441400?uo=4


      Hack Features:
      - Unlimited Cash -> Spend some.
      - Unlimited Coins -> Will increase instead of decrease.
      - Free In-App Purchases -> Toggle on via iGMenu.


      Jailbreak required hack(s): [Mod Menu Hack] Zombie Idle Defense ( All Versions ) +3 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
        • Thanks
        • Winner
        • Like
      • 25 replies
    • Zombie Idle Defense ( All Versions ) +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Zombie Idle Defense By THAI DONG COMPANY LIMITED
      Bundle ID: com.tdcgame.idle.zombie
      iTunes Store Link: https://apps.apple.com/us/app/zombie-idle-defense/id1509441400?uo=4


      Hack Features:
      - Unlimited Cash -> Spend some.
      - Unlimited Coins -> Will increase instead of decrease.
      - Free In-App Purchases


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Zombie Idle Defense v2.4.1 +3 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
        • Haha
        • Thanks
        • Like
      • 20 replies
    • MeChat v4.20.0 +1 Jailed Cheat [ Unlimited Gems ]
      Modded/Hacked App: MeChat By PlayMe Studio
      Bundle ID: world.playme.mechat
      iTunes Store Link: https://apps.apple.com/us/app/mechat/id1536157979
       

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


      Free Jailbreak required hack(s): [Mod Menu Hack] [Free] MeChat - Love Secrets v3.3.2 +1 Cheat [ Unlimited Gems ] - Free Jailbroken Cydia Cheats - iOSGods
      ViP Jailbreak required hack(s): [Mod Menu Hack] MeChat - Love Secrets v3.3.2 +1 Cheat [ Unlimited Gems ] - ViP 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
      • 617 replies
    • Good Pizza, Great Pizza v5.11.0 +2 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


      Jailbreak required hack(s): [Mod Menu Hack] Good Pizza, Great Pizza v5.5.6 +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
        • Thanks
        • Winner
        • Like
      • 68 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