User:Slash: Difference between revisions
From Melvor Idle
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
|style="text-align:center;"| {{PrayerIcon|Savagery|size=16}} • {{PrayerIcon|Menace|size=16}} • {{PrayerIcon|Volatility|size=16}} • {{PrayerIcon|Endure|size=16}} • {{PrayerIcon|Focused|size=16}} • {{PrayerIcon|Elusion|size=16}} • {{PrayerIcon|Ravage|size=16}} • {{PrayerIcon|Ferocity|size=16}} • {{PrayerIcon|Terrorize|size=16}} • {{PrayerIcon|Instability|size=16}} • {{PrayerIcon|Piercer|size=16}} • {{PrayerIcon|Drain|size=16}} • {{PrayerIcon|Vanish|size=16}} • {{PrayerIcon|Renewal|size=16}} • {{PrayerIcon|Cruelty|size=16}} • {{PrayerIcon|Opress|size=16}} • {{PrayerIcon|Devastation|size=16}} • {{PrayerIcon|Melee Shroud|size=16}} • {{PrayerIcon|Ranged Shroud|size=16}} • {{PrayerIcon|Magic Shroud|size=16}} • {{PrayerIcon|Evisceration|size=16}} • {{PrayerIcon|Deadshot|size=16}} • {{PrayerIcon|Brutality|size=16}} • {{PrayerIcon|Tyranny|size=16}} • {{PrayerIcon|Obliteration|size=16}} • {{PrayerIcon|Dissipation|size=16}} • {{PrayerIcon|Meticulous|size=16}} • {{PrayerIcon|Siphon|size=16}} • {{PrayerIcon|Dispersion|size=16}} • {{PrayerIcon|Unrelenting|size=16}} • {{PrayerIcon|Annihilation|size=16}} | |style="text-align:center;"| {{PrayerIcon|Savagery|size=16}} • {{PrayerIcon|Menace|size=16}} • {{PrayerIcon|Volatility|size=16}} • {{PrayerIcon|Endure|size=16}} • {{PrayerIcon|Focused|size=16}} • {{PrayerIcon|Elusion|size=16}} • {{PrayerIcon|Ravage|size=16}} • {{PrayerIcon|Ferocity|size=16}} • {{PrayerIcon|Terrorize|size=16}} • {{PrayerIcon|Instability|size=16}} • {{PrayerIcon|Piercer|size=16}} • {{PrayerIcon|Drain|size=16}} • {{PrayerIcon|Vanish|size=16}} • {{PrayerIcon|Renewal|size=16}} • {{PrayerIcon|Cruelty|size=16}} • {{PrayerIcon|Opress|size=16}} • {{PrayerIcon|Devastation|size=16}} • {{PrayerIcon|Melee Shroud|size=16}} • {{PrayerIcon|Ranged Shroud|size=16}} • {{PrayerIcon|Magic Shroud|size=16}} • {{PrayerIcon|Evisceration|size=16}} • {{PrayerIcon|Deadshot|size=16}} • {{PrayerIcon|Brutality|size=16}} • {{PrayerIcon|Tyranny|size=16}} • {{PrayerIcon|Obliteration|size=16}} • {{PrayerIcon|Dissipation|size=16}} • {{PrayerIcon|Meticulous|size=16}} • {{PrayerIcon|Siphon|size=16}} • {{PrayerIcon|Dispersion|size=16}} • {{PrayerIcon|Unrelenting|size=16}} • {{PrayerIcon|Annihilation|size=16}} | ||
|} | |} | ||
<syntaxhighlight lang="javascript" line> | |||
let results = [`{| class="wikitable navigation-not-searchable" style="margin:auto; clear:both; width: 100%"\n! Prayers !! DLC !! {{Skill|Prayer|Prayers}}`], | |||
nsMap = new Map([['melvorF', ['Standard', '{{Melvor}}']], ['melvorTotH', ['', '{{TotH}}']], ['melvorAoD', ['Unholy', '{{AoD}}']], ['melvorItA', ['Abyssal', '{{ItA}}']]]); | |||
game.prayers.namespaceMaps.forEach((prayers, ns) => { | |||
let bookResults = '', | |||
nsValues = nsMap.get(ns), | |||
rowSpan = ns === 'melvorF' ? 'rowspan=2' : '', | |||
style = ns === 'melvorTotH' ? `|| ${nsValues[1]}` : `! style="text-align:center;"${rowSpan}| ${nsValues[0]}\n|| ${nsValues[1]}` | |||
results.push(`\n|-\n${style}\n|style="text-align:center;"|`); | |||
prayers.forEach(prayer => { | |||
bookResults += ` {{PrayerIcon|${prayer.name}|size=16}} •`; | |||
}); | |||
bookResults = bookResults.slice(0, bookResults.length - 2); results.push(bookResults); | |||
}); | |||
let outputString = ``; | |||
results.forEach(str => outputString += str); | |||
outputString += '\n|}'; | |||
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(outputString, 'text') : copy(outputString); | |||
console.log(outputString); | |||
</syntaxhighlight> |
Revision as of 21:15, 5 July 2024
Prayers | DLC | Error creating thumbnail: File missing Prayers
|
---|---|---|
Standard | Error creating thumbnail: File missing Thick Skin • Error creating thumbnail: File missing Burst of Strength • Error creating thumbnail: File missing Clarity of Thought • Error creating thumbnail: File missing Sharp Eye • Error creating thumbnail: File missing Mystic Will • Error creating thumbnail: File missing Rock Skin • Error creating thumbnail: File missing Superhuman Strength • Error creating thumbnail: File missing Improved Reflexes • Error creating thumbnail: File missing Rapid Heal • Error creating thumbnail: File missing Protect Item • Error creating thumbnail: File missing Hawk Eye • Error creating thumbnail: File missing Mystic Lore • Error creating thumbnail: File missing Steel Skin • Error creating thumbnail: File missing Ultimate Strength • Error creating thumbnail: File missing Incredible Reflexes • Error creating thumbnail: File missing Protect from Magic • Error creating thumbnail: File missing Protect from Ranged • Error creating thumbnail: File missing Protect from Melee • Error creating thumbnail: File missing Eagle Eye • Error creating thumbnail: File missing Mystic Might • Error creating thumbnail: File missing Redemption • Error creating thumbnail: File missing Chivalry • Error creating thumbnail: File missing Piety • Error creating thumbnail: File missing Rigour • Error creating thumbnail: File missing Augury • Error creating thumbnail: File missing Stone Skin • Error creating thumbnail: File missing Safeguard • Error creating thumbnail: File missing Rejuvenation • Error creating thumbnail: File missing Sharp Vision • Error creating thumbnail: File missing Mystic Mastery • Error creating thumbnail: File missing Battleheart
| |
Error creating thumbnail: File missing Valor • Error creating thumbnail: File missing Avidity • Error creating thumbnail: File missing Divination • Error creating thumbnail: File missing Grace • Error creating thumbnail: File missing Holy Aegis • Error creating thumbnail: File missing Divine Precision • Error creating thumbnail: File missing Elusivity • Error creating thumbnail: File missing Battleborn
| ||
Unholy | Error creating thumbnail: File missing Maim • Error creating thumbnail: File missing Grudge • Error creating thumbnail: File missing Profane • Error creating thumbnail: File missing Consumption • Error creating thumbnail: File missing Malice • Error creating thumbnail: File missing Martyr • Error creating thumbnail: File missing Shatter • Error creating thumbnail: File missing Spite • Error creating thumbnail: File missing Destruction • Error creating thumbnail: File missing Punishment • Error creating thumbnail: File missing Corruption • Error creating thumbnail: File missing Defile • Error creating thumbnail: File missing Retribution • Error creating thumbnail: File missing Malevolence • Error creating thumbnail: File missing Reckoning • Error creating thumbnail: File missing Sacrilege • Error creating thumbnail: File missing Eradicate
| |
Abyssal | Error creating thumbnail: File missing
|
Error creating thumbnail: File missing Savagery • Error creating thumbnail: File missing Menace • Error creating thumbnail: File missing Volatility • Error creating thumbnail: File missing Endure • Error creating thumbnail: File missing Focused • Error creating thumbnail: File missing Elusion • Error creating thumbnail: File missing Ravage • Error creating thumbnail: File missing Ferocity • Error creating thumbnail: File missing Terrorize • Error creating thumbnail: File missing Instability • Error creating thumbnail: File missing Piercer • Error creating thumbnail: File missing Drain • Error creating thumbnail: File missing Vanish • Error creating thumbnail: File missing Renewal • Error creating thumbnail: File missing Cruelty • Error creating thumbnail: File missing Opress • Error creating thumbnail: File missing Devastation • Error creating thumbnail: File missing Melee Shroud • Error creating thumbnail: File missing Ranged Shroud • Error creating thumbnail: File missing Magic Shroud • Error creating thumbnail: File missing Evisceration • Error creating thumbnail: File missing Deadshot • Error creating thumbnail: File missing Brutality • Error creating thumbnail: File missing Tyranny • Error creating thumbnail: File missing Obliteration • Error creating thumbnail: File missing Dissipation • Error creating thumbnail: File missing Meticulous • Error creating thumbnail: File missing Siphon • Error creating thumbnail: File missing Dispersion • Error creating thumbnail: File missing Unrelenting • Error creating thumbnail: File missing Annihilation
|
let results = [`{| class="wikitable navigation-not-searchable" style="margin:auto; clear:both; width: 100%"\n! Prayers !! DLC !! {{Skill|Prayer|Prayers}}`],
nsMap = new Map([['melvorF', ['Standard', '{{Melvor}}']], ['melvorTotH', ['', '{{TotH}}']], ['melvorAoD', ['Unholy', '{{AoD}}']], ['melvorItA', ['Abyssal', '{{ItA}}']]]);
game.prayers.namespaceMaps.forEach((prayers, ns) => {
let bookResults = '',
nsValues = nsMap.get(ns),
rowSpan = ns === 'melvorF' ? 'rowspan=2' : '',
style = ns === 'melvorTotH' ? `|| ${nsValues[1]}` : `! style="text-align:center;"${rowSpan}| ${nsValues[0]}\n|| ${nsValues[1]}`
results.push(`\n|-\n${style}\n|style="text-align:center;"|`);
prayers.forEach(prayer => {
bookResults += ` {{PrayerIcon|${prayer.name}|size=16}} •`;
});
bookResults = bookResults.slice(0, bookResults.length - 2); results.push(bookResults);
});
let outputString = ``;
results.forEach(str => outputString += str);
outputString += '\n|}';
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(outputString, 'text') : copy(outputString);
console.log(outputString);