Lobbert 3 Posted October 3, 2018 Share Posted October 3, 2018 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? Link to comment Share on other sites More sharing options...
Marsbar 227 Posted October 3, 2018 Share Posted October 3, 2018 (edited) Bag.PickupContainerItem(16883); Try that? also, rather than doing luadostring: SpellManager.CastSpellByNameLUA("Pick Pocket"); Edited October 3, 2018 by Marsbar Link to comment Share on other sites More sharing options...
Lobbert 3 Posted October 3, 2018 Author Share Posted October 3, 2018 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. Link to comment Share on other sites More sharing options...
Marsbar 227 Posted October 4, 2018 Share Posted October 4, 2018 SpellManager.CastSpellByNameLUA("Pick Lock"); var junkBoxLocation = Bag.GetItemContainerBagIdAndSlot(16883); Lua.LuaDoString("PickupContainerItem("+junkBoxLocation[0]+","+junkBoxLocation[1]+")"); Tested this time, should work. Lobbert 1 Link to comment Share on other sites More sharing options...
Lobbert 3 Posted October 4, 2018 Author Share Posted October 4, 2018 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! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now