Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement