-
Posts
639 -
Joined
-
Last visited
-
Days Won
21
Reputation Activity
-
holic got a reaction from learntobot123 in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Major Update - v0.999
Added prayers: needs improvement and to add the ability to setup quick prayer Added potions: don't include the number of doses ("Strength potion", not "Strength potion(4)"), won't use Prayer potions until your prayer is almost drained Added required items: these items will be retrieved if missing, unlike its neighbouring "Don't deposit" Improved rune handling: now withdraws the required amount per rune type per spell (Air rune x3, Fire rune x2, Mind rune x1) Improved banking Improved safe-spotting Improved general speed Reverted kill counter to estimate Probably more, busy past few weeks Bug fixes -
holic got a reaction from romanaka3 in Alclueholic - A beginner clue scroll solver - Re-written!
Noted, I'll fix this next week.
-
holic reacted to beatyersocks in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Didn't see the console at that time, sorry about that 😕 Will let send you a screenshot when I encounter that again. Cheers!
-
holic reacted to floggun in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Script does not cut the web in the Varrock sewer.
-
holic reacted to peregrinesava in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
https://gyazo.com/5f7b95b66b293e90a6e79345c741d5dc
got an error, nothing happened though script continued on
-
holic reacted to mefikk in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
U set it to eat but at 10%, not 10 health, maybe thats the problem?
-
holic reacted to mefikk in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Great script! I was shocked it auto equipped arrows again, really love it
-
holic got a reaction from Hawz in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
It'll do that automatically, no need to do anything.
-
holic reacted to BagelChef in Behavior Trees For Dummies - Basic Woodcutting Script
Behavior Trees For Dummies
I'm not a pro at anything and take everything I say with a grain of salt. I have no idea what i'm doing and my opinions here are mostly preference. Make your own decisions, disagree with me, tell me why, and lets make better bots. Also, can't take credit for the idea of behavior trees in bots. I read @jgs95's post about them a week ago.
Introduction
The most popular type of scripts I have found during my time scripting is the `Node` based system. Node based systems split up their code into sections called Nodes (duh). Each Node is comprised of a condition that checks whether or not the node should run, and a action to perform if the condition passes. If you don't yet know about Node based systems I highly suggest checking out This post. You should know about other methodologies of bot scripting so you can weigh the pros and cons of both for yourself.
Code That A Computer Can Read Is Useless.
At a very high level Behavior Trees are used to handle triggering actions based on conditions. Sound a lot like the Node system mentioned earlier? Both methodologies are just ways to handle triggering actions based on conditions. That's what most if not all bots do. So why choose Behavior Trees? There are two things that need to be able to understand your code. The computer, and humans (yourself included). Writing code that the computer understands is easy. Take a look at the following JavaScript code.
var _0x49e6=['1JEFwRC','5222dXsJWJ','92FVLqzU','1365284gtsOMo','1614886gtbOhP','3648908RUJhLp','Hello\x20World!','74944THxNfO','412769AyhqCE','log','1402906gnphcE'];(function(_0xf7574b,_0x59a0fa){var _0x3a1092=_0x3bf3;while(!![]){try{var _0x2ce5f6=parseInt(_0x3a1092(0x182))+parseInt(_0x3a1092(0x185))*parseInt(_0x3a1092(0x184))+parseInt(_0x3a1092(0x17f))+parseInt(_0x3a1092(0x186))+-parseInt(_0x3a1092(0x183))*parseInt(_0x3a1092(0x180))+parseInt(_0x3a1092(0x187))+-parseInt(_0x3a1092(0x17d));if(_0x2ce5f6===_0x59a0fa)break;else _0xf7574b['push'](_0xf7574b['shift']());}catch(_0x46c630){_0xf7574b['push'](_0xf7574b['shift']());}}}(_0x49e6,0xd60df));function hi(){var _0x221f00=_0x3bf3;console[_0x221f00(0x181)](_0x221f00(0x17e));}function _0x3bf3(_0x3c1132,_0x58570b){_0x3c1132=_0x3c1132-0x17d;var _0x49e678=_0x49e6[_0x3c1132];return _0x49e678;}hi(); This runs. The computer is absolutely fine with this. But what about the poor sap that has to maintain this code? Or what if you need to go back and change something. I guarantee if you even step away to shit after writing this you will comeback and have no fucking idea what this does and probably blame someone else for writing it insisting they are an idiot and should be killed immediately (personal experience). This is why coding for humans is more important that coding for the computers. Take a look at the following code that does the exact same thing as the above example.
function helloWorld() { console.log("Hello World!"); } Tell me that doesn't make one thousand times more sense than the other example. Clean, readable code is the backbone of a good program. How fast, or efficient it is should be the second thing you think about. You can always go back and optimize. It's much harder to go back and make it understandable. If the topic of clean code has given you a boner/wet vagina I highly suggest reading Clean Code by Robert C. Martin. Now that we understand that we should prioritize writing code that humans can understand we can start looking at why we should choose Behavior Trees over everything else.
Why Choose Behavior Trees Over Everything Else?
Lets take a look at a node based wood chopper main script class. This is based off of This really great tutorial on the Node system by @GoldenGates. Great read, go read it if you aren't that solid with the node system yet.
public class WoodChopper extends AbstractScript { private final Node[] array = new Node[] { new WalkToTrees(this), new ChopWood(this), new WalkToBank(this), new OpenBank(this), new DepositLogs(this) }; @Override public int onLoop() { for (final Node node : array) if (node.activate()) { node.execute(); } return Calculations.random(250, 500); } } The main con I have for the Node based system is how it reads, reuse, and how you handle more complex conditions. Correctly naming your Node instances is a great start. but we are left wondering what conditions do these nodes run on. If we wanted to get a bit more flexible we could abstract out our conditions and actions using two new classes. a `Action` class and a `Condition` class. Then our main script class would look like this.
public class WoodChopper extends AbstractScript { private final Node[] array = new Node[] { new Node(new ShouldMoveToTrees(), new WalkToTrees()), new Node(new ShouldChopWood(), new ChopWood()), new Node(new ShouldWalkToBank(), new WalkToBank()), new Node(new ShouldOpenBank(), new OpenBank()), new Node(new ShouldDepositLogs(), new DepositLogs()) }; @Override public int onLoop() { for (final Node node : array) if (node.activate()) { node.execute(); } return Calculations.random(250, 500); } } This is pretty good. The logic flow is pretty obvious and its clear what conditions trigger what actions, in what order. For a basic script id be happy with this assuming your conditions and actions names aren't complete trash. Lets pretend that we want to chop trees behind Lumbridge castle and there is that obnoxious asshole mugger back there that attacks us all the time. We need to add some combat nodes to our Node array. Lets take a look at what that might look like now.
public class WoodChopper extends AbstractScript { private final Node[] array = new Node[] { new Node(new IsUnderAttackWithEnoughHealth(), new FightBack()), new Node(new IsUnderAttackWithoutEnoughHealthAndHasFood(), new Eat()), new Node(new IsUnderAttackWithoutEnoughHealthAndDoesNotHaveFood(), new RunAway()), new Node(new ShouldMoveToTrees(), new WalkToTrees()), new Node(new ShouldChopWood(), new ChopWood()), new Node(new ShouldWalkToBank(), new WalkToBank()), new Node(new ShouldOpenBank(), new OpenBank()), new Node(new ShouldDepositLogs(), new DepositLogs()) }; @Override public int onLoop() { for (final Node node : array) if (node.activate()) { node.execute(); } return Calculations.random(250, 500); } } We can see now that our conditions start to contain a lot of the same wording and logic. All of our combat nodes check to see if the player is under attack. Then we make a decision about the current health of our player. Then we make a decision on if we have food or not. It's as if each of these decisions are sub decisions. Sounds a whole lot like a tree to me. Now you could only have a `IsUnderAttack` condition and then have your other conditions inside the `FightBack` action but then we are hiding logic that someone might miss while also making it harder to dynamically add more behaviors, and also adding conditions to an action which goes against the name of "action". Actions should only be exactly what they are, actions. So what are we going to do about this? JESUS CHRIST GET TO BEHAVIOR TREES ALREADY YOU FUCK. Fine here we go.
First off, Watch the following Videos if you have never heard of behavior trees or have no idea how they work.
Data structures: Introduction to Trees - mycodeschool
Introduction To Behavior Trees - Holistic3d
What is a Behavior Tree and How do they work? (BT intro part 1) - Peter Ogren
How to create Behavior Trees using Backward Chaining (BT intro part 2) - Peter Ogren
Here is how we would create the same script with a behavior tree. After looking at this i'll go over why I think it is more readable/cleaner/flexible.
public class WoodChopper extends AbstractScript { Node bankTree = new TreeBuilder() .sequence() .oncePerSequenceCompletion() .condition(new PlayerShouldBank()) .finish() .oncePerSequenceCompletion() .action(new MoveToBank()) .finish() .action(new DepositLogs()) .finish() .buildTree(); Node chopTree = new TreeBuilder() .sequence() .oncePerSequenceCompletion() .action(new MoveToTrees()) .finish() .action(new ChopTree()) .condition(new PlayerShouldBank()) .finish() .buildTree(); Node tree = new TreeBuilder() .selector() .appendTree(bankTree) .appendTree(chopTree) .buildTree(); @Override public int onLoop() { tree.tick(); return Calculations.random(250, 500); } } Separation of Concerns
Behavior trees let us split up our logic into small, clean, chunks of code that only have to do with what they are doing. We have a tree dedicated to handling banking, a tree dedicated to handling chopping wood, and a tree dedicated to putting other trees together.
Readability
The biggest advantage I think behavior trees have over the node system is that the code reads basically in plain English. If we look at the "chopTree" above and read line by line we fully understand what it is doing without having to go anywhere, look into any of the classes etc. To really drive my point home on this ill show you some pseudocode for the "chopTree" and you can compare it to the actual code above.
To chop a tree we must do the following in sequence if we have not already moved to the tree location move to the location of the trees chop down a tree if we have more inventory room repeat this sequence Adaptability
Finally, our ability to add to our bots behavior is incredibly easy. Lets add our combat behavior to our behavior tree like we did to the node based system. We just create our combat tree, and add it to our root tree. We don't care about anything else in the code base. Since we want to prioritize combat we make sure to put this tree earlier in our root sequence.
Node combatTree = new TreeBuilder() .selector() .sequence() .condition(new HasMoreThanHalfHealth()) .action(new Retaliate()) .selector() .sequence() .condition(new HasFood()) .action(new EatFood()) .action(new RunAway()) .buildTree() Node root = new TreeBuilder() .selector() .appendTree(combatTree) .appendTree(bankTree) .appendTree(chopTree) .buildTree(); Small Conditions and Actions
Another lovely side effect of using a behavior tree over a node system is our conditions will only be checking a maximum of one thing. Remember earlier when we had the god awful "IsUnderAttackWithoutEnoughHealthAndDoesNotHaveFood" condition? Lots of code duplication, and not very reusable as it has been so tightly written to go along with the certain action it was originally meant to. Now look at our new conditions. "HasMoreThanHalfHealth", "HasFood", these conditions could be reused in other places, and also are way less prone to bugs as they are simpler.
Code Sharing
Another pro of re-usability/adaptability is how easy it makes it to share between multiple projects. Lets say you write an incredible combat tree that handles eating, switching styles, praying, running away, etc. All you gotta do is pull that hoe into your new bot and append it to your root tree. (you can do this with nodes too just want to plant brain seeds).
Conclusion
Library/Framework
If any of these reasons for using behavior trees made sense to you and you agree with them you might be asking if there is a pre-made framework for behavior trees you can use, and there is, I wrote one. But your not getting it. Implementing it yourself will really drive home all the ideas and pitfalls of this structure. The videos I posted above should be a good enough starting point for figuring out how to write your own implementation. Try to resist just googling for implementations because they are out there. It will make you a better developer if you pain through this and just do it. You'll learn a lot.
When to still use Node Systems
Like I said earlier I think there is no perfect tool for every job. You just need to know the tools at your disposal and implement what you think is most appropriate. If your bot just walks from Lumbridge to Edgeville don't implement a whole ass behavior tree. The overhead would just be ridiculous. If your building a PVP bot that also banks, switches PVP load outs etc, a behavior tree is probably a better fit. Basically, behavior trees are great for handling bots that handle a lot of behaviors. If your bot doesn't meet this criteria it's probably fine just remember my rant about readable, clean code.
Alright,
Bye
-
holic reacted to Icegiant48 in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
they are too small to type into
im just stupid sorry man i maiximized the screen and can type it in
-
holic reacted to letsbothard in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
6:38:52 PM: [ERROR] Exception has occurred while running! Please report error to developer if problem persists:
java.lang.NullPointerException
at k.execute(k.java:124)
at org.dreambot.api.script.impl.TaskScript.onLoop(TaskScript.java)
at org.dreambot.api.script.AbstractScript.run(AbstractScript.java)
at java.lang.Thread.run(Unknown Source)
not sure what it is, hope it can help you
-
holic reacted to letsbothard in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
to be honest i can't get over how good this script is, i wanted to do a test to see the ban rate, well here was my results
16h and still botting on an acc that was already disabled once.
id have to give this a 15/10 lol, can't wait to test the b2p
-
holic got a reaction from letsbothard in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Let me know if it has any bugs or even works at all lol. I couldn't test B2P but I think I got the logic all correct. If it's broken, please post the error!
-
holic got a reaction from clownmanbrah in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
-
holic reacted to letsbothard in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
hey! thanks for adding, my suggestion that is awsome! ty
-
holic reacted to 2349md in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Nearly 2m combat exp in f2p, been running it for about a week or so quite carelessly yet no bans so far. Worked flawlessly in pretty much every training spot I checked with the exception of the security stronghold.
Thanks for making such a solid script for free.
-
holic reacted to ChaosKilla in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
I've noticed many of the complaints are based om the DB client, not the script itself. Thank you for making such a versatile, free combat script. I've said this already but I've had no problems and it's the only combat script I trust so far. Thank you holic
-
holic reacted to hbwvgm in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
I got an error message and it kept spamming these two messages in the chat, but once it started the AFK break it sorted itself out. Didn't really cause any issues but I thought I'd let you know just incase. Cheers, great script I use it a lot, I have a few bots that have a few days in-game already and no bans. Thanks for all the work you put into this.
-
holic reacted to wettofu in Wet Quests - 2 Quests
Wet Quests (back from hiatus)
Current Quest List:
Quests are cool.
-
holic reacted to ThumperOF in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
just thought i'd give an update, I've just been banned after 30 something hours at hill giants hahaha. A very good script to be fair, good banking system etc cant fault it
suiciding accounts can be fun.
-
holic reacted to ThumperOF in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
So, I decided to run a new account and see how far i can actually bot it...
Genuinely couldn't fault this bot bro, Great work.
its been logged in for over 24 hours now, Was using a different script before this one but thought you'd like a 10 hour proggy of hill giants.
Edit; Forgot to say anyone having issues with the setting up part of the bot make sure you give DB more memory as it sorts the problem out.
-
holic got a reaction from Ebullg in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Fightaholic - The scrappy AIO fightin' script
Bug Reports - READ THIS FIRST
To submit a bug report, please do the following. Failing to do so may result in being ignored all together. These are simple requests
Ensure you're on the latest version first Explain your problem as clearly and concise as possible Share the error Share what settings you are using by setting up the script, saving your config to a file and pasting it here or PM me.
Description
Fights shit, like anything, eats, banks, loots, buries bones, switches combat styles, etc. Very easy to setup but a complex script nonetheless.
Setup
Selecting your NPC(s) is required. All other options are optional. Click Refresh to auto-fill the form and get available NPCs Click Start Troubleshooting
StackoverflowError: Give more memory to DreamBot on launch (slider above "Launch" button) Images failed to download: Manually download them below this post and extract the files to "~/DreamBot/Scripts/Fightaholic" Chinese users will almost certainly need to download these Main features
Extremely simple setup: simple GUI that auto-fills the fields for you as much as possible. Combat switching: supports all combat types (ie Melee, Range and Magic) Click on-screen "Switch" to switch styles whenever Right-click on-screen "Switch" to manually choose which style to use Buys missing items from GE: if any equipment, food, runes, arrows, potions or required items are missing, it will walk to the GE and attempt to buy them Script will end if you lack the resources to afford your items Script will buy equipment upgrades when specified. Sells loot at GE: select looted items to sell in the "Loot" tab. Will attempt to sell items first for cash before buying missing items Script will only show loot options in the list, to add custom items edit the .ini file manually. Level targets: stops training combat style when your desired level is reached Drinks potions: don't include the number of doses ("Strength potion", not "Strength potion(4)"), won't use Prayer potions until your prayer is almost drained Add antivenom potion to your inventory or required items and it will automatically cure you when necessary. Optional: Check drop vials to get rid of them Uses prayer: Select one or many prayers to use. Quick prayers and quick prayer setup supported Dungeons supported: Edgeville (with or without Brass key, add key to required items), Dwarven Mines, Asgarnian Ice Dungeon, Karamja Dungeon, Varrock Sewers Equipment switching: supports switching equipment when changing combat style Withdraws equipment if missing Upgrades equipment when specified (either have it in your bank or select "Buy upgradeable equipment"), use "^" as the upgrade wildcard. "^ scimitar" or "^ shortbow". DOESN'T WORK FOR ALL ITEMS. High Alch support: choose what to loot and in the opposite column choose which items to alch and the script will take care of the rest Multiple loot options: change the frequency of looting, style of looting and what to loot Supports options like loot by price and blacklist Ironman loot option: loot only what your NPC drops Features item blacklist to prevent looting the wrong items when looting by a price threshold Death walking / Grave looting: handles deaths by returning, collecting your grave, re-equipping equipment and continuing Still zero deaths to date with this script but will handle it once it happens Option to logout on death so you can handle it yourself Collects and equips arrows: makes sure you don't run out of arrows, checks your bank for more if needed. Safe spotting: set your "Target area" to below 3 and the script will automatically safe-spot Aggro support: check the "Aggro mode" checkbox when dealing with monster like Rock Crabs, who will become tame and impossible to fight after a certain amount of time. This will do its best to leave the area, rest and return to continue the fight. GIVE IT TIME TO DO ITS THING. This will not prefer AFK training over active training but will still allow for AFK training. Buries bones: all bones supported, you can also specify to bury only certain bones. Eats food: what kind of fighter would this be if it didn't eat when necessary, right? Bones to Peaches: experimental but should work. If it isn't, please screen record it or at least share the error from your console with me. Bones to Bananas: experimental but should work. If it isn't, please screen record it or at least share the error from your console with me. Customize bank locations: set the bank you'd like to use, or just set it to the closest and let the script handle it for you. Custom random-event handler: Talks to Genie, Old-Man, Drunken Dwarf , Frog, Freaky Forester and Rick Turpentine to collect their goodies and a delay for all other randoms to be more human-like Lamps will be used to increase your current combat skill Random handler will only fire if you have selected "Dismiss Randoms" in DreamBot's settings Anti-Ban: Bunch of features to keep your accounts safe Comprehensive obstacle handler: meaning you can start this script just about anywhere and the script will navigate Gielinor to your specified area Quickstart support: Parameters: "path\to\config.ini" Example: Windows: java -jar C:\Users\USERNAME\DreamBot\BotData\client.jar -script Fightaholic -params "C:\Users\USERNAME\Desktop\CONFIG.ini" Linux:
java -jar ~/BotData/client.jar -script Fightaholic -params "C:/Users/USERNAME/CONFIG.ini"
More to be included in this list that are already in the script.
*Temporarily disabled Script information
Click "Refresh" once logged in to see NPCs and auto-fill the script. Select the NPCs you want, and their potential drops will be listed below This is the only required setting. Select the loot you want. Click "Add" to add combat level targets, these skills will be trained until the specified target is reached. If you want to set a Magic level target, you can only do that with the first level target currently (because I'm lazy). If you want to use different equipment, fill out and select "Use" per equipment setup Arrows, bows, staves, melee weapons, shield and food should automatically be detected and filled out in their respective textfields Check "Use bank" to bank when inventory is full or out of food/arrows/runes Your target area will be set to the tile you are standing on when you click the "Start" button if no tile is set.
OR you can set the tile in the "Optional" tab and have the script walk there next time on start (provided you save the info) Set your target area to below 3 and the script will automatically safe-spot All other setup options have explanatory tool-tips (if you hover over them) and aren't required.
Item Support
These are items that will be automatically recognized in your settings
GUI
As of version 0.941
Progress Reports
27 hours 3 days all using overnight+1hr breaks
Changelog (For updates beyond version 1.0, please search this topic for "SDN Bot")
Fightaholic images.zip
-
holic reacted to keke0513 in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Thank you for your reply. Thank you
-
holic got a reaction from keke0513 in Fightaholic - The scrappy AIO fightin' script - Interaction Before Fight Added
Thanks! Might be a bug with the updates to DB path-finding, I'll look into it.
Sure, I can add a toggle for that. For now, set your "Eat at %" to 0 and see if that disables it for you. You might have to put a food name in there but anything should do.
-
holic reacted to Bunnybun in WindMouse - Custom Mouse Movement Algorithm
@holic Fyi MethodProvider.sleep() can cause random events to block forever, make sure to use Thread.sleep() instead