Jump to content

Quest API Queries


iamonkey

Recommended Posts

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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