Jump to content

Tutorial Island Completer v1.0 [+Other Features]


Recommended Posts

Posted (edited)

Tutorial island completer v1.0

 

 

Have a new account, start bot, select what you want in the GUI, click start smile.png

 

Features:

- Reliable

- Gives random appearance

- Can be started anywhere (but must be close to npc)

- Can train at chickens or walk to GE when done.

- Paint with runtime and settings will be shown

 

Bugs:

- There might be a bug in what happens after tutorial island (it's not thoroughly tested tbh)

 

Please request additional features

 

dDV24Qw.png

yBUJFfy.png

 

 

Download:

Instructions:

Go to C:\Users\YourUserName\OSBot\Scripts, place the .jar in there, start bot

Edited by xabdullahx
  • Like 8
Posted (edited)

Very nice, reading through the code, it looks nice. :- )

 

I think the structure i came up with, works pretty nice, its easy to add new functions, debug errors, and i pretty much have control of everything that happens all the time. It is inspired by the Task structure

 

The gui stuff is a bit messy, it was added quickly, minutes before release

Edited by xabdullahx
Posted

Dude I'm literally developing a VERY similar thing hahaha. At the moment it does exactly this. I'm planning on adding loads of other things though :/

Good job with the tut island, I know how annoying it can be.

 

Hehe, well, it's a good start to learning the osbot API, unfortunately, some methods do not work as intended in tutorial island. If you need help, i can provide it :)

Posted

Hehe, well, it's a good start to learning the osbot API, unfortunately, some methods do not work as intended in tutorial island. If you need help, i can provide it smile.png

 

Haha, yeah man I know all your troubles. Thanks for the offer, but I've finished now lol. But it would be good to hear your opinion on some things. In particular clicking continue on interactions, wow that was fun to get around. Also I noticed the way your of deciding which step you were on is a bit hacky. I used the progression bar widget to see which step I was on. Here's my method:

	private int getState() {
		for (int i = 1; i < 21; i++) {
			if (s.widgets.get(371, i) != null && s.widgets.get(371, i).getTextColor() == 0) {
				if (debug) s.log("Getting state" + (i - 1));
				return i - 1;
			}
		}
		return -1;
	}
Posted

Testing this now. Looks awesome smile.png

 

Great :)! Cant wait to hear what you think.

Also, make sure to download the latest version, i've updated it just now

 

Haha, yeah man I know all your troubles. Thanks for the offer, but I've finished now lol. But it would be good to hear your opinion on some things. In particular clicking continue on interactions, wow that was fun to get around. Also I noticed the way your of deciding which step you were on is a bit hacky. I used the progression bar widget to see which step I was on. Here's my method:

	private int getState() {
		for (int i = 1; i < 21; i++) {
			if (s.widgets.get(371, i) != null && s.widgets.get(371, i).getTextColor() == 0) {
				if (debug) s.log("Getting state" + (i - 1));
				return i - 1;
			}
		}
		return -1;
	}

 

Using the progress bar is a good idea, when i started the bot, i didnt know about widgets and what they could do. so, instead, i look for npcs around me and determine where i am. Progressbar is definitely a good way to do it!

 

 

I made these two methods for checking if "click here to continue" is available:

public boolean getPendingContinuation(){
return getScript().getWidgets().get(231,2) != null || getScript().getWidgets().get(193,2) != null || getScript().getWidgets().get(217,2) != null || getScript().getWidgets().get(229,1) != null || getScript().getWidgets().get(11,3) != null;
}
public boolean getOtherPendingContinuation(){
    return getScript().getWidgets().get(162,33) != null;
}

Also, these methods, i made before knowing that i could check getMessage to see if it contains the text i want ("click here to continue"). But they work great, and is a great way around getDialogue.getPendingContinuation().

 

The getOtherPendingContinuation() detects that other message that has bold text and the click here to continue is a bit further up

Posted

 

Haha, yeah man I know all your troubles. Thanks for the offer, but I've finished now lol. But it would be good to hear your opinion on some things. In particular clicking continue on interactions, wow that was fun to get around. Also I noticed the way your of deciding which step you were on is a bit hacky. I used the progression bar widget to see which step I was on. Here's my method:

	private int getState() {
		for (int i = 1; i < 21; i++) {
			if (s.widgets.get(371, i) != null && s.widgets.get(371, i).getTextColor() == 0) {
				if (debug) s.log("Getting state" + (i - 1));
				return i - 1;
			}
		}
		return -1;
	}

 

The best way to determine progress is using configs. There is a config for every quest including Tutorial Island. The value of that config changes for each stage of the quest. So your code would just look like:

switch (getConfigs().get(SOME_CONFIG_ID)) {
    case 0:
        // do something
        break;
    case 10:
        // do something else
        break;
}
  • Like 1
Posted

 

The best way to determine progress is using configs. There is a config for every quest including Tutorial Island. The value of that config changes for each stage of the quest. So your code would just look like:

switch (getConfigs().get(SOME_CONFIG_ID)) {
    case 0:
        // do something
        break;
    case 10:
        // do something else
        break;
}

Yeah I saw that comment on your tutorial island thread, but by that time I already had the Widget thing, and I thought it was pretty inventive so I stuck with. Basically the same thing so works either way :P the progression bar more than likely works off those configs. Don't take this away from me Explv D:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...