Scripting

Scripting for Runedev is a rewarding but often tedious process. Some people were just not made to script. That's OK. Scripting, as defined in the Runedev community, is the process of writing a program using the Runedev API. This program should be able to run on the Runedev client.

Why should you script?
Scripters are highly valued by the Runedev community, and the skills developed in scripting apply for everything from hacking to thinking critically. By scripting, you are no longer simplying "leeching" off the community, but also giving back.

How do I get started?
First, you need to learn Java, which is the language Runedev is scripted in. Oracle, the owner of Sun, who made Java, have an excellent Java tutorial, called Trails. It can be found here.

Essential:
 * Basic structure of the language
 * 1) Loops
 * 2) If statements
 * 3) Variable declaration
 * 4) Method creation
 * 5) Class creation
 * How to use Object Oriented Programming in Java
 * 1) Understanding superclasses and inheritance
 * 2) Understanding how to make your own objects
 * 3) Static vs. non-static
 * 4) Creating your own classes
 * Misc (optional)
 * 1) javax.swing
 * 2) How to understand Javadocs (very useful)
 * 3) Threads

Antiban
As zzSleepzz stated, antiban is only good if it look human. Don't go spinning the camera every 2 seconds. Antiban will often excessively slow down the script. For example, Undergroundz Firemaker spins the camera and waits to stop spinning before opening the bank. Every time. One solution to this is to "thread" your antiban or only do it when you are idle.

Failsafes
Failsafes are the most important thing in a script. A failsafe is any structure that detects and prevents the script from failing. One way of accomplishing this is something like this:

public void bank{

//figure out what you have to do

//walk to bank

/return

//open the bank

//return

//bank stuff

//return

//walk back

//return

}

The reason for adding all those returns in is that sometimes you're stuck behind a wall and you can't open the bank, even though you've already walked there. Maybe you've already opened the bank, but the bank's not open yet. By switching on a flag that says you're banking and then letting the loop do that work, you're also keeping antirandoms turned on (antirandoms won't work if you're stuck in an infinite loop)