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.

Worthy

Worthy's Scripter Application

Vote   7 members have voted

  1. 1. Vote


Please sign in or register to vote in this poll.

10 posts in this topic

1) Snipplets: [sOURCE] (Link to thread)
n/a (if the ones in Scripting Help qualify, then some are floating around)

2) Tutorials: [sOURCE] (Link to thread)
Node Framework
Save and Load GUI Settings

3) Randoms/updates submitted: [sOURCE] (Link to thread)
n/a

4) Scripts available to the public: [sOURCE] (Link to thread)
All script sources stored on GitHub due to the amount of class files.
World One Logger --> Source
AutoTalker Infinite --> Source
Merchant Assister --> Source
Planker --> Source
AIO Cow Killer --> Source
AIO Constructor --> Source

5) Short biography / Coding Experience: [1-2 short paragraphs]
Hello, I first started "coding" when I was around 10 or 11 for a game called ROBLOX. I realized they never really had any good games around or they just weren't perfect - and that bothered me. I decided to read up on the wiki and learn Lua, a simple and lightweight language that was fairly easy to understand. Within a month or two my first script gather hundreds of thousands of views and I began to like scripting and appeasing the general audience. Later, I was introduced to Minecraft and the Minecraft Mods which game along with that, and started developing mods with CraftBukkit, written in Java and Javascript. I was previously hired as a consultant to another RS botting company - which I would rather not name - after (when I was 15-16) and started developing bots for them again in Java.
Personally, I'm extremely into House music (edm and progressive dance) and love to go to different parties or dance events. I've also recently been hooked on body building. I go by the motto: "Fit body; fit mind."

6) Reasons why you feel you deserve Scripter: [1-3 short paragraphs]
I feel I am Worthy (puns) for the scripter rank because of not only the qualifications and experience mentioned above, but the continued persuit of appeasing the TRiBot community and releasing top-notch scripts for them.

7) What you plan to provide the community with: [1-3 short Paragraphs]
I plan to provide the community with varied (and hopefully useful) tutorials upon request and as well as useful scripts that are needed. I continually offer to help and support anyone asking questions or needing help in the Scripting Help section, as well.

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

9) Do you agree to follow the terms found here if you ever release a premium script? [YES/NO]
Yes

Regards,
Worthy

 

@vancouver

of course

 

@assume

the mousepaint class is not necessary for you to evaluate my code and view my potential as script writer

Edited by Worthy

Share this post


Link to post
Share on other sites

Yes, doesn't like macs. You're my underdog now.

Edited by Mute

Share this post


Link to post
Share on other sites

You're brave to use the node framework in a community that favors states, I like that. Silliness aside, I like that you're active and I like your attitude. You're always very helpful around the forums and you're very kind to everyone. You're a decent Java programmer and you understand the concept of multiple classes. While I may not agree 100% with nodes as I've never used them other than a brief period at PB, I like that it's your own style. 

 

Yes from me. But I want to know that you'll continue to contribute in the form of scripts and bot support.

1 person likes this

Share this post


Link to post
Share on other sites

Yes, I definitely think you should be accepted this time. 

Edited by Druid
1 person likes this

Share this post


Link to post
Share on other sites

First off, let me generate some quick suggestions/improvements/fixes.

 

scripts.planker.Utils

Game.getDestination() != null && Game.getDestination().distanceTo(dest) > 3)

Game.getDestination() != Game.getDestination(). Every time you call the method, a new object will be generated. The first object may be non-null, but the second object could be null. You don't null check the second object. What you should do is store the value returned from Game.getDesination() in a variable, then use that variable for null checking and action performing.

 

scripts.planker.nodes.BuyPlanks

                RSNPC operator = Utils.findNearestNPC(Constants.OPERATOR_ID);                                if (DynamicClicking.clickRSNPC(operator, "Buy-plank")) {

You should null check operator to avoid NPEs being thrown.

 

scripts.planker.nodes.BuyPlanks

RSNPC operator = Utils.findNearestNPC(Constants.OPERATOR_ID);boolean isNearOp = (operator != null) ? operator.getPosition().distanceTo(Player.getPosition()) < 10 && operator.isOnScreen() : false;

Once again, you should null check operator.

 

scripts.planker.nodes.DoBanking

if (Utils.getItem(Constants.COINS).getStack() < Variables.costAmt) {

Null check what Utils.getItem(..) returns.

 

scripts.planker.nodes.ToOperator

RSNPC operator = Utils.findNearestNPC(Constants.OPERATOR_ID);boolean isNearOp = (operator != null) ? operator.getPosition().distanceTo(Player.getPosition()) >= 10 || !operator.isOnScreen(): true;

Once again, null check operator.

 

scripts.cowkiller.Utils

if (Game.getDestination() != null && Game.getDestination() == dest) {

It's generally a bad idea to compare two non-primitive objects like this. You should use .equals(..) instead. Remember to also store the return value of the method in a variable, and operate on that variable.

 

scripts.cowkiller.nodes.Climb

if (Banking.isBankScreenOpen()) Banking.close();

You should either have a loop or return if Banking.close() returns false. You don't want the script to continue if it fails to close the bank.

 

scripts.cowkiller.nodes.Climb

                int plane = Player.getPosition().getPlane();                for (RSObject obj : Objects.getAll(20)) {                        if (obj == null || obj.getDefinition() == null || !obj.getDefinition().getName().equals(Constants.STAIRCASE_ID)) continue;                        //two staircases to choose from                        if (obj.getPosition().distanceTo((!Inventory.isFull())?Constants.TOP_BANK_TILE:Constants.BANK_LVL1) > 4) continue;                                if (obj.getPosition().distanceTo(Player.getPosition()) > 5)                                Utils.walkTo(Player.getPosition().getPlane()==0?Constants.BANK_LVL1:Constants.TOP_BANK_TILE);

Make sure to store method returns in variable for the reasons stated above. Also, if you are going to use a returned object multiple times, it's a good idea to cache the object (I'm talking about .getPosition(). It may not need a null check since it can't be null, but it is more efficient to only call the method once, if it is assumed that the object will be holding the same value throughout the runtime of the snippet).

 

The outlined problems can be found throughout your script, not just within the snippets I posted. I didn't want to reference each and every snippet where the problems occured.

 

So to wrap up my suggestions:

  • Store the returned values of API methods in variables if:
    1. They can be null and you need to perform a null check along with anther operation on the object.

    2. You need to use the values or call the objects of the object more than once, and the values of the object are assumed to stay the same within the snippet of code.


  • Make sure to have a failsafe/loopback if a method fails. That way, your script won't continue if a previous action failed.


Overall, I think your scripts are fairly well coded. You also have a nice implementation of your own scripting structure.

 

Welcome to the scripter oasis.

1 person likes this

Share this post


Link to post
Share on other sites

First off, let me generate some quick suggestions/improvements/fixes.

 

scripts.planker.Utils

Game.getDestination() != null && Game.getDestination().distanceTo(dest) > 3)

Game.getDestination() != Game.getDestination(). Every time you call the method, a new object will be generated. The first object may be non-null, but the second object could be null. You don't null check the second object. What you should do is store the value returned from Game.getDesination() in a variable, then use that variable for null checking and action performing.

 

scripts.planker.nodes.BuyPlanks

                RSNPC operator = Utils.findNearestNPC(Constants.OPERATOR_ID);                                if (DynamicClicking.clickRSNPC(operator, "Buy-plank")) {

You should null check operator to avoid NPEs being thrown.

 

scripts.planker.nodes.BuyPlanks

RSNPC operator = Utils.findNearestNPC(Constants.OPERATOR_ID);boolean isNearOp = (operator != null) ? operator.getPosition().distanceTo(Player.getPosition()) < 10 && operator.isOnScreen() : false;

Once again, you should null check operator.

 

scripts.planker.nodes.DoBanking

if (Utils.getItem(Constants.COINS).getStack() < Variables.costAmt) {

Null check what Utils.getItem(..) returns.

 

scripts.planker.nodes.ToOperator

RSNPC operator = Utils.findNearestNPC(Constants.OPERATOR_ID);boolean isNearOp = (operator != null) ? operator.getPosition().distanceTo(Player.getPosition()) >= 10 || !operator.isOnScreen(): true;

Once again, null check operator.

 

scripts.cowkiller.Utils

if (Game.getDestination() != null && Game.getDestination() == dest) {

It's generally a bad idea to compare two non-primitive objects like this. You should use .equals(..) instead. Remember to also store the return value of the method in a variable, and operate on that variable.

 

scripts.cowkiller.nodes.Climb

if (Banking.isBankScreenOpen()) Banking.close();

You should either have a loop or return if Banking.close() returns false. You don't want the script to continue if it fails to close the bank.

 

scripts.cowkiller.nodes.Climb

                int plane = Player.getPosition().getPlane();                for (RSObject obj : Objects.getAll(20)) {                        if (obj == null || obj.getDefinition() == null || !obj.getDefinition().getName().equals(Constants.STAIRCASE_ID)) continue;                        //two staircases to choose from                        if (obj.getPosition().distanceTo((!Inventory.isFull())?Constants.TOP_BANK_TILE:Constants.BANK_LVL1) > 4) continue;                                if (obj.getPosition().distanceTo(Player.getPosition()) > 5)                                Utils.walkTo(Player.getPosition().getPlane()==0?Constants.BANK_LVL1:Constants.TOP_BANK_TILE);

Make sure to store method returns in variable for the reasons stated above. Also, if you are going to use a returned object multiple times, it's a good idea to cache the object (I'm talking about .getPosition(). It may not need a null check since it can't be null, but it is more efficient to only call the method once, if it is assumed that the object will be holding the same value throughout the runtime of the snippet).

 

The outlined problems can be found throughout your script, not just within the snippets I posted. I didn't want to reference each and every snippet where the problems occured.

 

So to wrap up my suggestions:

  •  
  • Store the returned values of API methods in variables if:
    1.  
    2. They can be null and you need to perform a null check along with anther operation on the object.
    3.  
    4. You need to use the values or call the objects of the object more than once, and the values of the object are assumed to stay the same within the snippet of code.
    5.  
  •  
  • Make sure to have a failsafe/loopback if a method fails. That way, your script won't continue if a previous action failed.
  •  

Overall, I think your scripts are fairly well coded. You also have a nice implementation of your own scripting structure.

 

Welcome to the scripter oasis.

Damn, first Trilez feedback ever.

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.