Node Framework Tutorial
What is Node Framework?
A node based framework breaks actions into different classes.
Each class extends a Node and has a validate and execute function.
In this tutorial
I will be writing a basic powerminer to demonstrate the effectiveness of using Nodes.
Validate: if true, will run the execute method.
Execute: where the action happens
Second, we will plan and break down the actions we'll be creating.
In a powerminer, there are really only a couple classes necessary:
A GUI class (optional) A MineOre class A DropOre class Since this is a basic tutorial, I'm going to skip the GUI class
And for simplicity's sake, I won't be externalizing any variables (I usually have separate classes for Constants and Variables).
The MineOre class:
The DropOre class:
Lastly, the main class, PowerMiner:
Tying everything together:
When the script is initiated we add all the nodes we want into the ArrayList of nodes.
The script then loops indefinitely, looping through each node in the ArrayList, validating it, and then executing.
The min and max parameters I have set in the loop method, ensure the bot waits at least 20 to 40 milliseconds in between nodes.
As you can see you can do much much more with a node-based framework, but this tutorial shows the barebone basics.
For example: if you have an AIO script, you can have the GUI determine which nodes to add to the ArrayList. You can delete nodes to run if an action is completed, etc.
Full script on GitHub: https://github.com/WorthyTRiBot/PowerMiner
Please welcome our new developers, @JoeDezzy1, @erickho123, @Encoded, and @wastedbro.
These members will be responsible for working on, maintaining, and improving TRiBot.
This means that bug fixes and improvements will now come at a much faster pace! We're committed to providing users with the best botting experience possible!
This release includes:
More 3rd party libraries for script writers to use
Apache Commons Codec
Apache Commons Collections
Apache Commons Configuration
Apache Commons IO
Apache Commons Lang
Apache Commons Math
Hint arrow API
Fix player hooks including Player#getSkullIcon and Prayer#getPrayerIcon
This update includes:
Fix broken hooks
Fix login bot for the message "No reply from login server. Please wait 1 minute and try again."
Fix bug relating to which bot tab is sent human input
General#randomLong bug fix involving negative numbers
Fix GE API
Please note: There are still some issues with the login bot due to a change in the game mechanisms handling the login screen. We're working on a fix and will upload it when ready.
This release will:
Fix key event handling issue
Fix other event handling issue
Fix RSServer hook
Update world hopper to have it use OCR, thanks to Todd
Use proper disposal of old Graphics objects
Organize code imports
Apply around 8000 automated code refactorings
Make preparations for Java 9
Fix 11 various bugs
Add more reliable debugging support
Fix mouseEntered/Exited event dispatching bug
Fix minimap walking bug where it opens the map
Fix broken hooks for today's game update
Recently Browsing 0 members
No registered users viewing this page.