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

Commit 09af946

Browse files
author
Explv
committed
Fix Cooks Assistant quest stuck after operating hopper controls.
v3.2.3
1 parent b6a7308 commit 09af946

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

src/main/java/activities/quests/CooksAssistant.java

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,6 @@ public class CooksAssistant extends QuestActivity {
4040
);
4141
private boolean operated = false;
4242
private boolean put = false;
43-
private final MessageListener MILL_MESSAGE_LISTENER = message -> {
44-
if (message.getType() != Message.MessageType.GAME) {
45-
return;
46-
}
47-
48-
String messageStr = message.getMessage();
49-
50-
if (messageStr.contains("There is already grain in the hopper.") ||
51-
messageStr.contains("You put the grain in the hopper.")) {
52-
put = true;
53-
return;
54-
}
55-
56-
if (messageStr.contains("You operate the hopper. The grain slides down the chute.")) {
57-
operated = true;
58-
return;
59-
}
60-
};
6143

6244
public CooksAssistant() {
6345
super(Quest.COOKS_ASSISTANT);
@@ -67,12 +49,10 @@ public CooksAssistant() {
6749
public void onStart() {
6850
depositAllBanking.exchangeContext(getBot());
6951
cookDialogueCompleter.exchangeContext(getBot());
70-
getBot().addMessageListener(MILL_MESSAGE_LISTENER);
7152
}
7253

7354
@Override
7455
public void onEnd() {
75-
getBot().removeMessageListener(MILL_MESSAGE_LISTENER);
7656
}
7757

7858
@Override
@@ -157,7 +137,9 @@ private void fillHopper() {
157137
}
158138

159139
if (hopper.interact("Use")) {
160-
Sleep.sleepUntil(() -> put, 15000);
140+
Sleep.sleepUntil(() -> myPlayer().isAnimating(), 5000);
141+
Sleep.sleepUntil(() -> !myPlayer().isAnimating(), 3000);
142+
put = true;
161143
}
162144
}
163145
}
@@ -175,7 +157,9 @@ private void operateHopper() {
175157
}
176158

177159
if (controls.interact("Operate")) {
178-
Sleep.sleepUntil(() -> operated, 10000);
160+
Sleep.sleepUntil(() -> myPlayer().isAnimating(), 5000);
161+
Sleep.sleepUntil(() -> !myPlayer().isAnimating(), 3000);
162+
operated = true;
179163
}
180164
}
181165
}

src/main/java/script/AIO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@ScriptManifest(author = "Explv", name = "Explv's AIO " + AIO.VERSION, info = "AIO", version = 0, logo = "http://i.imgur.com/58Zz0fb.png")
2929
public class AIO extends Script {
3030

31-
public static final String VERSION = "v3.2.2";
31+
public static final String VERSION = "v3.2.3";
3232

3333
private Gui gui;
3434
private Paint paint;

0 commit comments

Comments
 (0)