Setting up your development environment
Step 0 - Pre-requisites
- Basic knowledge of Git, PowBot API, and Intellij IDEA
- Basic knowledge of the Gradle build system (https://www.tutorialspoint.com/gradle/index.htm)
Step 1 - Creating a new project
Create a new project in Intellij IDEA. Make sure to select the options outlined below.
After clicking on 'Create', wait until all background tasks are finished in the bottom right corner.
Step 2 - Modifying the gradle build configs
To auto import all needed libraries, overwrite everything in the gradle.build.kts
with the text below
plugins {
id 'java' // Alternative id("java")
id "org.jetbrains.kotlin.jvm" version "1.5.21" // Alternative id("org.jetbrains.kotlin.jvm") version "1.5.21"
}
group 'org.proto' // If failing, alternatively use ""
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
google()
maven {
url = uri("https://repo.powbot.org/releases")
}
}
// If failing, alternatively use ""
dependencies {
implementation('org.powbot:client-sdk:1.+') // + means gradle will pull the latest libs on refresh of project
implementation('org.powbot:client-sdk-loader:1.+')
implementation('com.google.guava:guava:31.1-jre') // needed for @Subscribe annotations / event bus
implementation('com.fasterxml.jackson.core:jackson-core:2.13.0')
}
Make sure to refresh the gradle configs by either clicking on the little button that comes up on the top right of your screen, or by going to the gradle tab and clicking on the icon.
Step 3 - Start making your script!
You can now start working on your script, everything should be held in the src/main/java/org/example/
path.
Example repo
https://github.com/Protoprize/PowBot-Base-Gradle-Project