Jump to content

Inventory Issue?


Trees

Recommended Posts

Not really sure why this is happening, but after interacting with an item in the inventory, it hovers over the item again or something like that?

FW1smjn.gif

In this example it involves dropping, but even things like ID'ing herbs causes this to happen.

Any ideas how to fix? I am just looping over inventory.getItems(), and it's only iterating once...

Link to comment
Share on other sites

Not really sure why this is happening, but after interacting with an item in the inventory, it hovers over the item again or something like that?

FW1smjn.gif

In this example it involves dropping, but even things like ID'ing herbs causes this to happen.

Any ideas how to fix? I am just looping over inventory.getItems(), and it's only iterating once...

Show us the code? And by the way for dropping you just probably just use getInventory().dropAll(itemName);

Link to comment
Share on other sites

Like I said I'm literally just iterating inventory.getItems and interacting with the item. And that built in method got me banned so I made my own.

How do you know it was the built in drop method that got you banned emote32342.png

 

And just so you know, all the built in method does is:

Filter nameFilter = new NameFilter("Trout");

for (int slot = 0; slot < 28; slot ++) {

   Item itemInSlot = getInventory().getItemInSlot(slot);

   if(itemInSlot != null && nameFilter.match(itemInSlot)) {
       getInventory().interact(slot, "Drop");
       sleep(gRandom(75, 25));
   }    
}

So I fail to see how what you are doing will be any different.

Edited by Explv
Link to comment
Share on other sites

How do you know it was the built in drop method that got you banned emote32342.png

 

And just so you know, all the built in method does is:

Filter nameFilter = new NameFilter("Trout");

for (int slot = 0; slot < 28; slot ++) {

   Item itemInSlot = getInventory().getItemInSlot(slot);

   if(itemInSlot != null && nameFilter.match(itemInSlot)) {
       getInventory().interact(slot, "Drop");
       sleep((long)gRandom(75, 25.0D));
   }    
}

So I fail to see how what you are doing will be any different.

 

 

randomized drop patterns are gud?

They are pretty to watch :boge:

Edited by House
Link to comment
Share on other sites

Well he isn't randomizing it, he's just iterating over the inventory and dropping the items in order?

 

And I don't think randomizing it would make any difference, and would probably be slower lol

 

Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27 :D

Link to comment
Share on other sites

Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27 biggrin.png

 

What you are experiencing is the fact that the Inventory doesn't update immediately. Either loop all 28 slots in 1 onLoop, or keep an iterator between onLoops to know where to continue from.

 

Also, its < 28 cause indexes 0-27 need to be iterated over :p

Edited by Lemons
  • Like 1
Link to comment
Share on other sites

Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27 biggrin.png

 

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27

 

0                                                                                                                                       < 28

Edited by Explv
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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