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...") |
m (Remove unnecessary array of strings; Cleaned up code a bit) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
A script is used to generate the following table. To use, open the game and paste the below into the [[In-game_Functions#Using_In-game_Functions|console]]. The outputs will be copied to your clipboard automatically. | A script is used to generate the following table. To use, open the game and paste the below into the [[In-game_Functions#Using_In-game_Functions|console]]. The outputs will be copied to your clipboard automatically. After running the script, 'edit source' on [[Template:AdventureAbyssalUnlockTable]] then Ctrl+A and Ctrl+V. Look over the contents to ensure everything looks fine then save. | ||
<syntaxhighlight lang="javascript" line> | <syntaxhighlight lang="javascript" line> | ||
let results = | let results = `<noinclude>{{/doc}}[[Category:Manual Tables]]</noinclude>\n{| class="wikitable stickyHeader"\n|- class="headerRow-0"\n! Unlock\n! Cost \n! Cumulative Cost`; | ||
let totalCost = 0, cost = 0, id = 0; | let totalCost = 0, cost = 0, id = 0; | ||
while (cost < 1000000000) { | while (cost < 1000000000) { | ||
cost = game.gamemodes. | cost = game.gamemodes.getObjectByID('melvorF:Adventure').abyssalLevelCapCost.getCosts(game, id, 1)._currencies.get(game.abyssalPieces); | ||
totalCost += cost; | totalCost += cost; | ||
results | results += `\n|-\n| ${id + 1}${cost === 1000000000 ? '+' : ''}`; | ||
results += `\n| {{AP|${cost}}}`; | |||
results += `\n| {{AP|${totalCost}}}`; | |||
id++; | id++; | ||
} | } | ||
results += '\n|}';console.log(results); | |||
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set( | self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(results, 'text') : copy(results); | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 12:36, 27 October 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. After running the script, 'edit source' on Template:AdventureAbyssalUnlockTable then Ctrl+A and Ctrl+V. Look over the contents to ensure everything looks fine then save.
let results = `<noinclude>{{/doc}}[[Category:Manual Tables]]</noinclude>\n{| class="wikitable stickyHeader"\n|- class="headerRow-0"\n! Unlock\n! Cost \n! Cumulative Cost`;
let totalCost = 0, cost = 0, id = 0;
while (cost < 1000000000) {
cost = game.gamemodes.getObjectByID('melvorF:Adventure').abyssalLevelCapCost.getCosts(game, id, 1)._currencies.get(game.abyssalPieces);
totalCost += cost;
results += `\n|-\n| ${id + 1}${cost === 1000000000 ? '+' : ''}`;
results += `\n| {{AP|${cost}}}`;
results += `\n| {{AP|${totalCost}}}`;
id++;
}
results += '\n|}';console.log(results);
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(results, 'text') : copy(results);