Guest User

Untitled

a guest
May 22nd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. alch_recipes = {
  2. health = {
  3. galingale = 8,
  4. sargassum = 2,
  5. juniper = 1,
  6. yarrow = 1},
  7. mana = {
  8. marjoram = 6,
  9. flax = 4,
  10. reish = 1,
  11. kafe = 1},
  12. bromide = {
  13. rosehips = 3,
  14. marjoram = 3,
  15. weed = 3,
  16. calamus = 2,
  17. reishi = 2},
  18. liniment = {
  19. arnica = 4,
  20. chervil = 2,
  21. yarrow = 2,
  22. horehound = 1,
  23. flax = 2},
  24. quicksilver = {
  25. kafe = 4,
  26. pennyroyal = 4,
  27. safe = 4,
  28. mercury = 1},
  29. antidote = {
  30. reishi = 6,
  31. wormwood = 6,
  32. myrtle = 2},
  33. mending = {
  34. arnica = 5,
  35. coltsfoot = 5,
  36. juniper = 5,
  37. rosehips = 3},
  38. love = {
  39. rosehips = 5,
  40. weed = 5,
  41. marjoram = 3,
  42. coltsfoot = 3,
  43. faeleaf = 1},
  44. regeneration = {
  45. arnica = 5,
  46. flax = 5,
  47. mistletoe = 3,
  48. sparkleberry = 2,
  49. chervil = 2,
  50. kombu = 1},
  51. allheale = {
  52. reishi = 7,
  53. kombu = 6,
  54. sargassum = 5,
  55. arnica = 3,
  56. yarrow = 2,
  57. pennyroyal = 2,
  58. sparkleberry = 2,
  59. merbloom = 2}
  60. }
  61.  
  62.  
  63.  
  64. function alchCraft(potion, amt)
  65. if not tostring(potion) then
  66. error("Invalid type to arg #1 in alchCraft: string expected, "..type(potion).." received.")
  67. return nil
  68. end
  69. tonumber(amt)
  70. if amt > 10 then
  71. echo("Warning, brewing too much!")
  72. else
  73. if not amt then amt = 1 end
  74. local herbshit = {}
  75. if not alch_recipes[potion] then error("No such recipe.") return end
  76. for x,y in pairs(alch_recipes[potion]) do
  77. table.insert(herbshit, x, y*amt)
  78. end
  79. -- y is number of herbs, x is id of herb
  80. for x,y in pairs(herbshit) do
  81. Send("outr "..y.." "..x)
  82. end
  83. for x,y in pairs(herbshit) do
  84. Send("add " ..y.." "..x)
  85. Send("amagalmate "..potion)
  86. end
  87. end
  88. end
Add Comment
Please, Sign In to add comment