October 3, 20187 yr Hi there, been trying to get a custom code snippet that will open all my junkboxes in inventory. Tried this so far: Lua.LuaDoString("CastSpellByName('Pick Lock')"); ItemsManager.UseItem(16883); Usefuls.WaitIsCastingAndLooting(); ItemsManager.UseItem(16883); The problem here is though that "UseItem" will cast a rightclick, but to use Pick Lock I need a left click on the Junkbox. Anyone got a good idea how to solve this?
October 3, 20187 yr Bag.PickupContainerItem(16883); Try that? also, rather than doing luadostring: SpellManager.CastSpellByNameLUA("Pick Pocket"); Edited October 3, 20187 yr by Marsbar
October 3, 20187 yr Author 7 minutes ago, Marsbar said: Bag.PickupContainerItem(16883); Try that? also, rather than doing luadostring: SpellManager.CastSpellByNameLUA("Pick Pocket"); Thanks, tried PickupCointainerItem already but not working, seems like its a click + drag.
October 4, 20187 yr SpellManager.CastSpellByNameLUA("Pick Lock"); var junkBoxLocation = Bag.GetItemContainerBagIdAndSlot(16883); Lua.LuaDoString("PickupContainerItem("+junkBoxLocation[0]+","+junkBoxLocation[1]+")"); Tested this time, should work.
October 4, 20187 yr Author 4 hours ago, Marsbar said: SpellManager.CastSpellByNameLUA("Pick Lock"); var junkBoxLocation = Bag.GetItemContainerBagIdAndSlot(16883); Lua.LuaDoString("PickupContainerItem("+junkBoxLocation[0]+","+junkBoxLocation[1]+")"); Tested this time, should work. Thanks, working now!
Create an account or sign in to comment