Forum › Forums › Grids and Presets › Crafting [Scenario Generator]
This topic contains 216 replies, has 69 voices, and was last updated by Lyfox 2 years, 10 months ago.
-
AuthorPosts
-
July 2, 2017 at 7:40 pm #4081July 11, 2017 at 10:12 pm #4378July 18, 2017 at 5:00 am #4486
I turned this into a button that automatically copy the results to your clipboard, bypass the “ctr-c” part.
Here it is for installing (need Greasymonkey/Tampermonkey): https://greasyfork.org/en/scripts/31546-crafting-list-to-miqo-scenario
July 23, 2017 at 6:04 am #4620I decided to try this out today. Got everything I needed to make a complete level 63 crafting accessories for my Carpenter. I ran the little script thingy in my browser console and pasted it into a new Scenario In MiqoBot. I made sure all the materials were in my inventory and ate some buff food. Grant it my Weaver was only 60 and couldn’t HQ anything, but holy crap sticks in a Chocobo factory Batman, this worked BEAUTIFULLY!!!
I can’t thank you enough for this.
I look forward to the day when we can make it go gather all the materials for us as well. AMAZING!!!
July 31, 2017 at 3:18 am #4790August 8, 2017 at 4:49 pm #4948August 8, 2017 at 5:01 pm #4949August 9, 2017 at 2:53 am #4960August 9, 2017 at 4:21 am #4961August 10, 2017 at 2:18 am #4976August 10, 2017 at 10:43 am #4977August 11, 2017 at 8:26 am #4981August 11, 2017 at 6:57 pm #4985So this script is amazing. I’ve been feeling the empty space where ACME Crafting Bot used to be and this goes a long way towards filling in that gap. (Now if only there was a way to track what items you have inside Miqobot like you can in ACME, or even get the items out of your retainers like it could in later versions)
I’ve been using it as a bookmarklet in Chrome. You just put the following into a bookmark and when you click on the bookmark it’ll run on the page and show a popup with the info that you can then copy/paste to the script.
WARNING: It DOES break for crafts with a very large list because it’ll shorten it with a “…” but the output is still there in the console so you can copy it from there as normal.
javascript:var rJob = function(val){ return $(val).children("td:eq(4)").children("img:eq(0)").attr("src").replace("/img/jobs","").replace("/","").replace("-inactive","").replace(".png",""); }; var rRecipe = function(val){ return $(val).children("td:eq(0)").children("a:eq(1)").children("span").text(); }; var rNeeded = function(val){ var txt = $(val).children("td:eq(1)").children("span").text(); var val = $(val).children("td:eq(1)").children("input").val(); return val > 0 ? val : txt; }; var rYields = function(val){ return $(val).attr("data-yields"); }; var rCount = function(val){ return Math.ceil(rNeeded(val)/rYields(val)); }; var chapter = function(tableId){ var reagents = $("tbody#"+tableId).children("tr.reagent").not(".success"); reagents.sort(function(a, b){ var lvlA = parseInt( $(a).attr("data-ilvl") ); var lvlB = parseInt( $(b).attr("data-ilvl") ); return (lvlA < lvlB) ? -1 : (lvlA > lvlB) ? 1 : 0; }); for(var i=0; i<reagents.length; i++){ var craftsLater = []; var from = -1; var to = -1; $(reagents.get().reverse()).each(function(index){ var itemId = $(this).attr("data-item-id"); var requires = $(this).attr("data-requires").split("&").map(function(value){ return value.split("x")[1]; }); var isCraftable = requires.reduce(function(isCraftable, requireId){ if(!isCraftable) return false; if(craftsLater.indexOf(requireId)>=0){ from = index; to = craftsLater.indexOf(requireId); return false; } return true; }, true); if(!isCraftable) return false; craftsLater.push(itemId); }); if(from < 0 || to < 0) break; from = reagents.length-1 - from; to = reagents.length-1 - to; reagents.splice(to, 0, reagents.splice(from, 1)[0]); } var miqo = ""; reagents.each(function(){ miqo += "job("+rJob(this)+")\r\n"; miqo += "recipe("+rRecipe(this)+")\r\n"; miqo += "craft("+rCount(this)+")\r\n"; }); miqo += "//--Section crafts: "+reagents.get().reduce(function(allCount, val){ return allCount+rCount(val); },0)+"\r\n"; return miqo; }; var antiDuplicate = function(miqo){ miqo = miqo.replace(/recipe\(Kite Shield\)/g, "recipe(Kite Shield, 3)"); miqo = miqo.replace(/recipe\(Goatskin Wristbands\)/g, "recipe(Goatskin Wristbands, 2)"); miqo = miqo.replace(/recipe\(Hempen Breeches\)/g, "recipe(Hempen Breeches, 2)"); miqo = miqo.replace(/recipe\(Copper Ring\)/g, "recipe(Copper Ring, 2)"); miqo = miqo.replace(/recipe\(Lapis Lazuli\)/g, "recipe(Lapis Lazuli, 2)"); miqo = miqo.replace(/recipe\(Brass Ring\)/g, "recipe(Brass Ring, 2)"); miqo = miqo.replace(/recipe\(Silver Ring\)/g, "recipe(Silver Ring, 2)"); miqo = miqo.replace(/recipe\(Garnet\)/g, "recipe(Garnet, 2)"); miqo = miqo.replace(/recipe\(Mythril Ring\)/g, "recipe(Mythril Ring, 3)"); miqo = miqo.replace(/recipe\(Horn Staff\)/g, "recipe(Horn Staff, 8)"); miqo = miqo.replace(/recipe\(Electrum Ring\)/g, "recipe(Electrum Ring, 2)"); miqo = miqo.replace(/recipe\(Honey\)/g, "recipe(Honey, 8)"); miqo = miqo.replace(/recipe\(Horn Fishing Rod\)/g, "recipe(Horn Fishing Rod, 2)"); miqo = miqo.replace(/recipe\(Ether\)/g, "recipe(Ether, 8)"); miqo = miqo.replace(/recipe\(Poisoning Potion\)/g, "recipe(Poisoning Potion, 2)"); miqo = miqo.replace(/recipe\(Paralyzing Potion\)/g, "recipe(Paralyzing Potion, 2)"); miqo = miqo.replace(/recipe\(Blinding Potion\)/g, "recipe(Blinding Potion, 2)"); miqo = miqo.replace(/recipe\(Sleeping Potion\)/g, "recipe(Sleeping Potion, 2)"); miqo = miqo.replace(/recipe\(Silencing Potion\)/g, "recipe(Silencing Potion, 2)"); miqo = miqo.replace(/recipe\(Boarskin Ring\)/g, "recipe(Boarskin Ring, 2)"); miqo = miqo.replace(/recipe\(Rose Gold Earrings\)/g, "recipe(Rose Gold Earrings, 2)"); miqo = miqo.replace(/recipe\(Mortar\)/g, "recipe(Mortar, 21)"); miqo = miqo.replace(/recipe\(Campfire\)/g, "recipe(Campfire, 2)"); miqo = miqo.replace(/recipe\(Manor Fireplace\)/g, "recipe(Manor Fireplace, 2)"); miqo = miqo.replace(/recipe\(Wall Chronometer\)/g, "recipe(Wall Chronometer, 2)"); miqo = miqo.replace(/recipe\(Cloche\)/g, "recipe(Cloche, 3)"); miqo = miqo.replace(/recipe\(Smithing Bench\)/g, "recipe(Smithing Bench, 2)"); miqo = miqo.replace(/recipe\(Wall Lantern\)/g, "recipe(Wall Lantern, 2)"); miqo = miqo.replace(/recipe\(Holy Rainbow Hat\)/g, "recipe(Holy Rainbow Hat, 2)"); miqo = miqo.replace(/recipe\(Reading Glasses\)/g, "recipe(Reading Glasses, 2)"); miqo = miqo.replace(/recipe\(Gaganaskin Gloves\)/g, "recipe(Gaganaskin Gloves, 2)"); miqo = miqo.replace(/recipe\(Gold Ingot\)/g, "recipe(Gold Ingot, 2)"); miqo = miqo.replace(/recipe\(Orchestrion\)/g, "recipe(Orchestrion, 4)"); miqo = miqo.replace(/recipe\(Camphor\)/g, "recipe(Camphor, 14)"); miqo = miqo.replace(/recipe\(Cordial\)/g, "recipe(Cordial, 2)"); miqo = miqo.replace(/recipe\(Survival Hat\)/g, "recipe(Survival Hat, 2)"); miqo = miqo.replace(/recipe\(Survival Shirt\)/g, "recipe(Survival Shirt, 3)"); miqo = miqo.replace(/recipe\(Survival Halfslops\)/g, "recipe(Survival Halfslops, 2)"); miqo = miqo.replace(/recipe\(Survival Boots\)/g, "recipe(Survival Boots, 2)"); miqo = miqo.replace(/recipe\(Luminous Fiber\)/g, "recipe(Luminous Fiber, 2)"); miqo = miqo.replace(/recipe\(Near Eastern Antique\)/g, "recipe(Near Eastern Antique, 2)"); miqo = miqo.replace(/recipe\(Coerthan Souvenir\)/g, "recipe(Coerthan Souvenir, 2)"); miqo = miqo.replace(/recipe\(Maelstrom Materiel\)/g, "recipe(Maelstrom Materiel, 2)"); miqo = miqo.replace(/recipe\(Heartfelt Gift\)/g, "recipe(Heartfelt Gift, 2)"); miqo = miqo.replace(/recipe\(Orphanage Donation\)/g, "recipe(Orphanage Donation, 2)"); miqo = miqo.replace(/recipe\(Platinum Ingot\)/g, "recipe(Platinum Ingot, 2)"); return miqo; }; var scenario = function(){ var miqo = ""; miqo += "//Pre-Requisite Crafting\r\n"; miqo += "solverPreset(recommended)\r\nnqhq(balanced)\r\nreclaimOff()\r\n\r\n"; miqo += chapter("PreRequisiteCrafting-section")+"\r\n"; miqo += "//Crafting List\r\n"; miqo += "solverPreset(recommended)\r\nnqhq(balanced)\r\nreclaimHQ(50)\r\n\r\n"; miqo += chapter("CraftingList-section")+"\r\n"; miqo += "//Repair\r\n"; miqo += "reclaimOff()\r\nrepair()\r\n"; miqo = antiDuplicate(miqo); window.prompt("Copy to clipboard: Ctrl+C, Enter", miqo); return miqo; }; console.log(scenario());
August 12, 2017 at 5:26 am #4989Hope you could help me out.
It gets stuck when trying to craft Molybdenum Ingot. Keeps trying to select an HQ Cobalt Ore. Even tho there is NQ available.
- This reply was modified 7 years, 4 months ago by foodgateway.
- This reply was modified 7 years, 4 months ago by foodgateway.
August 12, 2017 at 2:25 pm #4992 -
AuthorPosts
You must be logged in to reply to this topic.