Template:AdventureAbyssalUnlockTable/doc: Difference between revisions

From Melvor Idle
(Created page with "A script is used to generate the following table. To use, open the game and paste the below into the console. The outputs will be copied to your clipboard automatically. Edit source on Template:AdventureAbyssalUnlockTable then Ctrl+A and Ctrl+V. <syntaxhighlight lang="javascript" line> let results = [`<noinclude>{{/doc}}Category:Manual Tables</noinclude>\n{| class="wikitable sortable stickyHeader"\n|-class="headerRow...")
(No difference)

Revision as of 15:41, 19 July 2024

A script is used to generate the following table. To use, open the game and paste the below into the console. The outputs will be copied to your clipboard automatically. Edit source on Template:AdventureAbyssalUnlockTable then Ctrl+A and Ctrl+V.

let results = [`<noinclude>{{/doc}}[[Category:Manual Tables]]</noinclude>\n{| class="wikitable sortable stickyHeader"\n|-class="headerRow-0"\n!|Unlock!!Cost!!Cumulative Cost`];
let totalCost = 0, cost = 0, id = 0;
while (cost < 1000000000) {
	cost = game.gamemodes.allObjects[3].abyssalLevelCapCost.getCosts(game, id, 1)._currencies.get(game.abyssalPieces);
	totalCost += cost;
	results.push(`|${id+1}${cost === 1000000000 ? '+' : ''}||{{AP|${cost}}}||{{AP|${totalCost}}}`);
	id++;
}
let output = ``;results.forEach((alias, i) => output += alias + (i === results.length - 1 ? '\n|}' : '\n|-\n'));console.log(output);
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(output, 'text') : copy(output);