Last active
March 6, 2024 04:24
-
-
Save 04Slash/7a7a46974ddb06c53d259241b81d4195 to your computer and use it in GitHub Desktop.
Melvor Idle 100% Completion Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 100% Completion Script | |
// Temporarily disable notifyPlayer to improve script performance | |
let oldNotifyPlayer = notifyPlayer; | |
notifyPlayer = function() {} | |
// Complete Tutorial before we start | |
game.tutorial.completeTutorial(); | |
// Add Money, Slayer Coins, Prayer Points | |
game.gp.add(1000000000000); | |
game.slayerCoins.add(1000000000000); | |
game.combat.player.addPrayerPoints(4000000000); | |
// 100% Items | |
game.items.forEach((item) => game.bank.addItem(item, 6969696969, false, true, true)); | |
// 100% Skills | |
game.skills.forEach((skill) => { | |
// Cap every Skill to 120 | |
if (game.currentGamemode.allowDungeonLevelCapIncrease) | |
skill.setLevelCap(120); | |
skill.setUnlock(true); | |
skill.setXP(exp.level_to_xp(120)+1); | |
// Unlock all Relics | |
if (game.currentGamemode.allowAncientRelicDrops && skill.hasAncientRelics) { | |
skill.ancientRelics.forEach(({relic}) => { | |
if (!skill.ancientRelicsFound.has(relic)) | |
skill.locateAncientRelic(relic); | |
}); | |
} | |
}); | |
// 100% Mastery | |
game.masterySkills.forEach((skill) => { | |
skill.actions.forEach((action) => { | |
if (action.id === 'melvorF:Lemon_Cake') return; | |
skill.addMasteryXP(action, exp.level_to_xp(99)+1); | |
}) | |
}); | |
// 100% Mastery Pools | |
game.masterySkills.forEach((skill) => { skill.addMasteryPoolXP(1000000000) }); | |
// 100% Pets | |
game.pets.forEach((pet) => { game.petManager.unlockPet(pet) }); | |
// 100% Constellations | |
game.astrology.actions.forEach((constellation) => { | |
constellation.standardModsBought = [8, 8, 8]; | |
constellation.uniqueModsBought = [5, 5, 5]; | |
}); | |
// 100% Summoning Marks | |
game.summoning.actions.forEach((mark) => { | |
game.summoning.marksUnlocked.set(mark, 61); | |
game.summoning.renderQueue.markCount.add(mark); | |
game.summoning.renderQueue.markState.add(mark); | |
}); | |
game.summoning.renderMarkProgress(); | |
game.summoning.renderMarkState(); | |
// 100% Dungeons | |
game.dungeons.forEach((dungeon) => { game.combat.player.manager.setDungeonCompleteCount(dungeon, 420) }); | |
// 100% Monsters | |
let stats = new StatTracker(); | |
stats.add(8, 69420); | |
stats.add(2, 69420); | |
game.monsters.forEach((monsters) => { game.stats.Monsters.statsMap.set(monsters, stats) }); | |
// 100% Cartography | |
game.cartography.surveyWholeMap(); | |
game.cartography.activeMap.forEach((hex) => { | |
// Collect all POI rewards | |
if (hex.hasPOI && !hex.pointOfInterest.isDiscovered) | |
game.cartography.discoverPOI(hex.pointOfInterest); | |
hex.addSurveyXP(864); | |
game.cartography.onHexMastery(hex); | |
game.cartography.renderQueue.hexProgress.add(hex); | |
game.cartography.renderQueue.hexBackground.add(hex); | |
}); | |
// Donate every item to the Museum | |
if (cloudManager.hasAoDEntitlement) | |
game.archaeology.museum.artefacts.forEach((_, item) => { game.archaeology.donateItemToMuseum(item); }); | |
// Fully build Township | |
if (!game.township.townData.townCreated) { | |
game.township.selectWorship(game.township.worships.getObjectByID('melvorF:Aeris')); | |
game.township.confirmTownCreation(); | |
} | |
game.township.buildings.forEach((building) => { | |
let buildingBuilt; | |
building.biomes.forEach((biome) => { | |
let qtyToBuild = Math.min(game.township.getBuildingCountRemainingForLevelUp(building, biome), 100); | |
if (qtyToBuild <= 0) return; | |
buildingBuilt = true; | |
game.township.addBuildingToBiome(biome, building, qtyToBuild); | |
if (biome.getBuildingCount(building) >= building.maxUpgrades) { | |
townshipUI.performBuildingUpgradedUIChanges(building); | |
if (building.upgradesTo !== undefined) | |
game.township.addBuildingToBiome(biome, building.upgradesTo, 0); | |
} | |
}); | |
if (!buildingBuilt) return; | |
// Update everything | |
game.township.updateBuildingModifierData(building);game.township.updateForBuildingChange();townshipUI.updateBuilding(building);townshipUI.updateBuildingTotalModifierElement(building);townshipUI.updateTraderStatus();townshipUI.updateBuildingUpgradeProgressText(building);townshipUI.updateBuildingUpgradeProgress(building);game.township.game.township.renderQueue.activeTaskCategory = true;game.township.tasks.checkForTaskReady(true);game.township.computeTownStats();game.township.onBuildingChange(); | |
}); | |
// Complete all Townnship Tasks | |
game.township.tasks.tasks.forEach((task) => { game.township.tasks.completeTask(task, false, true) }); | |
// Buyout the shop | |
game.shop.updateBuyQuantity(69400); | |
game.shop.purchases.forEach((purchase) => { game.shop.buyItemOnClick(purchase, true) }); | |
// Finalization | |
game.completion.updateAllCompletion(); | |
// Remove all the modals from the queue, excluding the 100% Game Completion ones | |
for (let i = modalQueue.length - 1; 0 <= i; i--) { | |
if (modalQueue[i].imageUrl.includes('skills') || modalQueue[i].title === 'Pet Unlocked!' || modalQueue[i].imageUrl.includes('mastery_header') || modalQueue[i].titleText === 'Point of Interest Discovered!' || modalQueue[i].title === 'Ancient Relic Located' || modalQueue[i].title === 'Museum Reward Unlocked!') | |
modalQueue.splice(i, 1); | |
} | |
// Restore notifyPlayer | |
notifyPlayer = oldNotifyPlayer; | |
//location.reload(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment