Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.
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
5 changes: 4 additions & 1 deletion src/sections/FightingSection.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public final class FightingSection extends TutorialSection {
private static final Area LADDER_AREA = new Area(3108, 9523, 3114, 9529);
private static final Area INSIDE_RAT_CAGE_GATE_AREA = new Area(3107, 9517, 3110, 9520);
private static final Area OUTSIDE_RAT_CAGE_GATE_AREA = new Area(3111, 9516, 3113, 9521);
private static final Area WRONG_DOOR = new Area(3090, 9508, 3097, 9496);

private final CachedWidget VIEW_EQUIPMENT_STATS_WIDGET = new CachedWidget(new WidgetActionFilter("View equipment stats"));

Expand Down Expand Up @@ -102,7 +103,9 @@ private boolean inRatCage() {
private void enterRatCage() {
if (!OUTSIDE_RAT_CAGE_GATE_AREA.contains(myPosition())) {
getWalking().walk(OUTSIDE_RAT_CAGE_GATE_AREA);
} else if (getObjects().closest("Gate").interact("Open")) {
} else if (getObjects()
.closest(ob -> ob.getName() != null && ob.getName().equals("Gate") && !WRONG_DOOR.contains(ob))
.interact("Open")) {
Sleep.sleepUntil(this::inRatCage, 5000, 600);
}
}
Expand Down