Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Commit 45694ec

Browse files
ExplvExplv
authored andcommitted
Fix #58 - Client settings not being configured when player starts on Tutorial Island
1 parent 4cf4e57 commit 45694ec

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

AIO/src/org/aio/activities/tutorial_island/RuneScapeGuideSection.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ public final void onLoop() throws InterruptedException {
6464
isAudioDisabled = disableAudio();
6565
} else if (!getSettings().areRoofsEnabled()) {
6666
toggleRoofsHidden();
67-
} else if (!getSettings().isShiftDropActive()) {
68-
toggleShiftDrop();
6967
} else if (getObjects().closest("Door").interact("Open")) {
7068
Sleep.sleepUntil(() -> getProgress() != 10, 5000, 600);
7169
}

AIO/src/org/aio/script/AIO.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.aio.paint.MouseTrail;
88
import org.aio.paint.Paint;
99
import org.aio.tasks.Task;
10+
import org.aio.tasks.TutorialIslandTask;
1011
import org.aio.tasks.task_executor.TaskExecutor;
1112
import org.aio.util.SkillTracker;
1213
import org.aio.util.event.EnableFixedModeEvent;
@@ -25,7 +26,7 @@
2526
import java.util.List;
2627
import java.util.Optional;
2728

28-
@ScriptManifest(author = "Explv", name = "Explv's AIO v4.0", info = "AIO", version = 4.0, logo = "http://i.imgur.com/58Zz0fb.png")
29+
@ScriptManifest(author = "Explv", name = "Explv's AIO v4.1", info = "AIO", version = 4.1, logo = "http://i.imgur.com/58Zz0fb.png")
2930
public class AIO extends Script {
3031

3132
private Gui gui;
@@ -140,7 +141,7 @@ private List<Task> loadTasksFromGUI() throws InterruptedException {
140141

141142
@Override
142143
public int onLoop() throws InterruptedException {
143-
if (!osrsClientIsConfigured && !Tab.SETTINGS.isDisabled(getBot())) {
144+
if (!osrsClientIsConfigured && osrsClientIsConfigurable()) {
144145
osrsClientIsConfigured = configureOSRSClient();
145146
} else if (taskExecutor.isComplete()) {
146147
stop(true);
@@ -150,6 +151,14 @@ public int onLoop() throws InterruptedException {
150151
return random(200, 300);
151152
}
152153

154+
private boolean osrsClientIsConfigurable() {
155+
return !Tab.SETTINGS.isDisabled(getBot()) &&
156+
!getDialogues().isPendingContinuation() &&
157+
!myPlayer().isAnimating() &&
158+
taskExecutor.getCurrentTask() != null &&
159+
!(taskExecutor.getCurrentTask() instanceof TutorialIslandTask);
160+
}
161+
153162
private boolean configureOSRSClient() {
154163
if (!EnableFixedModeEvent.isFixedModeEnabled(getBot().getMethods())) {
155164
execute(new EnableFixedModeEvent());

AIO/src/org/aio/tasks/task_executor/TaskExecutor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public TaskExecutor(final List<Task> tasks) {
2020
this.taskQueue.addAll(tasks);
2121
}
2222

23+
public Task getCurrentTask() {
24+
return currentTask;
25+
}
26+
2327
public void setTaskQueue(final List<Task> taskQueue) {
2428
this.taskQueue.clear();
2529
this.taskQueue.addAll(taskQueue);

0 commit comments

Comments
 (0)