diff --git a/FreshShit/OreCamper/event.lua b/FreshShit/OreCamper/event.lua new file mode 100644 index 0000000..f338832 --- /dev/null +++ b/FreshShit/OreCamper/event.lua @@ -0,0 +1,24 @@ +-- UNIT_SPELLCAST_SENT +---@param allstates allstates +---@param e string +---@param source string +---@param spellname string +---@param _ string +---@param target string +function(allstates, e, source, spellname, _, target) + if source ~= "player" then return end + if spellname ~= "Mining" then return end + if aura_env.depositIterator[target] == nil then aura_env.depositIterator[target] = 0 end + local state = { + changed = true, + show = true, + progressType = "timed", + autoHide = true, + duration = aura_env.cooldown, + expirationTime = GetTime() + aura_env.cooldown, + name = string.format("%s #%d", target, aura_env.depositIterator[target]), + } + allstates[aura_env.depositIterator[target]] = state + aura_env.depositIterator[target] = aura_env.depositIterator[target] + 1 + return true +end \ No newline at end of file diff --git a/FreshShit/OreCamper/init.lua b/FreshShit/OreCamper/init.lua new file mode 100644 index 0000000..7b24e43 --- /dev/null +++ b/FreshShit/OreCamper/init.lua @@ -0,0 +1,2 @@ +aura_env.cooldown = 205 +aura_env.depositIterator = {}