Tutorial Setting up IntelliJ for RuneMate on Windows - Tutorial 1

Discussion in 'Tutorials & Resources' started by Eagles13, Jul 25, 2015.

  1. Eagles13

    Eagles13 The only thing Alpha about me is my bots

    Joined:
    Sep 22, 2014
    Messages:
    616
    Likes Received:
    180
    Tutorial 1: Setting up IntelliJ for RuneMate on Windows

    This is the first tutorial in a series, if you'd like to see more, take a look at this thread:
    https://www.runemate.com/community/...bots-for-runemate-from-novice-to-expert.2322/

    This is a comprehensive tutorial which takes you through the steps of downloading, installing, and setting up IntelliJ for RuneMate, assuming a clean install of Windows 8.1 x64:​


    Text-based instructions::
    • Either click here or search 'download jdk' on Google (and select the first result) in order to download JDK. On the download page, select this button:
    [​IMG]
    • On the next page, select 'Accept License Agreement', and download the appropriate binary for your system (make sure to download the 64-bit binary if you're using a 64-bit operating system).
    [​IMG]
    • Next, once the installer has finished downloading, launch it and complete the installation. You do not need to configure the installer in any way whatsoever.
    • Now, either click here or search 'download intellij' on Google (and select the first result) in order to download IntelliJ. On the download page, select the Community Edition:
    [​IMG]
    • Next, make sure you've got a copy of the RuneMate.jar file - click here to get the latest version or go to the "Download" page on the website.
    • When the IntelliJ download is finished, you can go ahead and install it - no special configuration is needed here. Next, run IntelliJ.
    • This screen may show up. Unless you have a previous installation, just click "OK".
    [​IMG]
    • Next, the 'Customize Idea' screen will show up. Select any options you want, or alternatively, click 'Skip All and Set Defaults':
    [​IMG]
    • On the next window, select "Create New Project":
    [​IMG]
    • Next, you'll be confronted with the window below. You'll need to pick the project SDK.
    [​IMG]
    • On this window, you'll need to:
      1. Click the "New" button.
      2. On the popup list which appears, click "Java"
      3. Select the path of your JDK installation. This ought to be in the format %Program Files%\Java\jdkx.x.x_xx.
      4. Click "OK".
    • Then, click "Next", and keep doing so until you reach the "Project name" textbox. I called my project Runemate, but you can call it whatever you want:
    [​IMG]
    • Take note of the Project location. Next, take the RuneMate.jar file which you downloaded earlier, and Copy & Paste it into the Project location directory.
    • Next, you should see an image like the one below. Press Alt+1 in order to open up the sidebar, as shown below:
    [​IMG]
    • Next, click the button circled in red in the image above in order to open the "Project Structure" dialogue, as shown:
    [​IMG]
    • Once the dialogue is visible:
      1. Select "Modules"
      2. Ensure that the "Java x.x" module is present
      3. Click the green "+" button
      4. Select "JAR"
    • Next, a dialogue should appear prompting you to select a file. Select RuneMate.jar, as which you should have just pasted into your project's base directory, as shown:
    [​IMG]
    • Once this is done, click "OK" on both dialogues to close them.
    • Next, on the main IntelliJ window, select Run -> Edit Configurations...
    [​IMG]
    • On the dialogue which appears, click the "+" button, and select "Application", as shown:
    [​IMG]
    • Fill out the information on the debug configuration likeso (but replace my username with yours):
    [​IMG]
    • For convenience, the contents of each of the fields is:
      • Code (Text):
        1. com.runemate.Boot
      • Code (Text):
        1. -sdk -login=FORUMUSERNAME:FORUMPASSWORD:GAMETYPE
      • Note that only -sdk is necessary in this field. GAMETYPE can be OSRS or RS3. The rest is for convenience
      • You might also do well to give the configuration a name, as the name is specified as "Untitled" in the screenshot
      • When this is done, click "OK".
    • Now you're ready to start creating some packages. If it's not open, press ALT+1 in order to open the project sidebar.
      • Now right click the "src" folder, and create a new package. You can call the package something along the lines of "com.yourname.bots".
      • Inside this package, create a new class called "testbot". When finished, your package structure should look like this (not that I've disabled flattening of packages in this screenshot, so yours might look slightly different.
    [​IMG]
    • Open the testbot class, and add the following code:
    [​IMG]
    • If you'd like a cursory explanation of what this code actually does, please refer to the video tutorial at 7:30.
    • Next, right click your "testbot" package on the project sidebar, and create a new file called "testbot.manifest.xml". After you're done, your project structure ought to look something like this:
    [​IMG]
    • Open the testbot.manifest.xml and add the following XML:
    [​IMG]
    • Again, if you'd like an explanation of what this does, please refer to the video tutorial.
    • You're now ready to debug for the first time. Press the green play button on the top right of the IDE:
    [​IMG]
    • RuneMate ought to show up. Once it's loaded, press the "Start Bot" button. If no bots show up, then click the "Change Directory" button (this is expected but may not always be the case). An open file dialogue ought to appear.
      • Make sure that once it appears, you select the directory above the "com" directory in the "out" directory of your project. It ought to look something like this:
    [​IMG]
    • If you did everything correctly, a bot ought to show up in the list called "Test bot". Once it appears, then select it and click the start button.
    • If a message appears in the debug window like the one below, then you've got your first bot set up with RuneMate! Congratulations!
    [​IMG]


    If you'd like to see more tutorials by me, see the tutorial index, here: https://www.runemate.com/community/...bots-for-runemate-from-novice-to-expert.2322/
     
    #1 Eagles13, Jul 25, 2015
    Last edited: Jul 25, 2015
    Sweden likes this.
  2. Sweden

    Joined:
    Jul 20, 2015
    Messages:
    27
    Likes Received:
    4
    Nice! How is it going on this whole tutorial project? :)
     
  3. Eagles13

    Eagles13 The only thing Alpha about me is my bots

    Joined:
    Sep 22, 2014
    Messages:
    616
    Likes Received:
    180
    Pretty well. I'm currently uploading & processing no.2
     
  4. Sweden

    Joined:
    Jul 20, 2015
    Messages:
    27
    Likes Received:
    4
    Can't wait :)
     
  5. juunhoad

    Joined:
    Jul 27, 2015
    Messages:
    4
    Likes Received:
    0
    How can I use proxy with this? Cuz now it skips the settings for proxy.
     
  6. Eagles13

    Eagles13 The only thing Alpha about me is my bots

    Joined:
    Sep 22, 2014
    Messages:
    616
    Likes Received:
    180
    I'm unsure of whether RM accepts proxy configuration as a commandline argument, so for now you can probably just remove the username & password configuration, or you could ask @Cloud if this feature is planned/implemented.
     
  7. GabeN

    Joined:
    Jun 5, 2015
    Messages:
    6
    Likes Received:
    0
    It says "Unrecognized option: -sdk" for me when I run it.

    ----------------------------------
    Wrote it in the wrong field. My bad.
     
    #7 GabeN, Sep 29, 2015
    Last edited: Sep 29, 2015
  8. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,525
    Likes Received:
    1,042
    Your should join our development chat so one of us can Teamviewer and set you up. :)
     
  9. whitlock

    Joined:
    Oct 2, 2015
    Messages:
    44
    Likes Received:
    2
    I followed all the steps its not giving me any errors its opening Runemate when I compile but my test bot isn't showing up even going into development mode I change the directory and its not showing my scripts bots
     
  10. alkimista

    Joined:
    Dec 11, 2014
    Messages:
    348
    Likes Received:
    17
    realy helpfull also on mac os, thank :)
     
  11. DrewChrist

    Joined:
    Jun 28, 2015
    Messages:
    39
    Likes Received:
    3
    I'm having the same issue as whitlock is there any chance we can get some help with this?
     
  12. nrkoo

    Joined:
    Oct 13, 2015
    Messages:
    10
    Likes Received:
    1
    What about DarkScape in the part where I need to input my forum credentials and the game type? DS? or what?
     
  13. Oh Gawd

    Joined:
    Sep 25, 2015
    Messages:
    8
    Likes Received:
    1
    I have a space in my name, so how exactly would that work? It won't log in automatically even if I enter a space.
     
  14. youramazingames

    Joined:
    Oct 24, 2015
    Messages:
    8
    Likes Received:
    4
    Its DARK
    Not DS
     
  15. Saiyan

    Joined:
    Sep 26, 2015
    Messages:
    13
    Likes Received:
    1
    Does this work for spectre?
     
  16. DevTucker

    Joined:
    May 1, 2016
    Messages:
    42
    Likes Received:
    7
    Doesn't seem so, Unless I'm doing something wrong.
     
  17. Serene

    Serene ( ͡° ͜ʖ ͡°)

    Joined:
    Mar 30, 2015
    Messages:
    1,064
    Likes Received:
    239
    This setup worked fine for me with spectre.
     
  18. Party

    Party The Favourite

    Joined:
    Oct 12, 2015
    Messages:
    2,607
    Likes Received:
    1,126
    com.runemate.boot.Boot (if you're still having an issue)
     
    Sh4dows likes this.
  19. DevTucker

    Joined:
    May 1, 2016
    Messages:
    42
    Likes Received:
    7
    Was an issue with IntelliJ and Spectre. I have to launch spectre manually in -sdk mode. Launching it from the IDE causes 32bit/64bit issues even with proper run configurations.
     
  20. BearJollyMan

    Joined:
    Jun 21, 2016
    Messages:
    2
    Likes Received:
    0
    The debug picture is invalid, can you update it?
     

Share This Page

Loading...