local function get_recipe_data()
local data_array = {}
for x in db:nrows(
"SELECT RecipeID FROM MasterRecipeTable WHERE RecipeID !=0") do
table.insert(data_array, x.RecipeID)
end
return data_array
end
local function run_recipe_data()
local recipe_dataset = get_recipe_data()
for c = 1, #recipe_dataset do
local ignore_data = {}
local farmed_data = {}
local shopping_data = {}
local recipe_data = {}
local bank_data = {}
local bought_table = {}
recipe_data, ignore_data, bank_data, farmed_data, shopping_data =
crunch.items(recipe_dataset[c], 1, 0, 0)
if farmed_data[1] ~= nil then
print(recipe_dataset[c], " farmed")
table.insert(bought_table, recipe_dataset[c] .. ",0")
else
table.insert(bought_table, recipe_dataset[c] .. ",1")
print(recipe_dataset[c], " bought")
end
mq.delay(1)
end
return bought_table
end