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

Sell OSRS Gold
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

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.


  • 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...