Leaderboard
Popular Content
Showing content with the highest reputation on 05/06/24 in all areas
-
iffySulliuscep [80K WC EXP/HR], [AUTO EATS] [RANDOMIZED ANTIBAN]
iffy reacted to STLtooDope for a topic
Looks great, will be testing it for a couple hours to knock out some kudos! Thanks in advance1 point -
iffySulliuscep [80K WC EXP/HR], [AUTO EATS] [RANDOMIZED ANTIBAN]
iffy reacted to SirLoinMcStks for a topic
RNG is on my side, I got 8 fossils in my first inventory, and still have 8 wines1 point -
Look forward to using today.1 point
-
1 point
-
cCBrutalBundle - [up to 1.1m/hr] [Lvl 3 start] [Auto Bonding] [Muling]
mightyexpert reacted to camelCase for a topic
send me the script settings & approx stats of the account you are using and ill run a test when i can in most places i just set the script to overstock incase of deaths or something, outside of training when gear is expensive you are right it shouldnt, ill change that in next update is that happening to you on all dragons or just blacks? and if you have logs for that can you send them to me idrk what you mean by maybe aio, but ill be adding a ui to select the custom equipment so you dont have to use the settings file soon, this week or early next eta.1 point -
TaskScript uses TaskNodes to perform your script's function. Instead of managing your script's logic within the main onLoop(), you will create several TaskNodes to break up the script into different tasks TaskNodes have three methods associated with them: boolean accept() - this is the condition that must be met in order to trigger the TaskNode. int execute() - think of your AbstractScript's onLoop(). This executes the actions/logic we actually want to perform. int priority() - allows you to prioritize your TaskNodes. By default, TaskScript will iterate through your TaskNodes in the order you add them. The script will iterate through each task (either in priority order high to low, or in order that they've been added). If the accept() condition is found to be valid, the script will loop through that TaskNode's execute(). I will use a basic woodcutting script as an example. In the onStart() of our main class, we will need to add our nodes: @Override public void onStart() { addNodes(new BankTask(), new DropTask(), new ChopTask()); } First the script would iterate through our BankTask. So long as the conditions of accept() are found to be true, we will loop through BankTask.execute(). Once we've deposited our logs, this TaskNode will no longer be true (inventory is NOT full) and the script will move onto the next TaskNode: public class BankTask extends TaskNode { @Override public boolean accept() { return Inventory.isFull() && !isDrop; //isDrop is an internal boolean determined by the user within the GUI } @Override public int execute() { //Logic for Banking & depositing logs return 1000; } } Then the script would iterate through your DropTask, depending on the state of boolean isDrop: public class DropTask extends TaskNode { @Override public boolean accept() { return Inventory.isFull() && isDrop; //isDrop is an internal boolean determined by the user within the GUI } @Override public int execute() { //Logic for Dropping inventory of logs return 1000; } } If neither of our above TaskNodes return a valid accept() condition, the script would move onto the ChopTask(). In this example, I left the accept() as true since I know the script will only get to this node, if DropTask & BankTask are NOT valid. You're welcome to add a condition to be met (for example, verifying treeArea.contains(Players.getLocal()) ) public class ChopTask extends TaskNode { @Override public boolean accept() { return true; } @Override public int execute() { //Logic for Walking to the tree location & chopping desired tree return 1000; } } Once you've flushed out the execute() logic in each, and add your nodes in the Main class onStart(), TaskScript will handle the rest. It will loop through BankTask>DropTask>ChopTask, checking to see which one returns accept() first, and then run the appropriate execute() If you so choose, you could break out the script logic into even more tasks (Bank, Drop, Travel, Chop, Idle). Some people may find this excessive. Do whatever you find easiest. I personally like breaking down my script into smaller tasks and will opt to use either TaskScript or TreeScript. Similar to the previous poster, I learned using TreeScript at first (specifically this implementation), but I do find it overkill for simple scripts and have been using TaskScript far more often now. In TaskScript, your script logic is executed within each TaskNode. The script will check Task accept() > Task execute() if valid In TreeScript, your script logic is executed within each Leaf, which are stored in Branches. The script will check the Branch accept() > check the Leaf accept() if valid > Leaf execute() if valid.1 point