Welcome to TRiBot Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

TacoManStan

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

4 posts in this topic

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
14 people like this

Share this post


Link to post
Share on other sites

I did some java back in Highschool (3 years worth) and  I have long forgotten it but I am looking about getting back into it. This really helps bring back some memory. Thank you.

Share this post


Link to post
Share on other sites

Thanks man, this really helped. I would pay you lots of rs3 gp if you could give me private lessons.

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

  • Recently Browsing   0 members

    No registered users viewing this page.