Hello. I've been trying to figure out if this is possible without any luck (exacerbated by my.. extremely limited programming experience), but what I want to do is accept a wildcard from an alias, and use a table based on that wildcard. I can't find how for the life of me.
For example: say I want to make a health elixir. I -could- write a script that has an 'if elixir == "health" then do' for each elixir I can make, but what I would rather do is have a selection of tables listing the ingredients for each, and then send them to a single function that takes the table named after the elixir I want, reads the ingredient values in the table, and produces an elixir from that.
It would be something like:
Thus I would use this by something like 'tm Health vial1'.
Is this at all possible? Am I thinking about this the wrong way?
For example: say I want to make a health elixir. I -could- write a script that has an 'if elixir == "health" then do' for each elixir I can make, but what I would rather do is have a selection of tables listing the ingredients for each, and then send them to a single function that takes the table named after the elixir I want, reads the ingredient values in the table, and produces an elixir from that.
It would be something like:
function Transmutate (name, line, wildcards)
Health = {"realgar", "plumbum", "ferrum", "bisemutum"}
elixir = GetVariable("elixir")
vial = GetVariable("vial")
for i = 1, 4 do
for n = 1, <table length from 'elixir' variable> do
Send("outr 1", <table name from 'elixir' variable>[n])
end
end
Send("transmutate 4 ", elixir, " in alembic")
Send("decant alembic into ", vial, " 4 times")
end
Thus I would use this by something like 'tm Health vial1'.
Is this at all possible? Am I thinking about this the wrong way?