Greasy Fork is available in English.
Adds the ability to one click travel to the next m400 assigment location
当前为
// ==UserScript==
// @name MH: M400 Hunting Helper
// @author Warden Slayer - Warden Slayer#2010
// @namespace http://greasyfork.icu/en/users/227259-wardenslayer
// @version 1.0
// @description Adds the ability to one click travel to the next m400 assigment location
// @include https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @include http://www.mousehuntgame.com/*
// @include https://www.mousehuntgame.com/*
// @connect http://www.mousehuntgame.com/*
// @connect https://www.mousehuntgame.com/*
// ==/UserScript==
$(document).ready(function() {
const debug = localStorage.getItem('ws.debug');
if (debug == true) {
console.log('M400 Hunting Helper');
};
});
$(document).on('click', '.campPage-tabs-tabHeader.quests', function() {
setTimeout(function() {
$('.campPage-quests-footer-smash').removeAttr("href").removeAttr("onclick");
}, 500);
});
$(document).on('click', '.campPage-quests-objective-container:not(".locked")', function() {
const debug = localStorage.getItem('ws.debug');
if ($('.campPage-tabs-tabHeader.quests').hasClass('active')) {
if ($('.campPage-quests-title').text() == 'Track down the elusive M400') {
const location = $(this).find('.campPage-quests-objective-task').text().split('in ')[1].replace('the ','')
convertNameToClass(location)
}
}
});
function convertNameToClass(locationName) {
const debug = localStorage.getItem('ws.debug');
let locationTag = "";
if (locationName == 'Fiery Warpath') {
locationTag = 'desert_warpath';
} else if (locationName == 'Seasonal Garden') {
locationTag = 'seasonal_garden';
} else if (locationName == 'Meadow') {
locationTag = 'meadow';
} else if (locationName == 'Town of Gnawnia') {
locationTag = 'town_of_gnawnia';
} else if (locationName == 'Windmill') {
locationTag = 'windmill';
} else if (locationName == 'Harbour') {
locationTag = 'harbour';
} else if (locationName == 'Mountain') {
locationTag = 'mountain';
} else if (locationName == "King's Arms") {
locationTag = 'kings_arms';
} else if (locationName == 'Tournament Hall') {
locationTag = 'tournament_hall';
} else if (locationName == "King's Gauntlet") {
locationTag = 'kings_gauntlet';
} else if (locationName == 'Calm Clearing') {
locationTag = 'calm_clearing';
} else if (locationName == 'Great Gnarled Tree') {
locationTag = 'great_gnarled_tree';
} else if (locationName == 'Lagoon') {
locationTag = 'lagoon';
} else if (locationName == 'Laboratory') {
locationTag = 'laboratory';
} else if (locationName == 'Mousoleum') {
locationTag = 'mousoleum';
} else if (locationName == 'Town of Digby') {
locationTag = 'town_of_digby';
} else if (locationName == 'Bazaar') {
locationTag = 'bazaar';
} else if (locationName == 'Toxic Spill') {
locationTag = 'pollution_outbreak';
} else if (locationName == 'Training Grounds') {
locationTag = 'training_grounds';
} else if (locationName == 'Dojo') {
locationTag = 'dojo';
} else if (locationName == 'Meditation Room') {
locationTag = 'meditation_room';
} else if (locationName == 'Pinnacle Chamber') {
locationTag = 'pinnacle_chamber';
} else if (locationName == 'Catacombs') {
locationTag = 'catacombs';
} else if (locationName == 'Forbidden Grove') {
locationTag = 'forbidden_grove';
} else if (locationName == 'Acolyte Realm') {
locationTag = 'acolyte_realm';
} else if (locationName == 'Cape Clawed') {
locationTag = 'cape_clawed';
} else if (locationName == 'Elub Shore') {
locationTag = 'elub_shore';
} else if (locationName == 'Nerg Plains') {
locationTag = 'nerg_plains';
} else if (locationName == 'Derr Dunes') {
locationTag = 'derr_dunes';
} else if (locationName == 'Jungle of Dread') {
locationTag = 'jungle_of_dread';
} else if (locationName == 'Dracano') {
locationTag = 'dracano';
} else if (locationName == "Balack's Cove") {
locationTag = 'balacks_cove';
} else if (locationName == 'Claw Shot City') {
locationTag = 'claw_shot_city';
} else if (locationName == 'Gnawnian Express Station') {
locationTag = 'train_station';
} else if (locationName == 'Fort Rox') {
locationTag = 'fort_rox';
} else if (locationName == 'S.S. Huntington IV') {
locationTag = 'ss_huntington_ii';
} else if (locationName == "Zugzwang's Tower") {
locationTag = 'zugzwang_tower';
} else if (locationName == 'Crystal Library') {
locationTag = 'zugzwang_library';
} else if (locationName == 'Slushy Shoreline') {
locationTag = 'slushy_shorelinee';
} else if (locationName == 'Iceberg') {
locationTag = 'iceberg';
} else if (locationName == 'Sunken City') {
locationTag = 'sunken_city';
} else if (locationName == 'Muridae Market') {
locationTag = 'desert_city';
} else if (locationName == 'Living Garden') {
locationTag = 'desert_oasis';
} else if (locationName == 'Twisted Garden') {
locationTag = 'desert_oasis';
} else if (locationName == 'Lost City') {
locationTag = 'lost_city';
} else if (locationName == 'Cursed City') {
locationTag = 'lost_city';
} else if (locationName == 'Sand Dunes') {
locationTag = 'sand_dunes';
} else if (locationName == 'Sand Crypts') {
locationTag = 'sand_dunes';
}
if (debug == true) {
console.log(locationName,locationTag)
}
app.pages.TravelPage.travel(locationTag);
}
$(document).on('click', '.campPage-quests-footer-smash', function() {
if (confirm("Smash Your m400 Research Assignment?")) {
// change this to something to test with
let smashIt = 'essence_b_crafting_item';
//Uncomment to make live
//smashIt = 'library_m400_research_quest_item';
hg.utils.UserInventory.smashItem(smashIt,1,function (resp) {;})
}
})