Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- List of all types of herb that we wish to maintain a stock of
- local herblist = {
- "yarrow",
- "galingale",
- "marjoram",
- "colewort",
- "mistletoe",
- "juniper",
- "faeleaf",
- "chervil",
- "rosehips",
- "sargassum",
- "sage",
- "reishi",
- "kafe",
- "flax",
- "pennyroyal",
- "weed",
- "wormwood",
- "arnica",
- "horehound",
- "calamus",
- "sparkleberry",
- "kombu",
- "coltsfoot",
- "merbloom",
- "myrtle",
- "earwort"
- }
- function createHerbTable()
- -- Purge existing data first
- myHerbs = {}
- -- Now, create our table structure with a default value of 0 for each herb
- for _, v in ipairs(herblist) do
- myHerbs[v] = 0
- end
- end
- function parseRiftContents(limit)
- local limit = tonumber(limit) or 2000
- -- m&m already provides easy access to current rift values, so we'll use those
- for k, v in pairs(mm.me.riftcontents) do
- if v < limit then
- local amt = limit - v
- -- Check our herblist table to ensure we only fill those herbs we require
- if table.contains(herblist, k) then
- myHerbs[k] = amt
- end
- end
- end
- end
- function doFillRift()
- for k, v in pairs(myHerbs) do
- send("buy " .. v .. " " .. k)
- send("inr all " .. k)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment