Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Buy OSRS Gold

Sell OSRS Gold
Sign in to follow this  
cybertruth

Script Development Setup Guide

Recommended Posts

This is a guide on how to first setup your development environment on Windows for making scripts with Tribot. I wrote this after running into a few issues getting setup myself.

Setup

TL;DR version: 

Spoiler

Be VIP or VIP Extended
Use JDK 8 (important!)
Set output paths to %appdata%/.tribot/bin/scripts
Work in a package called scripts
Enable Developer Mode in Tribot client

Full version:

  1. Get VIP or VIP Extended. One of these account statuses is required for your bots to be able to run locally.
  2. Download and install the Tribot Client. Log in with your VIP+ account credentials.
  3. Install JDK 8. Note the location where it was installed. (default is C:/Program Files/Java/jdk1.8.0) This is an important step! The JDK version MUST be 8 or the compiled scripts will not show up in your client.
  4. Install an IDE like IntelliJ Idea. Start a new project (name does not matter) and then go through the following steps to get your IDE set up.
    1. Click the Project SDK dropdown at the top. Select "Add JDK" and then browse to the location where you installed JDK 8. Select your JDK folder and hit OK.
    2. Create a new package called "scripts" in the src directory.
    3. Make a new class called SampleScript inside of the scripts package and insert the boilerplate script template found at the bottom of this post.
    4. Go into your project structure (File -> Project Structure) and do these things:
      1. Go to the Project tab. Make sure the Project SDK reads 1.8 and the Project language level is 8.
      2. Navigate to the Libraries tab. Click the plus and add the Tribot jar file.
        1. The tribot jar file is located at C:\Users\{username}\AppData\Roaming\.tribot\dependancies\TRiBot-#.jar. (# represents your version)
        2. You may have to enable viewing hidden files by clicking the eye icon, the furthest right icon at the top. 
      3. Open the Modules tab. Inside there, open the Paths tab. Check Use Module compile output path and then put C:\Users\{username}\AppData\Roaming\.tribot\bin in both of the input fields. Hit OK to close the project structure window.
  5. Now that your IDE is all set-up, you need to compile your class. To do this, just go to Build -> Build Project. Now, the compiled .class files should show up in your .tribot/bin/scripts/ directory.
  6. In the Tribot client, go to Settings and enable Developer Mode. This will allow you to refresh the scripts directory in the client.
  7. Start a new client and you should be able to select local scripts. Under the combat category, you should now see our sample script called scriptname (Local).
  8. Check out the Tribot API and the Java 8 API. Enjoy developing!

FAQ

Q: My scripts are compiling and the .class files are in the right directory, but I can't get anything to show up in the client.
A: This could be happening for a few reasons. Make sure you are VIP or VIP Extended and ensure that you have your SDK set to JDK 8 (1.8).

I'll add more to this section as I see what problems are encountered often.

Boilerplate Script

package scripts;

import org.tribot.script.Script;
import org.tribot.script.ScriptManifest;

@ScriptManifest(authors = { "authorname" }, category = "Combat", name = "scriptname", version = 1.00, description = "", gameMode = 1)

public class SampleScript extends Script {
    @Override
    public void run()
    {
    }
}

Additional Help

If you still need help, you can comment on this thread or join the Tribot Discord. Good luck!

  • Like 4

Share this post


Link to post
Share on other sites
Posted (edited)

@cybertruth Any way to get your script running if it depends on an external .jar file or .class files? When tribot client launches after login, it deletes all those files.

EDIT: Figured it out. You need to put the .jar files of your external dependencies in a new directory ".tribot/thirdparty" so they can be loaded along with the other tribot dependencies. Maybe you should add this to the original post.

Edited by IceKontroI

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Our picks

    • Hi everyone,

      I'd like to thank everyone for their patience in this transition period. Since last week, we've worked out the remaining bugs with this integration.

      Some users have still been having issues with connecting their forums account to their Auth0 account. To resolve this, we've imported all forums accounts into Auth0.

      Unfortunately, the accounts which were imported today were using an unsupported password hashing algorithm. Hence, random passwords were set during the import.

      What does this mean for me?

      If you've previously linked your forums account to your Auth0 account, you don't have to do anything. Nothing changes for you.


      If you haven't logged in via our new login yet,

      Try logging in with your forums email address and the last password you used


      If you are unable to login, please use the "Forgot password" tool on the login page:
      Follow the instructions to reset your password
       
      • 1 reply
    • Hello everyone,

      Last week we tried to roll out Auth0 Login, but we lost that battle. Now it's time to win the war!

      Important changes

      When logging into the client, you'll now have to enter your Auth0 account credentials instead of your forums credentials

      Note: 2FA is still handled through your forums account (for the time being)



      Changes for existing users

      You'll have to link your Auth0 account to your forums account here: https://tribot.org/forums/settings/login/?service=11


      Auth0 accounts have been created for most existing users. Please use your forums email address and password to login.



      Important notes

      Make sure to verify your email address upon creating a new Auth0 account


      When we mention your Auth0 account, we mean your account used for auth.tribot.org as displayed below
      • 71 replies
    • To better support the upcoming changes (TRiBot X, new repository), we're switching our login handler to Auth0. Instead of logging in with the standard form, you'll now be required to login through our Auth0 application.

      All existing accounts which have been used within approximately the past year have been imported into Auth0 using the same email and password combination which has been stored on the forums.

      What does this mean for users?

      Your account credentials are now even more securely stored


      You'll be able to login via Facebook, Google, and others in the future


      Is there anything users have to do differently now?

      Existing users: You'll have to login with the standard login, open your Account Settings, then link your Auth0 account


      New users: You'll be redirected to our Auth0 app (auth.tribot.org) where you'll be able to create an account


      Why was this change made?

      The new apps we are creating (such as the new repository) aren't able to use the forums to handle user logins


      To centralize all user accounts in one area


      To ensure that the client login doesn't go down when the forums are having problems


      To speed up our development


      Other considerations

      There's no documentation or official support for using Invision Community combined with Auth0, so there are still a few kinks we're working out


      We're in the works of creating an account management panel specifically for Auth0 accounts (ETA August)


      It's not possible to change email addresses for the time being (this will be resolved this August)


      Changing passwords is a weird process for the time being. To change your password, you'll have to use the "Don't remember your password" tool on the Auth0 login page
      • 11 replies
    • Over the past month, we've been working hard on TRiBot's new repository - a much needed update. This change has been deemed necessary for TRiBot X, and will allow us to really speed up development of all aspects of TRiBot.

      Today we are going to share what we've been working on!


      Now you must be wondering what kind of features the new repository will have.... well, you'll have to be patient for a little while longer. We're still figuring out various technical aspects so we can't provide answers to all possible questions. We're also focusing on development rather than writing about it so that everyone can get access to our latest developments at lightning speed. I will however answer a few users' questions.

      We're planning on a release of this early to mid August, giving users some goodies before TRiBot X's release.

      Thank you all for being patient. I hope everyone is excited as much as I am!
      • 17 replies
    • Over the past few months, I’ve been working diligently on a new project - TRiBot X. Everything has been written from the ground up, with all of the best practices of software engineering. Every aspect of TRiBot has been re-imagined to support three main goals: flexibility, useability, and reliability.
      • 50 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...