Jump to content

Quests


Recommended Posts

Posted
Just now, Container said:

Without knowing shit; MAYBE you can write a method that will open said quest window and check the text in the widget that opens. If widgetText == "Soemthing something" -> set quest progress. I don't know if there's anything in the API that does anything like that.

There's has to be another method to it as I've used @Token's Quest Script on a trial and it didn't have to check this kind of thing, so reluctant to implement such a method.

Posted
34 minutes ago, harrypotter said:

I'm continuing on with my learning on how to use the API, I'm currently looking into how to detect the current progress of a quest. I can see via the API that I can check if is quest is complete or started however I can't find anything that will assist in tracking the current progression of a quest?

Thanks for your help!

Use configs.

A config consists of an ID and a value. You can view them as they are updated by selecting the configs option in the OSBot settings.

As you progress through a quest, an associated config's value will be updated indicating the progress.

For example, I think for Tutorial Island the id is 281, so you get the progress using:

int progress = getConfigs().get(281);

This value will change as you progress, for example, when you start Tutorial Island it would be something like:

281 : 0

After you talk to the RuneScape Instructor it might be something like:

281 : 10

Etc.

There is a small section on this in my Scripting 101 tutorial, the link for which is in my signature.

  • Like 4
Posted
19 minutes ago, Explv said:

Use configs.

A config consists of an ID and a value. You can view them as they are updated by selecting the configs option in the OSBot settings.

As you progress through a quest, an associated config's value will be updated indicating the progress.

For example, I think for Tutorial Island the id is 281, so you get the progress using:

int progress = getConfigs().get(281);

This value will change as you progress, for example, when you start Tutorial Island it would be something like:

281 : 0

After you talk to the RuneScape Instructor it might be something like:

281 : 10

Etc.

There is a small section on this in my Scripting 101 tutorial, the link for which is in my signature.

Great, again thanks for you help!

Posted (edited)
1 hour ago, Explv said:

Use configs.

A config consists of an ID and a value. You can view them as they are updated by selecting the configs option in the OSBot settings.

As you progress through a quest, an associated config's value will be updated indicating the progress.

For example, I think for Tutorial Island the id is 281, so you get the progress using:

int progress = getConfigs().get(281);

This value will change as you progress, for example, when you start Tutorial Island it would be something like:

281 : 0

After you talk to the RuneScape Instructor it might be something like:

281 : 10

Etc.

There is a small section on this in my Scripting 101 tutorial, the link for which is in my signature.

This is great however I can't seem to check if a quest is actually started or not:

if (!script.getQuests().isStarted(Quests.Quest.IMP_CATCHER)) {
}

According to the API this should return a boolean: https://osbot.org/api/org/osbot/rs07/api/Quests.html#isStarted-org.osbot.rs07.api.Quests.Quest-

This is however throwing the following error:

[ERROR][Bot #1][03/21 01:41:24 PM]: Error in script executor!
java.lang.NullPointerException
	at ImpCatcher.run(ImpCatcher.java:20)
	at Quest.run(Quest.java:66)
	at Main.onLoop(Main.java:88)
	at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ih:18)
	at java.lang.Thread.run(Thread.java:745)

This would suggest that the following param is null:

Quests.Quest.IMP_CATCHER

Am I missing something obvious here?

Edit:- 

This was a problem with my class, resolved.

Edited by harrypotter

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...