Jump to content

Inventory.dropAll weird behavior on mirror mode


dankdrcode

Recommended Posts

I made a script that works well on stealth mode but when using mirror mode the behavior is not the same when using Inventory.dropAll(). 

In stealth mode it takes ~10 seconds to drop a full inventory.

In mirror mode it takes +30 seconds to drop a full inventory.

Is this normal behavior? I'm reporting it as a bug because it seems so strange and robotic.

 

This is my code

inventory.dropAllExcept("Feather", "Fly fishing rod");

I'm not using any while loops or sleep commands...

 

If this isn't a bug, can someone please explain the discrepancy between the two? I'm still learning so any info is appreciated

Link to comment
Share on other sites

Completely normal. Some systems take a couple seconds to perform any inventory option on mirror mode. inventory.dropAll happens to perform many separate inventory options sequentially, so its going to take forever. You'll have better luck creating a custom dropAll method using getMouse().click(new RectangleDestination(getBot(), getInventory().getSlotBoundingBox(slotNum)))

  • Like 2
Link to comment
Share on other sites

1 hour ago, Camaro said:

Completely normal. Some systems take a couple seconds to perform any inventory option on mirror mode. inventory.dropAll happens to perform many separate inventory options sequentially, so its going to take forever. You'll have better luck creating a custom dropAll method using getMouse().click(new RectangleDestination(getBot(), getInventory().getSlotBoundingBox(slotNum)))

This is a great recommendation. @Camaro what is your take on the usage of the built-in functions like inventory.dropAll()? 

Link to comment
Share on other sites

2 hours ago, Fay said:

This is a great recommendation. @Camaro what is your take on the usage of the built-in functions like inventory.dropAll()? 

And if you don't mind answering this : What are some methods that you personally stay away from and what alternatives do you use instead? 

 

I wish these performance issues were documented somewhere.... 

Link to comment
Share on other sites

On 1/9/2022 at 4:49 PM, dankdrcode said:

And if you don't mind answering this : What are some methods that you personally stay away from and what alternatives do you use instead? 

 

I wish these performance issues were documented somewhere.... 

I think it just comes down to personal experience with the use of the API. If you are building your own bots, you'll get enough runtime with them to understand ways to optimize. The built in methods IMO are ways for people to jump right in and adopt the platform.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...