Jump to content

Recommended Posts

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
https://wrobot.eu/forums/topic/10205-how-to-open-junkboxes/
Share on other sites

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
https://wrobot.eu/forums/topic/10205-how-to-open-junkboxes/#findComment-48221
Share on other sites

SpellManager.CastSpellByNameLUA("Pick Lock");
var junkBoxLocation = Bag.GetItemContainerBagIdAndSlot(16883);
Lua.LuaDoString("PickupContainerItem("+junkBoxLocation[0]+","+junkBoxLocation[1]+")");

Tested this time, should work.

Link to comment
https://wrobot.eu/forums/topic/10205-how-to-open-junkboxes/#findComment-48239
Share on other sites

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
https://wrobot.eu/forums/topic/10205-how-to-open-junkboxes/#findComment-48252
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...