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

Sell OSRS Gold
bbuu20

Bbuu20's Scripter Application

Recommended Posts

1.) Snippets:


2.) Tutorials: [Source] (Link to thread)

None

3.) Randoms/updates submitted: [Source] (Link to thread)

None

4.) Scripts available to the public:

Bbuu20's Tutorial Island  (ABC, not L10)       [Source] (Link to thread)

Bbuu20's Smart Miner (Full ABCv2 L10)       [Source] (Link to thread)

Bbuu20's Fire Maker    (Full ABCv2 L10)       [Source] (Link to thread)

5.) Short biography / Coding Experience: [1-2 short paragraphs]

Hey everyone, thanks for checking my stuff out. I'm a 20 year old second year Computer Science major at the University of Massachusetts, and I've been playing Runescape since I was 7. I probably started botting about 10 years ago, but I didn't start writing scripts until I was in high school. I joined TriBot almost exactly one year ago, and have been pretty involved in the community ever since.

I realize it may seem to some that I am applying for the scripter rank too early since I've only just released my third script. However, I believe the quality of my scripts should speak for itself. I am very comfortable with Java syntax, as well as the TriBot API.

6.) Reasons why you feel you deserve Scripter: [1-3 short paragraphs]

I have made great strides in my programming knowledge over the past few months. If you want more proof of this progress, look at the difference between this, my first tribot script, and this one, my current release of that same script. I am very passionate about doing the best that I can with the amount of knowledge I have. I am only going to get better at programming.

I have a great understanding of Java, and the TriBot API. When I write my scripts, I make sure that they are of the highest possible quality. To demonstrate my knowledge in the frontend side of Java, I posted one script that uses Swing for the UI, and one that uses JFX. I also created a tile map for my mining script that allows users to select custom rocks they'd like to mine. To demonstrate my knowledge of the backend side, I keep all my code very organized, with classes in the appropriate packages, methods in the appropriate classes, and show that I have a solid understanding of OOP in general, using polymorphism, making use of instance manipulation/statics to avoid needless creation of the same object multiple times, etc.

I am very involved in the TriBot community. I come on and check the forums at least five times a day, and answer any questions that I believe I know the answer to. I try to be as helpful as possible for new users, and always let them know that my forum pms are open to anyone with a question. That being said, I know the difference between answering a question to help someone, and answering a question just to get my post count up. I always reply thoughtfully, this is the reason why 25% of my posts receive a like.


7.) What you plan to provide the community with: [1-3 short Paragraphs]

I plan to provide the community with increasingly high quality scripts. When I was first learning the TriBot API, I made great use of the quality open source scripts. I understand the value of those scripts to the community, so I want to keep many of my scripts open source. 

I plan to continue to help new users, and experienced users alike, with any problem which I know a solution for.



8.) Do you agree to continue to not only update, but provide more free, open sourced scripts to the community? [YES/NO]

Yes, of course. I'll continue to do all of this even if I don't get scripter.

 

edit: @HeyImJamie yea, you’re absolutely right about the enums. We haven’t really talked about them since my freshman cs courses, so I remembered the naming convention incorrectly. I have now fixed this naming issue, all my enums are named in CONSTANT_NOTATION. Was there anything aside from the enums that I should be doing differently, or does it all look good for the most part? Thanks for the feedback.

Also, on the topic of community involvement, I didn’t really disappear after the release of my first script, I just stopped writing scripts for a few months so I could focus on school, and get better as a programmer. I was still regularly visiting the website. I am in the discord, and I answer questions there when I can, as I do on the forums, but I really try not to say things just to make it look like I’m more “involved”. I want all of my responses to have meaning to the person asking the question, and I think that they almost always do.

 

edit: @FALSkills Thanks, that is some seriously well thought out feedback. One question I have though is won't caching a game setting instantiate it, therefore making it impossible to get accurate current stats on the game setting? Or is that where I should use substantiating?

You're completely right about the recalculating being done in subtask switches. I will go through and make sure all the calculations are done in Calculations.java. I don't know why I didn't do that in the first place. I also agree that I should have a switch statement in all proceed methods. If nothing else, it will at least keep things consistent. 

On the topic of Antiban trackers, I thought that was only meant to be used before we are planning to use idle actions, but I will read up more on the topic and be sure that I understand the actual purpose.

Finally, I do plan to implement paint and gui for all of my scripts. I agree that it is very important to have a way for the user to interact with the script, and even get feedback from the script so they can report bugs to me more easily.

Edited by bbuu20
Responding to FALSkills
  • Like 1

Share this post


Link to post
Share on other sites

Personally, I'd like to see some more community involvement. You were relatively active on the release of your tutorial island script and then disappeared. I do appreciate that the forums aren't as active as they once were so I'd recommend joining the Discord if you haven't already.

As for your code / releases, from the brief look I've taken they seem ok but I'd like to see something either a little more complex or a little more polished from you. There are also mistakes that I wouldn't expect from a CS Major, for example not following the correct conventions:

https://github.com/zperkins11/Tribot/blob/master/tutorialIsland/data/SubTask.java

N9AUPv3.png

For now it's a no from me, but I know how far you've come and hopefully you don't take offence from this and continue to work on what I've mentioned. :)

  • Like 1

Share this post


Link to post
Share on other sites

I'll be looking through your TutorialIsland source and providing feedback.
 

From Calculations.java:
Lot's of "magic numbers".  If you are going to use a number that can be declared a constant (especially if you are going to re-use it), i.e. an interface master or child, you should declare it that way and refer to it by that declaration rather than just a raw number.  This is good practice for a variety of reasons:

  • If that number ever changes, you can fix it by changing that number in a single location rather than in each individual method call.
  • With good naming conventions, it should be fairly obvious to someone else what that number represents from the name of the constant, while a magic number means nothing to a passerby.

Caching values that are obtained from the client, especially interfaces, will drastically improve the efficiency of the script. Interfaces, in particular, are very slow to calculate on Looking Glass.

In the example below, you should cache the first call of Interfaces.get(263,1,0) as it could potentially (however unlikely) be null in the next line when it is called again.  It also would save the calculation of trying to find that Interface again.  In TRiBot, most methods that return Strings are also not null-safe, so you should null check the getText() call.  I would refer to the api docs for methods that you are unsure of whether or not they are null safe.  For the most part, anything String related in TRiBot is not null safe.

if (InterfaceHandler.isOnScreen(Interfaces.get(263, 1, 0))) {
 if (Interfaces.get(263, 1, 0).getText().contains("This will display your options menu.")) {
  return OpeningSettingsTab;
 }
}

I would also suggest caching the game setting at the start as there is no need to re-calculate it later in steps 220-240

case 470 could use some brackets to improve readability and to ensure that it is behaving how you want/think it is. (I'm a big bracket user, might just be personal preference).

Using a switch statement in your proceed() methods could make it look cleaner and also prevent redundant checks (if the first if statement checking the current subtask returns true, then the other ones aren't going to so why bother checking them).  I see that this has been done in the HandleCombatArea class, which is great.

 

Most of the script does this:

  1. Calculations class does calculations and determines which subtask to execute.
  2. Main class iterates through the task list to find out which task is associated with the subtask.
  3. Subtask is executed, which often times recalculates things which have already been calculated in the Calculations task.

While it isn't crucial to save/cache every call you make, it is a good habit to get into and is necessary for achieving highly optimized scripts for complicated tasks.

From HandleMiningArea.java:

startWaitTime = System.currentTimeMillis();
rocks[randomRock].hover();
Antiban.get().generateAndSleep((int)(System.currentTimeMillis() - startWaitTime)); //use an abc sleep

This isn't really an appropriate time for a reaction time.  You are reacting to hovering an object, which shouldn't have a reaction time.  You should react to clicking that object, or clicking an interface, anything that takes an uncertain duration of time to complete.  You also only have 2 instances of generating tracker information in your entire api, which is a crucial element for abc2 to determine if and when it should execute functions.

 

As Jamie noted, I would also make sure you are familiar/using java naming conventions.

 

While it's not major, it looks like there's only a paint in your Miner.  While I'm not one to talk (since I hate GUIs and GUIs are an important tool for customers/users), I think that including a paint should be a necessity since it: 

  1. Tells the user what the script is doing and how well it is performing
  2. Allows users to share progress reports
  3. Can make it easier to pinpoint issues due to the first point

 

It's a Yes from me.  You've shown you can utilize a framework, your code is readable and for the most part looks like it works well, and I think that the issues discussed thus far are mostly nit-picky.

  • Like 1

Share this post


Link to post
Share on other sites

@bbuu20 I'll provide an example for caching the game setting:
 

public static SubTask generateSubTask() {
 int currentSetting = Game.getSetting(281); // or reference another location where you are storing variables.
 switch (currentSetting) {
  case 0:
   //...


  case 220:
  case 230:
  case 240:
   if (currentSetting == 230) {
    //...
   } else {
    //..
   }
 }
}

 

  • Thanks 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

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