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
This release will:
Fix Settings UI placement bug
Fix game object location bug
Fix small layout bug making the client shift up and down
Fix client crashing bug where loading the client with a small display area will cause the client to crash
Fix annoying Linux bug relating to painting events and peers
Fix settings saving bug where settings are saved to disk more often than they should
Fix RSInterface#isBeingDrawn bug affecting a limited amount of people
Drop Java 1.7 bytecode version for 1.8
Important: Since the downloadable RS client uses Java 7, it will no longer be compatible with Looking Glass. To make up for this, we will add support for using other clients such as RuneLite (at a later date).
This change was necessary to allow us to use Java 8 syntax. It also paves the way for Java 9/10/11 support.
Try our development release by checking "Development Release" on the TRiBot Loader. Note that these new features are currently in beta.
This release features:
Re-sizable mode support for both LG and the regular client
Slightly improved login bot
Removed final access modifiers from API classes
Added RSServer hook wrapper to get the client's cached list of server/world info
[NEW] Bug fix for intelligent banking
[NEW] Improvement to the stability of LG over time
[NEW] Vastly improved the reliability and speed of Screen#getColorAt on both LG and the regular client
[NEW] Fix LG login problems
[NEW] Fixed re-sizable mode container bug
[NEW] Fixed re-sizable mode mouse bug
[NEW] Use of public constants in the Banking API
[NEW] Use of other various constants such as Projection#NULL_PT and Screen#EMPTY_COLOR
More features to come very soon!
Please test it and let us know here if there are any new bugs introduced in this release.
Recently Browsing 0 members
No registered users viewing this page.