Jump to content

Quest class usage


b9s

Recommended Posts

Hey, I'm trying to make a bot for completing a quest. 

In the initial phase of the script I'd like to check if the quest is already started (or even completed), I try to do this in the following way: 

if (getQuests().isStarted(Quest.SHEEP_SHEARER)){
    doSomething();
}

However, when testing I found it returns false even though the quest IS started.

Am I doing something wrong here or has something changed on either the API side or RS' side that makes it no longer work? 

 

 

P.S. Yes it is Sheep Shearer and I'm already in the testing phase ;)

Edited by b9s
Link to comment
Share on other sites

OSBot quest class has been broken for a long time but a few months ago it was reworked because the webwalker had to verify if the user can access certain quest areas such as Morytania. It will now cache the quests on the first attempt to generate a webwalking path. So the problem is either the actual usage of the class was restricted to internal only and the API methods were not fixed or the quests have not been cached. You may be able to enforce the quest caching either by calling Walking#webWalk or Tabs#openTab for Tabs.QUESTS.

Link to comment
Share on other sites

The completion of quests are also registered as configs. If you only need the completion status of a few quests you can try to use configs instead.

 

So for example for sheep shearer the config ID is 179. If the value is 1 it has started and if the value is 21 it's completed.

 

Ideally Osbot should also use configs instead of their current system, but I can imagine that it can be tricky to get all the configs right. I have gathered a big list myself with most the configs for every quests, but cbf to share it here.

Edited by Xerion
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...