Jump to content

Quest API Queries


Recommended Posts

Posted

Has anyone noticed quest queries such as isStarted() or isComplete() seem to be dysfunctional? If the bot starts a quest, I have to restart the entire client (OSBot client using mirror mode) for the script to actually see that the quest has been started. I've seen a lot of other posts in the past about the quest API not working, is this just a bug that has never been fixed? Is it basically deprecated, or maybe I am using it wrong? Here's an example of what I'm doing:

if(getQuests().isStarted(Quest.COOKS_ASSISTANT)){
	//do something
}

From the documentation, it looks like a forgotten function. Perhaps I am running into a caching issue and that is why the client must be restarted, how would I fix that otherwise?

oh5N9z8.png

Also, what are some alternative and reliable methods for querying if a quest is started? I saw a post about configs but I have no idea how to go about using those.

Posted
11 hours ago, iamonkey said:

Has anyone noticed quest queries such as isStarted() or isComplete() seem to be dysfunctional? If the bot starts a quest, I have to restart the entire client (OSBot client using mirror mode) for the script to actually see that the quest has been started. I've seen a lot of other posts in the past about the quest API not working, is this just a bug that has never been fixed? Is it basically deprecated, or maybe I am using it wrong? Here's an example of what I'm doing:


if(getQuests().isStarted(Quest.COOKS_ASSISTANT)){
	//do something
}

From the documentation, it looks like a forgotten function. Perhaps I am running into a caching issue and that is why the client must be restarted, how would I fix that otherwise?

oh5N9z8.png

Also, what are some alternative and reliable methods for querying if a quest is started? I saw a post about configs but I have no idea how to go about using those.

Configs are like settings parsed from the game. Most of the things you do in the game have a config setting, such as turning on the run energy orb to 'On'.
You can verify or debug such things with the OSBot client debug tools in the settings menu. It will be labeled 'Config debugger' or something similar.

You can then read the what values are changing while playing the game. For example, say the main config value for the run orb is 107.

Code Example:

// Get the value of the config and store it as an integer value (Keeping the decimal format of the debugger)
int value = getConfigs().get(107);

Then we can handle logic when we know the correct value is enabled.
if (value == 1)
   // We are running
else
   // We are walking

 

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