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.

godspower33

godspower33 Scripter Application

10 posts in this topic

1)    Snipplets: N / A

2) Tutorials: N / A

3) Randoms/updates submitted: N / A

4) Scripts available to the public: [sOURCE] (Link to thread)

Gods Fungus:  

Gods Fungus Source

 

Gods Man Killer:

God Man Killer Source

 

Gods Pizza Topper: 

Gods Pizza Topper Source


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

I am currently a third year university student, majoring in Computer Science with concentrations in artificial intelligence, robotics, and gaming. I have scripted for a long time on and off, I like to write new scripts and code, and watch it work flawlessly. I started writing scripts back on Scar or Simba is what it is called now I believe. I began writing scripts on Tribot about a year and a half ago. I hadn’t really improved greatly with the Tribot API until recently and once I had a good grasp on it, I started writing some public scripts and some private scripts I use.

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

I believe I would make a good addition to the scripting team because I like to code, and I am almost always willing to write up free scripts on request. I don’t mind spending time helping out anyone with questions whether it be about writing scripts, or helping them on how to bot better.

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


I plan on providing the community with good quality scripts and quick bug fixes on any script I have released (Provided I have an account capable of the stats required) I plan on writing more public scripts, I will write scripts for methods that have outdated/broken scripts on repository, and will try to give both gold farmers and normal botters scripts that can be beneficial to both of them.


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

Yes.

 

@Sphiinx Thank you for the detailed explanation, I will definitely take another look at my scripts and fix those naming conventions, and and possible NPE's. I must've missed that, when I was proof-reading over my code. I do cache and null check interfaces in my Pizza Topper but I must've missed that when I was reading my Fungus code :( . My fungus script was one of my first bigger scripts and at the time, and I didn't use node/task based framework when I wrote it but I do use it mostly now in my scripts. I sometimes do write smaller scripts in one class though, but I wrote my Man Killer with node based framework to demonstrate I understand it. I should've done a re-write on the Fungus script with the node framework before applying with that script. About the #setClickingAPIUseDynamic(boolean), I do use that in my other scripts. Thank you overall, I see now where I can improve on these scripts and clean them up.

@Assume Can you elaborate please, and criticize my code some so I know what I should be improving on?

@modulusfrank12 Thanks, review it whenever you have time. I can't create a poll on the topic, I think a moderator has to do it for the scripter forum. https://gyazo.com/4f7635967c4931a3d1b77badccb443b9

@Final Calibur Thanks for reviewing my code, I will definitely take a look at all those naming conventions and fix those magic numbers. I will change the world hopping method I use and make it more efficient. In the future I will make sure my code is easier to follow for everyone who reads it. I'll re-write my Fungus script using node framework and clean up all the code and make the changes. 

Edit : I went through and re-wrote/made all the corrections, changes to all 3 scripts that I am applying with.  (Not sure if I can do that or not). 

@Assume

Edited by godspower33
2 people like this

Share this post


Link to post
Share on other sites

You should look into using a repository such as Github or Bitbucket.

Share this post


Link to post
Share on other sites

I think you need to add a poll? I'll try to review when I have some time.

 

Edit: I see.

Edited by modulusfrank12

Share this post


Link to post
Share on other sites

Here are my thoughts on what you can improve.

  • General
    • Packaging
      • Instead of throwing all of your classes into one package, you should learn how to package your projects correctly and according to the Java Conventions.
    • Constants/Variables
      • Your constants and their naming conventions are very inconsistent. It seems like you don't know the difference between a constant and a variable.
      • A variable may change in value after it's been initialized, while a constant will never change after it's been initialized. As well, in Java, we can use the final keyword to specify that a value will never be changed and we use ALL_UPPER_CASE as the naming convention.
      • Some examples of your incorrect conventions: Both of these are constants and should be declared final and use the ALL_UPPER_CASE naming convention.
    • Framework
  • Gods-Fungus
    • MortFungusCW.java
      • TRiBot has a method to get a random number from two specified numbers, so I'm not sure why you're using Math#random here. It seems you use General#random in the rest of your script as well.
      • You don't need to make references to the class like this. Those methods are a part of the class and can be accessed, as well, there is nothing that would over right them.
      • You should refrain from using magic numbers such as this especially when a script is open-source. Because of this, anyone who looks at your script won't immediately know what ID "14151" is. Or if you come back to the script after awhile, even you may not remember.
      • Instead of using DynamicClicking and Clicking in different areas, you can just use the Clicking class and set the script to use DynamicClicking when needed. You can do this by getting the thread settings and then calling #setClickingAPIUseDynamic(boolean).
      • You should be taking advantage of the return values of methods. For example, instead of just calling this, you should be checking if the action was successful or not and acting upon that returned value.
      • You should try to avoid programming linearly like this. It will make it tougher when debugging issues and it's a bad habit to get into.
      • There is no point in using a while loop here when the method is already being looped. This can also potentially cause more issues such as an infinite loop.
      • This is a potential NPE waiting to happen. You're attempting to get an interface without caching it and null checking. Doing this could result in the Interface being null and throwing an NPE.
      • This is unnecessary, you don't need to create an ArrayList to store all of the worlds you want to use. An ArrayList is a dynamically re-sizing array that should be used when we don't know how many elements we need to put in it. Since we do know this, you could just simply store them in an integer array.
      • You should be null checking this.

 

You seem to help out in the community and you're quite active which is good, although, you still have a lot to learn about programming and Java.

Your classes are quite cluttered and some of your methods are very long and vague. There are also many places in your scripts where NPE's can be thrown because you're not properly null checking or not null checking at all.

1 person likes this

Share this post


Link to post
Share on other sites
49 minutes ago, modulusfrank12 said:

I think you need to add a poll? I'll try to review when I have some time.

 

Edit: I see.

 

 

If I'm not mistaken, they stopped doing that.

1 person likes this

Share this post


Link to post
Share on other sites
On 7/25/2016 at 1:48 AM, Sphiinx said:

 

If I'm not mistaken, they stopped doing that.

That is correct, new boards permissions did not allow you to apply usergroups to poll restrictions.

1 person likes this

Share this post


Link to post
Share on other sites

I'm completely agreeing with sphiinx here. With that level of scripting, you do not meet the scriptwriter standards and should try again in a month or so with your improved code.

Share this post


Link to post
Share on other sites

Agree with pretty much everything @Sphiinx said. He outlined most of the major issues. The content in this post is mainly non-fatal convention-based criticism.

Just glanced at your Gods-Fungus script, here are some notes:

1.) Program to the interface, not the implementation. This should be List<Integer> noWorlds = new ArrayList<>();
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L60

2.) Variable / Constant naming conventions are inconsistent
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L84
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L91
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L218
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L232

3.) Magic numbers
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L93
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L116
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L133
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L160
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L178
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L232
        
4.) Overly-complex code
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L102
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L200

               Make use of the random method provided in the TRiBot API

        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L443
        https://github.com/godspower33/Gods-Fungus/blob/master/MortFungusCW.java#L198
            

           Really despise how you've gone about choosing a world to hop to. Probably one of the
            most inefficient ways to do it. Not only are you hard-coding the list of worlds you CAN'T
            hop to (would've been better off hard-coding the worlds you CAN hop to), your getWorld method
            is a brute-forced, inefficient, lazy implementation.

            Either make your system know which worlds it can hop to, to avoid the unecessary
            calculations every time you need to hop, or modify your WorldHopper (seems to be mine in this case)
            to have options for which type of world to hop to

            
5.) Overall, too many egyptian-like pyramids of code. Essentially what I'm saying is there are too many convoluted
    and hard to trace methods.

 

   It's a no from me as well, but I hope you re-apply in the future.

Share this post


Link to post
Share on other sites

I think there were some good comments in this thread on areas to improve, however I believe you are not far off from earning the rank so please keep at it.

Here are some general comments,

return (Inventory.getAll().length > OLD);  //Gods-Man-Killer/blob/master/Methods/Loot.java
This wont work with stackable items that you already have in your inventory (i.e. Chaos rune)

General.sleep(1200, 2400); // sleep while we wait for interface to turn to bkr
Whenever possible, try to avoid using sleeps like these make them dynamic with a return condition.

AntiBan.generateTrackers(1500, true);
This isn't proper use of the ABCL class, you should generate trackers on the time performing the action. And on that note, the reaction sleep should be executed before performing the next action (Walking, Clicking, etc.) 

Gods-Fungus/Methods/
As a general practice, try to avoid redundancy and expanding the complexity of your project more than what it needs. A lot of those methods are similar in function, and I think the methods of traveling/banking can be organized better without the need for 11 nodes.

Address some of the comments in this thread and re-apply with your changes, good luck.

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.