void functions in java

From WebHostingNeeds.com
Jump to: navigation, search

Voids are just methods with no return types. It's best to make one void per task. Every script must start with a void called "script". Say I was making a woodcutting script. I would make the starting script void, then make the cutting void, and then the banking void. See? One void per task. The first void in the script will always start like:

public void script() throws InterruptedException { 

In the script void always make sure you set your camera up how you want it. To do this we put:

theCamera.setPitchUp(); //You can also do setPitchDown(); but not many people do this 

After that we need to set the compass in the direction best suited for the script. To do this we put:


You could also put: South, East, West, or Random.

After that, your going to "loop" the script to the next void. This means your going to make the script continue on to the next method. Note that you have to make your script loop else it will stop after only one run. Say we were making a woodcutting script and the next void was called "WalkToTrees" If I were to loop it from the script void to the WalkToTrees void, it would look like this:

public void script() throws Exception

Complete iBot neXus Scripting Tutorial by Durenir, Updated by Chen (Monopoly)