1. Saewelo's Avatar
    Saewelo
    Guest

    Macros for destroying Soul Shards

    Haven't seen this anywhere around this warlock subsection and I thought it would be worth sharing for fellow warlocks that might not know of them.

    Destroying a single shard:
    Code:
    /run i="Soul Shard"d=1 for x=0,4 do for y=1,GetContainerNumSlots(x) do  if (d>0) then l=GetContainerItemLink(x,y)  if l and GetItemInfo(l)==i then PickupContainerItem(x,y) DeleteCursorItem() d=d-1 end end end end
    Destroy all but a specified number of shards:
    Code:
    /run i="Soul Shard"d=GetItemCount(i)-20 for x=0,4 do for y=1,GetContainerNumSlots(x) do  if (d>0) then l=GetContainerItemLink(x,y) if l and GetItemInfo(l)==i then PickupContainerItem(x,y) DeleteCursorItem() d=d-1 end end end end
    Change the "20" in "d=GetItemCount(i)-20" to set the number of shards you want to carry.

  2. Soul shards limiter add-on:
    https://cdn.discordapp.com/attachmen...rdsLimiter.rar

    This add-on will automatically remove excessive shards. Edit the value of `llimit` variable to the maximum amount of soul shards that is desireable. By default it's 15.

    Code:
    local frame = CreateFrame('FRAME', 'SoulShardsLimiterFrame', UIParent)
    
    local soulShardItemId = 6265
    local limit = 15
    
    frame:RegisterEvent('BAG_UPDATE')
    frame:SetScript('OnEvent', function(self, event, containerId, ...)
      local k = 0 
      for i = 0, 4 do 
        for j = 1, GetContainerNumSlots(i) do 
          local itemId = GetContainerItemID(i, j) 
          if soulShardItemId == itemId then 
            k = k + 1 
            if k > limit then 
              PickupContainerItem(i, j) 
              DeleteCursorItem() 
            end 
          end 
        end
      end
    end)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •