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


  • Content Count

  • Joined

  • Last visited

  • Feedback


Community Reputation

4 Neutral

About cybertruth

  • Rank
    New Botter
  1. 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: Full version: Get VIP or VIP Extended. One of these account statuses is required for your bots to be able to run locally. Download and install the Tribot Client. Log in with your VIP+ account credentials. 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. 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. 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. Create a new package called "scripts" in the src directory. Make a new class called SampleScript inside of the scripts package and insert the boilerplate script template found at the bottom of this post. Go into your project structure (File -> Project Structure) and do these things: Go to the Project tab. Make sure the Project SDK reads 1.8 and the Project language level is 8. Navigate to the Libraries tab. Click the plus and add the Tribot jar file. The tribot jar file is located at C:\Users\{username}\AppData\Roaming\.tribot\dependancies\TRiBot-#.jar. (# represents your version) You may have to enable viewing hidden files by clicking the eye icon, the furthest right icon at the top. 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. 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. In the Tribot client, go to Settings and enable Developer Mode. This will allow you to refresh the scripts directory in the client. 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). 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!
  2. This thread can be closed. I got some help on Discord with the problem. I was using the wrong JDK version, turns out 8 is required. Thanks again to all of those on Discord who helped me.
  3. I had VIP the whole time, so I don't think it's related to that.
  4. EDIT: This thread can be closed. I got some help on Discord with the problem. I was using the wrong JDK version, turns out 8 is required. Thanks again to all of those on Discord who helped me. I'm having a little bit of trouble running a script locally. I don't see it in the list of scripts, even after a few client restarts. The script is just boilerplate with basic drawing on screen. I compiled the class and set the output to point at the Tribot script location. To make things clearer, here is my current directory starting from .tribot: bin/scripts/chopper/chopper.class I've also tried moving the compiled class up a directory so it sits at bin/scripts/chopper.class, but had no luck. Here is the source class, but I don't think this issue is linked to the contents of the script. package scripts.chopper; import org.tribot.script.Script; import org.tribot.script.ScriptManifest; import org.tribot.script.interfaces.Painting; import java.awt.*; @ScriptManifest(authors = {"x"}, category = "Woodcutting", name = "y") public class Chopper extends Script implements Painting { @Override public void run() { } @Override public void onPaint(Graphics graphics) { graphics.drawString("z", 50, 50); } } Thanks in advance for the help.
  • Create New...