Jump to content

Herb Cleaning


PlagueDoctor

Recommended Posts

So i'm making a herb cleaning script and i'm having trouble finding a method of cleaning each herb that doesn't either suck(clicks each herb too slowly), or occasionally mess up(click every herb and then do it again even though they're all clean). 

 

As you read this i am trying out different things to try and reach a desirable result.

 

How would you do this? Can you inform me of a good way to do this?

 

Link to comment
Share on other sites

Try mouse.click(), it should be faster than interact() because it has no sleeps

 

Yeah mouse click isn't great though, because when you're running out of herbs you might not have a full inventory, so it would click on nothing a bunch of times. Which could be okay, but isn't really perfect.

Link to comment
Share on other sites

Yeah mouse click isn't great though, because when you're running out of herbs you might not have a full inventory, so it would click on nothing a bunch of times. Which could be okay, but isn't really perfect.

No matter what you use, you will still check what you actually have in your inventory

The API fortunately doesn't provide a Herblore#cleanAllGrimyHerbsInInventoryThenBank()

  • Like 6
Link to comment
Share on other sites

do it so it checks if the inventory has x28 of the cleaned thing then it stops and bank

if (getInventory().getAmount("Item Name") == 28) {
// bank
	}  

@@PlagueDoctor

 

Yeah... No... If it started with less than 28 or withdrew less than 28 (maybe the bank didn't have 28 remaining), it'll just be left standing there.

 

 

 

@@PlagueDoctor

If I were you, I would check if the inventory contains the grimy type herb. If it does, proceed to get its slot, make an InventorySlotDestination out of it (it's documented in the API), and click on the InventorySlotDestination. Then return how much you want to sleep for (maybe 50-150ms).

  • Like 1
Link to comment
Share on other sites

Yeah... No... If it started with less than 28 or withdrew less than 28 (maybe the bank didn't have 28 remaining), it'll just be left standing there.

 

Then he could just do that to check if the bank has enough amount of the item or not..

if(bank.getItem("Item").getAmount() >= 28) {
    bank.withdraw("Item", 28);
}else {
    stop();
}

@@Imateamcape 

Edited by Mr Pro Pop
Link to comment
Share on other sites

Then he could do that to check if the bank has enough amount of the item or not..

if(bank.getItem("Item").getAmount() >= 28) {
    bank.withdraw("Item", 28);
}else {
    stop();
}

@@Imateamcape

 

thats a very roundabout and less stable way of doing the exact same thing and would undoubtedly be prone to far more errors. not efficient.

Link to comment
Share on other sites

thats a very roundabout and less stable way of doing the exact same thing and would undoubtedly be prone to far more errors. not efficient.

 

1-) No don't just try to get me wrong, it's good nothing is wrong with it, Checks if the bank has enough amount of the item if so it withdraws and continue otherwise the script will close.

This is how it is in the api and 100% working with no errors, In case you didn't like it you could code your own system!

 

I didn't even ask you for your opinion and don't even care if you liked it or not

Told you before I don't want to get on with you, Otherwise ill just ignore if you couldn't understand.

I have no time to waste replying your nooby quotes.

Edited by Mr Pro Pop
Link to comment
Share on other sites

1-) No, its good nothing is wrong with it, Checks if the bank has enough amount of the item if so it withdraws and continue otherwise the script will close.

This is how it is in the api and 100% working with no errors, Otherwise get your own system if you did not like it.

Its your own problem for understanding or not.

 

2-) Don't just try to get me wrong, Leave me alone I don't really care if you liked it or not, Didn't ask for your opinion.

Told you before i don't want to get on with you, Otherwise ill just ignore if you couldn't understand.

 

I have no time to waste replying your nooby quotes.

queJBwt.gif queJBwt.gif queJBwt.gif queJBwt.gif queJBwt.gif queJBwt.gif

come back to me when you understand basic day 1 for loops (quote from skype of you asking me):

On 9/16/16, at 10:18 PM, Mr Pro Pop wrote:

> Do you think you could provide us with a snippet smile.png

 

you had a bad solution and i called you out on it. chill lol

Link to comment
Share on other sites

queJBwt.gif queJBwt.gif queJBwt.gif queJBwt.gif queJBwt.gif queJBwt.gif

come back to me when you understand basic day 1 for loops (quote from skype of you asking me):

 

you had a bad solution and i called you out on it. chill lol

 

Well this was since 10 days now i am good enough at coding, Plus let me ask you how you were when you started coding and learnt from code academy/others resources, Weren't it step by step to get on your current level ?

Thats exactly what i am currently doing right now!

 

Plus no one doesn't need help, Helps getting others to memorize and cover it next time!

 

I am not trying to be rude but since you won't understand it wasn't me the guy who sent you the message then i don't rather speak with you, I sent you skype chat proof and screenshots and tried to contact you but you ignored and wont deal with that.

Edited by Mr Pro Pop
Link to comment
Share on other sites

Well this was since 10 days now i am good enough at coding, Plus let me ask you how you were when you started coding and learnt from code academy/others resources, Weren't it step by step to get on your current level ?

Thats exactly what i am currently doing right now!

 

I am not trying to be rude but since you won't understand it wasn't me the guy who sent you the message then i don't rather speak with you, I sent you skype chat proof and screenshots and tried to contact you but you ignored and wont deal with that.

 

you dont just learn to code in 10 days m8. i dont know why you're reacting in such an aggressive way, but im not surprised after our initial interaction. look, here's why yours would not work in a straightforward way:

 

yours would clean one, then the inventory wouldn’t contain 28 anymore, and it would bank everything again, then take out another full inventory, then clean one more, then repeat.

 

this doesnt need to be a dispute and i'm not sure why you're disputing it (??). we had an altercation, it ended awhile ago. water under the bridge. idk why you continue acting like this...

Link to comment
Share on other sites

you dont just learn to code in 10 days m8. i dont know why you're reacting in such an aggressive way, but im not surprised after our initial interaction. look, here's why yours would not work in a straightforward way:

 

yours would clean one, then the inventory wouldn’t contain 28 anymore, and it would bank everything again, then take out another full inventory, then clean one more, then repeat.

 

this doesnt need to be a dispute and i'm not sure why you're disputing it (??). we had an altercation, it ended awhile ago. water under the bridge. idk why you continue acting like this...

 

Well i didn't argue because of that.

I argued because i have done it in the right way and then you came and said its wrong.

 

If you didn't really read it well so here is what i said

 

do it so it checks if the inventory has x28 of the "cleaned" thing then it stops and bank..

 

do you see that "cleaned" word ? it was your problem reading from the first.

 

 

Edited by Mr Pro Pop
Link to comment
Share on other sites

Well i didn't argue because of that.

I argued because i have done it in the right way and then you came and said its wrong.

 

If you didn't really read it well so here is what i said

 

do it so it checks if the inventory has x28 of the "cleaned" thing then it stops and bank..

 

do you see that "cleaned" word ?

 

it was your problem reading from the first.

 

then if it misclicks on one, it needs to go through the whole inventory again. why spend 3 hours debugging this, when you can just use 1 object to make simpler and more efficient code. christ. it is wrong.

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...