I use this:
public void onMessage(Message message) throws java.lang.InterruptedException {
String txt = message.getMessage().toLowerCase();
if (txt.contains("the fire catches")) {
firesMade++;
}
}
Good luck!
Version: 1.04.269
Cosole output:
[ERROR][Bot #1][03/22 02:45:47 PM]: Error in script executor!
java.lang.NullPointerException
at org.osbot.rs07.api.Widgets.isVisible(zg:60)
at org.osbot.rs07.api.Widgets.isVisible(zg:55)
at org.osbot.rs07.api.DepositBox.isOpen(ii:140)
at ClayMiner.Miner.bank(Miner.java:104)
at ClayMiner.Miner.onLoop(Miner.java:88)
at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(dl:173)
at java.lang.Thread.run(Unknown Source)
Script: private clayminer.
Hooks that failed: DepositBox, would not deposit, interface was open but would not do anything.
JVM bit version: 32
Isn't there a method in the API to select a specific option? I can't make an example method right now cause I shut down my PC cause I'm going to bed in a few minutes.
Well you try to see if a boolean is true but you dont check a variable, when programming you can't just put plain text like you have in line 20 in the if statement.
And for the coin id it should be 995 if I remember correctly
Yes put the coin thing at the beginning of your loop.
To define the npc:
NPC gardener = npcs.closest("Wyson the gardener");
(Also make sure you import NPC).
Line 20 you forgot the brackets at the if statement it should be:
if(code here) {
}
Line 30: You want to get to the NPC but you try to define it as an object.
Line 31: You try to interact with a variable called stall but that's never made.
Line 32: Same as 31.
For the coin thing:
if(!(inventory.getAmount(COINID) < 20)) {
stop();
}
Yeah I thought it would automatically count up but it didn't I logged it to the console to see and it just pasted it right after, I'll go report it in a few minutes.