Jump to content

[TUTORIAL] Intellij Setup for Script Development

Recommended Posts

How to set up Intellij for Script Development

Please note that EpicBot uses Java 8. You can download this from Oracle here.

If your Java version is not 8, set up Intellij to use Java 8, read "Set Up Intellij" here.

Don't know your Java version? Type java --version in a command prompt. 


Make a new Intellij Project

Go to File -> Project Structure -> Modules. Click the + icon. Select JARs or Directories.



Find your EpicBot folder. Select the dependencies folder and click OK.



You should now see it in your Dependencies list. Click Apply (don't click OK).



Click your Artifacts tab on the left, and the plus arrow again. Select "Other" from the drop down menu.



You should see something like this:



Name your artifact at the top (must be unique from your other script artifact names in other projects).

Select the "Include in project build" checkbox.

Click the '<project name> compile output' on the right side, so it moves to the left column.

Click the file folder on the left.



Find your EpicBot/scripts folder. You may not have one, and will need to make one. Select it and click OK.


If your screen looks like this, click Apply and OK.


Any script should now compile when you click the "Build Project" button (green hammer top right)


Making a Test Script

Right click your src folder on the left. Select New -> Java Class, and name it.


You should get something like this:



A quick sample script to test:

import com.epicbot.api.shared.APIContext;
import com.epicbot.api.shared.GameType;
import com.epicbot.api.shared.script.LoopScript;
import com.epicbot.api.shared.script.ScriptManifest;
import com.epicbot.api.shared.util.paint.frame.PaintFrame;

import java.awt.*;

@ScriptManifest(name = "Test Script", gameType = GameType.OS)
public class TestClass extends LoopScript {

    public boolean onStart(String... strings) {
        return true;

    protected int loop() {
        return 50;

    protected void onPaint(Graphics2D g, APIContext ctx) {
        PaintFrame frame = new PaintFrame("Test Script");
        frame.addLine("Title", "Value");
        frame.draw(g, 0, 170, ctx);

Click the build icon (green hammer top right) and you should then be able to see your script in the script selector.




Q: I followed the instructions and everything is red?

Your dependencies are not imported properly.

Q: I don't see the script in the script list?

You're not building the artifact properly. Ensure that "Include in Project Build" is checked, your output directory is correct, and your compile output is under the output root (left column). See below:


  • Like 3
  • Thanks 1
Link to comment
Share on other sites

  • Koala pinned and featured this topic

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.


  • Create New...