completeDialogue(java.lang.String... options)
Completes the current dialogue using the specified options when available.
How exactly should I use this so he picks the first option?
This is the code I currently have, Eclispe is giving an error at each line starting with "Dialogues.", what's the proble there and how can I solve it? DO you guys have any other suggestions on things I could improve?
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.api.Dialogues;
import java.awt.*;
@ScriptManifest(author = "Me", info = "Buys Woad leaves from Wyson the gardener in Falador Park", name = "Woad Leaf Buyer", version = 0.1, logo = "")
public class main extends Script {
@Override
public void onStart() {
log("Woad Leaf Buyer has started.");
}
@Override
public int onLoop() throws InterruptedException {
if(!(inventory.getAmount(995) < 20)) {
stop();
}
NPC gardener = npcs.closest("Wyson the gardener");
if (gardener != null) {
gardener.interact("Talk-to");
return random(200, 300);
Dialogues.clickContinue();
return random(200, 300);
Dialogues.clickContinue();
return random(200, 300);
Dialogues.selectOption(2, 1);
return random(200, 300);
Dialogues.clickContinue();
return random(200, 300);
Dialogues.clickContinue();
return random(200, 300);
Dialogues.selectOption(4, 4);
return random(200, 300);
Dialogues.clickContinue();
return random(200, 300);
Dialogues.clickContinue();
return random(200, 300);
Dialogues.clickContinue();
}
return random(200, 300);
}
@Override
public void onExit() {
log("Thanks for running my first script");
}
@Override
public void onPaint(Graphics2D g) {
}
}