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.

xCode

xCode's Scripter Application

xCode for Scripter   6 members have voted

  1. 1. Does xCode deserve Scripter rank?

    • Yes
      4
    • No
      2

Please sign in or register to vote in this poll.

15 posts in this topic

Snippets:

Tutorials:
N/A

Randoms/Updates submitted:
N/A

Scripts available:

Note: All script sources are in BitBucket due to too many classes.

About me
My love for programming started to develop about 4 years ago. I had some courses Information Sciences at high school and that's the place where it all started. I started developing some websites in HTML and CSS (just the basics) and started to realise that I really loved doing this. Because of that I started an Information Sciences course on my local university. In the meanwhile I got introduced with C#, JAVA, C++, HTML, PHP and some more nice object orientated languages. Before I joined this community, my JAVA knowledge was kinda low in my opinion. But since the language is kinda similar to C# (in which I'm more familiar with) I understood it rather quickly. Combining this with my love for Runescape resulted in me being addicted to this forum and me writing this application eventually.

Why I deserve to be a Scripter
I feel like I'm qualified enough to be a Scripter on this forum, because I've provided this nice community some quality scripts. I've devoted a lot of my spare time to contribute to a community which respects my work and keep me motivated doing the thing I love. I desire making more free scripts for this community and help the ones in need, while gaining more experience myself and grow stronger as a programmer. I also feel like I've learned a lot from my last application. I've read all the feedback very carefully and updated my code according to the feedback. In the meanwhile I've written two new scripts xRangingGuild and xPestControl which I'm really proud of. Which is in my opinion an indication of how much I love this community and how much I'd like to help others and help myself growing as a programmer.

What you plan to provide the community with?
I will provide this community a lot of support, not only with scripting or bot related issues, but also with free, high quality scripts. I'm checking the Help section each day to see if there is someone who needs me. I will keep my scripts up to date and will post tutorials and snippets whenever I think of something that could be really helpful for others.

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

Edit: I forgot to update my source code for xFishy and therefore removed it from the list until it's up-to-date.

Reactions:


@Druid @modulusfrank12
Thanks for the feedback. I've added your skype Druid :) I do have some questions tho on your feedback, because I was really sure about processing all of the feedback in my current code.
I've:
- Updated all my classes which could be enums to enums.
- I've updated my snippet.
- I'm sure I use lowerCamelCasing everywhere now.
- I'm filling my comboboxes for my GUI's with objects instead of just strings and grabbing the index of the selected item.
- I now use a class Variables where I store all my variables in.
- I now use a class Constants where I store all of my constants in.
- I've looked into enhanced for-loops and use them.

I'm really willing to improve, but I need some guidance atm :)

@Starfox
Thank you very much. I really appreciate the feedback you gave me and it's really nice to hear from you I've improved myself.

@Encoded
Thank you very much also for your positive feedback. You are completely right I should use one of the bracket-conventions and stick to it. I do prefer brackets on a new line, so I think I'll stick to that in the future and adjust my existing code to it.

@karlrais
Thank you for your feedback, but I think some of is not really correct. Correct me if I'm wrong

In your Variables class all your variables are static? What's up with that? That means they are effectively the same as constants...

Variables and constants are not the same. Variables are static so I can reach them without inititializing the Variables-class first. Variables change, constants don't.

If you run 10 scripts and you stop 1 then all 10 scripts would stop.

Sorry, but this is not the case.

In your antiban node there's a lot of redundant code. ...

Constants.ANTIBAN.performRandomMouseMovement();

Constants.ANTIBAN.performRandomRightClick();

Constants.ANTIBAN.performRotateCamera();

Constants.ANTIBAN.performTimedActions(SKILLS.RANGED);

Constants.ANTIBAN.performXPCheck(SKILLS.RANGED);
The line in bold already calls all the other lines.

I can't see a bold line? Can you explain a bit more what you mean?

Furthermore thanks for your tip on using CTRL + shift + f. It will save me some time in the future.

I don't hate you, I like you ;) Feedback is always something positive even tho it's critisism. Even that will help me grow as a developer.

@karlrais

What i meant was your Variables class and Constants class are effectively the same.

Does this mean it's bad that I prefer to seperate my constants from my variables? I think it's just nice to seperate these things even tho they are effectively the same. In my opinion makes my code more readable and I can't see anything bad about it.

That's right. And by not initializing the variables all your scripts share the same instace. If one instance changes the variable then other instances all get that changed variable.

You are completely right, in general. But I've tested this for TRiBot scripts. It doesn't matter how many instances you run of a script. If in one instance Variables.stop is set to true, this wouldn't set the stop-variable in another instance. I actually have tested this. I could ofcourse have an instance of the Variables-class in all of my other classes, but this would cost me some lines of code extra, to achieve the same. But I'm willing to do this if other Scripters here agree with you about my approach being a bad practise. Again, you are right, but I don't see why I should change it atm.

This already call all the other lines in your antiban node. From javadoc:
"Performs all of the actions supported by TIME_TRACKER, if the necessary conditions are met, and will reset the timers for any performed actions."

Thankyou, I did not know this.

@karlrais
I tested this on multiple tabs in one tribot client.
And yes I see advantages in putting constants in the node class and putting the variabels in the specific nodes.
Would you be convinced about me deserving Scripter rank if I'd change this?

 

@karlrais

Looking at the 2 options from an Object-Oriented perspective, the second option would be better.

Due to a bug my poll got deleted. I used my mobile phone to edit the thread which resulted in the poll being deleted. Could you please vote again?

Edited by xCode

Share this post


Link to post
Share on other sites

"I've read all the feedback very carefully and updated my code according to the feedback."

I don't think this is the case, read through some of the feedback on your last application. 

 

The code we are presented to review is very messy and poorly structured. It seems you're just throwing a load of statements together to make it work, rather than making an elegant script that functions efficiently with maintainable code. 

 

Although your scripts may work, that's not what this application process is about, I'm sure others will agree with this.

 

I suggest you don't re-apply until you've reviewed every line of code in your script and really asked yourself if that's the best way to approach what you're trying to do. Otherwise you'll just find the same comments on every future application you make.

 

You have a good attitude so get cracking! If you need any help/advice add me on Skype.

1 person likes this

Share this post


Link to post
Share on other sites

"I've read all the feedback very carefully and updated my code according to the feedback."

I don't think this is the case, read through some of the feedback on your last application. 

 

The code we are presented to review is very messy and poorly structured. It seems you're just throwing a load of statements together to make it work, rather than making an elegant script that functions efficiently with maintainable code. 

 

Although your scripts may work, that's not what this application process is about, I'm sure others will agree with this.

 

I suggest you don't re-apply until you've reviewed every line of code in your script and really asked yourself if that's the best way to approach what you're trying to do. Otherwise you'll just find the same comments on every future application you make.

 

You have a good attitude so get cracking! If you need any help/advice add me on Skype.

 

 

I agree with Druid, we gave you a lot of advice last time and you haven't taken them seriously enough to change your code. I vote no.

 

Edit: You sure you uploaded the updated sources to bitbucket?

Did either of you look at the source of his scripts? What you're saying is flat out incorrect.

 

@xCode

You have improved significantly since your last application and you clearly listened to a lot of the advice given to you. Of course there is always room for improvement, but regardless of that I am voting yes on your application.

Share this post


Link to post
Share on other sites

Did either of you look at the source of his scripts? What you're saying is flat out incorrect.

 

@xCode

You have improved significantly since your last application and you clearly listened to a lot of the advice given to you. Of course there is always room for improvement, but regardless of that I am voting yes on your application.

I was thinking the same thing.

You have more than enough knowledge to hold the scripter rank. And just like everyone else here did, you'll find ways to improve overtime.

edit: The only annoying thing about your code is the conventions you use for your opening brackets, but that's more personal preference.

An example would be https://bitbucket.org/robinhopok/xhunter/src/5389aed7eb1c7740a183ddf3060b303b9d2e5f39/Nodes/PickupTrap.java?at=master

You don't put a space between your bracket after Node on line 14.

Then for the isValid and execute methods the bracket has a space, but all your if statements have the bracket on the next line.

Edited by Encoded

Share this post


Link to post
Share on other sites

First of I have not used node framework style myself so I will not vote on this application. I can only speak from pure Java perspective.

 

- I now use a class Variables where I store all my variables in.

- I now use a class Constants where I store all of my constants in.

 

Who told you to do this? Your kill node (or w/e) does not need to know about any of the variables other than those needed for killing. I would keep all the variables in their specific nodes.

Also it seems like an interface would be better suited for a node, because abstract class with only abstract methods is effectively an interface and it would leave the option to extend some class other than Node in the future. 

 

Use lowercaseonly for package names. It's super annoying.

 

For crying out loud use a formatter. CTRL + shift + F in Eclipse and your whole code looks the same.

 

In your Variables class all your variables are static? What's up with that? That means they are effectively the same as constants...

public static ArrayList<Node> nodes = new ArrayList<Node>();public static boolean stop = false;public static int ticketsOnStart = 0;public static String status = "";public static boolean debug = false;

And then you have

while(!Variables.stop){

That means you use the same stop variable for all instances of the script. If you run 10 scripts and you stop 1 then all 10 scripts would stop. It seems to me that you do not understand the difference between static and non-static well. If this is the case I don't think you deserve scripter just yet.

 

In your antiban node there's a lot of redundant code. 

...Constants.ANTIBAN.performRandomMouseMovement();Constants.ANTIBAN.performRandomRightClick();Constants.ANTIBAN.performRotateCamera();Constants.ANTIBAN.performTimedActions(SKILLS.RANGED);Constants.ANTIBAN.performXPCheck(SKILLS.RANGED); 

The line in bold already calls all the other lines.

 

If you managed to read this far I could seem to you that I hate you. I don't. We don't. We're always looking for new scripters to the community because there's infinite amount of work to be done. But those new scripters have to know what they're doing. If you have any questions PM me and i'll send you my RL skype.

Share this post


Link to post
Share on other sites

Variables and constants are not the same.

What i meant was your Variables class and Constants class are effectively the same.

 

 

Variables are static so I can reach them without inititializing the Variables-class first.

That's right. And by not initializing the variables all your scripts share the same instace. If one instance changes the variable then other instances all get that changed variable.

 

 

Sorry, but this is not the case.

It may not be the case but it's just wrong in every way you look at it.

Because of this I decided to vote NO. I can't let such thing as static AND instance variable pass.

 

 

I can't see a bold line? Can you explain a bit more what you mean?

Constants.ANTIBAN.performTimedActions(SKILLS.RANGED);

This already call all the other lines in your antiban node. From javadoc:

"Performs all of the actions supported by TIME_TRACKER, if the necessary conditions are met, and will reset the timers for any performed actions."
 
TL;DR Voting no because of 2in1 static and instance variables.

 

 

Share this post


Link to post
Share on other sites

Does this mean it's bad that I prefer to seperate my constants from my variables? I think it's just nice to seperate these things even tho they are effectively the same. In my opinion makes my code more readable and I can't see anything bad about it.

 

You are completely right, in general. But I've tested this for TRiBot scripts. It doesn't matter how many instances you run of a script. If in one instance Variables.stop is set to true, this wouldn't set the stop-variable in another instance. I actually have tested this. I could ofcourse have an instance of the Variables-class in all of my other classes, but this would cost me some lines of code extra, to achieve the same. But I'm willing to do this if other Scripters here agree with you about my approach being a bad practise. Again, you are right, but I don't see why I should change it atm.

 

You probably tested it on multiple clients. Each client opens new JVM and operates on that, in that case yes your option will work but is still wrong. Try multple tabs and you'll see what I mean.

 

I would put the constants into the Node class or interface (however your way is still ok) and I'd lose the Variables class and put all variables into their specifc Nodes. That way everything is nicely where it belongs.

1 person likes this

Share this post


Link to post
Share on other sites

Would you be convinced about me deserving Scripter rank if I'd change this?

 

I don't decide if you get a scripter rank. As of right now this could go either way, but personally I doubt 2in1 static and instance variables will be approved.

 

If it was up to me, I would close this application for now to let you clean up your code (everything we talked about and more) and apply again after 7? days. If I were you I'd also add ABC10 to earn some bonus points. If you don't do it before scripter application you'll probably never do it.

Share this post


Link to post
Share on other sites

In your Variables class all your variables are static? What's up with that? That means they are effectively the same as constants...

public static ArrayList<Node> nodes = new ArrayList<Node>();public static boolean stop = false;public static int ticketsOnStart = 0;public static String status = "";public static boolean debug = false;

And then you have

while(!Variables.stop){

That means you use the same stop variable for all instances of the script. If you run 10 scripts and you stop 1 then all 10 scripts would stop. It seems to me that you do not understand the difference between static and non-static well. If this is the case I don't think you deserve scripter just yet.

You should read about what you're talking about before you start giving advice about it. What you said is only true if all 10 scripts are running off of the same jvm, which will never happen because the tribot api doesn't work with multiple tabs on one client to begin with, so putting variables in a container class and making them static is the best way to go.

 

Second, static variables and constants are not effectively the same thing. I do not know where you got that idea, but I urge you to not spread it around as it is false information.

Share this post


Link to post
Share on other sites

You should read about what you're talking about before you start giving advice about it. What you said is only true if all 10 scripts are running off of the same jvm, which will never happen because the tribot api doesn't work with multiple tabs on one client to begin with, so putting variables in a container class and making them static is the best way to go.

 

Second, static variables and constants are not effectively the same thing. I do not know where you got that idea, but I urge you to not spread it around as it is false information.

 

You need to read through the whole dialog before making any conclusions.

 

Also at one point tabs were on the same JVM, I believe it was when the tabs were first released. So he's script might very well break on day.

And no, putting semantically different variables in a single container class is never a good idea.

 

Why would the script writer have to know about super deep stuff about Tribot to which there is no source nor documentation and go through the trouble of opening mutiple tabs and logging in with multiple accounts etc.. just to see if he could use INSTANCE AND STATIC variables which do not make any sense in the first place. Just put the variables where they belong and use them how they were meant to be used.

Share this post


Link to post
Share on other sites

You need to read through the whole dialog before making any conclusions.

 

Also at one point tabs were on the same JVM, I believe it was when the tabs were first released. So he's script might very well break on day.

And no, putting semantically different variables in a single container class is never a good idea.

 

Why would the script writer have to know about super deep stuff about Tribot to which there is no source nor documentation and go through the trouble of opening mutiple tabs and logging in with multiple accounts etc.. just to see if he could use INSTANCE AND STATIC variables which do not make any sense in the first place. Just put the variables where they belong and use them how they were meant to be used.

Tabs run on the same JVM, as seen here: 3b158c0273.png

 

The tribot api inherently does not work correctly with multiple tabs open because for the most part it is a static api (e.g. Player.getPosition) so you would never want to run multiple tabs in the first place. I don't think that is "super deep stuff about tribot", it's a part of how static fields are stored and referenced.

 

Now, in the scope of tribot storing run-time information like he is in a class like that is not a terrible idea (the list and the stop variable shouldn't be there, I agree with that). But my main focus in my post directed at you was trying to get the point across that you should not spread around false (or rather incomplete) information. His script will not end all running instances if one of them stops on a different client (which is how people run are told to run scripts in the first place since the api does not work correctly with multiple tabs).

Edited by Starfox

Share this post


Link to post
Share on other sites

Tabs run on the same JVM, as seen here: 3b158c0273.png

 

The tribot api inherently does not work correctly with multiple tabs open because for the most part it is a static api (e.g. Player.getPosition) so you would never want to run multiple tabs in the first place. I don't think that is "super deep stuff about tribot", it's a part of how static fields are stored and referenced.

 

Now, in the scope of tribot storing run-time information like he is in a class like that is not a terrible idea (the list and the stop variable shouldn't be there, I agree with that). But my main focus in my post directed at you was trying to get the point across that you should not spread around false (or rather incomplete) information. His script will not end all running instances if one of them stops on a different client (which is how people run are told to run scripts in the first place since the api does not work correctly with multiple tabs).

 

I am not giving out false information. I have never stated the tab thing as a fact. It was, for the most part, a guess, which is why I said "...If I'm right..."

 

Now, even though I am wrong, you are wrong even more so.. Abusing the fact that "api does not work correctly with multiple tabs" is just wrong on such a fundamental level that it boggles my mind we're even discussing it. It's like doing integer math with strings. Why do it the wrong way, if you could do it easier and better the right way? One does not have to know or assume how Tribot handles the JVM. And you don't have to know how Tribot handles JVM if you code your scripts the right way, as in static variable = shared by all instances of the script.

 

Finally, which is better?

class Car {  private int carWidth;  private int airplaneLenght;  private void landOnTheMoon(); }

or

class Car {  private int carWidth;}class Airplane {  private int airplaneWidth;}class Apollo13 {  private void landOnTheMoon();}

Share this post


Link to post
Share on other sites

Your code is clean and understandable; people can learn from it. I don't see any major flaws in your code from what i know. You have contributed a lot to the community and i can see a lot of potential! Yes from me :) 

1 person likes this

Share this post


Link to post
Share on other sites

Your code looks neat and understandable, I also think that your code contributes a lot, the hunter and pest control scripts look pretty decent. 

Although there are a few MINOR things

 

if(inventoryItems[i].getDefinition().getName().equalsIgnoreCase(xHunter.valuables[j]))/*that may return null,  * but this is something you * can find out on your own when it happens. */final RSItemDefinition definition = inventoryItems[i].getDefinition();if (definition != null) {    final String name = definition.getName();    if (name != null) {        if (name.equalsIgnoreCase(xHunter.valuables[[j])) {            //code here        }            }}

Also when using General.sleep(), no need for General.random as you can already do General.sleep(min,max);

 

Overall, your knowledge of scripting & time dedicated is definitely noticeable, Yes from me.

1 person likes this

Share this post


Link to post
Share on other sites

For the level you are applying for and based on some of the comments above, I am accepting this application.

 

Welcome, looking forward to your progress.

1 person likes this

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.