Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ public boolean run(GotrConfig config) {
if (lootChisel()) return;

if (waitingForGameToStart(timeToStart)) return;

if (!Rs2Inventory.hasItem("Uncharged cell") && !isInLargeMine() && !isInHugeMine()) {
takeUnchargedCells();
return;
}


if (powerUpGreatGuardian()) return;
if (repairCells()) return;
Expand Down Expand Up @@ -221,12 +227,27 @@ public boolean run(GotrConfig config) {
private boolean waitingForGameToStart(int timeToStart) {
if (isInHugeMine()) return false;
if (getStartTimer() > Rs2Random.randomGaussian(Rs2Random.between(20, 30), Rs2Random.between(1, 5)) || getStartTimer() == -1 || timeToStart > 10) {

takeUnchargedCells();

// Only take cells if we don't already have them
if (!Rs2Inventory.hasItem("Uncharged cell")) {
// If in large mine and need cells, leave first
if (isInLargeMine()) {
if (leaveLargeMine()) return true;
}
takeUnchargedCells();
// Return to large mine if we were there before
if (!isInLargeMine() && shouldMineGuardianRemains) {
if (Rs2Walker.walkTo(new WorldPoint(3632, 9503, 0), 20)) {
Rs2GameObject.interact(ObjectID.RUBBLE_43724);
return true;
}
}
}

repairPouches();

if (!shouldMineGuardianRemains) return true;

mineGuardianRemains();
return true;
}
Expand Down Expand Up @@ -276,7 +297,15 @@ private boolean powerUpGreatGuardian() {
}

private static void takeUnchargedCells() {
if (!Rs2Inventory.isFull() && !Rs2Inventory.hasItem("Uncharged cell")) {

if (!Rs2Inventory.hasItem("Uncharged cell")) {
// Drop one guardian essence if inventory is full
if (Rs2Inventory.isFull()) {
if (Rs2Inventory.drop(ItemID.GUARDIAN_ESSENCE)) {
Microbot.log("Dropped one Guardian essence to make space for Uncharged cell");
}
}

Rs2GameObject.interact(ObjectID.UNCHARGED_CELLS_43732, "Take-10");
log("Taking uncharged cells...");
Rs2Player.waitForAnimation();
Expand Down Expand Up @@ -575,13 +604,13 @@ public boolean isOutsideBarrier() {
&& Rs2Player.getWorldLocation().getRegionID() == 14484;
}

public boolean isInLargeMine() {
public boolean isInLargeMine() {
int largeMineX = 3637;
return Rs2Player.getWorldLocation().getRegionID() == 14484
&& Microbot.getClient().getLocalPlayer().getWorldLocation().getX() >= largeMineX;
}

public boolean isInHugeMine() {
public boolean isInHugeMine() {
int hugeMineX = 3594;
return Rs2Player.getWorldLocation().getRegionID() == 14484
&& Microbot.getClient().getLocalPlayer().getWorldLocation().getX() <= hugeMineX;
Expand Down