Code: Select all
^srec (.+)$
Code: Select all
local itemslist = matches[2]
local storeditems = { "tin", "silver", "gold" }
for _,v in ipairs(storeditems) do
table.insert(itemslist, v)
end
display(itemslist)
table.save(getMudletHomeDir() .. "/" .. itemslist, itemslist)
echo(string.format("Variables saved in: '%s'", getMudletHomeDir() .. itemslist))
itemslist would then get set to mining
I would then loop through stored items and add them to mining
I then would take the mining list and save it so I can use it as a persistent variable.
Currently it saves as a string, so I tried different code to convert it to a table but it saves over the local variable.
Code: Select all
local itemslist = matches[2]
local itemslist = {}