harrypotter Posted March 21, 2017 Share Posted March 21, 2017 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! Quote Link to comment Share on other sites More sharing options...
Container Posted March 21, 2017 Share Posted March 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
harrypotter Posted March 21, 2017 Author Share Posted March 21, 2017 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. Quote Link to comment Share on other sites More sharing options...
Container Posted March 21, 2017 Share Posted March 21, 2017 2 minutes ago, harrypotter said: 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. There's no shame in making your own method. Quote Link to comment Share on other sites More sharing options...
harrypotter Posted March 21, 2017 Author Share Posted March 21, 2017 (edited) 2 minutes ago, Container said: There's no shame in making your own method. Certainly isn't however I'd like to know the "proper" way to achieve this. I'd like to know the best practice Edited March 21, 2017 by harrypotter Quote Link to comment Share on other sites More sharing options...
Container Posted March 21, 2017 Share Posted March 21, 2017 Just now, harrypotter said: Certainly isn't however I'd like to know the "proper" way to achieve this. It's easier to lean using best practice at an early stage Wrong. It's easier to learn if you just try. You can always learn best practice later. Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted March 21, 2017 Share Posted March 21, 2017 That information is in configs Quote Link to comment Share on other sites More sharing options...
harrypotter Posted March 21, 2017 Author Share Posted March 21, 2017 Just now, Container said: Wrong. It's easier to learn if you just try. You can always learn best practice later. I'd disagree, I have a software development background and I know from first hand experience that trying to shift bad habits isn't easy, why not kill those bad habits before they develop? 1 Quote Link to comment Share on other sites More sharing options...
harrypotter Posted March 21, 2017 Author Share Posted March 21, 2017 4 minutes ago, Polymorphism said: That information is in configs How do you find these configs, is it documented in the API? Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted March 21, 2017 Share Posted March 21, 2017 4 minutes ago, harrypotter said: How do you find these configs, is it documented in the API? In the osbot debug options, turn configs on. Do something in the quest to proceed to the next stage (or even start the quest) and you'll see the id for that quest as well as the value which indicated progress. 1 Quote Link to comment Share on other sites More sharing options...
harrypotter Posted March 21, 2017 Author Share Posted March 21, 2017 1 minute ago, Polymorphism said: In the osbot debug options, turn configs on. Do something in the quest to proceed to the next stage (or even start the quest) and you'll see the id for that quest as well as the value which indicated progress. Brilliant, I'll look into this. Thanks! 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted March 21, 2017 Share Posted March 21, 2017 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. 4 Quote Link to comment Share on other sites More sharing options...
harrypotter Posted March 21, 2017 Author Share Posted March 21, 2017 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! Quote Link to comment Share on other sites More sharing options...
SSJG Posted March 21, 2017 Share Posted March 21, 2017 you'll need to pull some sorcery out of your ass 1 Quote Link to comment Share on other sites More sharing options...
harrypotter Posted March 21, 2017 Author Share Posted March 21, 2017 (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 March 21, 2017 by harrypotter Quote Link to comment Share on other sites More sharing options...