Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Question: AbstractScript


    Fran
     Share

    Recommended Posts

    Hi Guys, hope you're all doing well.

     

    I am a new scripter and would like to understand why do all scripts have to extend AbstractScript? And what is exactly AbstractScript?

     

    Thanks in advance.

     

    Regards.

    Link to comment
    Share on other sites

    Hi Guys, hope you're all doing well.

     

    I am a new scripter and would like to understand why do all scripts have to extend AbstractScript? And what is exactly AbstractScript?

     

    Thanks in advance.

     

    Regards.

     

    AbstractScript is what allows writers to actually write scripts for the client by providing variables, accessors, and methods to the writer. This paired with a @ScriptManifest annotation allows the script to recognized by the client so that you may load the script locally.

     

    The reason for the name, is because of the type of Class it is. AbstractScript is exactly how it sounds, a abstract class which is used by extending it in other classes of scripts such as TaskScript, and also allows you to extend the class overriding the provided methods such as  onStart() , onLoop(), and onPaint() to  create a script.

     

    I hope this answers some of your questions! :)

    Link to comment
    Share on other sites

     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.