Jump to content

Leaderboard

  1. Einstein

    Einstein

    Premium Scripter


    • Points

      751

    • Content count

      1,960


  2. YoHoJo

    YoHoJo

    Super Moderator


    • Points

      336

    • Content count

      6,297


  3. TRiLeZ

    TRiLeZ

    Administrator


    • Points

      288

    • Content count

      3,503


  4. Encoded

    Encoded

    Premium Scripter


    • Points

      268

    • Content count

      5,391



Popular Content

Showing content with the highest reputation since 08/16/2017 in all areas

  1. 15 points
    I've recently received a PM from a user asking for scripting advice. His code intensified the existential dread. I'm writing this tutorial in an attempt to prevent this from happening again in the future. Einstein's Scripting Tutorial This tutorial covers the basics and it's aimed at users with very little to no programming experience. After reading this tutorial, you will be able to write your own basic TRiBot scripts. Let's get started! What exactly is a script? According to Wikipedia, scripts are: "programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator". Sounds familiar? In this case, the special run-time environment is the TRiBot client. Therefore, scripts written for TRiBot will only work within the TRiBot client. Attempting to execute a script from your desktop will have no effect. You need to start a client instance and then feed it a script in order to get things running. A RuneScape script is basically a set of instructions for your bots to execute: go to the bank kill a goblin move the camera chop down a tree Adding rules and condition to those instructions will allow us to write useful scripts, because the actions will be performed at the appropriate time: go to bank if the inventory is full kill a goblin if my player is not in combat do nothing (sleep / idle) while the player is busy cutting the tree if the player reached level 40 fishing, switch from trout/salmon to lobsters Let's take a step back New programmers sometimes get overwhelmed by the avalanche of new symbols, keywords, { } [ ] ( ) ; : ... -> ( ͡° ͜ʖ ͡°) (ok, maybe the last one is not part of the Java syntax) Don't get distracted by the apparent complexity, and try to understand the logical meaning of the code. Any kind of software, as incomprehensible and cryptic as it may seem at first, it's really just a very simple set of instructions. In order to understand how simple and logical programming really is, let's take a step back and abstract TRiBot/Runescape. Consider the following script that you probably ran today IRL, without even being aware of it: The comments (green) are ignored by the compiler, I included them just to make matters more clear. ("!" - means "NOT" ) Writing a script that will be executed by TRiBot A. The setup: Steps 2 to 5 will be repeated every time you write a new script. Step 1 will only be repeated if Eclipse tries to hack you. 1. Download any Java IDE. This tutorial uses Eclipse. 2. Create new project, the name is irrelevant. 3. Go to Java Built Path (depends on IDE) > add extrenal JAR > navigate to .tribot\dependancies > add "TRiBot.jar" 4. Create a new package called scripts (lowercase 's'). 5. Create a new class, again the name is irrelevant. If your setup looks like this, then you are ready to move on. B. The Actual coding: Now that you finished the setup, you are finally ready to start coding. Simply make your class extend Script (uppercase 'S'). This will generate two different errors. 1. You need to import the abstract class Script. Just use the IDE's auto import shortcut (Eclipse: Ctrl + Shift + O). 2.You need to implement the inherited method run from the Script class. Click the error warning > "Add unimplemented methods" or write it as shown below. Things should look like this at this point. The run() method will be called automatically when you press in the Tribot client. The instructions contained within the run() method will be executed in sequence, from top to bottom (Blue Arrow). If all the instructions are executed, the script will stop. In order to prevent this from happening, we will write all the instructions inside a infinite loop (@Todd's signature). When control flow reaches the end of the loop, instead of exiting the method, it will return back to the top, executing the instructions again. (Red Arrow) That's everything you need to get a working TRiBot script. In order to make the script perform useful tasks, you will have to write instructions inside the run method. I've included a script example in this tutorial. For a complete list of instructions, refer to the TRiBot API. Running the script Your IDE will automatically compile the .java files into .class files. Navigate to your workspace (the location of your project) and copy the .class files. Paste them in C:\Users\UserName\AppData\Roaming\.tribot\bin\scripts. If you packaged the script correctly, it will appear in the script list when you press . VIP is required to run local scripts TRiBot is unable to execute .java files. Only add .class files to the scripts folder. By declaring a script manifest (see below), you will be able to define a custom script category, name, and other metadata. Actual script example I never imagined that I would actually publish this. If I remember correctly, this is my first script. I've removed a few things for simplicity's sake and I've commented every line of code. Note: This modified version is not tested. Why did I named the potato-gathering method abuse? Null Pointer Exception / Array Index Out of Bounds Exception Two of the most common bugs that new scripters encounter are the Null Pointer Exception and the Array Index Out of Bounds Exception. It's very easy to avoid them if you understand them correctly. They both refer to the same idea: You cannot perform actions upon something that doesn't exist. Null Pointer Exception Consider the following table. Let's try to eat the apple that is on the table and see what happens. // Declare a variable of type Apple, named 'apple'. Apple apple; // Search the table for the nearest apple: // Assign the variable 'apple' with the value returned by the method 'getNearestApple()' apple = table.getNearestApple(); // Attempt to eat the apple stored in the 'apple' variable apple.eat(); Line 2: Since there is no apple on the table, the method getNearestApple(), will assign the value null (nothing) to the 'apple' variable. Line 3: Since the variable apple points to nothing, attempting to perform an action upon it (eat the apple) will throw a Null Pointer Exception. How to prevent a null pointer exception on line 3: if (apple == null) print("The apple variable is null, let's leave it alone."); else apple.eat(); Array Index Out of Bounds Exception We have an array of 4 apples. Let's try to eat the 5th apple and see what happens. apples[4].eat(); Since the array only contains 4 elements (indexes 0 to 3), attempting to perform an action on the 5th element (index 4) will throw an Array Out of Bounds Exception. How to prevent this from happening: if (apples.length < 5) print("The array's length is less than 5. We are unable to access the 5th element. (index 4)"); else apples[4].eat(); Tips I highly recommend learning Java before even attempting to script. Read the whole API a few times: https://tribot.org/doc/ The only way you become proficient at any kind of programming is by deliberate practice. Solve the problem first, then write the code. Read the open source scripts of other users. Write scripts because because you enjoy doing it. Have fun; experiment with code. The end Thank you for reading my basic scripting tutorial and I hope you learned something from it. If you need any help with your code, or you just want to harass someone, feel free to send me a PM.
  2. 15 points
    Updated world hopper Added firewall disable feature, both by command line and TRiBot settings Fixed Grand Exchange offer bug Added better support for detecting resizable mode TRiBot Firewall Settings There has been a number of requests for a feature to completely disable the firewall. We've included this feature in the general settings menu for your convenience. By default the firewall will still be enabled. This comes along with a few other bug fixes; including a GE bug that didn't allow users to purchase items, a world hopper update, and a more accurate method to detect resizable mode.
  3. 13 points
    Fluffee's Server Setup 2.0 [BETA] As some of you may know, I released an automated server setup script a little over a year ago. Albeit that script worked well, I was never fully satisfied with it, as I found it to be kind of messy to use. As a result, I rewrote the script, and restructured it, to add more, and stronger support for the different versions of Debian, the different versions of CentOS and the different versions of Ubuntu. However, with so many different Operating Systems being supported, and many different server providers having different setups, it's hard for me to test every possible scenario on my own. Which is why I've been privately handing this script out, and am now publicly looking for help. What does the script do? Similar to my previous setup script, this script changes the SSH port and creates a new user for connecting and using the server and disables root SSH connections; it installs the latest version of TightVNC Server (1.3.10) and sets that up with the desired port and password. It installs JDK 102 (32 or 64 bit depending on the OS), and installs TRiBot and OSBuddy and sets up the appropriate .jar file associations. What operating systems does it support? - CentOS (6.x and 7.x) (32 and 64 bit) - Debian (7.x and 8.x) (32 and 64 bit) - Ubuntu (12.x, 14.x and 16.x) (32 and 64 bit) Does it work? As far as I know, yes it does in fact work, and it works well if I might add. However, given that I can't test every possible setup, there is the potential for differences and issues, which is why I need help. I want to beta test, how can I help? The next time you setup a server, or if you just want to reinstall your old one, use this new script and let me know if you encounter any issues or things that you think are missing. Ideally, after you answer the questions the script prompts you for, you shouldn't have to touch the keyboard again. Therefore, if during installation the script prompts you for any kind of input that isn't the first few questions, please let me know as this is probably not supposed to happen. Also, if things don't work, like TRiBot doesn't open, there's no internet browser, LG won't hook, etc. make me aware of those issues as well, so I can try and fix them! I've found a bug, what do you need from me? A few things, I'll need the operating system and bit type and a description of the bug. I may ask you for SSH access to the server, as well as ask you to reinstall the server a few times, while I attempt to troubleshoot the issue. The issues may only arise on your server, so I might not be able to recreate the issue on my end, as my hosting provider may have a different server setup than your's. I've added in a bug report format below which would be the best way to report a bug, but simply shooting me a PM or messaging me on Skype also work, assuming you're willing to allow me to troubleshoot. How do I run the script? Login as root to a fresh VPS/dedi running one of the supported operating systems. From there run the commands listed below and follow the onscreen instructions. For those who would like to see the script's code, it can be found on my github here. The commands to run are as follows: wget --no-check-cert https://bitbucket.org/Fluffee/fluffees-server-setup/raw/master/fluffees-server-setup.sh && chmod +x fluffees-server-setup.sh && ./fluffees-server-setup.sh -v Version History
  4. 10 points
    Hello, I wrote this script at quest release, however I never got around to finalizing and posting it. It is in mostly one class, however it should still be quite readable. It is built using the EnumScript framework which I quite like. Features include: Start the script at any step or anywhere in RuneScape that is supported by Dax's WebWalker. Arguments for house favor and skill lamp selections. By default, Arceuus house is chosen and the skills chosen are randomized. If you provide arguments, it will not randomize. Requirements: Only requirement is to have 1 feather or 2 gp. Arguments instructions: (important for customization!) Script can be found here: https://tribot.org/repository/script/id/2569 Source can be found here: https://github.com/FALSkills/TribotScripts/tree/master/clientofkourend Thank you to @Final Calibur for his ACamera class, and @daxmagex for his WebWalker and included utility functions. Walking in RuneScape would be a pain without you!
  5. 10 points
    50 hours and 2 gallons of coffee later... How does this script work? Trains 11 different skills as follows: Sets a random skill target for combat and gathering skills (min/max values are optimized for each skill). The processing skills (cooking, smithing etc.) are trained using the gathered resources (ores, logs etc.), until the raw materials are depleted. The skills are trained randomly. Switches to a random task every 5 to 15 minutes. (Note: can pick the same task) Despite the randomness, certain rules are followed in order to train effectively (e.g. it can only train cooking after we are done fishing. However, after fishing is done, there is no guarantee that it will start cooking or it will go mining etc.). Skills supported at the moment: How to use the script: Start the script anywhere, it will automatically gather all the items it needs to complete all tasks. Do not supply the bot with high tiers tools, it will only use bronze and iron. What not to suggest / not bugs: Change the Draynor fishing spot - No. Even with the occasional deaths caused by the dark wizards, the Draynor fishing spot remains the best place for fishing. An efficient combat fail-safe has been implemented, but even if the bot dies, it only takes ~ 55 seconds to get back from Lumbridge to the fishing spot. Fixed set of levels instead of random-picked targets - No. Thousands of accounts with the exact same levels may not be the best idea, given the heuristic nature of bot detection. Walking is broken! - This script uses TRiBot's built in webwalking system. I might change this on a future release, however there are other dev. priorities for this script.
  6. 10 points
    I would like to congratulate @Todd on joining the development team. Expect great things from him!
  7. 9 points
    Improved web walker clicking accuracy Improved Clickable#click accuracy and made it also use RSModel's human clicking point generation algorithm. Clicking now uses DynamicClicking upon models when the entity's model isn't null. DynamicClicking is now the default clicking method used by Clicking.
  8. 8 points
    A free script that allows you to start your own F2P Goldfarm with fishing lobsters. Accepts all trade requests and receives gold. Uses the gold to automatically buy all the required fishing equipment. Levels 1-20: Net fishing Levels 20-40: Fly fishing Starting from level 40 the script will fish lobsters, which will be banked in the Port Sarim deposit box. Being robust, easy-to-use and completely free, this is an excellent script for the new TRiBot users that are interested in starting a small farm and learn the basics of goldfarming. How to use: 1. Create a new account and complete Tutorial Island using a script. [Optional] If you want to trade the lobsters before the account has 18 hours of in-game time, use a quester to automatically get 7 Quest Points. 2. After you're done with the account, run this script; it will start waiting to receive a trade. 3. Simply log in on a mule account trade with the bot, and offer it gold (5,000-10,000 recommended). All trade requests / windows will be automatically accepted by the bot. Done! After receiving the gold, the script will automatically do everything else. [Waiting to receive gold] [Buying the required tools] [Net fishing 1-20] [Fly Fishing 20-40] [Fishing Lobsters 40-∞ ] Enjoy!
  9. 8 points
    Hello, everyone. Recently I've been interested in how Jagex's pattern detection works. I ran a simple easily detected script which opens the GE, buys 1 lobster at 100 GP, waits 30 seconds, then cancels the offer and closes the GE on a loop with tribot's AI antiban turned off. After a few minutes of runtime some abnormal things started happening. Most commonly my input to the game was blocked, meaning I could move my mouse around, but the game server never accepted my input, and as a result my account's actions had no effect on the game world. I've been able to semi-reliably recreate this scenario multiple times on different accounts and IP addresses. It's worth noting that players and NPCs continue their normal action while my account's been frozen, which also indicates no connection errors. The input blockage happens fairly often to the point that it's very unlikely it has anything to do with my network connection or Jagex servers. I believe this is Jagex's first line of defense against bots (or at least one of them). Real players will typically try to perform various actions in-game like arranging inventory, clicking on random tiles or objects, world hopping, and even restarting the client. Bots may repeatedly click the same action (big red flag) or do nothing (moderate red flag) I have no doubt that botters/scripters with more experience than me have noticed this, but this is not a thread about Jagex input blocking, it's about preventing it from happening through pattern breaking. Pattern breaking is centered around the imperfections and variability of the human mind and judgment. Regular player activity does form patterns to some degree, but typically it isn't as pronounced as those of bots. There are two categories of pattern breaking: Large scale More useful for public scripts or large farms Focuses on creating differences between accounts through account preference Different methods of performing tasks Different subsets of antibans per account Each account may be only able to use 7 out of 12 generic antibans available for the script This increases the longevity of the script by allowing less opportunities for Jagex to group accounts via similar actions Different frequencies of antibans per account Account A may perform one antiban more frequently than account B Changes in sleep and delay times per account Accounts all have different run times This is mainly for farm detection, not for public scripts Different accounts running the script in different worlds/locations if possible Unique break patterns per account Different muling cycles Small scale Focuses on preventing accounts from producing patterns through their actions Changes the order of sub-actions within a larger action when order does not matter More useful when incorporated as part of a complex script process Avoid hardcoding script processes as first A, then B, finally C Instead use fluid condition checks to see what action should be performed Then use account preference and probability to determine which of several actions it prefers over the others Action[] actions = getActions(situation); // This should perform action condition checks and return only relevant actions boolean performed = false; for (action : actions) { if (accountPrefers(action) && accountProbability(action)) { performed = performAction(action); if (performed) { break; } } } if (!performed) { performAction(action[General.random(0, action.length)]; } While this may seem excessive, this is how players decide what to do next in a sequence of events Antiban is a large part of pattern breaking Performing actions you don't usually do is an effective way to break patterns Misclicking can be seen as a form of antiban as it's infrequent but deviates from your normal activity Avoid randomization Randomizing everything from antibans to sub-actions within a larger action schedule may seem like an appealing idea While it's likely to work to some degree, it will make accounts on the large scale appear too similar to each other We're trying to get our accounts to operate in the grey area between a well defined pattern and no pattern at all If all accounts operate in this grey area their patterns will be loosely defined but dissimilar from each other The idea of pattern breaking shows promise, however it has many requirements. One of which is account preference which is something Tribot has some support for, but this support is limited. For example a scripter has no way of applying Tribot preference to custom made functions. The solution is to make your own preference system where the account's username and a seed value is used to derive a value from 0 to 100. Below is my own way of doing so: /** * Performs a probability check on the input value. Input a percentage (0 - 100). */ public boolean chance(double chance) { return General.random(0, 100) <= chance; } /** * Scales a value based on its original range so that its position in that range is in the same position in the new range. */ public double normalizeValue(double value, double oldMin, double oldMax, double newMin, double newMax) { double percentage = (value - oldMin) / (oldMax - oldMin); return newMin + percentage * (newMax - newMin); } /** * Generates a username based preference value for the given seed (0 - 100). */ public double preference(double seed) { try { String hash = Double.toString(Player.getRSPlayer().getName().hashCode() * Math.sqrt(seed)).replaceAll("[^\\d.]", "").replaceAll("\\.", ""); String int1 = Character.toString(hash.charAt(hash.length() - 1)); String int2 = Character.toString(hash.charAt(hash.length() - 2)); String int3 = Character.toString(hash.charAt(hash.length() - 3)); return normalizeValue(Double.parseDouble(int1 + int2 + "." + int3), 0, 99, 0, 100); } catch (NullPointerException e) {return 50.0;} } /** * Generates a username based preference value for the given seed, but normalized to match the provided range. */ public double preference(double seed, double min, double max) { return normalizeValue(preference(seed), 0, 100, min, max); } /** * Performs a probability check on a preference value normalized to match the given range. */ public boolean preferenceChance(double seed, double min, double max) { return chance(preference(seed, min, max)); } Hopefully I've included all the necessary functions for the above to work. If you for example wanted to test an account's preference for performing Action A over Action B, you could take the hashcode of each actions, remove all non-integer characters from each, input them into the functions above, and receive a preference for each. I recommend using custom ranges like preference(100, 15, 85), where 100 is the seed, 15 is the min chance, and 85 is the max chance. That way the preference range will always be within 15% and 85% and you won't ALWAYS or NEVER perform that action above other actions. It should also be mentioned that you shouldn't be using these preferences to determine which actions to do, only to determine which actions should be performed above other actions. All actions should be performed as long as they're part of your script. This post ended up being much longer than I originally wanted but it's good to get your thoughts out in writing so I'm glad I spent the time. Going forward I would appreciate a healthy discussion, please add to the thread with your comments rather than just taking up space with pointless nay saying.
  10. 7 points
    Summary Hello everyone, I've started a project that I hope can benefit our antiban technology. Since ABCv2, there really hasn't been much improvement in antiban. I think the concepts behind Trilez's creation are the key to staying under the heuristic radar of Jagex and prolong bot life. This project is an extension of the current implementation of ABCUtil, and serves to replace some functionality, and also add some. Since my class extends ABCUtil, you still have access to everything ABC has to offer. I'm not replacing all of it! Why? There are three main reasons behind this project: Put simply, ABCv2 is cumbersome. It's annoying to implement in most cases, and very difficult to implement correctly in a lot of cases. This mainly applies to the new addition of Reactions, which requires a lot of unnecessary input from the script. Some of the human data behind the new Reactions of ABCv2 isn't ideal. Bots should not emulate the average player, because the average player plays RS like an AFK game. That's how these reactions were recorded. We want our bot to be very efficient, but not abnormally efficient. We want our bot to be a no-life, caffeine-driven player, but still human. (Though we still want each bot to be heuristically different than other bots, but we'll get to that). There are more things to add! Replacements Reactions I've already pointed out the problems with the current Reactions System. Anyone who's watched their bot wait 13 seconds between killing seagulls are likely also frustrated. Not to mention, ABCv2 does not cover reactions for predictable events. ABCv3 will offer a set of Reaction Types that allow the scripter to replace nearly all arbitrary sleep times with something that looks human, and takes into account RS username, mouse position, and a dynamic sleep. Here are some examples of Reactions that you can use in your script. Each one will use an equation that produces data that matches human data that I will collect: SHORT (generally around 200-600 milliseconds) MEDIUM (500-1000) LONG (1000,3000) BANK_APPEARS (used after bank screen opens. Based solely off of human data collected from people opening the bank) BANK_CLOSES (used after bank is closed) INTERFACE_APPEARS (used for non-bank interfaces) INTERFACE_CLOSES (used for non-bank interfaces) Now, we must also account for AFK Reactions, which are performed after long, idling tasks, such as chopping a tree. The current implementation takes into account 9 factors. My system will take into account the majority of those factors, and some of them will be auto-detected. For example, ABCv2 forces you to tell it whether or not you're in combat. My reactions will determine that for you. Also, the Abc3Util class will now provide helper classes for keeping track of idle events so that it can take into account average idle time. It will also make it easy to keep tasks separate. ABCv2 is really only meant for generating reaction times based off of a single Idle Task. But let's say your bot chops oaks AND Willows. Those each require separate reaction generating variables. Abc3Util will allow you to easily track data for any number of events at the same time, and generate reactions based on them, with only a few lines of code. All of the old Reaction Methods will be Overriden and marked "Deprecated" (they will still function normally, however). Preferred Target ABC preferred target is annoying to implement, and sometimes doesn't make sense. For example, it requires you to call it for hovering the next Target, then you must store that target for when you decide to actually click something. The problem, however, is that in order for this to make sense, you must make sure that not only is the Target valid, but also that it hasn't moved or anything else has spawned or even if your mouse isn't on it. Also, this method only takes into account distance, which isn't a good metric, because it ignores any and all obstacles. In effect, the ABCLv2 Preferred target system is useless. .... but it's a good idea. I'm going to replace this by calculating many of the above variables I mentioned inside the API. Therefore, instead of calling the method when going to hover and storing the result, you can just call it whenever. It will be a more expensive call, but it will take into account Mouse Position, Weighted Distance to targets, Competition, and it will be adjusted to allow for human-like decisions, which include not always picking the absolute most optimal targets. New Features Timed Action - Accidental Input Performing actions in a human way is important, but our input in general must also look human. Even though our actions are performed at human times, they still all have a purpose. Hell, even most of the times actions have specific purposes. How many times have we accidentally pressed a key on the keyboard while playing a video game? A lot. This action in meant to be performed while the game screen is focused, and it simply presses 1 or more keys on the keyboard. It works the same as all timed actions, except the "should" method will rarely return true when the mouse is on screen (though it's possible, to avoid heuristic detection). The method will also return different results (over time) based on the RS account username (like normal ABC). This method will also be affected by fatigue. Basically speaking, the longer the script running, the more likely these accidents (although they will still be rare). Predictive Inputs Now that we have human reactions, we must explore how humans have compensated for our slow nervous system! The answer is predicting the future. It's not hard. When we click the banker, we expect the bank screen to appear. Our reaction may be slow, but we compensate by moving our mouse near where we think the deposit button will appear. My API will simply provide a "shouldPredict()" method, which will return true most of the time, but the actual calculation will be complex. The implementation will be up to the scripter, except for APIs that I package with this project (for example, I might offer a Banking extension that uses this). The method will also return different results (over time) based on the RS account username (like normal ABC). This method will also be affected by fatigue. Simply put, the longer the script time, the fewer predictions (although it will normally still be true). Improvements Easier Implementation Singleton In ABCv2, you must get a new instance of the class and use it in all of your code, until a new RS account logs in. That's not necessary, and really annoying if you have a lot of source files. My implementation stores an instance of itself in a thread-local variable (works with tabs, but can only be retrieved on the main thread). Here's how you use it now: Abc3Util.instance().shouldHover(); You're of course welcome to store the result of "instance()" in your script for easier use, but now you don't have to pass it to all of your objects if you don't want to. Timed Actions In ABCv2, you must do something like "if(shouldDoX) { doX(); }" for each action. You probably have a method that goes through each action and performs it if needed. My implementation has a built in method for that. As a bonus, it randomizes the order in which it checks and performs the actions. By doing so avoids certain behavioral patterns. Even though checking your stats and moving the mouse are humanized behaviors, always performing them in the same order can be dangerous, even if it doesn't happen often. Abc3Util.instance().performTimedActions(); Release Schedule I have not yet decided if I will release this publicly. If it ends up truly helping with banrates, it will be a very valuable tool. I don't want to sound greedy, but I might have to charge for this (maybe offer it to Patreon subscribers?). How You Can Help? I will be asking for private Beta Testers eventually. I will need human data. But the human data I collect will be much more controlled than what Trilez collected in order to produce the results I want. Remember, we want to be human, but an efficient human. If I had enough developer support, I would consider allowing this to be open-sourced for contributions. Other than that, I have no way you can help other that be loyal to Tribot and spread the word. I may eventually have a Patreon where you can subscribe for certain benefits and I will put the money towards things that will speed this development along. Let me know if you'd be behind that. Credits Shotdox - For providing a base set of calculation methods for generating distributions (jogged my statistics memories) TRiLez - For inventing ABC and showing that human data is important. If we want to fight against heuristics, we need to implement heuristics of our own! If you have any question, feel free to post below, or contact me on Discord (wastedbro#9955).
  11. 7 points
    While attempting to upload my own script to the repository with JavaFX, I realized there was not a lot of information on this topic. This tutorial will explain how to incorporate JavaFX into your Tribot scripts and how to make sure it will work correctly when uploaded to the repository. Part 1 - JavaFX Why use JavaFX? JavaFX offers a high level of customization, including support of style sheets and FXML, and is the future of user interfaces in java. Prior to JavaFX, Swing was used to create user interfaces. JavaFX supports a variety of features that were previously not available in Swing. Furthermore, basic items in JavaFX have been updated to look much more modern then their Swing counterpart. Swing GUI vs. JavaFX GUI How do I learn JavaFX? Because there is already a large number of resources that currently exist to teach JavaFX, I will not be discussing everything about how to learn the basics of JavaFX. I highly recommend reading Oracle's guide to getting started with JavaFX located at https://docs.oracle.com/javafx/2/get_started/jfxpub-get_started.htm (I used this myself to learn the basics) FXML? FXML is "an XML-based user interface markup language created by Oracle Corporation for defining the user interface of a JavaFX application." as stated by Wikipedia at https://en.wikipedia.org/wiki/FXML. I highly recommend that you use FXML to design your GUI layouts. An easy to use drag and drop program that will create the FXML code for you is Scene Builder. Using this program, you don't need practically anything about FXML to get started. Scene Builder can be downloaded at http://gluonhq.com/products/scene-builder/. It is very similar to the Swing WindowBuilder plugin for Eclipse (or the Netbeans GUI builder, however, I don't recall its name). Scene Builder I'm ready to get started. For the purpose of this tutorial, we will create a basic application that has a textfield and a button and will save the value of the textfield when the button is pressed and will print it to the Tribot Client Debug. First, in order to use JavaFX in your IDE you must download the e(fx)clipse plugin for Eclipse located at https://www.eclipse.org/efxclipse/install.html. If you do not use Eclipse then you must find another plugin that will allow you to create JavaFX applications in your IDE. Do a quick google search and I'm sure you will be able to find it. Now we want to set up our JavaFX program. I recommend using Laniax's GUI API located at https://github.com/Laniax/LanAPI/tree/master/core/gui (thanks @laniax) Download the GUI class and the AbstractGUIController class and put them into your scripts package. The GUI handles all front end parts of the user interface, and the controller handles the logic. For the sake of this basic program, we are not going to use anything else from Laniax so delete everything that contains LogProxy and log in it. Additionally you may have to delete a few extra lines from the GUI class that involve other classes from the Laniax's API. Now create a main class that will extend script. We are going to create a new GUI object and display it, and wait until the GUI is complete. The URL fxml will contain the path to where we will place the FXML file. The "null" will be replaced with the path as a string. Now we want to build the GUI Controller. Remove the "getEnableNotifications" from the AbstractGUIController as we will not be using this. Create a new class called "Controller" that extends AbstractGUIController. The required initialize method is called when the FXML is loaded. Anything that must occur when the FXML is loaded can be placed within the method. In this case we will leave it blank. We will come back to these later on. Next we want to design the actual GUI with FXML. You must download Scene Builder (displayed above) at http://gluonhq.com/products/scene-builder/ to build your FXML file. An example of a complete FXML file created with Scene Builder is https://github.com/Naton1/nSand-Crabs/blob/master/fx/gui.fxml. Simply drag and drop the components you would like to use in Scene Builder. Open Scene Builder and click File, New to start a new application. Drag and drop the components as you wish to construct your GUI. I suggest messing around with this program for a bit to understand the basics of Scene Builder and JavaFX. Explore everything so that you can become familiar with all of the options you have (on both the left and right sidebars). Code Created by Scene Builder Now, in order to reference any of these objects from our java program, we need to give them each an fx id. This can be done by clicking on the item in Scene Builder that you want to reference, and then clicking "code" on the right sidebar. Type in whatever you want to call the component in your java program. Additionally, to add event handlers, enter the name of a method you want to call when an action is performed on the specified component in the onAction textfield. For this example, we will name the textfield as "textField" and the button as "startScriptButton". We will name the method that is called when the button is pressed "startScriptPressed". Furthermore, we need to set the "controller" of this FXML file. This can be done by clicking on the Controller tab and selecting your Controller class in the bottom left hand corner. Now, we want to incorporate this into our JavaFX application. Open up the GUIController and add two new fields, one for the new textfield and one for the button. They must be named exactly as named in the FXML. Additionally, all fxml objects must be referenced with the @FXML annotation. While you are doing this be sure that you are importing the correct javafx packages (hopefully your IDE will do this for you). We also need to add in the method that we added, #startScriptPressed Now when the button is pressed in the GUI, the startScriptPressed method will be called. Place all logic inside this method. We are simply going to have to print to the client debug. Don't forget to close the GUI so that the loop in the main script will end. Now all we have to do is go back in and edit the path to our FXML file, and we are all set to run the program. Now run the program and the text in the textfield will print to the client debug in Tribot. Congratulations! You made your first (very basic) Tribot script with JavaFX & FXML! This only shows the basics of what JavaFX can do but as you explore it more you will discover all of the incredible things that can now be done with this useful platform. Part 2 - JavaFX & FXML on the Tribot repository Obfuscation When uploading any files to the repository, they are all obfuscated, meaning the names of the objects in the code are all changed. When the FXML tries to reference a java object, it needs the exact name of the object. Therefore, we need something that can make sure the obfuscator does not change the names of important objects. This can be done by downloading an external .jar known as Allatori Annotations, also located on Laniax's API. https://github.com/Laniax/LanAPI/blob/master/allatori-annotations.jar This must be added to your build path in your IDE by right clicking on your project, going to build path, add external jar, and locating the jar that was just downloaded. Now to make sure certain names do not change, we just add the @DoNotRename annotation to the class, and all fields + methods that are related to the FXML. Example of adding in the @DoNotRename annotations Cannot reference local .fxml files When uploading your script to the repository, you cannot access your .fxml file. The only way to load a .fxml file into your GUI through Tribot is by uploading the .fxml file to a website or another method discovered by Laniax. You can either upload it to your own website and use the path of that as the argument to your URL object Example of URL of .fxml file uploaded to personal website Or you can do what @IceKontroI came up with - "I did have this problem a while back and my solution was to use Pastebin. Upload the .fxml file to https://pastebin.com/ then load up the raw FXML. That link can be used instead of a local file path, only problem is that it needs to be manually updated." The method that Laniax discovered to get around uploading your .fxml file is as follows: Quoted from Laniax The End Thanks for reading my guide, if you have any questions or if you have any other useful information that I could add, than please let me know. Hope this helps some of you from some of the problems that I had
  12. 7 points
    Preface This tutorial uses Windows 10 and IntelliJ IDEA. Prerequisites Java knowledge equivalent to someone who has passed a college level introductory Java course with complete understanding of the course. Java Development Kit installed. VIP or VIP-Extended on TRiBot (required to run local scripts). Advisories Experience with a Java IDE. Experience programming outside of a classroom setting. Learning Resources The Java™ Tutorials Derek Banas YouTube Tutorial TRiBot Java Documentation https://tribot.org/doc/ Outline Preface Getting Started IntelliJ IDEA Setup Creating Your First Script Uploading to the TRiBot Script Repository Script Design Task Decision Tree Variables and Constants Development Tools Essential Classes and Methods Getting Started IntelliJ Idea Setup Download and install IntelliJ IDEA community edition from JetBrains.com. If you have never ran the TRiBot client before, do so now and let it load Old School RuneScape all the way up to the login screen. After doing so, I would recommend restarting the TRiBot client, although this is not required. Create and Setup the IntelliJ Project On the IntelliJ welcome screen, select Create New Project If you already have a project open, then select File -> New -> Project… Select the Java verison or if none are available, press New... and locate the directory in which Java is installed. Click Next skipping the project template option and you then should come to a window that allows you to set the project name and location. Set those to whatever you want and then click Finish Adding TRiBot.jar to Project Libraries Select File -> Project Structure and in the window that opens select Libraries Click the green + and select Java. You will now need to locate TRiBot’s dependencies folder. On a standard windows installation, this folder will be located at C:\Users\REPLACE_WITH_YOUR_WINDOWS_USER\AppData\Roaming\.tribot\dependancies Yes, dependancies is mispelled. Once you have navigated to the dependancies folder inside IntelliJ, select TRiBot.jar and press OK Note: AppData is a hidden folder and will not display in IntelliJ’s file explorer. You will need to type in the path at the top of the window for it to show. Do not press enter after typing the path, the file explorer will automatically refresh as you type. On the next window you should only have one module. Make sure the module is selected and press OK Configuring Output Path If you have closed the Project Structure window, reopen it by selecting File -> Project Structure Navigate to the Modules tab and make sure your only module is selected. Select the Paths tab and then select the radio button Use module compile output path Change both the Output path and Test output path to C:\Users\REPLACE_WITH_YOUR_WINDOWS_USER\AppData\Roaming\.tribot\bin\ Click Apply and then OK Creating Your First Script All of your classes will need to be in the package scripts In your src folder, create the package scripts Inside the scripts package, create a new Java Class named HelloWorld Extend Script and implement the method run Note: Make sure you import org.tribot.script.Script and not sun.font.Script Add a ScriptManifest which will provide the TRiBot client information about your script so it can be properly categorized in the script selector. @ScriptManifest(authors = "Encoded", name = "Hello World", category = "Script Tutorial") Add println("Hello World"); inside the run method and the basic script skeleton is complete. println prints to the Client Debug at the bottom of the TRiBot client. This method is inhereted from Script, but an equivalent method can be found in the General class. Build your project (Build -> Build Project) and then press Start Script in the TRiBot client. If your script does not show up in the script selector, then you have done something incorrect or you do not have VIP. HelloWorld.java package scripts; import org.tribot.script.Script; import org.tribot.script.ScriptManifest; @ScriptManifest(authors = "Encoded", name = "Hello World", category = "Script Tutorial") public class HelloWorld extends Script { @Override public void run() { println("Hello World"); } } Creating Additional Modules When developing a script that is more than one class file, creating a specific module for that script is highly recommended. For each additional module, you will need to change the output path like you did above and add the TRiBot.jar library as a module dependency. Removing RS3 Auto Imports IntelliJ IDEA will auto import for you. This can lead to unwanted behavior such as importing RS3 classes when you wanted OSRS. To fix this, go to File -> Settings... -> Editor -> General -> Auto Import In the Exclude from Import and Completion table, add obf, org.tribot.api.rs3, and sun.font.Script Uploading to the TRiBot Script Repository To upload to the TRiBot Script Repository, you will need to create a .zip file with your script’s java source files. The zip file acts as your scripts package. You will need to keep the same package structure you’re using in IntelliJ. If you have the package scripts.agility you will need to have the agility folder inside in the zip. As an example using HelloWorld.java from above, create a zip file named HelloWorld.zip and place HelloWorld.javainside. HelloWorld.zip is now ready to be uploaded to the repository, but please do not upload it in attempt to keep the repository clean of unwanted scripts. Note: Do not place your compiled class files inside the zip file, only java source files. Script Design Two of the most common script design patterns will be covered: Task Decision Tree Task The task design pattern consists of a collection of tasks that have a validation and execution method. The collection is then iterated over and if a task’s validation method returns true, then the task is executed. Tasks are typically stored in a Set or a List. Here is a short tutorial for the Task Framework. Decision Tree The decision tree design pattern consists of a manually created decision tree that is traversed using a modified preorder depth-first search until a valid runnable node is found. Here is a tutorial for the Decision Tree Framework. Variables and Constants Variables To manage variables, I use a Vars class. The Vars class will be a singleton. A singleton is not needed, however, when managing a shared resource such as variables, a singleton is preferred. To access a variable, you will call Vars.get().variableName Note: There might be more proper ways to manage variables, but this has proved to be the most effective for me. Vars.java public class Vars { private static final Vars instance = new Vars(); public int variableName; public static Vars get() { return instance; } private Vars() { } } Constants To store constants, I use a final Constants class. This allows you to static import constants so there is no need to have to reference the class and then the constant. Note: The Constants class is not a substitution for enums. You should be using enums wherever possible. Constants.java public final class Constants { public static final int EXAMPLE_CONSTANT = 1; private Constants() { } } Development Tools TRiBot Debug Options All options listed under the Debug tab in the TRiBot client. Interface Explorer At the top of the TRiBot client, navigate to Tools -> Interface Explorer LAN ScriptTools Contains various tools to aid in script development. Area Creator and VarBit Explorer These tools will either need to be developed yourself or can potentially be found on the TRiBot forums. Java VisualVM Used to monitor CPU and memory usage. Can be found within the JDK installation directory. Essential Classes and Methods RSArea Should always be used to check if a location is within a area. Clicking Should be used for all clicking that involves an entity to stay consistent. Timing.waitCondition(Condition c, long timeout) Should always be used where applicable.
  13. 7 points
    Hello all, It seems that the latest update has broken an important aspect of TRiBot causing some scripts to not work properly or at all. We are working on a solution and will update when we can.
  14. 7 points
    TRiLeZ hax0r where is my monk-phish
  15. 7 points
    Up now. Had to message support and wait to force start server up since I wasn't able to ssh into it.
  16. 7 points
    Back-end problem. Expect a fix in 10 minutes.
  17. 6 points
    The following script payment methods are being removed: One Payment Auths Monthly Two Week One Month Two Month Three Month Six Month The reasons for this decision: Bot farmers taking advantage of unlimited script instances, costing us more money than what we get from them. Most of our revenue comes from individuals whom run one or two instances at a time. Then there are bot farmers whom pay $8 for VIP-E and use an unlimited script instance purchase which they purchased years ago. These bot farmers consume most of our computing resources compared to all other users. It doesn't make sense for us to support bot farmers in this way when they are costing more than the revenue they bring in. This loss of profit from bot farmers taking advantage of unlimited script instances ultimately is being paid for by the majority of TRiBot users. When we lose money from allowing bot farmers to carry on with not contributing their fair share, there's less money for us to spend on development, support, and various projects. Scripters are less inclined to provide adequate support when they're expected to provide long-term support for scripts which are no longer making them any money. Removing these script payment methods will force scripters to be more responsible and accountable for their scripts and customers. Script prices are expected to decline for users whom only run one or two instances while increase for bot farmers running 10+ accounts. Since the former represents most of our customer base, these new prices will be more fair overall for users. We are using the increased revenue flow to hire more developers, like how @Todd was recently hired as a developer, provide better support How are we providing better support? FreshDesk is being setup to better allow us to handle customer issues, emails, and tickets. We are also writing guides to be included in an easy to use, frequently updated knowledge base. After it has been setup, we will be hiring some support staff to actively work as an agent behind the help desk software. What kind of projects are coming? A few weeks ago, we hired a team of experts to redesign our back-end systems, front-end for repository, and back-end API endpoints for TRiBot to communicate. This will then allow us to more easily maintain our web services as well as introduce new features, or bring back old ones such as the bot panel. The project is expected to be completed within a few months, and is currently on schedule. Sneak peeks are soon to come. Old, outdated, or bug filled components of TRiBot are to be overhauled and redone progressively over the course of the year. A total remake of the TRiBot client is going to being development starting late Spring, which will address all of the problems TRiBot currently suffers from. The new client will have a fresh, responsive new UI, a new scripting API with a much, much better design than the current one, better anti-ban, overall better mouse movements for all users (not just VIP-E), more overall stability, better automated testing and code review to prevent issues, and lots more. Many of you may of heard TRiBot was getting a new client years ago. That was the plain, but unfortunately the developer behind it (not me nor any of the other TRiBot admins) disappeared due to personal issues, and misled me about his software engineering and general programming abilities. This project was abandoned last year. Do not let the development of a new client make you think the current version of TRiBot isn't going to keep getting updated. I will keep working on it, and Todd's main focus is on maintaining the current version of TRiBot. It's possible for us to not have to focus on only one project. What happens to previous unlimited or lifetime script purchases? All premium unlimited or lifetime script purchases will be converted over in the following manner: Those non-private script sales which have occurred in the past 6 months will automatically get converted over to 1-year script instances starting from the time of purchase. The running instance count will remain the same as to what was purchased. This is longer than what is stated in the point below because at the time of purchase, the customers would have believed they were getting more than they're actually going to get. To make it more fair for them, they are getting a longer time period. Those non-private script sales which have occurred previous to the past 6 months will automatically get converted to 6-month instances, starting from today. The running instance count will remain the same as to what was purchased. Private script instance purchases will be capped at 100 running instances. I hope everyone will deem these changes as fair, TRiLeZ
  18. 6 points
    BE SURE TO LOG INTO TRIBOT AT LEAST ONCE BEFORE USING THE CLI STARTER. This client starter uses tribot internal functions to start the client. Arguments: accountemail - required, this represents your account username in tribot account's manager scriptname - required, this represents the script name you want to start. If your script has spaces in them, use quotes to wrap the script name, i.e: -scriptname "Auto Fisher Pro" heapsize - (optional), this represents the heap size you start tribot with. Default is 386 world - optional, this represents the world you want to start the client on breakprofile - optional, this represents the break profile name in the tribot's break handler scriptargument - optional, this represents the script arguments if you wish to use them proxyip - optional, this represents the proxy ip you wish to use. proxyport - (required if ip), this represents the proxy port you wish to use proxyusername (optional), this represents the proxy username you want to authenticate with proxypassword (optional), this represents the proxy password you wish to authenticate with. https://www.dropbox.com/s/tyjnlhtqc1bwdmw/publicstarter_jar.zip?dl=0 Keep all files in the same directory. Check the .bat file for an example. creds to deluxe for his orginial starter
  19. 6 points
    would be cool if tribot made an official CLI
  20. 6 points
    Quick Update: While progress on the actual antiban has been slow, I've been testing what I currently have. It's doing quite well. In the meantime, I've been developing a way for my scripts to easily incorporate all of my features. The best part? It's entirely optional. Take a quick look at something that will be included in all future premium scripts of mine: I won't just have the best antiban in general. I'll have the best antiban for each and every user, because it's completely up to you to choose. Happy botting!
  21. 6 points
    Announcements The above information is largely a personal Thank You to my customers, and some explaining on my end. To those who have no interest in reading such information, know that the script will be fixed by the end of the day, and I thank you all for waiting. While most of you are simply customers, there are dozens of you who have been with me from the beginning; since the glory days of Sigma Merch. It is somewhat unusual for people to display signs of personal weakness when in business, but it is my belief that it is my obligation to be transparent with all of you rather than leaving you to wonder why (and therefore oftentimes assume the worst). Below I am going to be sharing quite a bit about myself and my personal life, so I once again warn those who have no interest or find that awkward, know that the script will be fixed by the end of the day. But I digress. I have been going through personal turmoil for many months now. This illness has certainly not helped the matter, so once I again I apologize for the horrendous timing of this incident, as well as my lack of public presence on the forums for the last 8-12 months. I will not go into detail as details are irrelevant to the vast majority of you, but know that if I could have been active, I would have been. To those who are familiar with the three most common mental health disorders — i.e., ADD/ADHD, Anxiety/Panic, and Depression — , you already know how difficult just one of the three can be to overcome, much less all three at once. Throw one of the worst cases of Perfectionism you can imagine into the mix and you've got a pretty good view into my head. (By the way, if you want an example of how even the best of us can fall, watch Iron Man 3. It's fiction, but it depicts PTSD-triggered Panic Disorder perfectly. But once again, I digress). I am not going to go into any more detail than I have above, but know that those are the conditions that I have been battling with (as well as getting my insurance to help pay for the help I need, but once more I digress). What I really want to say is thank you. Thank you to my customers who have been more than patient and understanding, but most of all, thank you to my support team for holding down the fort while I went through my crucible. I say this because I want everyone to know that I am taking no one for granted, I am ignoring no one, and I appreciate all of you. Well, that was fun, now wasn't it? Lots of feelings and what-not? Probably feels kinda strange for all of you reading this; but hey, it needed to be said. As the nice fancy italicized text says at the top of this post, Tau GE will be fixed by the end of the day, and the extension will then be given as soon as TRiLeZ has the time to apply it. If anyone has any further questions or would like to talk to me personally, please contact me via the Tau Support Discord Chat (link in signature), or shoot me a PM (via Discord). Ciao!
  22. 5 points
    Decision Tree Framework by wastedbro Hello everyone, While working on some very large scripts, I realized that the current accepted frameworks scale poorly with many tasks, and that I have to choose between cleanliness and efficiency. Due to this, I've been working on a new framework that I am writing about here. Here is the Source, for Reference: https://github.com/WBScripts/Tree-Framework Summary So the decision tree framework is based on, well, The Decision Tree. My framework uses this concept and implements a Binary Tree of Decisions and Actions. Both decisions and actions are Nodes. Nodes can have 2 children. Actions will have null children, and Decisions will have 2 children of either Decisions, or Actions. I know it sounds a little confusing, so let's talk about why we even need this. Why not use the popular Node Framework? The Node Framework is a great way to split up a large amount of code. However, there is a problem. Even though each node is a different class, they really aren't flexible. If we assume each node is completely independent and isolated, we must ensure it's an invalid node when another node is valid, which is a huge waste of resources. If we do not do this, we must ensure our nodes are checked in a specific order (or prioritized). While prioritized nodes prevent wasteful duplicate checks, it still does not prevent all wasteful checks. And it certainly cannot be in-depth. For example, if you want a "Pick up birds nest" node and a "chop node", you must ensure both of their validation methods include "is in chopping area". That's wasteful, so putting them in the same node is the only option. These problems are not a big deal in small scripts, but as the complexity grows, so do these problems. Here's a visual comparison of the Frameworks in a Combat Script: Node Framework As you can see, both of the first nodes include an Area Check. This is either solved by combining the Nodes or ensuring they always run in that order (and then you would be unable to re-use the nodes without including them all). Also, let's say you start this script in the bank. It checks if it needs to eat. Why? We're in the bank. We could put the Banking Node first, but then we run the risk of the Eating Node not being fast enough once we start adding complexity. Oh, and let's say we want to add a Gear Upgrade feature. Well, how would we do that? Upgrading gear is really only done in the bank, so we could have two nodes that check a banking condition..... Well, that makes our valid() methods bloated and repetitive. So, I guess we just have to put them in the same node... All of this can be solved with my framework. Decision Tree Framework As you can see, this framework is much different. It allows you to nest in logic. In this framework, our script will never even check the HP unless we meet a bunch of other conditions. Yet, we still have a direct path to the eating method, making it the number one priority where we can be attacked. Now, if we want to add gear upgrading, we would simply add the nodes under the Banking part of the script. Now we can add functionality with touching our old code. This decreases regression bugs. So how do I use this? Well, let's show you how to create some Nodes. Decision Node Example: public class HasToBankNode extends DecisionNode { @Override public boolean isValid() { return Banking.isBankScreenOpen() || Inventory.isFull(); } } Important: Remember to include "extends DecisionNode" Every Node has a "getValidNode()" Method. This method will check the "onValid" method and return the true node if it's valid. If not, it will return the false node. Process Node Example: public class BankNode extends ProcessNode { @Override public String getStatus() { return "Banking"; } @Override public void execute() { // Do bank stuff } } Decision Nodes must have these two methods to run. How do we run these nodes? Here's an example: DecisionNode hasToBankNode = new HasToBankNode(); ProcessNode bankNode = new BankNode(); hasToBankNode.addOnTrueNode(bankNode); hasToBankNode.addOnFalseNode([insert some other node]); DecisionTree executionTree = new DecisionTree(hasToBankNode); // Create a tree from the root node while(true) { INode node = executionTree.getValidNode(); if(node != null) node.execute(); } That's it! You'll want to shorten this code once you have a lot of nodes, though. All of the background stuff is handled for you! The "getValidNode()" method is recursive. It will go through the entire tree and pick the correct process node for you. This framework has more features. I will try to write a tutorial for them soon. Github Link: https://github.com/WBScripts/Tree-Framework
  23. 5 points
    Credits and VIP have been sent to the winners! Thanks go out to everyone who participated.
  24. 5 points
    All snippet releases recently have been basically useless so I'll release something useful. Green tiles = safe spots Cyan tile = NPC location Github: SafeSpotGenerator Known Issues Spots that an NPC can walk to after being attacked shouldn't be generated (IE direct corners). How To Use Painting all safe spots for a specific NPC. @Override public void onPaint(Graphics graphics) { Graphics2D g = (Graphics2D) graphics; RSNPC npc = NPCs.find("Barbarian")[0]; HashMap<RSNPC, ArrayList<RSTile>> safeSpots = SafeSpot.generateSafeSpots(npc); for (RSTile tile : safeSpots.get(npc)) { if (tile.isOnScreen()) { Polygon poly = Projection.getTileBoundsPoly(tile, 0); g.setColor(Color.GREEN); g.fill(poly); g.setColor(Color.WHITE); g.draw(poly); } } g.setColor(Color.CYAN); g.fill(Projection.getTileBoundsPoly(npc, 0)); g.setColor(Color.WHITE); g.draw(Projection.getTileBoundsPoly(npc, 0)); } Of course once you retrieve all the safe spots of NPC's near you, you can apply some logic to determine which NPC's you can attack from your current location, or which NPC you should walk to to attack.
  25. 5 points
    To add to the existing Game#Options() the TRiBot API offers, here's a bunch of methods to toggle game options on/off. I made this because a lot of the current Options API simply do not work - I also added a few extra that didn't exist. Features: setShiftClick - boolean param. True = toggle on, false = toggle off, setMouseCamera - boolean param. True = toggle on, false = toggle off, setMouseWheelZoom - boolean param. True = toggle on, false = toggle off, setAcceptFirstAid - boolean param. True = toggle on, false = toggle off, setRemoveRoofs - boolean param. True = toggle on, false = toggle off, setGameBrightness - int param between 1-4 for which brightness to select (see @param setting in source for more info) setPlayerAttackOptions - int param between 1-4 for which option to select (see @param setting in source for more info) setNPCAttackOptions - int param between 1-4 for which option to select (see @param setting in source for more info) setKeybindingDefault - boolean param to toggle Esc key to close interfaces. setDataOrbs - boolean param. True = toggle on, false = toggle off, All methods return a boolean - will return true if the condition requested is met. Update: Added setLootDropNotification method! Source
×