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

Commit 99d468a

Browse files
ExplvExplv
authored andcommitted
- Fix script crashing after break
- Add tooltip text to loadout panel
1 parent b8f5333 commit 99d468a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

AIO/src/org/aio/gui/utils/LoadoutPanel.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,13 @@ public void actionPerformed(final ActionEvent e) {
228228
setItemDialog().ifPresent(item -> {
229229
equipmentMap.put(equipmentSlot, item);
230230

231+
JButton sourceButton = (JButton) e.getSource();
232+
233+
sourceButton.setToolTipText(item);
234+
231235
Optional<URL> iconURL = getIcon(ItemGuide.getAllGEItems().get(item));
232236

233237
if (iconURL.isPresent()) {
234-
JButton sourceButton = (JButton) e.getSource();
235238
sourceButton.setIcon(new ImageIcon(iconURL.get()));
236239
}
237240
});

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
import org.aio.util.event.EnableFixedModeEvent;
1414
import org.aio.util.event.ToggleRoofsHiddenEvent;
1515
import org.aio.util.event.ToggleShiftDropEvent;
16+
import org.aio.util.widget.CachedWidget;
1617
import org.json.simple.JSONObject;
1718
import org.osbot.rs07.api.ui.Tab;
19+
import org.osbot.rs07.randoms.WelcomeScreen;
1820
import org.osbot.rs07.script.Script;
1921
import org.osbot.rs07.script.ScriptManifest;
2022

@@ -29,7 +31,7 @@
2931
@ScriptManifest(author = "Explv", name = "Explv's AIO " + AIO.VERSION, info = "AIO", version = 0, logo = "http://i.imgur.com/58Zz0fb.png")
3032
public class AIO extends Script {
3133

32-
static final String VERSION = "v2.1.1";
34+
static final String VERSION = "v2.1.2";
3335

3436
private Gui gui;
3537
private Paint paint;
@@ -143,7 +145,9 @@ private List<Task> loadTasksFromGUI() throws InterruptedException {
143145

144146
@Override
145147
public int onLoop() throws InterruptedException {
146-
if (!osrsClientIsConfigured && osrsClientIsConfigurable()) {
148+
if (!getClient().isLoggedIn() || getWidgets().isVisible(WelcomeScreen.INTERFACE)) {
149+
return random(1200, 1800);
150+
} else if (!osrsClientIsConfigured && osrsClientIsConfigurable()) {
147151
osrsClientIsConfigured = configureOSRSClient();
148152
} else if (taskExecutor.isComplete()) {
149153
stop(true);

0 commit comments

Comments
 (0)