Skip to content

Commit

Permalink
Merge pull request #40 from GigiaJ/main
Browse files Browse the repository at this point in the history
yeehaw
  • Loading branch information
GigiaJ authored Jun 29, 2024
2 parents 5f9e949 + eff3455 commit de3b7fc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
20 changes: 14 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ repositories {
mavenCentral()
}

def lastSupportedVersion = "1.10.32.1"
def runeLiteVersion = getRuneLiteVersion()
def supportedCheck = false
if (supportedCheck) {
if (runeLiteVersion != lastSupportedVersion) {
println("Warning - client has been updated")
throw new Exception("Out of date (last supported: " + lastSupportedVersion + " current client: " + runeLiteVersion + ")")
}
}

static def getRuneLiteVersion() {
URL url = new URL("http://repo.runelite.net/net/runelite/client/maven-metadata.xml")
Expand All @@ -41,7 +49,7 @@ dependencies {
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'

implementation project(":OSRSBot")
//implementation project(":OSRSBot")

implementation group: 'net.runelite', name: 'client', version: runeLiteVersion

Expand All @@ -56,10 +64,10 @@ dependencies {
testImplementation group: 'net.runelite', name:'jshell', version: runeLiteVersion
//We want these both at compile and at runtime.
//So we use implementation instead of compileOnly or runtimeOnly
//implementation 'com.github.OSRSB:OSRSBot:master-SNAPSHOT'

implementation 'com.github.OSRSB:OSRSBot:master-SNAPSHOT'
//implementation 'com.github.OSRSB:DaxWalkerOSRSBot:master-SNAPSHOT'
implementation project(":DaxWalkerRSB")
//implementation project(":DaxWalkerRSB")
}

group = 'osrsb'
Expand Down Expand Up @@ -134,7 +142,7 @@ class ScriptTask extends DefaultTask {

def copyLargeDir(File dirFrom, File dirTo) {
if (!dirTo.exists()) {
dirTo.mkdir()
dirTo.mkdir();
}

dirFrom.eachFile(groovy.io.FileType.FILES) { File source ->
Expand Down Expand Up @@ -233,4 +241,4 @@ task dockerComposeWithWireGuardForceBuild(type: Exec) {
group = "Docker"
commandLine 'docker', 'compose', '-f', 'docker-compose-wireguard.yml', 'build', '--no-cache', 'script'
commandLine 'docker', 'compose', '-f', 'docker-compose-wireguard.yml', 'up', '--build', '--force-recreate', '--no-deps', '-d'
}
}
24 changes: 12 additions & 12 deletions src/main/java/basicloopbot/Main.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package basicloopbot;

import dax_api.api_lib.DaxWalker;
import dax_api.api_lib.models.DaxCredentials;
import dax_api.api_lib.models.DaxCredentialsProvider;
//import dax_api.api_lib.DaxWalker;
//import dax_api.api_lib.models.DaxCredentials;
//import dax_api.api_lib.models.DaxCredentialsProvider;
import net.runelite.rsb.methods.Methods;
import net.runelite.rsb.methods.NPCs;
import net.runelite.rsb.script.Script;
import net.runelite.rsb.script.ScriptManifest;
import net.runelite.rsb.wrappers.RSNPC;
import net.runelite.rsb.wrappers.RSPath;
import net.runelite.rsb.wrappers.subwrap.WalkerTile;
//import net.runelite.rsb.wrappers.subwrap.WalkerTile;

import java.util.logging.Logger;

Expand All @@ -24,7 +24,7 @@ public class Main extends Script {

private final int MIN = random(250, 400); // Random minimum value for our loop
private final int MAX = random(700, 900); // Random maximum value for our loop
private final WalkerTile chickenCoop = new WalkerTile(3233, 3295, 0);
//private final WalkerTile chickenCoop = new WalkerTile(3233, 3295, 0);

@Override
public int loop() {
Expand Down Expand Up @@ -74,7 +74,7 @@ public int loop() {
} else {
// Chicken is null, we should find one
Logger.getLogger(getClass().getName()).info("Walking");
DaxWalker.walkTo(chickenCoop);
//DaxWalker.walkTo(chickenCoop);
}
} catch (NullPointerException e) {
e.printStackTrace();
Expand All @@ -88,12 +88,12 @@ public int loop() {
@Override
public boolean onStart() {
// Pass DaxWalker credentials
DaxWalker.setCredentials(new DaxCredentialsProvider() {
@Override
public DaxCredentials getDaxCredentials() {
return new DaxCredentials("sub_DPjXXzL5DeSiPf", "PUBLIC-KEY");
}
});
//DaxWalker.setCredentials(new DaxCredentialsProvider() {
// @Override
// public DaxCredentials getDaxCredentials() {
// return new DaxCredentials("sub_DPjXXzL5DeSiPf", "PUBLIC-KEY");
// }
//});
return true;
}
}

0 comments on commit de3b7fc

Please sign in to comment.