12,790
edits
m (Revert to previous revision) |
(Add Herblore potion tier levels) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
-- Version: | -- Version: V1.0.3 (?1806) | ||
--[[ | --[[Generated from console via | ||
(function() { | (function() { | ||
var getGameVersion = function() { | var getGameVersion = function() { | ||
var | var elemVer = document.querySelector("li[data-target='#modal-major-update']:not(.d-none)") | ||
if ( | if (elemVer !== undefined) { | ||
return elemVer.innerText | |||
} | |||
else { | |||
return gameVersion | |||
} | } | ||
} | } | ||
var formatJSON = function(txt) { | |||
var out = JSON.stringify(txt) | |||
out = out.replace(/\'/g, "\\\'") | |||
out = out.replace(/\\\"/g, "\\\\\"") | |||
return out | |||
} | |||
var fullText = "-- Version: " + getGameVersion() | var fullText = "-- Version: " + getGameVersion() | ||
fullText += "\r\n\r\nlocal SkillData = {}" | |||
fullText += "\r\n\r\nSkillData.Skills = mw.text.jsonDecode('" + formatJSON(SKILLS) + "')" | |||
// Prayer | |||
fullText += "\r\n\r\nSkillData.Prayer = mw.text.jsonDecode('" + formatJSON(PRAYER) + "')" | |||
// Woodcutting | |||
fullText += "\r\n\r\nSkillData.Woodcutting = {}" | |||
for ( | fullText += "\r\nSkillData.Woodcutting.Trees = mw.text.jsonDecode('" + formatJSON(Woodcutting.trees) + "')" | ||
// Fishing | |||
fullText += "\r\n\r\nSkillData.Fishing = {}" | |||
fullText += "\r\nSkillData.Fishing.Fish = mw.text.jsonDecode('" + formatJSON(Fishing.data) + "')" | |||
fullText += "\r\nSkillData.Fishing.Areas = mw.text.jsonDecode('" + formatJSON(Fishing.areas) + "')" | |||
fullText += "\r\nSkillData.Fishing.JunkItems = mw.text.jsonDecode('" + formatJSON(Fishing.junkItems) + "')" | |||
fullText += "\r\nSkillData.Fishing.SpecialItems = mw.text.jsonDecode('" + formatJSON(Fishing.specialItems) + "')" | |||
// Firemaking | |||
fullText += "\r\n\r\nSkillData.Firemaking = mw.text.jsonDecode('" + formatJSON(Firemaking.recipes) + "')" | |||
// Cooking | |||
fullText += "\r\n\r\nSkillData.Cooking = {}" | |||
fullText += "\r\nSkillData.Cooking.Recipes = mw.text.jsonDecode('" + formatJSON(Cooking.recipes) + "')" | |||
// Mining | |||
fullText += "\r\n\r\nSkillData.Mining = {}" | |||
fullText += "\r\nSkillData.Mining.Rocks = mw.text.jsonDecode('" + formatJSON(Mining.rockData) + "')" | |||
// Smithing | |||
fullText += "\r\n\r\nSkillData.Smithing = {}" | |||
fullText += "\r\nSkillData.Smithing.Recipes = mw.text.jsonDecode('" + formatJSON(Smithing.recipes) + "')" | |||
// Thieving | |||
fullText += "\r\n\r\nSkillData.Thieving = {}" | |||
fullText += "\r\nSkillData.Thieving.NPCs = mw.text.jsonDecode('" + formatJSON(Thieving.npcs) + "')" | |||
fullText += "\r\nSkillData.Thieving.Areas = mw.text.jsonDecode('" + formatJSON(Thieving.areas) + "')" | |||
fullText += "\r\nSkillData.Thieving.RareItems = mw.text.jsonDecode('" + formatJSON(Thieving.generalRareItems) + "')" | |||
// Farming | |||
// The below function returns a modified version of newFarmingAreas, removing various properties | |||
// from each patch object that relate to what the user has planted & are therefore useless for | |||
// wiki purposes. Not required, but simply makes the data cleaner. | |||
function wikiGetFarmingAreas() { | |||
let allowedPatchKeys = ['level', 'cost'] | |||
let wikiFarmingAreas = [] | |||
for (i = 0; i < newFarmingAreas.length; i++) { | |||
let keyList = Object.keys(newFarmingAreas[i]).filter((n) => n !== 'patches') | |||
let newPatches = [] | |||
let newArea = {} | |||
for (j = 0; j < newFarmingAreas[i].patches.length; j++) { | |||
let newPatch = {} | |||
allowedPatchKeys.forEach((k) => newPatch[k] = newFarmingAreas[i].patches[j][k]) | |||
newPatches[j] = newPatch | |||
} | } | ||
keyList.forEach((n) => newArea[n] = newFarmingAreas[i][n]) | |||
newArea['patches'] = newPatches | |||
wikiFarmingAreas[i] = newArea | |||
} | } | ||
// | return wikiFarmingAreas | ||
} | |||
fullText += "\r\n\r\nSkillData.Farming = {}" | |||
fullText += "\r\nSkillData.Farming.Patches = mw.text.jsonDecode('" + formatJSON(wikiGetFarmingAreas()) + "')" | |||
// Fletching | |||
fullText += "\r\n\r\nSkillData.Fletching = {}" | |||
fullText += "\r\nSkillData.Fletching.Recipes = mw.text.jsonDecode('" + formatJSON(Fletching.recipes) + "')" | |||
// Crafting | |||
fullText += "\r\n\r\nSkillData.Crafting = {}" | |||
fullText += "\r\nSkillData.Crafting.Recipes = mw.text.jsonDecode('" + formatJSON(Crafting.recipes) + "')" | |||
// Runecrafting | |||
fullText += "\r\n\r\nSkillData.Runecrafting = {}" | |||
fullText += "\r\nSkillData.Runecrafting.Recipes = mw.text.jsonDecode('" + formatJSON(Runecrafting.recipes) + "')" | |||
// Herblore | |||
fullText += "\r\n\r\nSkillData.Herblore = {}" | |||
fullText += "\r\nSkillData.Herblore.Potions = mw.text.jsonDecode('" + formatJSON(Herblore.potions) + "')" | |||
fullText += "\r\nSkillData.Herblore.TierMasteryLevels = mw.text.jsonDecode('" + formatJSON(Herblore.tierMasteryLevels) + "')" | |||
// Agility | |||
fullText += "\r\n\r\nSkillData.Agility = {}" | |||
fullText += "\r\nSkillData.Agility.Obstacles = mw.text.jsonDecode('" + formatJSON(Agility.obstacles) + "')" | |||
fullText += "\r\nSkillData.Agility.Pillars = mw.text.jsonDecode('" + formatJSON(Agility.passivePillars) + "')" | |||
// Summoning | |||
fullText += "\r\n\r\nSkillData.Summoning = {}" | |||
fullText += "\r\nSkillData.Summoning.RecipeGPCost = mw.text.jsonDecode('" + formatJSON(Summoning.recipeGPCost) + "')" | |||
fullText += "\r\nSkillData.Summoning.MarkLevels = mw.text.jsonDecode('" + formatJSON(Summoning.markLevels) + "')" | |||
fullText += "\r\nSkillData.Summoning.Marks = mw.text.jsonDecode('" + formatJSON(Summoning.marks) + "')" | |||
fullText += "\r\nSkillData.Summoning.Synergies = mw.text.jsonDecode('" + formatJSON(Summoning.synergies) + "')" | |||
// Astrology | |||
fullText += "\r\n\r\nSkillData.Astrology = {}" | |||
fullText += "\r\nSkillData.Astrology.Constellations = mw.text.jsonDecode('" + formatJSON(Astrology.constellations) + "')" | |||
fullText += "\r\nSkillData.Astrology.BaseStardustChance = mw.text.jsonDecode('" + formatJSON(Astrology.baseStardustChance) + "')" | |||
fullText += "\r\nSkillData.Astrology.BaseGoldenStardustChance = mw.text.jsonDecode('" + formatJSON(Astrology.baseGoldenStardustChance) + "')" | |||
fullText += "\r\nSkillData.Astrology.BaseInterval = mw.text.jsonDecode('" + formatJSON(Astrology.baseInterval) + "')" | |||
fullText += "\r\nSkillData.Astrology.ModifierMagnitudeChances = mw.text.jsonDecode('" + formatJSON(Astrology.modifierMagnitudeChances) + "')" | |||
// Mastery | |||
var skillKeys = Object.keys(SKILLS); | |||
var tempUnlocks = {}; | |||
for(var i = 0; i < skillKeys.length; i++) { | |||
var key = skillKeys[i]; | |||
if(SKILLS[key].hasMastery){ | |||
var chkArray = []; | |||
var unlockArray = masteryUnlocks[key]; | |||
for(var j = 0; j < unlockArray.length; j++) { | |||
chkArray[j] = {level: unlockArray[j].level, unlock: getMasteryUnlock(key, j)} | |||
} | |||
tempUnlocks[key] = chkArray; | |||
} | |||
} | |||
fullText += "\r\n\r\nSkillData.MasteryUnlocks = mw.text.jsonDecode('" + formatJSON(tempUnlocks) + "')" | |||
var tempCheckpoints = {}; | |||
for(var i = 0; i < skillKeys.length; i++) { | |||
var key = skillKeys[i]; | |||
if(SKILLS[key].hasMastery){ | |||
var chkArray = []; | |||
for(var j = 0; j < 4; j++) { | |||
chkArray[j] = getMasteryCheckpointBonus(key, j) | |||
} | |||
tempCheckpoints[key] = {bonuses: chkArray}; | |||
} | |||
} | |||
fullText += "\r\n\r\nSkillData.MasteryCheckpoints = mw.text.jsonDecode('" + formatJSON(tempCheckpoints) + "')" | |||
var MasteryPoolXP = [] | |||
for(var i = 0; i < skillKeys.length; i++){ | |||
var key = skillKeys[i]; | |||
if(SKILLS[key].hasMastery){ | |||
MasteryPoolXP[key] = getMasteryPoolTotalXP(key); | |||
} | |||
} | } | ||
fullText += "\r\n\r\nSkillData.MasteryPoolXP = mw.text.jsonDecode('" + formatJSON(MasteryPoolXP) + "')" | |||
fullText += "\r\n\r\ | |||
var skillMilestones = Object.keys(SKILLS).map(function(s) { if (MILESTONES[SKILLS[s].name] === undefined) { return null } else { return MILESTONES[SKILLS[s].name].length } }) | |||
fullText += "\r\n\r\nSkillData.Milestones = mw.text.jsonDecode('" + formatJSON(skillMilestones) + "')" | |||
fullText += "\r\n\r\ | |||
fullText += "\r\n\r\ | // Adventure mode skill unlock costs | ||
fullText += "\r\n\r\nSkillData.SkillUnlockCosts = mw.text.jsonDecode('" + formatJSON(priceToUnlockSkill) + "')" | |||
fullText += "\r\n\r\nreturn SkillData" | |||
console.log(fullText) | console.log(fullText) | ||
})() | })() | ||
--]] | --]] | ||
local SkillData = {} | |||
SkillData.Skills = mw.text.jsonDecode('{"0":{"name":"Woodcutting","media":"assets/media/skills/woodcutting/woodcutting.svg","hasMastery":true,"masteryTokenID":481,"maxLevel":99,"miniBarItems" | |||
SkillData.SkillUnlockCosts = mw.text.jsonDecode('[10000,25000,50000,200000,250000,400000,1000000,2500000,10000000,25000000,50000000,100000000,200000000,500000000,500000000,500000000,500000000,500000000,500000000]') | |||
return | return SkillData |