7
7
import org .aio .paint .MouseTrail ;
8
8
import org .aio .paint .Paint ;
9
9
import org .aio .tasks .Task ;
10
+ import org .aio .tasks .TutorialIslandTask ;
10
11
import org .aio .tasks .task_executor .TaskExecutor ;
11
12
import org .aio .util .SkillTracker ;
12
13
import org .aio .util .event .EnableFixedModeEvent ;
25
26
import java .util .List ;
26
27
import java .util .Optional ;
27
28
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" )
29
30
public class AIO extends Script {
30
31
31
32
private Gui gui ;
@@ -140,7 +141,7 @@ private List<Task> loadTasksFromGUI() throws InterruptedException {
140
141
141
142
@ Override
142
143
public int onLoop () throws InterruptedException {
143
- if (!osrsClientIsConfigured && ! Tab . SETTINGS . isDisabled ( getBot () )) {
144
+ if (!osrsClientIsConfigured && osrsClientIsConfigurable ( )) {
144
145
osrsClientIsConfigured = configureOSRSClient ();
145
146
} else if (taskExecutor .isComplete ()) {
146
147
stop (true );
@@ -150,6 +151,14 @@ public int onLoop() throws InterruptedException {
150
151
return random (200 , 300 );
151
152
}
152
153
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
+
153
162
private boolean configureOSRSClient () {
154
163
if (!EnableFixedModeEvent .isFixedModeEnabled (getBot ().getMethods ())) {
155
164
execute (new EnableFixedModeEvent ());
0 commit comments