Skip to content

Knowledgebase

Ben Loll edited this page Feb 3, 2022 · 5 revisions

Global User Object

Every mh user has a user object that stores all of the data associated with your account's identity. When you are logged in you can type these things into to console.

  • user > returns a JSON object of all the data fields.
  • user.gold > on the other hand would only return the value for how much gold you have
  • user.sn_user_id > is your social network user ID. This is used in other endpoints to get data (not hunter ID)
  • user.user_id > this is your hunter ID

User Quest Object

Part of the global user object contains data about your current quests. The data/action available varies by the location you are currently hunting in.

As an example, when hunting in the floating islands, this endpoint would return true/false if your bottle wind was enabled or not. There are even endpoints to toggle things like bottled wind

  • user.quests.QuestFloatingIslands.hunting_site_atts.is_fuel_enabled

hg.utils

This is a large collection of endpoints that can perform actual in-game actions in addition to getting data. Just type in hg.utils and see the list.

The global user object noted above can also be retrieved using this hg.util

  • hg.utils.User.getUserData([user.sn_user_id], ['gold','points'], function (data) { console.log(data);}) > retuns the user object including the requested fields

This util gets a list of every trap you own and the associated data for each one

  • hg.utils.UserInventory.getItemsByClass('weapon',true,function (resp) { console.log(resp);})

This util gets a list of every mouse in the game and the associated data for each one

  • hg.utils.MouseUtil.getMouseNames(function (resp) { console.log(resp);})

This util gets a list of every mouse you have caught and returns your catches/misses for each

  • hg.utils.MouseUtil.getHuntingStats(function(data) {console.log(data);})

This util arms a given cheese based on the cheese ID supplied

  • hg.utils.TrapControl.setBait(1010).go();

app.pages

This is another list of endpoints that can perform actual in-game actions in addition to getting data. Just type app.pages and see the list.

This endpoint can be called to travel to any destination

  • app.pages.TravelPage.travel($(this).attr('destination'));

Clone this wiki locally