Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
testing1

GeniuSFarming

Recommended Posts

Posted (edited)

This Script has 5 phases 

1-First phase  progressive 1-30 planting  bagged plant 1 in POH 

2- Second phase will add tree runs support 

3-Third phase will add fruit runs support 

4-fourth phase will add Herb runs Money Making 

5-Fifth  phase will add ABC 

This is an open source script Waiting for feedback from Scripters on how to improve my codes 

Source Code

PS : i could make the banking node more simple but i think i am too lazy so will do it in phase two if there is a comment about it 

1-Must have in bank for 1-30 Phase 1 

To run this script u need to write in argument box >> PROG cause there wont be an GUI for this script 

- 432 Bagged Plant 1

- 60 Watering Can(8)

- 25 House Teleport Tabs

- 5 Ring Of Deling(8)

-And Of A House xD

-Must  Start At CW

 

2-Phase 2 TREE runs  

- Lumb Teleport tablet

- VarrockTeleport tablet

- FaladorTeleport tablet

-Passage Necklace

- Rake

-Spade

- Coins

-UltraCompost / or any kind of compost just make sure it is in bank 

-Sapling depends on your level /  Willow , Maple ,Yew , magic

The Script will run for 5 patches only Lumb, Varrock, Falador, Taverley, Gnome Stronghold

The script will make sure there is plant in each patch then logout and wait for the plants to grow with a randomization in time so for each account time of wait is different. 

PS: I only tested WIllow cause the level of the account i have but i am leveling it up to test all of trees please report any bug and i will fix asap

This support Compost and Payment too 

ARG supports :   for compost  use TREE:COMP

for Payment use TREE:PAY

will be adding more argument for each tree cause if ppl wan do single tree 

also going add arg for single run 

if u wan me add any thing Please LMK 

This Script is still in BETA so if u found any bug report it and i will fix asap

Get Script From Here

 

Update 1- **Fixed some bugs 
**Adjusted my banknode

**Can start at any where with or without ring of D equipped  

 

Edited by testing1
  • Thanks 1
  • thonking 1

Share this post


Link to post
Share on other sites
37 minutes ago, contemporary said:

Interesting idea, with consistent work it might turn into a valuable tribot addition. If I may add a suggestion, perhaps post some working CLI examples in the main post to get script running easier for new people.

thanks for feedback but dont get what u meant about CLI 

Share this post


Link to post
Share on other sites
6 hours ago, troopafox22 said:

Feedback here: working really well for Phase 1, has problems shifting back into the building more though... heres a GIF link that shows what I mean:

Once you hit the building icon, it auto switches to building mode, but cant seem to get there.

https://i.gyazo.com/2f305adcf859d7426ec23ab01248bceb.mp4

 

Oh yesterday update of rs broke somethings i will be fixing this asap thanks for reporting the bug 

Share this post


Link to post
Share on other sites

I'm going to start by looking over the  BankingItems class without looking at anything else, I will try to take a look at other stuff in the future (but my free time isn't always plentiful)..

Let's look at your first declaration.

public static final int duling[] = {2552,2554,2556,2558,2560,2562,2564,2566};

A common thing we look for is proper naming conventions.  I'm not sure of the best resource to review at this time, but this link has the right stuff. https://google.github.io/styleguide/javaguide.html#s5-naming

Constants should be in all caps, and ideally free of spelling errors. The proper naming convention would be:

public static final int[] DUELING = {2552,2554,2556,2558,2560,2562,2564,2566};

 

The next declaration can be considered a constant, and again is misspelled.  I would apply the same naming conventions to it.

RSArea castelWar

 

The validate method has several "magic numbers" in it.  I have no idea what the items with IDs 8431, 8013, 5331 are by looking at this method.  I can probably assume one of them is a seed dibber and one of them is a rake or spade, but again there is no indication.  A "magic number" is just a random number in code without any variable assigned or explanation as to what it means.  You should ideally declare those integers as constants, such as RAKE_ID, and assign the value to that variable (and refer to the variable RAKE_ID rather than the id).  You can also create a method such as "hasRake()" which returns Inventory.getCount(RAKE_ID) > 0, since that is quicker to type/understand and also will probably be used in other places in your code.

@Override
public boolean validate() {
	return Inventory.getCount(8431) == 0 || Inventory.getCount(8013) == 0 || Inventory.getCount(5331)==3
		&& !Banking.isBankScreenOpen();
}

I'm not really sure where to start with your execute method.  I would condense many of those if statements into separate methods which handle the desired tasks. I will give a brief idea of what I mean below.

@Override
public void execute() {
	if(!isWearingDueling()){
		getDuelingRing();
	}
	...
}

public void getDuelingRing(){
	if(hasInventoryDueling()){
		if(isBankOpen()){
			closeBank();
		} else {
			equipDueling();
		}
	} else if(!isInBank()){
		walkToBank();
	} else if(!isBankOpen()){
		openBank();
	} else {
		withdrawDueling();
	}
}

It might also be nice to have execute methods return a value whether or not they succeeded/failed so that you can handle failures (such as being out of dueling rings), or you can just manage that with a global "shouldRun" variable.

 

Hope this helps.

Share this post


Link to post
Share on other sites
23 minutes ago, FALSkills said:

I'm going to start by looking over the  BankingItems class without looking at anything else, I will try to take a look at other stuff in the future (but my free time isn't always plentiful)..

Let's look at your first declaration.

public static final int duling[] = {2552,2554,2556,2558,2560,2562,2564,2566};

A common thing we look for is proper naming conventions.  I'm not sure of the best resource to review at this time, but this link has the right stuff. https://google.github.io/styleguide/javaguide.html#s5-naming

Constants should be in all caps, and ideally free of spelling errors. The proper naming convention would be:

public static final int[] DUELING = {2552,2554,2556,2558,2560,2562,2564,2566};

 

The next declaration can be considered a constant, and again is misspelled.  I would apply the same naming conventions to it.

RSArea castelWar

 

The validate method has several "magic numbers" in it.  I have no idea what the items with IDs 8431, 8013, 5331 are by looking at this method.  I can probably assume one of them is a seed dibber and one of them is a rake or spade, but again there is no indication.  A "magic number" is just a random number in code without any variable assigned or explanation as to what it means.  You should ideally declare those integers as constants, such as RAKE_ID, and assign the value to that variable (and refer to the variable RAKE_ID rather than the id).  You can also create a method such as "hasRake()" which returns Inventory.getCount(RAKE_ID) > 0, since that is quicker to type/understand and also will probably be used in other places in your code.

@Override
public boolean validate() {
	return Inventory.getCount(8431) == 0 || Inventory.getCount(8013) == 0 || Inventory.getCount(5331)==3
		&& !Banking.isBankScreenOpen();
}

I'm not really sure where to start with your execute method.  I would condense many of those if statements into separate methods which handle the desired tasks. I will give a brief idea of what I mean below.

@Override
public void execute() {
	if(!isWearingDueling()){
		getDuelingRing();
	}
	...
}

public void getDuelingRing(){
	if(hasInventoryDueling()){
		if(isBankOpen()){
			closeBank();
		} else {
			equipDueling();
		}
	} else if(!isInBank()){
		walkToBank();
	} else if(!isBankOpen()){
		openBank();
	} else {
		withdrawDueling();
	}
}

It might also be nice to have execute methods return a value whether or not they succeeded/failed so that you can handle failures (such as being out of dueling rings), or you can just manage that with a global "shouldRun" variable.

 

Hope this helps.

Man that helped me alot i wll take that all into consideration and will fix that all but about naming i was naming it with capitalization but a PScripter told me to use camel naming or something like that again thanks alot ❤️ 

Share this post


Link to post
Share on other sites
29 minutes ago, testing1 said:

Man that helped me alot i wll take that all into consideration and will fix that all but about naming i was naming it with capitalization but a PScripter told me to use camel naming or something like that again thanks alot ❤️ 

Camel case naming is preferred for variables, constants should be in all caps.

Share this post


Link to post
Share on other sites
17 hours ago, FALSkills said:

I'm going to start by looking over the  BankingItems class without looking at anything else, I will try to take a look at other stuff in the future (but my free time isn't always plentiful)..

Let's look at your first declaration.

public static final int duling[] = {2552,2554,2556,2558,2560,2562,2564,2566};

A common thing we look for is proper naming conventions.  I'm not sure of the best resource to review at this time, but this link has the right stuff. https://google.github.io/styleguide/javaguide.html#s5-naming

Constants should be in all caps, and ideally free of spelling errors. The proper naming convention would be:

public static final int[] DUELING = {2552,2554,2556,2558,2560,2562,2564,2566};

 

The next declaration can be considered a constant, and again is misspelled.  I would apply the same naming conventions to it.

RSArea castelWar

 

The validate method has several "magic numbers" in it.  I have no idea what the items with IDs 8431, 8013, 5331 are by looking at this method.  I can probably assume one of them is a seed dibber and one of them is a rake or spade, but again there is no indication.  A "magic number" is just a random number in code without any variable assigned or explanation as to what it means.  You should ideally declare those integers as constants, such as RAKE_ID, and assign the value to that variable (and refer to the variable RAKE_ID rather than the id).  You can also create a method such as "hasRake()" which returns Inventory.getCount(RAKE_ID) > 0, since that is quicker to type/understand and also will probably be used in other places in your code.

@Override
public boolean validate() {
	return Inventory.getCount(8431) == 0 || Inventory.getCount(8013) == 0 || Inventory.getCount(5331)==3
		&& !Banking.isBankScreenOpen();
}

I'm not really sure where to start with your execute method.  I would condense many of those if statements into separate methods which handle the desired tasks. I will give a brief idea of what I mean below.

@Override
public void execute() {
	if(!isWearingDueling()){
		getDuelingRing();
	}
	...
}

public void getDuelingRing(){
	if(hasInventoryDueling()){
		if(isBankOpen()){
			closeBank();
		} else {
			equipDueling();
		}
	} else if(!isInBank()){
		walkToBank();
	} else if(!isBankOpen()){
		openBank();
	} else {
		withdrawDueling();
	}
}

It might also be nice to have execute methods return a value whether or not they succeeded/failed so that you can handle failures (such as being out of dueling rings), or you can just manage that with a global "shouldRun" variable.

 

Hope this helps.

Updated all the source code too meet almost every thing u said i am still going to remove the supplie check node and will be using shouldRun variable soon waiting for your comments 

Share this post


Link to post
Share on other sites
2 hours ago, testing1 said:

Updated all the source code too meet almost every thing u said i am still going to remove the supplie check node and will be using shouldRun variable soon waiting for your comments 

I'm not going to be available to check your code on a daily or even weekly basis, so I wouldn't keep waiting.  

You have not included the "Vars" class in your source, which is rather important since it seems you have moved a lot of the code to that class.
I would suggest you separate some of those methods into other classes, such as your own "Banking" class, your own "GameTabs" class, etc. so that you can easily refer to those methods in the future based upon whatever topic they relate to.  "Vars" typically would be understood to be a class that stores variables, not a random mesh of different functions.

This:

Vars.waitTill(Inventory.getCount(RINGOFDUELING) == 0);

Probably isn't correct, but I can't see what Vars.waitTill method does.  I can assume that it is incorrect because that function is the equivalent of:

boolean b = Inventory.getCount(RINGOFDUELING) == 0;
Vars.waitTill(b);

I assume you are trying to wait until that boolean is true, however the Inventory.getCount call is only calculated once.  This means that, if it was false when checked, it will always be false.

You probably were trying to do something like this:

Vars.waitTill(() -> Inventory.getCount(RINGOFDUELING) == 0);

Which would be using the functional interface BooleanSupplier.  You would need to change your waitTill method to accept a BooleanSupplier as an argument.
Does your waitTill method use the Timing.waitCondition method inside of it?  If not, you probably should!

 

I have no idea what this could possibly be doing, my guess is probably nothing:

if (Vars.WATERINGCAN == 0) {
	Vars.getItemFromBank(Vars.WATERINGCAN, 3);
}

 

Share this post


Link to post
Share on other sites
19 minutes ago, FALSkills said:

You have not included the "Vars" class in your source

thanks for the update i thought i shouldn't include the vars in my source code is wise move !

 

19 minutes ago, FALSkills said:

I would suggest you separate some of those methods into other classes,

Noted and doing it right now 

 

19 minutes ago, FALSkills said:

Vars.waitTill(Inventory.getCount(RINGOFDUELING) == 0);

i think it will work as i supply it with boolean as argument and i just have to add the boolean to the method 

public static void waitTill(boolean Condition){
        Timing.waitCondition(() -> {
            General.sleep(500);
            return Condition;
        }, General.random(8000, 10000));
        General.sleep(500, 1000);

}

 

23 minutes ago, FALSkills said:

if (Vars.WATERINGCAN == 0) { Vars.getItemFromBank(Vars.WATERINGCAN, 3); }

this code withdraw wateringCan from bank it will be checking if in bank ,if bank screen open , and if bank contains wateringCan with else in between 

public static void getItemFromBankD(int item, int keep, int count, RunescapeBank Bank) {

    if (!Banking.isInBank()) {
        scripts.dax_api.api_lib.DaxWalker.walkToBank(Bank);
        Timing.waitCondition(() -> {
            General.sleep(500);
            return Banking.isInBank();
        }, General.random(8000, 9000));
        General.sleep(500, 1000);

    } else if (!Banking.isBankScreenOpen()) {
        if (Banking.openBank()) {
            Timing.waitCondition(() -> {
                General.sleep(500);
                return Banking.isBankScreenOpen();
            }, General.random(4500, 5500));
            General.sleep(500, 1000);

        }

    } else if (Inventory.getAll().length > 0) {
        Banking.depositAllExcept(keep);
        Timing.waitCondition(() -> {
            General.sleep(500);
            return Inventory.getAll().length == 0;
        }, General.random(1500, 2000));
        General.sleep(500, 1000);

    } else if (Banking.find(item).length > 0) {
        if (Banking.withdraw(count, item)) {
            Timing.waitCondition(() -> {
                General.sleep(500);
                return Inventory.getCount(item) > 0;
            }, General.random(1500, 2000));
            General.sleep(500, 1000);
        }
    } else {
        throw new RuntimeException("Out Of" + item);
    }
}

 

Again thanks alot i hope my code improved the way u wanted it to be i am keep getting more advice from u man u are a hero thanks again do u think there were some improvement or not 

Share this post


Link to post
Share on other sites
7 minutes ago, testing1 said:

 

public static void waitTill(boolean Condition){
        Timing.waitCondition(() -> {
            General.sleep(500);
            return Condition;
        }, General.random(8000, 10000));
        General.sleep(500, 1000);

}

That does not work how you think it does.  The boolean is only calculated once, when it is declared.  It is not calculated again.  

public static void waitTill(BooleanSupplier condition){
        Timing.waitCondition(condition, General.random(8000, 10000));
        General.sleep(500, 1000);

}

waitTill(() -> Inventory.getCount(RINGOFDUELING) > 0);

 

The method for Vars.getItemFromBank is not the one you shared there.  If you look at the method I was mentioning, it does not make sense. You check if Vars.WATERINGCAN == 0, and if so, you get Vars.WATERINGCAN (which is 0) from the bank. 

Share this post


Link to post
Share on other sites
16 minutes ago, FALSkills said:

The boolean is only calculated once, when it is declared.  It is not calculated again.  

The boolean is not calculated every time the node is validated ?

 

17 minutes ago, FALSkills said:

The method for Vars.getItemFromBank is not the one you shared there

both are the same the only difference is this one deposit all the inv if it is not empty 

20 minutes ago, FALSkills said:

check if Vars.WATERINGCAN == 0, and if so, you get Vars.WATERINGCAN (which is 0) from the bank.

fuck me i didnt see that yeah mb changed it 

if (Vars.wateringCanCount() == 0) {
    CustomBanking.getItemFromBank(Vars.WATERINGCAN, 3);
}

Share this post


Link to post
Share on other sites
On 1/30/2020 at 12:00 PM, testing1 said:

The boolean is not calculated every time the node is validated ?

It is calculated every time the node is validated. It is not calculated every loop of the wait condition, which is the entire purpose of the wait condition.

Share this post


Link to post
Share on other sites
1 minute ago, FALSkills said:

It is calculated every time the node is validated. It is not calculated every loop of the wait condition, which is the entire purpose of the wait condition.

yeah i got it already changed it to boolean supplier as u suggested working perfect now ❤️ thanks alot 

Edited by testing1

Share this post


Link to post
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.


  • Our picks

    • [CONTEST ANNOUNCEMENT] 2019 Botter's Choice Awards
      2019 Botter’s Choice Awards

      To celebrate the launch of our TRiBot Official RuneScape Bot Blog,

      we’re doing a giveaway! 

      The TRiBot Official RuneScape Bot Blog: 

      Teaching you how to do more advanced botting, faster.
      Contest Details

      Prize: 3 winners will be selected to win 25 TRiBot credits.

      How to enter:

      Respond to this forum post by November 12th tagging the thread for: 

      Your favorite script

      Provide a brief explanation (1-2 sentences) why you think that script should be put in the top 5. 

      Who can enter?

      Botter’s who are not currently scripters. Sorry scripters, the people are going to vote. Your contest is here.

      The top 5 in each category will be showcased on our TRiBot Official RuneScape Bot Blog in a “People’s Choice” section and promoted across the TRiBot website. 

      -- Credits will be awarded based on thoughtfulness and humor -- 

      Bonus points

      Use a meme in your explanation. Because we all love memes.

      *no purchase necessary. Winners will be announced on Friday, November 15, 2019 at 4:00 p.m. on our News and Announcements forum. 

      -- Vote Below -- 
        • Like
      • 28 replies
    • [READ TO THE END FOR A TEASER]

      I've noticed some new TRiBotters have had some troubles finding out sources of how to do certain things, such as using advanced scripts and often get lost in the forums.

      We are still getting posts asking where to start, what to do, recommended scripts, etc. 

      As many of you know, I am new to the team, and had troubles myself learning how to bot, let alone script. 

      So, what our team decided to do was make it easier to learn how to bot, how to script, and just become an overall better botter and scripter faster. 

      As some of you might have seen, I've posted 3 new blogs, you can check it out by clicking on the following picture or here.


      These first 3 blogs are the first of many blogs that will be TRiBot official. They are encouraged to be challenged, improved upon and act as A Best Practices Guide for Botters.

      What information would you like to see in the blogs?

      👇 [TEASER] 👇

      .

      .

      .

      We are going to be hosting a  CONTEST  this  OCTOBER.

      Its scary to think how soon you'll find out.👻

      Stay tuned.


      - RileyZ
      • 8 replies
    • Today marks a big day for TRiBot! To make it easier for users to use TRiBot, we've created installers available for every platform! These installers are all bundled with the latest version of OpenJDK 1.8 (Java 😎, which is LG compatible.

      Using TRiBot is now easy. Simply download the installer for your platform, install TRiBot, and run it. The TRiBot Loader will correctly identify the bundled JDK so there's no need to change the Java selection.

      Windows

      EXE installer: TRiBot-windows-x64-4.0.3.exe


      MSI installer: TRiBot-windows-x64-4.0.3.msi


      Portable version: TRiBot-windows-x64-4.0.3.zip


      Mac OS

      Installer: TRiBot-macos-4.0.3.dmg


      Portable version: TRiBot-macos-4.0.3.tgz


      Unix/Linux

      Installer: TRiBot-unix-4.0.3.sh


      RPM installer (CentOS/Fedora): TRiBot-linux-4.0.3.rpm


      DEB installer (Debian): TRiBot-linux-4.0.3.deb


      Portable version: TRiBot-unix-4.0.3.tar.gz


      Platform Independent

      JAR file: tribot-loader-4.0.3.jar


      Note that this jar file does not include the bundled JDK.



      Windows and Mac OS users may notice a warning message stating that the installer/application is un-recognized or un-trusted. Please ignore this message and proceed with running the installer/application. We need to acquire a code signing certificate so that we can sign the installers letting the operating system know that these files can be trusted. It will take a week or more to acquire one, so please hold tight.

      Other notable changes to the TRiBot Loader:

      Support getting the version from OpenJDK distributions


      Add check for bundled JDK


      Copy OpenJDK tools.jar to the bundled JDK if not present


      Set the current java as the first available list entry


      Ignore Java versions which are symbolic links


      Make the bundled JDK the preferred Java version


      Update icon images


      Reduce the number of HTTP calls
        • Thanks
        • Like
      • 25 replies
    • TRiBot is looking to improve a lot of its customer relationship management, customer on boarding process, customer experience, design elements, community engagement and pretty much everything else you can imagine when it comes to marketing.

      Our goal: To ensure that the marketing done TRULY reflects the experience and does not shine an inaccurate light on what TRiBot is lacking in.

      So I ask, what do you love about TRiBot and what do you hate about TRiBot? What does O S Bot, Rune M8, PowR Bot and Dre amBot do better? (yes I purposely didn't spell it right 😂).

      Love, 

      RileyZ
        • Like
      • 18 replies
    • Hello TRiBot,

      Today we have a significant release that has been in the works for the last month addressing several key issues, features and bugs in the backlog.

      With these changes, we are also including a new TRiBot Loader which will allow you to select any version that is released. This adds the flexibility of allowing you to revert to a previous version should an issue arise, run development only builds, view an accurate change log between versions etc. we are very proud to offer this feature and think it will add a lot more functionality down the road as we continue to release new versions.

      These changes include 80+ commits by our development team, a list of them is summarized below and also available for your viewing pleasure in the new TRiBot Loader.

      In addition, we have taken additional steps to improve as a development team by adding continuous integration and deployment into our workflow to assist in delivering timely releases such as bug fixes as well as new features on a weekly basis depending on our development cycle.
        • Thanks
        • Like
      • 39 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...