Skip to content

Instantly share code, notes, and snippets.

@Randactyl
Created March 7, 2015 20:40
Show Gist options
  • Select an option

  • Save Randactyl/2acf0b403cd29303fb65 to your computer and use it in GitHub Desktop.

Select an option

Save Randactyl/2acf0b403cd29303fb65 to your computer and use it in GitHub Desktop.
[ESO] Automated Fish Item Use
local function AddContextMenuOption(rowControl)
local bagId = rowControl.bagId
local slotIndex = rowControl.slotIndex
AddMenuItem("Use All", function()
local delay = 0
for i = 1, rowControl.stackCount do
zo_callLater(function() CallSecureProtected("UseItem", bagId, slotIndex) end, delay)
delay = delay + 2000
end
end, MENU_ADD_OPTION_LABEL)
ShowMenu(self)
end
local function AddContextMenuOptionSoon(rowControl)
zo_callLater(function() AddContextMenuOption(rowControl) end, 50)
end
ZO_PreHook("ZO_InventorySlot_ShowContextMenu", AddContextMenuOptionSoon)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment