Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alch_recipes = {
- health = {
- galingale = 8,
- sargassum = 2,
- juniper = 1,
- yarrow = 1},
- mana = {
- marjoram = 6,
- flax = 4,
- reish = 1,
- kafe = 1},
- bromide = {
- rosehips = 3,
- marjoram = 3,
- weed = 3,
- calamus = 2,
- reishi = 2},
- liniment = {
- arnica = 4,
- chervil = 2,
- yarrow = 2,
- horehound = 1,
- flax = 2},
- quicksilver = {
- kafe = 4,
- pennyroyal = 4,
- safe = 4,
- mercury = 1},
- antidote = {
- reishi = 6,
- wormwood = 6,
- myrtle = 2},
- mending = {
- arnica = 5,
- coltsfoot = 5,
- juniper = 5,
- rosehips = 3},
- love = {
- rosehips = 5,
- weed = 5,
- marjoram = 3,
- coltsfoot = 3,
- faeleaf = 1},
- regeneration = {
- arnica = 5,
- flax = 5,
- mistletoe = 3,
- sparkleberry = 2,
- chervil = 2,
- kombu = 1},
- allheale = {
- reishi = 7,
- kombu = 6,
- sargassum = 5,
- arnica = 3,
- yarrow = 2,
- pennyroyal = 2,
- sparkleberry = 2,
- merbloom = 2}
- }
- function alchCraft(potion, amt)
- if not tostring(potion) then
- error("Invalid type to arg #1 in alchCraft: string expected, "..type(potion).." received.")
- return nil
- end
- tonumber(amt)
- if amt > 10 then
- echo("Warning, brewing too much!")
- else
- if not amt then amt = 1 end
- local herbshit = {}
- if not alch_recipes[potion] then error("No such recipe.") return end
- for x,y in pairs(alch_recipes[potion]) do
- table.insert(herbshit, x, y*amt)
- end
- -- y is number of herbs, x is id of herb
- for x,y in pairs(herbshit) do
- Send("outr "..y.." "..x)
- end
- for x,y in pairs(herbshit) do
- Send("add " ..y.." "..x)
- Send("amagalmate "..potion)
- end
- end
- end
Add Comment
Please, Sign In to add comment