Click to open network menu
Join or Log In
Mobafire logo

Join the leading League of Legends community. Create and share Champion Guides and Builds.

Create an MFN Account






Or

League of Legends (LoL) Question: Importing builds

Posted in Items 16,380

  • Mobafire Avatar

    Importing builds

    Well all I want to know if it is possible for item builds listed on here to be automatically converted into a import code for the LoL client. Or at least a import file. If anyone doesn't know what I'm talking about, you can now import builds in the client using the "Import item set" option in "collection/items".

    An example import code:
    {"title":"Twitch Jungle","associatedMaps":[11],"associatedChampions":[29],"blocks":[{"items":[{"id":"2003","count":1},{"id":"2140","count":1},{"id":"2055","count":1}],"type":"Consumables"},{"items":[{"id":"2031","count":1},{"id":"3340","count":1},{"id":"1041","count":1}],"type":"Starter"},{"items":[{"id":"3706","count":1},{"id":"3715","count":1},{"id":"1043","count":1},{"id":"1001","count":1},{"id":"3364","count":1}],"type":"First Recall"},{"items":[{"id":"1416","count":1},{"id":"1419","count":1},{"id":"3006","count":1},{"id":"3047","count":1},{"id":"3111","count":1}],"type":"Core Build"},{"items":[{"id":"3153","count":1},{"id":"3085","count":1},{"id":"3095","count":1},{"id":"3087","count":1},{"id":"3046","count":1},{"id":"3031","count":1},{"id":"3812","count":1},{"id":"3072","count":1}],"type":"Common Items"},{"items":[{"id":"3022","count":1},{"id":"3033","count":1},{"id":"3036","count":1},{"id":"3142","count":1},{"id":"3147","count":1},{"id":"3156","count":1}],"type":"Situational"}]}

    EXAMPLE CODE taken from: https://www.weprolol.com/en/guide-item-sets/
  • Answers (2)

    2
    EagleExe | August 8, 2020 1:44am
    Here's an updated tutorial on how to copy and paste item sets from Mobafire to League of Legends
    https://github.com/EagleExe/LoL-ItemsJSON

    Basically just paste the following code into the browser's console and it will create a button in the upper-right of the page.
    Code:
    // ==UserScript== // @name LoL-ItemsJSON // @version 0.1 // @author EagleExe // @include http://www.mobafire.com/league-of-legends/build/* // @include https://www.mobafire.com/league-of-legends/build/* // ==/UserScript== document.ItemCodes = {"Boots of Speed":1001,"Faerie Charm":1004,"Rejuvenation Bead":1006,"Giant's Belt":1011,"Cloak of Agility":1018,"Blasting Wand":1026,"Sapphire Crystal":1027,"Ruby Crystal":1028,"Cloth Armor":1029,"Chain Vest":1031,"Null-Magic Mantle":1033,"Long Sword":1036,"Pickaxe":1037,"B. F. Sword":1038,"Hunter's Talisman":1039,"Hunter's Machete":1041,"Dagger":1042,"Recurve Bow":1043,"Amplifying Tome":1052,"Vampiric Scepter":1053,"Doran's Shield":1054,"Doran's Blade":1055,"Doran's Ring":1056,"Negatron Cloak":1057,"Needlessly Large Rod":1058,"Dark Seal":1082,"Cull":1083,"Enchantment: Warrior":1400,"Enchantment: Cinderhulk":1401,"Enchantment: Runic Echoes":1402,"Enchantment: Warrior":1412,"Enchantment: Cinderhulk":1413,"Enchantment: Runic Echoes":1414,"Enchantment: Bloodrazor":1416,"Enchantment: Bloodrazor":1419,"Health Potion":2003,"Showdown Health Potion":2006,"Total Biscuit of Rejuvenation":2009,"Total Biscuit of Everlasting Will":2010,"Kircheis Shard":2015,"Refillable Potion":2031,"Corrupting Potion":2033,"Oracle's Extract":2047,"Guardian's Horn":2051,"Poro-Snax":2052,"Diet Poro-Snax":2054,"Control Ward":2055,"Shurelya's Reverie":2065,"Elixir of Iron":2138,"Elixir of Sorcery":2139,"Elixir of Wrath":2140,"Minion Dematerializer":2403,"Commencing Stopwatch":2419,"Stopwatch":2420,"Broken Stopwatch":2421,"Slightly Magical Boots":2422,"Perfectly Timed Stopwatch":2423,"Broken Stopwatch":2424,"Abyssal Mask":3001,"Archangel's Staff":3003,"Manamune":3004,"Atma's Reckoning":3005,"Berserker's Greaves":3006,"Archangel's Staff (Quick Charge)":3007,"Manamune (Quick Charge)":3008,"Boots of Swiftness":3009,"Catalyst of Aeons":3010,"Sorcerer's Shoes":3020,"Frozen Mallet":3022,"Glacial Shroud":3024,"Iceborn Gauntlet":3025,"Guardian Angel":3026,"Rod of Ages":3027,"Chalice of Harmony":3028,"Rod of Ages (Quick Charge)":3029,"Hextech GLP-800":3030,"Infinity Edge":3031,"Mortal Reminder":3033,"Last Whisper":3035,"Lord Dominik's Regards":3036,"Seraph's Embrace":3040,"Mejai's Soulstealer":3041,"Muramana":3042,"Muramana":3043,"Phage":3044,"Phantom Dancer":3046,"Ninja Tabi":3047,"Seraph's Embrace":3048,"Zeke's Convergence":3050,"Jaurim's Fist":3052,"Sterak's Gage":3053,"Sheen":3057,"Spirit Visage":3065,"Kindlegem":3067,"Sunfire Cape":3068,"Tear of the Goddess":3070,"Black Cleaver":3071,"Bloodthirster":3072,"Tear of the Goddess (Quick Charge)":3073,"Ravenous Hydra":3074,"Thornmail":3075,"Bramble Vest":3076,"Tiamat":3077,"Trinity Force":3078,"Warden's Mail":3082,"Warmog's Armor":3083,"Overlord's Bloodmail":3084,"Runaan's Hurricane":3085,"Zeal":3086,"Statikk Shiv":3087,"Rabadon's Deathcap":3089,"Wit's End":3091,"Rapid Firecannon":3094,"Stormrazor":3095,"Lich Bane":3100,"Stinger":3101,"Banshee's Veil":3102,"Aegis of the Legion":3105,"Redemption":3107,"Fiendish Codex":3108,"Knight's Vow":3109,"Frozen Heart":3110,"Mercury's Treads":3111,"Guardian's Orb":3112,"Aether Wisp":3113,"Forbidden Idol":3114,"Nashor's Tooth":3115,"Rylai's Crystal Scepter":3116,"Boots of Mobility":3117,"Executioner's Calling":3123,"Guinsoo's Rageblade":3124,"Deathfire Grasp":3128,"Sword of the Divine":3131,"Caulfield's Warhammer":3133,"Serrated Dirk":3134,"Void Staff":3135,"Haunting Guise":3136,"Dervish Blade":3137,"Mercurial Scimitar":3139,"Quicksilver Sash":3140,"Youmuu's Ghostblade":3142,"Randuin's Omen":3143,"Bilgewater Cutlass":3144,"Hextech Revolver":3145,"Hextech Gunblade":3146,"Duskblade of Draktharr":3147,"Liandry's Torment":3151,"Hextech Protobelt-01":3152,"Blade of the Ruined King":3153,"Hexdrinker":3155,"Maw of Malmortius":3156,"Zhonya's Hourglass":3157,"Ionian Boots of Lucidity":3158,"Spear of Shojin":3161,"Morellonomicon":3165,"Moonflair Spellblade":3170,"Zephyr":3172,"Athene's Unholy Grail":3174,"Head of Kha'Zix":3175,"Umbral Glaive":3179,"Sanguine Blade":3181,"Guardian's Hammer":3184,"Locket of the Iron Solari":3190,"Seeker's Armguard":3191,"Gargoyle Stoneplate":3193,"Adaptive Helm":3194,"Hex Core mk-1":3196,"Hex Core mk-2":3197,"Perfect Hex Core":3198,"Prototype Hex Core":3200,"Spectre's Cowl":3211,"Mikael's Crucible":3222,"Luden's Echo":3285,"Scarecrow Effigy":3330,"Warding Totem":3340,"Arcane Sweeper":3348,"Greater Stealth Totem":3361,"Greater Vision Totem":3362,"Farsight Alteration":3363,"Oracle Lens":3364,"Molten Edge":3371,"Forgefire Cape":3373,"Rabadon's Deathcrown":3374,"Infernal Mask":3379,"Obsidian Cleaver":3380,"Salvation":3382,"Circlet of the Iron Solari":3383,"Trinity Fusion":3384,"Zhonya's Paradox":3386,"Frozen Fist":3387,"Youmuu's Wraithblade":3388,"Might of the Ruined King":3389,"Luden's Pulse":3390,"'Your Cut'":3400,"Head of Kha'Zix":3410,"Head of Kha'Zix":3416,"Head of Kha'Zix":3422,"Head of Kha'Zix":3455,"Ardent Censer":3504,"Essence Reaver":3508,"Eye of the Herald":3513,"Eye of the Herald":3514,"Ghost Poro":3520,"Black Spear":3599,"Black Spear":3600,"Enchantment: Warrior":3671,"Enchantment: Cinderhulk":3672,"Enchantment: Runic Echoes":3673,"Enchantment: Bloodrazor":3675,"Frosted Snax":3680,"Super Spicy Snax":3681,"Espresso Snax":3682,"Rainbow Snax Party Pack!":3683,"Dawnbringer Snax":3684,"Nightbringer Snax":3685,"Cosmic Shackle":3690,"Singularity Lantern":3691,"Dark Matter Scythe":3692,"Gravity Boots":3693,"Cloak of Stars":3694,"Dark Star Sigil":3695,"Stalker's Blade":3706,"Skirmisher's Sabre":3715,"Dead Man's Plate":3742,"Titanic Hydra":3748,"Bami's Cinder":3751,"Righteous Glory":3800,"Crystalline Bracer":3801,"Lost Chapter":3802,"Death's Dance":3812,"Edge of Night":3814,"Spellthief's Edge":3850,"Frostfang":3851,"Shard of True Ice":3853,"Steel Shoulderguards":3854,"Runesteel Spaulders":3855,"Pauldrons of Whiterock":3857,"Relic Shield":3858,"Targon's Buckler":3859,"Bulwark of the Mountain":3860,"Spectral Sickle":3862,"Harrowing Crescent":3863,"Black Mist Scythe":3864,"Fire at Will":3901,"Death's Daughter":3902,"Raise Morale":3903,"Twin Shadows":3905,"Spellbinder":3907,"Oblivion Orb":3916,"Ghostwalkers (Melee Only)":4001,"Lifeline":4003,"Spectral Cutlass":4004,"Pridestalker's Blade":4101,"Enchantment: Warrior":4102,"Enchantment: Cinderhulk":4103,"Enchantment: Runic Echoes":4104,"Enchantment: Bloodrazor":4105,"Doran's Lost Shield":4201,"Doran's Lost Blade":4202,"Doran's Lost Ring":4203,"Doran's Lost Idol":4204,"Force of Nature":4401,"Innervating Locket":4402,"The Golden Spatula":4403}; document.ChampionCodes = {"Aatrox":266,"Ahri":103,"Akali":84,"Alistar":12,"Amumu":32,"Anivia":34,"Annie":1,"Aphelios":523,"Ashe":22,"AurelionSol":136,"Azir":268,"Bard":432,"Blitzcrank":53,"Brand":63,"Braum":201,"Caitlyn":51,"Camille":164,"Cassiopeia":69,"Chogath":31,"Corki":42,"Darius":122,"Diana":131,"Draven":119,"DrMundo":36,"Ekko":245,"Elise":60,"Evelynn":28,"Ezreal":81,"Fiddlesticks":9,"Fiora":114,"Fizz":105,"Galio":3,"Gangplank":41,"Garen":86,"Gnar":150,"Gragas":79,"Graves":104,"Hecarim":120,"Heimerdinger":74,"Illaoi":420,"Irelia":39,"Ivern":427,"Janna":40,"JarvanIV":59,"Jax":24,"Jayce":126,"Jhin":202,"Jinx":222,"Kaisa":145,"Kalista":429,"Karma":43,"Karthus":30,"Kassadin":38,"Katarina":55,"Kayle":10,"Kayn":141,"Kennen":85,"Khazix":121,"Kindred":203,"Kled":240,"KogMaw":96,"Leblanc":7,"LeeSin":64,"Leona":89,"Lillia":876,"Lissandra":127,"Lucian":236,"Lulu":117,"Lux":99,"Malphite":54,"Malzahar":90,"Maokai":57,"MasterYi":11,"MissFortune":21,"MonkeyKing":62,"Mordekaiser":82,"Morgana":25,"Nami":267,"Nasus":75,"Nautilus":111,"Neeko":518,"Nidalee":76,"Nocturne":56,"Nunu":20,"Olaf":2,"Orianna":61,"Ornn":516,"Pantheon":80,"Poppy":78,"Pyke":555,"Qiyana":246,"Quinn":133,"Rakan":497,"Rammus":33,"RekSai":421,"Renekton":58,"Rengar":107,"Riven":92,"Rumble":68,"Ryze":13,"Sejuani":113,"Senna":235,"Sett":875,"Shaco":35,"Shen":98,"Shyvana":102,"Singed":27,"Sion":14,"Sivir":15,"Skarner":72,"Sona":37,"Soraka":16,"Swain":50,"Sylas":517,"Syndra":134,"TahmKench":223,"Taliyah":163,"Talon":91,"Taric":44,"Teemo":17,"Thresh":412,"Tristana":18,"Trundle":48,"Tryndamere":23,"TwistedFate":4,"Twitch":29,"Udyr":77,"Urgot":6,"Varus":110,"Vayne":67,"Veigar":45,"Velkoz":161,"Vi":254,"Viktor":112,"Vladimir":8,"Volibear":106,"Warwick":19,"Xayah":498,"Xerath":101,"XinZhao":5,"Yasuo":157,"Yorick":83,"Yuumi":350,"Zac":154,"Zed":238,"Ziggs":115,"Zilean":26,"Zoe":142,"Zyra":143}; document.GatherTheData = function() { String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")} String.prototype.removeTags=function(){return this.replace(/<[\D\d]*>/g,"")} String.prototype.removeSpaces=function(){return this.replace(/\s/g,"")} let Title = document.querySelector("div[class$='top__title']").querySelector("h2").innerHTML.removeTags().trim(); let ChampionName = document.getElementById("sidebar-similar-builds").querySelector("h3").innerHTML; let ChampionCode = document.ChampionCodes[ ChampionName.removeSpaces() ]; let Author = document.querySelector("div[class$='top__title']").querySelector("a").innerHTML +" @ "+ document.querySelector("div[class$='top__title']").querySelector("a").href; let URL = document.location.href; let Output = '{\n\t"title": "'+Title+'",\n\t"associatedMaps": [],\n\t"associatedChampions": ['+ChampionCode+'],\n\t"_notes": "'+URL+'",\n\t"_author": "'+Author+'",\n\t"blocks": ['; let Divs = document.querySelectorAll("div.view-guide__items"); let Type, ItemSpans, i, j; for(i=0; i<Divs.length; i++) { Type = Divs[i].children[0].children[0].innerHTML; Output += '\n\t\t{\n\t\t\t"type": "'+Type+'",\n\t\t\t"items": ['; ItemSpans = Divs[i].children[1].children; for(j=0; j<ItemSpans.length; j++) { ItemCode = document.ItemCodes[ ItemSpans[j].querySelector("span").innerHTML ]; Output += '\n\t\t\t\t{ "id": "'+ItemCode+'", "count": 1 }'; if(j != ItemSpans.length-1) Output += ','; } Output += '\n\t\t\t]\n\t\t}'; if(i != Divs.length-1) Output += ','; } Output += "\n\t]\n}"; console.log("============ gathered the data ============"); return Output; } var Button = document.createElement("button"); Button.style = "position:fixed; top:50px; right:7px; z-index:999999; border:0px; background:darkblue; color:#bbcbe8; padding:5px 9px; font-family:'Open Sans Mobafire','Open Sans',sans-serif,sans-serif"; Button.innerHTML = "Items JSON"; Button.onmouseover = function() { document.getElementById("TheTextarea").value = document.GatherTheData(); document.getElementById("TheTextarea").style.visibility = "visible"; } Button.onclick = function() { document.getElementById("TheTextarea").style.visibility = document.getElementById("TheTextarea").style.visibility=="hidden" ? "visible" : "hidden"; } document.body.appendChild(Button); var TheTextarea = document.createElement("textarea"); TheTextarea.style = "position:fixed; top:82px; right:7px; z-index:999999; border:2px dashed navy; width:280px; height:420px; background:gainsboro; color:black; font-size:6px; font-family:'Open Sans Mobafire','Open Sans',sans-serif,sans-serif; overflow-x:hidden; visibility:hidden"; TheTextarea.id = "TheTextarea"; TheTextarea.value = document.GatherTheData(); TheTextarea.onmouseover = function() { document.getElementById("TheTextarea").select() } document.body.appendChild(TheTextarea);
    1
    cahanghally | July 15, 2020 11:09am
    You can easily copy mobafire builds using a google chrome extension
    Loading Comments...
    Load More Comments

    League of Legends Champions:

    Teamfight Tactics Guide