Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
TacoManStan

[Tutorial] Learning Java with TRiBot #1 - The Very Beginning

Recommended Posts

Leaning Java with TRiBot - The Very Beginning
Click Here for a List of All Tutorials

eQ4FCso.png

If anyone would like to provide any advice or feedback on the tutorial, please message me on DiscordI want to keep the comments to questions as much as I possibly can, so people can learn not only by reading the tutorial, but also reading the rest of the thread. Thank you!

eQ4FCso.png

Introduction

Hello everyone! If you are reading this, you want to script for TRiBot, but you don't have any experience with the Java programming language. To that I say... welcome! You are not alone.

Let's first start off by saying that yes, in order to script for TRiBot, you must know Java. If you're here, I'm sure someone has probably already told you that, or you figured it out for yourself. That being said, there is nothing to fear! While it was highly discouraged until now, with this tutorial guide you can now learn Java through scripting for TRiBot!

Before we jump right into things, let's make something clear; this isn't an instant journey. You need to learn Java, not just copy some code. This is going to take some time. Luckily, I've been told that I'm pretty good at explaining things, because I remember how it felt to be new to Java. Every tutorial you look at seems to assume that you have at least some coding experience.

your-face-when-programming.jpg

That's not the case with this tutorial/guide. That being said, that means that it is important that you read the entire tutorial. Everything I type here is here for a reason. Don't skip things, you'll just wind up getting confused, and you'll regret it later on.

With that in mind, I have decided that I'm going to start at the beginning. The very beginning. Now let's get started!

Introduction 1.5

I lied. We're not getting started just yet. One more quick thing first.

There might be words that you don't know the meaning of in this tutorial. You might not be from the US (lingo is a bit different), or you might just not know the meaning. Every word that I think anyone reading this might not understand, I will turn into a link to either the dictionary.com or wikipedia.org definition of the word. That being said, I'll do my best to keep the language simple. Tutorials are easier to read that way anyways, even if you do understand the language.

Alright, now let's get started!

The Very Beginning

At this point, most other programming books dive right into the nature of a computer. They'll talk about RAM, CPUs, and other acronyms that you may or may not understand. That doesn't matter. At all.

Instead, I'm going to start by explaining what Java is. Chances are you already know what programming is. If you don't here's a quick definition: "You write words that make the computer do things that you want it to." That's all you need to know about programming right now.

What is Java?

Java, as you have probably guessed, is a programming language. More specifically, Java is an object oriented programming language. I intentionally left no link there, because Wikipedia over-complicates things, and therefore I'm going to define it myself.

What is Object Oriented Programming (OOP)?

When you think of object oriented programming, the easiest thing you can do is think of a car. What just popped into your head? A Mustang? An Avalon? A Focus? A Prius? A Camry? Chances are, pretty much everyone thought of a different car. That right there is object oriented programming.

You're probably thinking "wut...?" That's the beauty of it; it's really that simple. Of course, I need to elaborate a bit on that bit. (Note: Let's get something clear. I used this as an example, an I don't really know anything about cars. Okay, moving on.)

OOP (remember that stands for object oriented programming) is all about taking the most basic form of something, and then getting more specific as needed. So in that example, we started with a car. You can get more specific than a car though. You can have a Mustang, Avalon, etc. That's getting more and more specific.

434506ffe6.png

In fact, if we wanted to break it up even further, we could add different types of cars in the middle, such as "coupe", "sedan", etc.

94511c1521.png

You can also go in the other direction as well. What's more simple than a car? How about an automobile? Now all of a sudden you have trucks, cars, motorcycles, etc.

e81d5f24e7.png


How Far Up Can You Go?

When you program in Java, you create things called objects. In the previous example, the "car" was an object. The "automobile" was an object. The "Prius" was an object.

Remember when I said that the goal in Java is to get as specific as you can? Well, what's the starting point? If you were to take "car", "automobile", "goat", or anything else you can think of, and you were to keep going up and up and up, getting less and less specific, where would you end up?

The answer to that question is: Object. You would end up with an Object.

f0e5d758d8.png

This is the case for everything you do in Java. The entire concept of programming revolves around creating objects. In RuneScape terms, you might want to get access to a tree, or an NPC, or your own player. As you probably guessed, each of those things, and anything else you can think of, is an object.

Conclusion

This is the end of the first installment of my Learning Java with TRiBot tutorial series. This first section was obviously just the very beginning, and there wasn't even any code! That's okay; you'll be seeing plenty of code soon enough, and you'll be scripting for TRiBot (and writing other Java programs as well, if you want) in no time!

Note that if people seem interested in this concept, I'll probably make videos to go along with my written tutorials as well!

eQ4FCso.png

If there is anything you don't understand, please let me know! If you didn't understand it, chances are someone else didn't either.

Click Here for Tutorial #2!

Edited by TacoManStan
  • Like 16
  • Thanks 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

  • Our picks

    • This release will:

      Fix LG for both OSBuddy and RuneLite


      Fix issue where the resizable client isn't able to be made smaller (Thanks @JoeDezzy1)


      Fix detection of the logout game tab when resizable mode and side panels are enabled (Thanks @JoeDezzy1)


      Add initial support for Sentry to allow us to identify and easily debug exceptions happening with all TRiBot users


      Add methods to determine if the bank is actually loaded, and not just the overarching interface (Thanks @wastedbro)



      Upcoming updates:

      Improved CLI support


      Full Sentry support


      Much more
        • Like
      • 57 replies
    • This release will:

      Fix NPE in Camera API (Thanks @wastedbro)


      Update deposit box interface ids (Thanks @Encoded)


      Add various bank methods (Thanks @wastedbro)


      Banking#getWithdrawXQuantity


      Banking#getDefaultWithdrawQuantity


      Banking#arePlaceholdersOn




      Fix resizeable minimap bug (Thanks @wastedbro)


      Remove Java 8 requirement


      Please note: TRiBot is not yet fully compatible with Java 10+




      Fix the break handler issues by ensuring the break handler thread never gets paused


      Fix broken settings hooks



      Upcoming updates:

      Improved CLI support


      Much more



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

      Add support for using custom F key bindings to switch between game tabs (Thanks @erickho123)


      Fix tab opening for "Skills" and "Kourend Tasks" (Thanks @erickho123)



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

      Fix an issue where breaks would stop firing


      Fix Combat#getWildernessLevel, use dynamic search for text and cache ID for later calls


      Fix an NPE in the Combat API


      Fix Mouse#leaveGame bug where the mouse wouldn't actually leave the game screen
        • Like
      • 21 replies
    • 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
      • 59 replies
  • Recently Browsing   0 members

    No registered users viewing this page.

×