Jump to content
Sign in to follow this  
Boolean

Boolean's full eclipse set-up tutorial (mac OS)

Recommended Posts

boolean's ultimate eclipse set-up (mac OS)


 


Here's the way to set up your eclipse with the bot, both for mac as for windows.


 


Things you'll need in advance:


 


The eclipse IDE


 


http://www.eclipse.org/downloads/


 


The latest tribot jar file


 


https://tribot.org/download.php


 


The latest version of java JDK.


 


http://www.oracle.com/technetwork/java/javase/downloads/index.html


 


 


Mac OS:


 


Install eclipse. When you open it it asks you to give in where you want your workspace. Choose where-ever you want. (mine's in documents, it doesn't really matter).


 


Okay so now eclipse opens, and I believe there's some kind of tutorial, you want to skip that, and go straight to the workbench. It should look something like this:


epgc.png


 


of course you won't already have a tribot file. But we are going to add that now.


 


In the package section, right click with your mouse and select new -> java project


dmrb.png


 


Nam the project however you want, i'll name mine TribotScripting.


after that you want to uncheck 'use default location'. because if we would use the default location your scripts would be saved in your workspace, and not instantly in your bot folder, so if you'd do that you'd have to transfer your scripts from your workspace to the tribot file every time you compiled your script, which is a lot of unnecessary work. We want to set it to the location of the tribot folder. This folder gets constructed automatically when you launch the tribot.jar for the first time. 


But where can we find this folder? (You need to know where this folder is if you want to add scripts you haven't written yourself).


i45t.png


 


There are a few ways to get there on a mac computer.


By directories:


go to: User > library > application support > tribot.


Here's where we have the tribot file.


 


BE WARE:


Mac often sets the 'library' folder in your User folder to invisible. If you can't see your library folder, there are 2 things you can do.


 


method 1: Set the library folder to visible:


I'd suggest you go to this tutorial: 


http://www.wikihow.com/See-Hidden-Folders-on-Mac-OS-X-and-Other-Recent-Models


 


method 2: Open the folder trough terminal


This is fairly easy, just open your terminal and write down this:


k9xh.png


 


Your folder probably does not have the SRC file already, but we'll get to that later.


What you can do to make things easier is just make an alias of the tribot folder and store it on your desktop or something.


hwod.png


 


Okay So now that we know where our tribot folder is, we're going to use the directory of the folder to set the location of our java project. Which for me would thus be: 


 


'/Users/*USERNAME*/Library/Application Support/tribot'


jpqs.png


 


After that click next. You'll get a window that looks somewhat like this: (I can't show you exactly how you have it because my tribot is already set-up with eclipse)


70qo.png


 


alright so under the 'Source' section. You won't already see tribot/src like I have, but we're going to create it now. click on 'add folder'


A new window will ask you to select your source folder. If the 'src' folder is not there, just click create new folder and name it 'src'. Then select it en press finish or okay.


bscr.png


 


 


 


 


Now we go to the Order and Export tab, and we're going to check everything we have in there.


n5ay.png


 


Now you can click finish, and your project is created. :)


 


 


Now what we still need to do is this:


click on your project and select new > package. make sure it's under the src folder. (like on the image). Then name it 'scripts' And press okay.


6jpb.png


 


 


In this scripts package is where your future scripts will be! if you want to create a new script, just right click on the scripts package in your project and select new > class


a6rm.png


 


Now that you have a new class file, this is where your code would go. If you want to test if everything works now I suggest you copy this into your first little script, (it's the basic skeleton)



package scripts;
 
import org.tribot.script.Script;
import org.tribot.script.ScriptManifest;
 
@ScriptManifest(authors = { "Boolean" }, category = "Woodcutting", name = "woodcutter")
public class test extends Script{
 
 
 
@Override
public void run() {
 
println("hello world");
}
 
 
}

like this: 


spdf.png


 


Note that if you just copy my code, your class name should be the same name as your .java file.


More detailed: see how 'public class '''''test'''' extends script is the same name as the .java file '''''test'''''.java under the scripts package. This must be the same or the script won't compile. Save your script.


 


 


Go ahead and open your bot now, open your scripts folder in your bot. Do you see your script? probably not. because the script has not been compiled yet. in other words: there has not yet been made a class file of your .java files. This means that although you have given in the code, your computer has not done anything with it yet, and we'll need to fix that.


 


back in your eclipse, you want to go to eclipse > preferences


pzk7.png


 


then you want to go to the section 'workspace' and check build automatically. What this does it that your script will now automatically compile when you click save in eclipse.


jp7u.png


 


Open your scripts folder again, your test script should now be visible under the section woodcutting or whatever section you chose. Try running it and it will print 'hello world" in the console. After that the script stops.


 


The 'build automatically' allows us to go to eclipse whilst the bot is still open, and just change whatever you want in your script. Lets say we'll change "hello world" to "hello tribot". Just press save and rerun your script, the console will now print "hello tribot".


 


Because it's compiling so fast and easy, this is a really good way to fix little things in your scripts. Instead of opening and re-opening the bot we lose less time because we just have to press save to compile! Which spares us a lot of time.


 


 


That's about it, I hope you get your bot to work and that everything is clear to you now. Thanks for reading!


 


  • Like 1

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
Sign in to follow this  

  • Our picks

    • This release will:

      Add LG support for Runelite


      Fix NPCChat issues


      Fix a bug where the camera angle setter would just hold down a key for 5 seconds (the timeout)


      Slightly adjust the rotation via keys to be more accurate


      Add the ability for asynchronous camera movement via keys


      Make Camera rotation via mouse more fluid, with more antiban, and work much better in resizable mode


      Add a "Camera#setCamera" method, allowing the rotation and angle to be set in parallel


      Increase the likelihood of using the mouse for camera movements


      Add support for adjusting the camera to positionable entities (Positionable#adjustCameraTo)



      Upcoming updates:

      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Thanks
        • Like
      • 36 replies
    • This update will:

      Allow for clicking through the chat box when possible (Thanks @Todd)


      Fix Combat#selectIndex (Thanks @Encoded)


      Ensure worlds stay sorted and added a check to avoid misclicks in the in-game world hopper (Thanks @erickho123)


      Fix out-dated Options API interface indices (Thanks @Todd)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Like
      • 12 replies
    • This release will:

      Fix login bot after today's game update (Thanks @JoeDezzy1)


      Fix latest in-game world hopping issues (Thanks @erickho123)


      Compact Settings UI and set location relative to TRiBot (Thanks @JoeDezzy1)


      Fix an older implementation of GrandExchange#getWindowState (Thanks @JoeDezzy1)


      Improve the preformance of NPCChat by only searching in certain interface parents (Thanks @JoeDezzy1)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      LG support for RuneLite


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Thanks
        • Like
      • 16 replies
    • This release will:

      Fix bytecode manipulation in order to prevent the modification of parameters within the Filter and Condition classes themselves (thanks @wastedbro)


      Fix NPE caused by non-null value in GE API (thanks @erickho123)


      Add and fix equals methods for api2007.types (thanks @JoeDezzy1)


      Modify Mouse#leaveGame to make the mouse leave the game from top, left, right, or bottom (thanks @erickho123)


      Add Entrana area to Ships API (thanks @erickho123)


      Fix raid prayers index/settings in Prayer API (thanks @erickho123)



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Like
      • 29 replies
    • This update will:

      Implement better canvas locking/synchronization mechanism


      Fix small Login API bug


      Remove the requirement for xbooting Java classes


      Use ExecutorService to perform canvas work in parallel


      Add "Account Management" game tab to GameTab API (thanks @Encoded)


      Fix NPCChat#getMessage (thanks @Encoded )


      Fix NPCChat#selectOption (thanks @Encoded )


      Fix Banking API after today's update (thanks @Encoded )


      Fix in-game world hopper after today's update (thanks @Encoded )



      Upcoming updates:

      Break handler bug fix


      Improved CLI support


      Much more



      Note: If you are using LG, please restart both the RS client and TRiBot
        • Thanks
        • Like
      • 38 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×