Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.osbot.rs07.api.map.Area;
- import org.osbot.rs07.api.model.Entity;
- import org.osbot.rs07.script.Script;
- import org.osbot.rs07.script.ScriptManifest;
- import org.osbot.rs07.utility.ConditionalSleep;
- import java.awt.*;
- @ScriptManifest(name = "WtfQuest", author = "Gunn", version = 1.0, info = "", logo = "")
- public class Skeleton extends Script {
- //public SheepShearer sheepShearer = new SheepShearer();
- public Skeleton() throws InterruptedException {
- }
- @Override
- public void onStart () {
- //Code here will execute before the loop is started
- }
- @Override
- public void onExit () {
- //Code here will execute after the script ends
- }
- @Override
- public int onLoop () throws InterruptedException {
- WalkToQuestStart();
- TalkToFredFirst();
- return 100; //The amount of time in milliseconds before the loop starts over
- }
- @Override
- public void onPaint (Graphics2D g){
- //This is where you will put your code for paint(s)
- }
- private void WalkToQuestStart() {
- Area houseFredFarmer = new Area(3192, 3270, 3184, 3279);
- getWalking().webWalk(houseFredFarmer);
- }
- private void TalkToFredFirst() throws InterruptedException {
- // Creating NPC
- Entity FredTheFarmer = getNpcs().closest("Fred the Farmer");
- if (!dialogues.inDialogue()) {
- if (FredTheFarmer != null) {
- if (FredTheFarmer.isVisible()) {
- if (FredTheFarmer.interact("Talk-to")) {
- new ConditionalSleep(random(1000, 2000)) {
- public boolean condition() throws InterruptedException {
- return dialogues.inDialogue();
- }
- }.sleep();
- }
- } else {
- getCamera().toEntity(FredTheFarmer);
- }
- }
- } else {
- if (dialogues.isPendingOption()) {
- dialogues.completeDialogue("I'm looking for a quest.", "Yes okay. I can do that.", "Of course!","I'm something of an expert actually!");
- sleep(random(400, 900));
- }
- if (dialogues.isPendingContinuation()) {
- dialogues.clickContinue();
- sleep(random(400, 900));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment