Jump to content
  • Create New...

[How To] Setup Local Scripts

Recommended Posts

Quick guide for setting up local scripts in IntelliJ.

I assume that you have IntelliJ installed already.

You must have Java 11-14  to run PowBot. You can download it from https://adoptopenjdk.net/.


First, you must download PowBotLoader from https://powbot.org/download.

After running PowBotLoader once you should have the required PowBot.jar in "C:\Users\YourName\.powbot\client" ( on Windows). You will use PowBot.jar in the next section NOT PowBotLoader.

Open IntelliJ.

Click on the File->New->Project. Select Java and make sure that under Project SDK you have java 11 or higher. Click Next and Next again.


Now you can name your project whatever you want and select the location. Click Finish.


Once you have completed that you should have a new empty project.

On the left side right click on your project name and select "Open Module Settings", the window on the right side should be open now.

Select Libraries under Project Settings and click on the "+" sign and select Java.


Find and select the PowBot.jar . Click OK, then Apply and then again OK to close the window. (The screenshot below shows an old jar file name)


Now we need to setup run configuration. Click on Run->Edit Configuration on the top toolbar. The configuration window should be open now.

Click on the "+" sign, choose Application.

n step5.thumb.png.8647e406dd799c584a1caf73cc42229f.png

Now name your configuration however you want.

Under Main class put jagexappletviewer.

Under VM  options put "-Xmx1024m -XX:+UseG1GC"

Make sure that jre version is correct. Now click Apply and OK.


You should now be ready to start making some scripts.

Double click on your project name on the left side to expand the menu. Now right click on src (folder for all of your source files) and select New->Java class and name it Main.


Your class will be empty. The code in the picture is the minimum you'll need to run the script.


If you have written the necessary code you can now run the app.  Select Run->Run "ProjectName" . It will compile and run the client.

Hopefully you got something like this. In the client if you select File->Play you should see your script name ( name comes from the manifest)


That's it!

Good luck with scripting.


Edited by Toma
Updating rsbot references
  • Like 2
Link to post
Share on other sites
  • Moderators

Updated the thread, there were references to the loader jar rather than the exe, and people are downloading the old jar from here.

Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...
On 3/6/2021 at 8:40 AM, bigA21 said:

PowBotLoader never finishes the loading it just gets stuck on 99% for me. image.png.b888fbc360905ae809e1ec05ac100894.png

Any help would be greatly appreciated.



I had the same problem when using jdk14, but it works with jdk11

Link to post
Share on other sites
3 hours ago, petroboti said:

I had the same problem when using jdk14, but it works with jdk11

Yeah, @bigA21 if anyone is having loading issues, if you download jdk11 you can configure your IDE to point to it and it should work.

If you're also having issues with loading the client individually you can have the java jdk11 binary point to the powbot.jar and it should also work

Link to post
Share on other sites
  • 4 weeks later...

How does the classloader work? Does it look for a specific folder to load scripts from? I'm building to ~/.powbot/scripts but no scripts get loaded in PowBot.
OP claims that simply running bot and clicking 'File->Play' will load script. Does this mean PowBot script classloader is looking in the default Intellij build folder (out)? Is there any way to change what folder is being read for class files?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.