Fictional 1 Share Posted May 1, 2020 How to Interact with the last of an item I tried with slotInteract(27, "Use") however this doesn't work, what is the correct code for this ? Link to comment Share on other sites More sharing options...
Chuppa 2 Share Posted May 1, 2020 Works fine for me, maybe check your code for logic errors? Link to comment Share on other sites More sharing options...
Fictional 1 Author Share Posted May 1, 2020 3 minutes ago, Chuppa said: Works fine for me, maybe check your code for logic errors? What is your code? Well I saw that the slotInteract only returns a true lol. How would I interact with the last item even? Link to comment Share on other sites More sharing options...
Chuppa 2 Share Posted May 1, 2020 I just basically copy-pasted your code to the start of my script to test it and it used the item in the last slot. getInventory().slotInteract(27, "Use"); Link to comment Share on other sites More sharing options...
Chuppa 2 Share Posted May 1, 2020 Quote Well I saw that the slotInteract only returns a true lol. How would I interact with the last item even? That's how you do it, all interact() methods in dreambot API return a boolean - true if interacting succeeded and false if interacting failed (i.e failed to click on certain object for example). If you already know what item is in your last slot (it doesn't change) you could also just interact with that item like: getInventory().interact(ITEM_ID, "ACTION"); However seeing as getInventory.slotInteract(ITEM_SLOT_NUMBER, "ACTION") works fine for me I really think it's the rest of your code that causes this problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.