• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Lua - Slash and Sqlite (1 Viewer)

You would need something that tells you the order, yes. But if you can explain why you need them in that order (or what order you’re putting them in) maybe I can help.

Either way, it’s going to be using the Order By clause, it’s just what you’re using that on for meeting your needs.

The goal is to maintain a recipe order list, if a recipe is called multiple times in different quantities, I want it to total them all up but collapse to the 1st occurence of the recipe, while maintaining the sequence integrity..

Sample Data:



Brick
1234​
1​
File
111​
1​
Brick
1234​
3​
Brick
1234​
4​
Taco
1212​
1​


Desired:



ItemNameRecipeIDItemCount
Brick
1234​
8​
File
111​
1​
Taco
1212​
1​
 
Right, but that's alphabetical -- "ORDER BY ItemName" gives you that. I'm trying to figure out what you mean by the order of items and why it matters.
 
Right, but that's alphabetical -- "ORDER BY ItemName" gives you that. I'm trying to figure out what you mean by the order of items and why it matters.
Specifically for crafting, there has to be an order of the recipes to be made in proper quantities and proper sequence..

so we can't make a file before we have metal bits, so the metal bits would have to come first in the order.
 
The order in SQL doesn’t matter for that, though. You either have the component, you need to buy the component, you need to farm the component, or you need to make the component.

In the case of the file, if you have a recipe that requires a file, but you have no file you need to make a file which is itself its own recipe.
 
The order in SQL doesn’t matter for that, though. You either have the component, you need to buy the component, you need to farm the component, or you need to make the component.

In the case of the file, if you have a recipe that requires a file, but you have no file you need to make a file which is itself its own recipe.
Here is a sample recipe list generation in proper order:

There are quite a few that have the same recipe but with different amounts, yes, it does work, but it could make the mass recipes ahead of time in one fell swoop. Instead it makes a few bricks does the combine in that chain then makes a few more of the same bricks..

1647981626935.png

Then there are situations where a tool is created (Geerlok Laminating Device) using another tool (Laminator Roller), but the Laminator Roller has a need count overall for 2 to complete the recipe so the order is this.

I need a Geerlok device, but to make it I need 1 laminator roller, but overall i need 2 laminator rollers to complete the over-arching recipe. So the order I would go for is make:

2 laminator rollers
1 geerlok laminating device

Current state it would shop for 3 laminator rollers, and try to make 2 rollers and then would ignore making the third roller but have the materials.
 
Last edited:
@jb321 you sir are a god among men, I see what you are trying to undertake and this shit is amazing.

Road to 350+ (oh how I hope it never does) but this will make life soo much easier
 
@jb321 you sir are a god among men, I see what you are trying to undertake and this shit is amazing.

Road to 350+ (oh how I hope it never does) but this will make life soo much easier
Wait until they unleash Road to 450+
 
I understand what you are saying but those are calculations. If you want to make 500 then you need the components for 500. The order in the SQL query doesn’t matter for that.
 
Feeling pretty dense here, I know it's possible just not getting the structure..

Given 2 items, the pack slot and the slot in the pack.. what is the qty of the item in that slot in that bag? What is the syntax?

Code:
   local BankSlot = mq.TLO.FindItemBank(p_id).ItemSlot() + 1
        local Slot2 = mq.TLO.FindItemBank(p_id).ItemSlot2() + 1

My first answer is:

mq.TLO.FindItemBank(97281).Stack())
 
Question - Lua - Slash and Sqlite

Users who are viewing this thread

Back
Top
Cart