Jump to content

Herb Cleaning


PlagueDoctor

Recommended Posts

Okay sorry bro i thought you were still wanted to fight with me or being my enemieLets clear everything!

Are we good now ?

If so i guarantee you that we will never fight again, We could be friends.

@@Imateamcape

 

nah i got over it pretty quick, im down to bury the hatchet we're cool smile.png

Edited by Imateamcape
Link to comment
Share on other sites

@

Fuck off it's not terrible, Don't just try to post shit when you don't even understand.

No other methods to check items quantity else than that.

If you really feel confident in yourself then let's see what other methods you have.

 

bro it's not necessary to check item quantity. he just needs to make an inventoryslotdestination and click on it. part of learning is understanding new abilities and adapting to them and using them when necessary. in this case, it's more efficient to use an inventoryslotdestination bro.

 

also i fixed the issue on skype i think

Link to comment
Share on other sites

@

Fuck off it's not terrible, Don't just try to post shit when you don't even understand.

No other methods to check items quantity else than that.

If you really feel confident in yourself then let's see what other methods you have.

Stupid ass arrogant grey name..

 

First of all, if he were to use that poor code of yours, it would only work so long as he has either 28, or over 28 grimy herbs in the bank. Which is stupid. On-top of that, it doesn't check whether or not the inventory is even empty.

 

Oh and I don't understand? Weird how I have a scripter rank and you don't. Pleb.

		if (bank.isOpen() && inventory.isEmpty()) {
			Item herby = bank.getItem("grimyHerb");

			if (bank.contains("grimyHerb")) {
				if (herby.getAmount() >= 28) {
					bank.withdraw("grimyHerb", 28);
				} else if (herby.getAmount() < 28 && herby.getAmount() > 0) {
					bank.withdraw("grimyHerb", herby.getAmount());
				} else {
					stop();
				}

				new ConditionalSleep(5000) {

					@[member=Override]
					public boolean condition() throws InterruptedException {
						return inventory.contains("grimyHerb");
					}
				}.sleep();
			}
		}
Link to comment
Share on other sites

		if (bank.isOpen() && inventory.isEmpty()) {
			Item herby = bank.getItem("grimyHerb");

			if (bank.contains("grimyHerb")) {
				if (herby.getAmount() >= 28) {
					bank.withdraw("grimyHerb", 28);
				} else if (herby.getAmount() < 28 && herby.getAmount() > 0) {
					bank.withdraw("grimyHerb", herby.getAmount());
				} else {
					stop();
				}

				new ConditionalSleep(5000) {

					@[member='Override']
					public boolean condition() throws InterruptedException {
						return inventory.contains("grimyHerb");
					}
				}.sleep();
			}
		}

 

Alright, Thanks for that bro.

Btw I was just giving him suggestions!

Sorry for bothering!

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

 

Stupid ass arrogant grey name.. emote3.png

 

 

IMO that code has pointless checks and this code is cleaner.

Comments explain my thoughts on the get amount checks and why they aren't needed.

 

if (bank.isOpen() && inventory.isEmpty()) {
			
			// Note to newbies, if you had this check in the parent 'if' statement
			// And did 'else stop();' it would stop if the bank wasn't open or inventory wasn't empty.
			if(bank.contains("grimyHerb")) 
			{
				/* 
				 * Regardless of how many you have it will withdraw the most you can
				 * Therefore there is no need to check how many you have and withraw that many,
				 * Just withdraw all. If you have 21 it will withdraw 21 if you have 1 million
				 * It will withdraw as many as your inventory can fit.
				*/
				bank.withdrawAll("grimyHerb"); 
				
				new ConditionalSleep(5000) {

					@[member='Override']
					public boolean condition() throws InterruptedException {
						return inventory.contains("grimyHerb");
					}
				}.sleep();
			}
		}

also kek at this thread feels.png

Edited by venetox
Link to comment
Share on other sites

 

IMO that code has pointless checks and this code is cleaner.

Comments explain my thoughts on the get amount checks and why they aren't needed.

 

if (bank.isOpen() && inventory.isEmpty()) {
			
			// Note to newbies, if you had this check in the parent 'if' statement
			// And did 'else stop();' it would stop if the bank wasn't open or inventory wasn't empty.
			if(bank.contains("grimyHerb")) 
			{
				/* 
				 * Regardless of how many you have it will withdraw the most you can
				 * Therefore there is no need to check how many you have and withraw that many,
				 * Just withdraw all. If you have 21 it will withdraw 21 if you have 1 million
				 * It will withdraw as many as your inventory can fit.
				*/
				bank.withdrawAll("grimyHerb"); 
				
				new ConditionalSleep(5000) {

					@[member='Override']
					public boolean condition() throws InterruptedException {
						return inventory.contains("grimyHerb");
					}
				}.sleep();
			}
		}

just because your version is more simplistic, it doesn't necessarily mean it's better. :doge:

the checks are also objective, you pronounce it tomato, i pronounce it tomatoe, etc

i'd rather not spam the player's game chat with "you do not have enough inventory space for that".

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