Created
March 7, 2015 20:40
-
-
Save Randactyl/2acf0b403cd29303fb65 to your computer and use it in GitHub Desktop.
[ESO] Automated Fish Item Use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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