Jump to content

Plague Doctor's - Chocolate Grinder


PlagueDoctor

Recommended Posts

http://2007.runescape.wikia.com/wiki/Money_making_guide/Grinding_chocolate_bars
 

$190-200k Profit Per/Hour ~

Script to execute the above method of money making.

No skill requirements!
 
Requirements:

  • Have Knife in bank or inventory
  • Have Chocolate bars in bank
  • Be near a bank or GE

Process:

  • Withdraws a Knife and 27 Chocolate Bars.
  • Turns all of the Chocolate bars into Chocolate Dust.
  • Deposits all Chocolate Dust.
  • If you have no Chocolate bars left, it logs out and stops script. 
  • Repeat.

Extra Notes:

  • You can only buy 10,000 Chocolate bars from the G.E every 4 hours. 
  • As with all scripts, if you don't want to get banned, script carefully or don't script at all.

Download: Google Drive Link
https://drive.google.com/file/d/0B68yui8zn4TPVXAyNHBtbzBKdWM/view?usp=sharing

 

EDITS:

  • 9/28/2016 - Added conditional sleeping, removed walk to bank function and added support for every bank.

 
If you have any issues, post them here. Otherwise, enjoy!

Edited by PlagueDoctor
  • Like 3
Link to comment
Share on other sites

You should really look into conditional sleeps..

Also, why is it restricted to one bank?

private Area varrockWestBank = new Area(3180, 3447, 3190, 3433);

You could just do - 

		if (map.isWithinRange(objects.closest("Grand Exchange booth"), 10) && !bank.isOpen()) {
			bank.open(); //attempts to open the bank
			new ConditionalSleep(10000) { //how many ms to wait for condition
				@[member=Override]
				public boolean condition() throws InterruptedException {
					//method goes here
					return bank.isOpen(); //ends conditional sleep if bank is open
				}
			}.sleep();
		}

		//now it proceeds to the next method

		if (bank.isOpen()) {
			new ConditionalSleep(10000) {
				@[member=Override]
				public boolean condition() throws InterruptedException {
                                        //add your methods here
					return inventory.contains("Knife") && inventory.contains("Chocolate bar"); //ends conditional sleep if you have the knife and chocolate bar
				}
			}.sleep();
		}

There's a lot that can be improved in your script. I suggest going through other open source scripts and releasing the source to your scripts for suggestions on improvements.

Link to comment
Share on other sites

You should really look into conditional sleeps..

Also, why is it restricted to one bank?

private Area varrockWestBank = new Area(3180, 3447, 3190, 3433);

You could just do - 

		if (map.isWithinRange(objects.closest("Grand Exchange booth"), 10) && !bank.isOpen()) {
			bank.open(); //attempts to open the bank
			new ConditionalSleep(10000) { //how many ms to wait for condition
				@[member='Override']
				public boolean condition() throws InterruptedException {
					//method goes here
					return bank.isOpen(); //ends conditional sleep if bank is open
				}
			}.sleep();
		}

		//now it proceeds to the next method

		if (bank.isOpen()) {
			new ConditionalSleep(10000) {
				@[member='Override']
				public boolean condition() throws InterruptedException {
                                        //add your methods here
					return inventory.contains("Knife") && inventory.contains("Chocolate bar"); //ends conditional sleep if you have the knife and chocolate bar
				}
			}.sleep();
		}

There's a lot that can be improved in your script. I suggest going through other open source scripts and releasing the source to your scripts for suggestions on improvements.

Thanks for the response, i'll look into what you mentioned. I created this script for my own use and decided to share in case others would find it useful.

Link to comment
Share on other sites

Thanks for the response, i'll look into what you mentioned. I created this script for my own use and decided to share in case others would find it useful.

 

Yes, I remember suggesting against it in the chatbox.

Conditional sleeps are your best friend when making scripts.

Best to learn great methods while just starting out. Practicing poor code will make it hard to switch over to better/cleaner code later on. Trust me on that one, I'm speaking from personal experience lol.

 

Congrats on the release btw!

Edited by Reminiscence
Link to comment
Share on other sites

Yes, I remember suggesting against it in the chatbox.

Conditional sleeps are your best friend when making scripts.

Best to learn great methods while just starting out. Practicing poor code will make it hard to switch over to better/cleaner code later on. Trust me on that one, I'm speaking from personal experience lol.

 

Congrats on the release btw!

Will do, thanks for mentioning the conditional sleep stuff, looks as though it will be really useful. Might try implement in into this code as a learning experience.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

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