Advertisement
Urtgard

Handle opening Glimmering Treasure Chest

Jun 20th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. -- Handle opening Glimmering Treasure Chest
  2. if fishing and opening and lastNode and (lastNode == L["Glimmering Treasure Chest"]) and select(8, GetInstanceInfo()) == 1626 then
  3.     local bigChest = false
  4.     for _, slot in pairs(GetLootInfo()) do
  5.         if slot.item == L["Ancient Mana"] and slot.quantity == 100 then
  6.             bigChest = true
  7.         end
  8.     end
  9.  
  10.     if bigChest == true then
  11.         local names = {"Arcano-Shower", "Displacer Meditation Stone", "Kaldorei Light Globe", "Unstable Powder Box", "Wisp in a Bottle", "Ley Spider Eggs"}
  12.         for _, name in pairs(names) do
  13.             local v = self.db.profile.groups.items[name]
  14.             if v and type(v) == "table" and v.enabled ~= false then
  15.                 if v.attempts == nil then v.attempts = 1 else v.attempts = v.attempts + 1 end
  16.                 self:OutputAttempts(v)
  17.             end
  18.         end
  19.  
  20.         v = self.db.profile.groups.mounts["Torn Invitation"]
  21.         if v and type(v) == "table" and v.enabled ~= false then
  22.             if v.attempts == nil then v.attempts = 1 else v.attempts = v.attempts + 1 end
  23.             self:OutputAttempts(v)
  24.         end
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement