diff --git a/Watchmen_Envenomer.xml b/Watchmen_Envenomer.xml new file mode 100644 index 0000000..2b5c740 --- /dev/null +++ b/Watchmen_Envenomer.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ColourNote ("lime", "", "Deleted " .. #queue .. " outstanding item(s) from the queue.") + queue = {} -- queue is now empty + + + + + + if #queue == 0 then + ColourNote ("red", "", "Pending envenom queue is empty") + return + end -- if + + ColourNote ("lime", "", "Envenom queue:") + for k, v in ipairs (queue) do + ColourNote ("yellow", "", v.name .. ", " .. v.id .. ", " .. v.giver) + end -- for + ColourNote ("lime", "", #queue .. " outstanding item(s) in the envenom queue.") + + + + + + if #queue == 0 then + ColourNote ("red", "", "Pending envenom queue is empty") + return + end -- if + + item = table.remove(queue, 1) + + ColourNote ("lime", "", "Removed item ID: " .. item.id .. " from " .. item.giver) + + + + + + if #queue == 0 then + ColourNote ("red", "", "Pending envenom queue is empty") + return + end -- if + + item = queue[1] + + state = 16 + Send ("envenom " .. item.id) + + + + + + + + + + + + + + + + + + +