Neon Bot
Welcome to NBot! NBot says to Login or Register!
Basic Scripting Methods. Rawrbotad

Join the forum, it's quick and easy

Neon Bot
Welcome to NBot! NBot says to Login or Register!
Basic Scripting Methods. Rawrbotad
Neon Bot
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Neon Bot
NBot build 11.2a launched! Click Here!
Bad Ideas make for great stories
We need more site Activity! Don't let us lose hope in everyone!

You are not connected. Please login or register

Basic Scripting Methods.

Go down  Message [Page 1 of 1]

1Basic Scripting Methods. Empty Basic Scripting Methods. Sat Dec 11, 2010 12:13 pm

Sikuma



Code:

public void main(String[] args) {

}
This is the main method executed at runtime.

To make the main method loop we throw a while statement in.
Code:

public void main(String[] args) {
   while(running()) {

   }
}
This is telling the class to loop the main method aslong as the boolean running returns true.

Code:
public void onStop() {

}
This method is executed when the script ends.
Good use of this.

Code:
public void onStop() {
   printMessage("Script Done");
}


Code:
public iCookPro(Client mc) {
   super(mc);
}
This method* is thrown when the class initiates itself. Things in this are executed BEFORE the main method.



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum