How to Write a Runescape Script in Eclipse

Runescape allows players to integrate Java scripts, so you can automate some of the gameplay. You test and run your scripts in the Eclipse Java development environment. Eclipse lets you program and run scripts in a debugger to ensure you have no syntax errors.

Instructions

    • 1

      Click the Windows "Start" button and type "eclipse.exe" into the search field that appears. Press "Enter." Double-click "eclipse.exe" to open the Eclipse software. Open your Runescape project to load the code. If you do not have a project already created, click the "File" menu and select "New." Click "Java Project" and select "Finish" to create a blank project.

    • 2

      Click the "File" menu item and select "New." Click "New Class" to create a new Java script file. Type a name for the class and select a storage location. Click "Finish" to open the file in the Eclipse editor.

    • 3

      Type your Runescape script code. For instance, if you want to make your character walk to the bank when the distance is less than 10 miles, add the following code to your class file:

      if (calc.distanceTo(bankTile) < 10 ) {
      Actions.WALKTOBANK;
      }

    • 4

      Click "Save" to save your code. To test the code in Eclipse, click the "Run" button in the toolbar. The compiler checks for any syntax errors and runs in the debugger.

Related Searches:

References

Comments

Related Ads

Featured