commit 65dc500b3bfceee5600c4a22235c090959557ccd Author: Casper V. Kristensen Date: Mon May 11 18:08:45 2020 +0200 Add AutoCoin. diff --git a/AutoCoin/AutoCoin.lua b/AutoCoin/AutoCoin.lua new file mode 100644 index 0000000..45e6749 --- /dev/null +++ b/AutoCoin/AutoCoin.lua @@ -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); diff --git a/AutoCoin/AutoCoin.toc b/AutoCoin/AutoCoin.toc new file mode 100644 index 0000000..070c67e --- /dev/null +++ b/AutoCoin/AutoCoin.toc @@ -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 diff --git a/AutoCoin/README.md b/AutoCoin/README.md new file mode 100755 index 0000000..489c2bf --- /dev/null +++ b/AutoCoin/README.md @@ -0,0 +1,2 @@ +# AutoCoin +World of Warcraft Classic AddOn to automatically need Zul'Gurub coins and bijous.