Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/07/15, 02:38 PM   #1
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Fish gutting snippet

Made this real quick to use all of my hundreds of fish items. There aren't really any safety checks, so it needs to be used responsibly (use it on fish!)

Lua Code:
  1. local function AddContextMenuOption(rowControl)
  2.     local bagId = rowControl.bagId
  3.     local slotIndex = rowControl.slotIndex
  4.  
  5.     AddMenuItem("Use All", function()
  6.             local delay = 0
  7.             for i = 1, rowControl.stackCount do
  8.                 zo_callLater(function() CallSecureProtected("UseItem", bagId, slotIndex) end, delay)
  9.                 delay = delay + 2000
  10.             end
  11.         end, MENU_ADD_OPTION_LABEL)
  12.  
  13.     ShowMenu(self)
  14. end
  15.  
  16. local function AddContextMenuOptionSoon(rowControl)
  17.     zo_callLater(function() AddContextMenuOption(rowControl) end, 50)
  18. end
  19.  
  20. ZO_PreHook("ZO_InventorySlot_ShowContextMenu", AddContextMenuOptionSoon)

If anyone wants to make something of this, go for it.

edit: one nice change would be disabling the "Fish acquired." center screen announcement!

Last edited by Randactyl : 03/07/15 at 02:45 PM.
 
 

ESOUI » AddOns » Alpha/Beta AddOns » Fish gutting snippet

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off