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.


Genka's script writer application v2

Should Genka get the script writer rank?   4 members have voted

  1. 1. Should Genka get the script writer rank?

Please sign in or register to vote in this poll.

3 posts in this topic

Scripter Application Format
My last application can be found here: https://tribot.org/forums/topic/56445-genkas-script-writer-application/
1) Snipplets: [sOURCE] (Link to thread)
2) Tutorials: [sOURCE] (Link to thread)
3) Randoms/updates submitted: [sOURCE] (Link to thread)
4) Scripts available to the public: [sOURCE] (Link to thread)
GThieving AIO  [Thread][Source] - 520 users
GFireCrafter [Thread][Source] - 100 users
GEnchant [Thread][Source] - 92 users
XMas event solver [Thread][Source] - 42 users (this is really messy script, and i didn't plan to release, but found that people might find it useful. I am afraid it might do more harm than good to this application, but I still thought I should add it).
5) Short biography / Coding Experience: [1-2 short paragraphs]
I am 23 year old computer enthusiast. I joined Tribot just over 3 years ago to bot oldschool runescape. I have made a lot of private scripts for personal use, but I came to the conclusion, that I can do a lot more good by providing my scripts to other people. My favourite activities include listening to dnb/dubstep, driving my car around the town, writing scripts for new activities on runescape and cuddling with my girlfriend.
6) Reasons why you feel you deserve Scripter: [1-3 short paragraphs]
I have been here a while and I am always looking for ways to improve my communication and programming skills. I have always thought myself to be friendly and helpful person. My last application was denied and I learned a lot from it and I will not stop learning.
7) What you plan to provide the community with: [1-3 short Paragraphs]
I am planning to provide the community with best scripts and support I can provide. Would really like to be the role model for people.
8) Do you agree to continue to not only update, but provide more free, open sourced scripts to the community? [YES/NO]


@Final Calibur , love the sophisticated answers I get in this thread. I will look into all those things and will continue to learn and make my scripts better. I will not stop improving, and I will keep applying until I get the rank.

EDIT: new and improved GFireCrafter main.java [source]

Edited by Genka
3 people like this

Share this post

Link to post
Share on other sites

I believe you're active enough in the community, and you have a decent number of contributions under your belt.
Your code is what concerns me, and after looking through some of it, here are some things I noticed:

  • Convoluted methods
    • Banking07#bank (gthieving)
      • This method is long, bloated with tasks that can be separated into other methods, and hard to trace.
      • Also, instead of while loops, you can simply use Timing#waitCondition for a cleaner solution.
    • Pickpocketing#pickPocket (gthieving)
      • Once again, why combine so many different tasks into one method? Why does one method have to handle not only pick pocketing, but also walking to the npc? 
    • Main.java (GFireCrafter)
      • The methods in this class are extremely long and hard to trace. For example:
        • bank()
        • travelAndCraft()
          • Why does it have to be travel and craft? Why can't you split up the tasks into their own appropriate methods?
    • XMAS.java (XMas event solver)
      • Just take a glance at the doShit() method. It's over 500 lines long.
  • Checking from within a method if it should execute
    • Eating#eat (gthieving)
      • Within this method you're checking if needToEat evaluates to true. However in the CrackSafes class, you're checking if needToEat evaluates to true before calling Eating#eat. This is redundant, and you should get rid of the check within the eat method. Methods that perform a specific task should not need to know themselves whether or not they should execute. Determining whether or not a method should execute should be delegated to your main logic flow. This is another reason a lot of your methods are convoluted.
  • Inefficient code
  • Not making use of the boolean values returned by some API methods
    • CrackSafes#crackSafe (gthieving)
      • These two chunks of code (1 2) should be modified to first check if the clicking method returned true (meaning a successful click) before sleeping. Otherwise you're sleeping even if the click wasn't successful. Also, you should make use of conditional sleeping instead of blindly sleeping for a specific amount of time.
    • Banking07#bank (gthieving)
      • Same as above for these two chunks of code (1 2). Also, use conditional sleeps instead of while loops.
    • StealFromStall#execute (gthieving)
      • Same as above for these pieces of code (1 2).
  • Overabundance of static data
    • Not much has to be said about this, other than the fact that you're limiting your users to only being able to run your scripts in multiple clients, as opposed to multiple tabs. Programming in an object-oriented manner will allow you to solve this issue, and also make it so you won't sling around the static keyword wherever it seems to help.

After looking through your code, I just can't bring myself to say yes. I would say the main thing you need to improve on is method size and organization. Sure, messy code may work when you're making free, simple scripts. You'll run into major difficulties down the line when you try to make something more complex. If you fix this issue up, it would most likely be a yes from me.

Edited by Final Calibur
1 person likes this

Share this post

Link to post
Share on other sites

FC pretty much nailed the major things on the head, I'll point out a couple that I saw...




					if(DynamicClicking.clickRSNPC(victim[0], "Pickpocket " + npcName)){						GThieving.abc.waitNewOrSwitchDelay(last_busy_time, false);						last_busy_time = System.currentTimeMillis();

Remember, its abc sleep -> action -> cache last_busy_time.




    private boolean isLastCharge(){        RSItem[] ring = Equipment.find(SLOTS.RING);        if(ring.length > 0){            RSItemDefinition def = ring[0].getDefinition();            if(def != null){            return def.getName().contains("1");            }        }        return false;    }

.getName() can also return null, check javadocs




                    withDraw(itemToEnchant, 0, "items to enchant");                    abc.waitNewOrSwitchDelay(System.currentTimeMillis(), false);

sleep -> action -> cache value, need a global variable last_busy_time and set that value to the current time after the action is complete.



No from me as well for now, good luck on your next application.

Share this post

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

  • Recently Browsing   0 members

    No registered users viewing this page.