end of the loop(), then your script will execute your code,wait 1000milliseconds, and then restart itself from the top.onRepaint(Graphics g): This is a method that allows you to draw onthe runescape screen. this method is called a million times a second.With this method, you can show the user progress reports. for example, if you want to show the user how many fish have beencaught, you can have this be drawn with the onRepaint(Graphics g)method.get() methods: these are methods like getVersion(), getAuthor(), etc.these simply return a string or double value, which corresponds to thename. for example, in getAuthor() I will say "return 'Ben B' " because Iam the author.
Step 2 – GUI Building
Alright, so the first thing you ever will want to do in your script is getinput from your user. Woah woah woah, what is input, you say? inputis when you ask the user for information or specifications. andexample of input in Rsbot would be asking "What kind of logs do youwant to fletch?". this inquiry is followed by a text box, such as the onebelow:
Rsbot uses the Java programming language, which means we needto use java to get input from the user of your script. The way javadoes this is through a GUI (Generic User Interface). Sounds high-tech, ya? Well, it isn't. Infact, it's so bloody simple I don't even knowwhy I bother explaining it. Java is an application programminglanguage, so it uses windows to display things. a window is anything,like the browser you are using to read this tutorial, or microsoft word.Everything on a computer is in some kind of window. A window in java is also called a frame, and this is where the code starts.Whenever you make a GUI, you will put the GUI code in theonStart() method. Why? Because theonStart()method is called when thescript begins.You wouldn't want to ask the user for input after thescript is done (duh!), so you ask for it when it starts (duh!).There are