Add AutoCoin.
This commit is contained in:
commit
65dc500b3b
44
AutoCoin/AutoCoin.lua
Normal file
44
AutoCoin/AutoCoin.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
AutoCoin = {}
|
||||
AutoCoin.title = GetAddOnMetadata("AutoCoin", "Title")
|
||||
AutoCoin.version = GetAddOnMetadata("AutoCoin", "Version")
|
||||
AutoCoin.author = GetAddOnMetadata("AutoCoin", "Author")
|
||||
print(("Loaded %s v%s by %s."):format(AutoCoin.title, AutoCoin.version, AutoCoin.author))
|
||||
|
||||
local coinAndBijouRolls = {
|
||||
[19698] = 1, -- 0=Pass, 1=Need, 2=Greed
|
||||
[19699] = 1,
|
||||
[19700] = 1,
|
||||
[19701] = 1,
|
||||
[19702] = 1,
|
||||
[19703] = 1,
|
||||
[19704] = 1,
|
||||
[19705] = 1,
|
||||
[19706] = 1,
|
||||
[19707] = 1,
|
||||
[19708] = 1,
|
||||
[19709] = 1,
|
||||
[19710] = 1,
|
||||
[19711] = 1,
|
||||
[19712] = 1,
|
||||
[19713] = 1,
|
||||
[19714] = 1,
|
||||
[19715] = 1
|
||||
}
|
||||
|
||||
local rolls = {
|
||||
[0] = "Pass",
|
||||
[1] = "Need",
|
||||
[2] = "Greed"
|
||||
}
|
||||
|
||||
local frame = CreateFrame("FRAME");
|
||||
frame:RegisterEvent("START_LOOT_ROLL");
|
||||
frame:SetScript("OnEvent", function(self, event, rollID, rollTime)
|
||||
local link = GetLootRollItemLink(rollID)
|
||||
local _, itemID = strsplit(":", link)
|
||||
local roll = coinAndBijouRolls[tonumber(itemID)]
|
||||
if roll ~= nil then
|
||||
print(("|cff00ffffAutoCoin|r: %s %s."):format(rolls[roll], link))
|
||||
RollOnLoot(rollID, roll)
|
||||
end
|
||||
end);
|
10
AutoCoin/AutoCoin.toc
Normal file
10
AutoCoin/AutoCoin.toc
Normal file
|
@ -0,0 +1,10 @@
|
|||
## Interface: 11304
|
||||
|
||||
## Title: AutoCoin
|
||||
## Notes: Automatically need Zul'Gurub coins and bijous.
|
||||
## Author: Caspervk
|
||||
## Version: 0.0.1
|
||||
|
||||
## X-License: GNU General Public License v3 or later (GPLv3+)
|
||||
|
||||
AutoCoin.lua
|
2
AutoCoin/README.md
Executable file
2
AutoCoin/README.md
Executable file
|
@ -0,0 +1,2 @@
|
|||
# AutoCoin
|
||||
World of Warcraft Classic AddOn to automatically need Zul'Gurub coins and bijous.
|
Loading…
Reference in a new issue