Implement ore camper
This commit is contained in:
24
FreshShit/OreCamper/event.lua
Normal file
24
FreshShit/OreCamper/event.lua
Normal file
@@ -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
|
2
FreshShit/OreCamper/init.lua
Normal file
2
FreshShit/OreCamper/init.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
aura_env.cooldown = 205
|
||||
aura_env.depositIterator = {}
|
Reference in New Issue
Block a user