12,790
edits
m (Re-add attackType) |
(Add Herblore potion tier levels) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
-- Version: | -- Version: V1.0.3 (?1806) | ||
--[[Generated from | --[[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 (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 = {}" | |||
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) + "')" | |||
var | // Mastery | ||
var skillKeys = Object.keys(SKILLS); | |||
var tempUnlocks = {}; | |||
fullText = | 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]; | |||
fullText = | 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 | 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\ | } | ||
} | |||
fullText += "\r\n\r\nSkillData.MasteryPoolXP = mw.text.jsonDecode('" + formatJSON(MasteryPoolXP) + "')" | |||
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\ | |||
// Adventure mode skill unlock costs | |||
fullText += "\r\n\r\nSkillData.SkillUnlockCosts = mw.text.jsonDecode('" + formatJSON(priceToUnlockSkill) + "')" | |||
fullText += "\r\n\r\ | |||
fullText += "\r\n\r\nreturn | 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" | |||
SkillData.MasteryCheckpoints = mw.text.jsonDecode('{"0":{"bonuses":["+5% increased Woodcutting Mastery XP","+5% increased chance to receive double Logs per action","All Logs sell for +50% GP Value","When you receive a Birds Nest, always receive a base minimum of 2."]},"1":{"bonuses":["+5% increased Fishing Mastery XP","Receive no more Junk","+5% increased chance to get double Fish","When you catch a Special Item, there is a 25% chance to receive one extra Special Item. It is possible to receive a different item than the original."]},"2":{"bonuses":["+5% increased Firemaking Mastery XP","10% decreased Burning interval","Receive GP equal to 25% of the value of the Log you are burning","+5% increased Global Mastery XP"]},"3":{"bonuses":["+5% increased Cooking Mastery XP","+5% increased chance to get double cooked Food","+10% chance to preserve raw food in Cooking","All Food heals for +10% HP"]},"4":{"bonuses":["+5% increased Mining Mastery XP","Reduced Ore respawn time by 10%","Reduce Mining interval by 0.2s","All Rocks gain +10 Maximum HP (Bonus applied on Rock Respawn)"]},"5":{"bonuses":["+5% increased Smithing Mastery XP","+5% resource preservation chance for Smithing","+5% resource preservation chance for Smithing","+10% chance to double items in Smithing."]},"10":{"bonuses":["+30 Thieving Stealth, +3% increased Thieving XP","Decreases Thieving Interval by 0.2s, +3% increased Thieving Mastery XP","+100% increased gold from Thieving","+100 Thieving Stealth, chance to gain unique area items from Thieving is tripled"]},"11":{"bonuses":["+5% increased Farming Mastery XP","Crops cannot die (Bonus applied when crop grows).","+5% increased Crop harvest","Reduced crop grow time by 10% (Bonus applied when crop is planted)"]},"13":{"bonuses":["+5% increased Fletching Mastery XP","Produce 1 extra Javelin per Fletch (Applied to base quantity)","Produce 1 extra Gem-Tipped Bolt per Fletch (Applied to base quantity)","Reduce Fletching Interval by 0.2s"]},"14":{"bonuses":["+5% increased Crafting Mastery XP","+5% resource preservation chance for Crafting.","Decreased Crafting Interval by 0.2s","Always Craft a base quantity of 2 for Rings and Necklaces"]},"15":{"bonuses":["+5% increased Runecrafting Mastery XP","Grants 250% base Runecrafting XP from Runes","+10% resource preservation chance for Runecrafting","Grants an extra 5 Runes per craft"]},"19":{"bonuses":["+5% increased Herblore Mastery XP","+3% increased Herblore Skill XP","+5% resource preservation chance for Herblore","+10% chance to double Potions per action in Herblore"]},"20":{"bonuses":["+5% increased Agility Mastery XP","+10% GP from Agility","+10% Global Agility Obstacle cost reduction.","+15% Agility Obstacle Item cost reduction"]},"21":{"bonuses":["+5% increased Summoning Mastery XP","+1 Shard Cost Reduction for Tier 1 & Tier 2 Summoning Tablets","+10% resource preservation chance for Summoning","+1 Shard Cost Reduction for Tier 3 Summoning Tablets. +10 Base Quantity for Summoning Tablet Creation."]},"22":{"bonuses":["+5% increased Astrology Mastery XP","+1% chance to find Stardust","+0.2% chance to find Golden Stardust","-50% Cost to reroll specific Modifiers"]}}') | |||
SkillData.MasteryPoolXP = mw.text.jsonDecode('[4500000,11500000,4500000,15500000,5500000,57500000,null,null,null,null,11500000,12000000,null,28500000,27500000,42000000,null,null,null,15000000,25500000,10000000,5500000]') | |||
SkillData.Milestones = mw.text.jsonDecode('[10,24,10,32,12,116,11,1,12,1,24,25,73,58,56,85,87,32,14,31,12,21,12]') | |||
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 |