Jump to content
odisey

Up To Date Scripting Resources For Beginners

Recommended Posts

Posted (edited)

Hi,
I recently got back to Runescape because I was playing with opencv. At first, I wanted to create my own bot (something simple :D ) but I was amazed by the amount of work that went into Tribot antiban so I decided that I would write some scripts here.

I used to bot on the powerbot website before 2013 and got really close to max cape back then. I had like 5 skills left.

It could be fun to give something back to the community that created my main account that is not banned until this day.

I have some questions if there is anyone who would make time for me.

1) Could you please share links with some up to date comprehensive tutorial how to write a bot? I don't really code in java but the syntax is quite similar to other languages. However, it would be cool to read some tutorial for an advanced script (something more complicated than clicking tree and dropping logs) so that I could get a better feeling of a file structure, GUI, antiban and decision tree.

2) Is Tribot color bot? How detectable is the client? I saw that you have something like looking glass? That looks really cool but on the other hand, I saw some scripts working with item ids. Do you detect items on screen or do you read environment information from computer memory?

3) Are private scripts less detectable than public scripts?

Edited by odisey

Share this post


Link to post
Share on other sites
Posted (edited)

Welcome!

Here's a good one:

Checkout other threads in the scripting tutorial section:
https://tribot.org/forums/forum/43-scripting-tutorials/

Searching for open source scripts will also be helpful.

TRiBOt is reflection.
In theory private scripts have less users, so less data for Jagex to examine, so safer.
But IMO a well written script is a well written script, doesn't matter if it's private or not.

Edited by YoHoJo
  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, Naton said:

I would try to learn a bit of java before trying to apply it to scripting but not necessary I guess

I don't think that is necessary. There are differences but other than that when learning a new language and writing something simple - which scripting should be - it is just about the syntax and file structure. I know a bit of C++, php and javascript (nodejs) and I recently had to work on a project in javascript/ruby. I hope I am right :D otherwise no scripting for me.

Share this post


Link to post
Share on other sites
9 hours ago, YoHoJo said:

Welcome!

Here's a good one:

Checkout other threads in the scripting tutorial section:
https://tribot.org/forums/forum/43-scripting-tutorials/

Searching for open source scripts will also be helpful.

TRiBOt is reflection.
In theory private scripts have less users, so less data for Jagex to examine, so safer.
But IMO a well written script is a well written script, doesn't matter if it's private or not.

I love the Intelliji setup thanks. :)

Share this post


Link to post
Share on other sites

Im a firm believer that Looking Glass really helps in not being detected. others disagree, but ive botted for many years now.

 

Obviously private scripts will have less ban rate as they will do things that are different than the scripts that are open to public. to take it a step further to use a private script in an area that is not botted or has minimal bots will decrease ban rates much more. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By JordiLaFjord
      Hey.
      Just trying to right click make all on the gold bracelet interface. Most recent thing i've trid is getting the RSInterfaceChild braceInterface = Interfaces.get(446,47); then calling it as braceInterface.click("Make-All");
      I've tried a few other things from the forum that I can't thing of atm, so any help would be appreciated.
    • By AliveInMe
      Many beginners fail to understand how to navigate API's. Today I am going to show you how to navigate and understand TRiBots documentation.
      I. Open TRiBots API by following this link: https://tribot.org/doc/
      Your main screen should look like so:

      Don't be alarmed it's actually pretty easy to follow! I will begin by discussing the three main sections of our current screen.
      II. 3 Section main API page
      a) The API Packages: 

      Here is where you can find select classes per package and then broaden your search for a specific class in that package.
      *Helpful for import finding!*
      For the next screenshot, I clicked on org.tribot.api .
       
      b ) Here is where we can search a specific class available from all of the combined packages the API documents has to offer.

      Selecting a class will introduce the methods and descriptions associated with them.
      c) Finally, Here is the overview panel where we can use the navigation bar to our liking and also see class documentation! 

      You can search the Class Hierarchy, Deprecated Methods, Index, and Help section!
      Importance of the Index section
      The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields. Which is helpful for searching a specific method in the API documentation!
      For this GIF example, I select the Index section and followed the alphabetical list to search for the getHealthPercent() method.
      https://i.imgur.com/JxnRL5p.gif
      III. Part A: Class Documentation

      For the following information, I will select the class RSNPC   from the classes section shown in  II. b .
      Your overview panel should now show the RSNPC class documentation as follows

       
      This is the classes name and associated package.
       
      This is the classes implemented interfaces *If applicable*.
      Implementing the methods that allow us to get the RSNPC#RSTile, and RSNPC#Click methods.
       
      This shows the classes that it extends 
      Allowing us to use the methods associated with RSCharacter .  Some classes also show the description of the class as shown here .
       
      II. Part B: Class documentation Method Summary
      Scrolling down will show us the Method Summary .

       
      This section shows us the Method & Description and the return types each method returns.
      1st column = data type of the method
      2nd column = Method and Description of that method
       
      Clicking on any of those methods it will bring you down to a more in-depth explanation of the method.
      For this picture example I chose RSNPC#getDefinition()

      Marked in RED is the Name
      Marked in GREEN is the  DataType, Method Name, and Possible parameters a method could have
      Marked in BLUE is the description of the method.
      Marked in YELLOW is the return type of the method.
       
       
      I hope my tutorial helped some of you. If a topic needs a better explanation, please feel free to address it to me in the comment section.
      Thank you,
      AliveInMe
    • By we trippy mane
      Looking glass really helps prevent bans. They updated it though so it took me 3 hours to set it up this time while way back it took 10 min max. The issue was 32 vs 64 bit version's of everything. my guide if you want to start looking glass. Link looking glass with osbuddy. Get's complicated. did you download the 32 bit version of osbuddy? Also the 32 bit 102 jdk? and Are you opening tribot with jdk? also make sure you have 32bit version of java. Took few hours for me to figure this out. I had to delete literally everything and redownload everything the right way to make it work. Also fluffee's advice helped me. His thread is
      So here's 
    • By Fluffee
      Fluffee's TRiBot Account Adder v1.00 (Coded in AutoHotKey)
      I was getting sick of adding accounts manually, so I coded this in AutoHotKey. It reads account usernames, passwords, bank pins and rewards from a text file. As well as reading the world you want the account to use from a separate file (so you can loop the f2p worlds).
      To run the program, create a text file for your account formatted as follows:
      AccountUsername:Password:BankPin:Reward
      (e.g. Zezima:hacked:0000:Agility)
      You can leave out the Bank Pin and reward by just not including them, however rewards will not work without a bank pin.
      To format the worlds list, make a list as follows:
      383
      393
      394
      etc.
      I'm aware this will probably be buggy as I coded it in like 20 minutes at 1AM, but hopefully it works for some!

      To start the bot:
      Load up Fluffee's TRiBot Account Adder.exe, or .ahk whichever, insert the full path to your files (i.e. C:\Users\John\Desktop\Accounts.txt)
      Hit Start to save the paths
      Then Open TRiBot, go to the Account Manager, hit Add then hit F1 on your keyboard (F1 is the hotkey)
      Message me with any problems you have, it does work! Well it should anyways!
      NOTE: If you do not have AutoHotKey installed, download the .exe
      Hope it helps
      Virus Scan of both files:
      .exe https://www.virustotal.com/en/file/2267c37e5e2c19ab08f4bc545e3d6b8eed663d0894f2f9ecf61562f325695c54/analysis/1433995283/
      .ahk https://www.virustotal.com/en/file/6fccaa5fe5f1a7eb70396c4b65e7de1e20fd144af90fccf686fe2587be550476/analysis/1433995293/
      AHK - https://drive.google.com/open?id=0B8etMDADCUvKdFBnQnFjaXFnc1E
      EXE - https://drive.google.com/open?id=0B8etMDADCUvKdVozUE9JVjFCbzg
      Code - http://pastebin.com/H2U4cRC5
       
    • By Forsteen
      Hey,
       
      I'm making my own script and I want to check if there are any players within a certain range of me. I'm hoping this can be done using the Players part of api2007, using something like getAll() with a filter. The problem is, I don't know anything about filters, and I can't find any documentation of it except a post here on tribot explaining the concept, not how to actually use them. Could anyone either explain how to use filters or link me something which I can learn from? That would truly be great.
      EDIT - I just found the page specific to Filters.Players. This seems good enough for me to figure out.
      Thanks!
    • By Guki
      One of the most advantageous things you can do in programming is D.R.Y. (Don't Repeat Yourself!) 
      In our scripts, we can practice this by centralizing certain data constants within Enums, and adding in helper methods that will shorten our functioning code and create a level of abstraction that will make script maintenance a breeze.
      For this tutorial, I will just be showing a simple Item enum:
       
      public enum Items { LEATHER(1741), HARD_LEATHER(1743), GREEN_LEATHER(1745), BLUE_LEATHER(2505), RED_LEATHER(2507), BLACK_LEATHER(2509), COINS(995); private final int ID; private Items(int id) { this.ID = id; } public int getID() { return ID; } public int getNotedID() { return RSItemDefinition.get(ID).getNotedItemID(); } public RSItemDefinition getDefinition(){ return RSItemDefinition.get(ID); } }  
      This is for a Tanning script. As you can see, we name each constant by its full name to avoid naming collisions/confusion. 
      In an Item enum, the only required data is a Unique ID for each item. With this, we can create several helper functions that might be specific to the script., but the above is a good base for about any script.
       
      "Why not just use item id's and the standard API's methods you idiot? This is a waste of time..."
       
      As I said before, the above is a very introductory example, but here is a more complex application of the above idea using Interfaces.
      public enum Interfaces implements Clickable { TANNING_SOFT_LEATHER(324, 124), TANNING_BLACK_LEATHER(324, 131); private final int PARENT; private final int CHILD; private final int COMPONENT; private Interfaces(int parent, int child, int component) { this.PARENT = parent; this.CHILD = child; this.COMPONENT = component; } private Interfaces(int parent, int child) { this.PARENT = parent; this.CHILD = child; this.COMPONENT = -1; } private Interfaces(int parent) { this.PARENT = parent; this.CHILD = -1; this.COMPONENT = -1; } public int getParent() { return this.PARENT; } public int getChild() { return this.CHILD; } public int getComponent() { return this.COMPONENT; } /** * Check whether or not the interface is not null, and not hidden * * @return true if interface is open and visible, false if null, false * if hidden */ public boolean isOpen() { /* Null check Interface tree in descending order*/ if (org.tribot.api2007.Interfaces.get(PARENT) == null) { return false; } if (CHILD != -1 && org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD) == null) { return false; } if (COMPONENT != -1 && org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD).getChild(COMPONENT) == null) { return false; } /* Component.isHidden() check on Interface tree in ascending order*/ if (COMPONENT != -1) { return !org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD).getChild(COMPONENT).isHidden(); } if (CHILD != -1) { return !org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD).isHidden(); } return !org.tribot.api2007.Interfaces.get(PARENT).isHidden(); } /** * Attempts to click the interface component using the given option * * @param option the option to click on the component * @return true if we clicked the component, false otherwise */ @Override public boolean click(String[] option, Point randomness, Point offset) { if (isOpen()) { if (COMPONENT != -1) return org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD).getChild(COMPONENT).click(option, randomness, offset); if (CHILD != -1) return org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD).click(option, randomness, offset); return org.tribot.api2007.Interfaces.get(PARENT).click(option, randomness, offset); } return false; } @Override public boolean click(String... option) { return click(option, null, null); } @Override public boolean click(String option, Point randomness, Point offset) { return click(option, randomness, offset); } @Override public boolean hover() { return hover(null, null); } @Override public boolean hover(Point randomness, Point offset) { if (isOpen()) { /* Component.isHidden() check on Interface tree in ascending order*/ if (COMPONENT != -1) return !org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD).getChild(COMPONENT) .hover(randomness, offset); if (CHILD != -1) return !org.tribot.api2007.Interfaces.get(PARENT).getChild(CHILD).hover(randomness, offset); return !org.tribot.api2007.Interfaces.get(PARENT).hover(randomness, offset); } return false; } } Now as you can see this is far more useful in code.
      We can overload the constructor method of the enum to accept all types of interface components from Parent to Children, to Components. This allows us to directly path to the component we want, similar to org.tribot.api2007.Interfaces.get(int parent, int child). Also, we can implement the Clickable interface to get access to all mouse functionality commonly used within scripts, meaning we can now SAFELY click interfaces within our scripts like so:
      Constants.Interfaces.CONSTANT.click() There are other things this can be applied to such as NPCs and Objects, but I will let you code your on versions of those

      An easy way to manage all of your scripts constants (assuming it is a reasonable amount of code, under 500 lines) is to put all of your enums inside of a Constants class. This will allow you to easily manage imports and give access to all your constants with one import. 
       
      Thank you for taking the time to read this and if you have any questions, comments, concerns, flame, trihards, or otherwise feel free to reply or send me a PM and I will get back to you ASAP.
       
      -Guki
    • By MySmallBox
      Just learning to script and i want my bot to walk to Khalid bank
      this is what i got so far
      package scripts; import org.tribot.script.Script; import org.tribot.script.ScriptManifest; @ScriptManifest(authors = { "MySmallBox" }, category = "Crafting", name = "alkharid crafter") public class TinMiner extends Script { private boolean isAtBank(){ return false;} private boolean walkToBank(){ return false;} @Override public void run(){ while(true){ if(isAtBank()){ //begin crafting leather... this is for later but now i need to know how to walk to bank first }else{ walkToBank(); } sleep(50);}}} so yeah how do i walk to bank i read the api but still hopless
    • By Trauken
      Hi,
       
      I have some java experience and figured I wanted to have a go at  creating my own script, so I looked at the "Scripting Tutorial" by Trilez, and everything makes sense to me, but as I try to import the org.tribot.script.Script i get an error... I've read through the beginning of the tutorial but I really can't find what I'm doing wrong, is it possible that the tutorial is outdated and that I should import something else?
      Thanks!
  • Our picks

    • This update will:

      Fix GE inventory item positioning bug


      Fix broken object hooks
        • Like
      • 21 replies
    • This release will:

      Fix some ClosedChannelException bug


      Fix bug in RSObject#getAllTiles


      Add game tab support for "Kourend Favour"
      • 15 replies
    • This release will:

      Fix Settings UI placement bug


      Fix game object location bug


      Fix small layout bug making the client shift up and down


      Fix client crashing bug where loading the client with a small display area will cause the client to crash


      Fix annoying Linux bug relating to painting events and peers


      Fix settings saving bug where settings are saved to disk more often than they should


      Fix RSInterface#isBeingDrawn bug affecting a limited amount of people


      Drop Java 1.7 bytecode version for 1.8


      Important: Since the downloadable RS client uses Java 7, it will no longer be compatible with Looking Glass. To make up for this, we will add support for using other clients such as RuneLite (at a later date).


      This change was necessary to allow us to use Java 8 syntax. It also paves the way for Java 9/10/11 support.
        • Haha
      • 40 replies
    • This update will:

      Fix the RSMenuNode bug which also fixes the bug with bank opening


      Fix the incorrect object positions bug


      Fix and re-enable the LG Objects API Accelerator


      Fix the RSObject#getAllTiles bug
      • 22 replies
    • Try our development release by checking "Development Release" on the TRiBot Loader. Note that these new features are currently in beta.

      This release features:

      Re-sizable mode support for both LG and the regular client


      Slightly improved login bot


      Removed final access modifiers from API classes


      Added RSServer hook wrapper to get the client's cached list of server/world info


      [NEW] Bug fix for intelligent banking


      [NEW] Improvement to the stability of LG over time


      [NEW] Vastly improved the reliability and speed of Screen#getColorAt on both LG and the regular client


      [NEW] Fix LG login problems


      [NEW] Fixed re-sizable mode container bug


      [NEW] Fixed re-sizable mode mouse bug


      [NEW] Use of public constants in the Banking API


      [NEW] Use of other various constants such as Projection#NULL_PT and Screen#EMPTY_COLOR



      More features to come very soon!

      Please test it and let us know here if there are any new bugs introduced in this release.
        • Like
      • 12 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×