zezima247 0 Share Posted April 21, 2020 hello everyone, can somebody please tell me how to check if quest is started. i tryd it like this: if(!getQuests().isStarted(Quest.THE_RESTLESS_GHOST)) { //code } but my IDE gives me error, im a noob at this so im still learning please tell me how to resolve this problem and how i can prevent this in other scripts. thanksss Link to comment Share on other sites More sharing options...
PapayaBrownie 1 Share Posted April 22, 2020 It's cause the type Quest at org.dreambot.api.methods.quest.Quest is depreciated. From lovely Google: Quote A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists. Compilers warn when a deprecated program element is used or overridden in non-deprecated code. You can use a @SupressWarnings("depreciation") at the top of your method IF the Quest enum works fine, but I would try look for an alternative as it probably was depreciated for a reason Link to comment Share on other sites More sharing options...
wettofu 109 Share Posted April 22, 2020 you should get the progress via playersettings Link to comment Share on other sites More sharing options...
zezima247 0 Author Share Posted April 22, 2020 8 hours ago, wettofu said: you should get the progress via playersettings i try to use this code if((getPlayerSettings().getConfig() {//codetoexecute} but im not sure how to use the debugger to see what has changed because i already started the quest so im not sure how to see if the quest is started and how to search it in the gamedebugger->player settings tab. i try to search in the widget tab and i found the id of the quest its 13 but i dont know if thats the id they mean to use in .getConfig() i learned java in 1week so im still trying to figure things out since im a php/web developer, so pleace be more specific if you can. thankss Link to comment Share on other sites More sharing options...
zezima247 0 Author Share Posted April 22, 2020 solved the problem by using the folowing method i came across instead of playersettings ( player settings is to confusing for beginners) so for the people that read this and had the same problem with there quest bot use this to see if the quest is: not started, in progress, or finished paste this above your if statements: int notStartedColor = 16711680; int inProgressColor = 16776960; int finishedColor = 901389; int QUEST = getQuestIndex("NAME_OF_YOUR_QUEST"); int textColor = getWidgets().getWidget(399).getChild(6).getChild(QUEST).getTextColor(); THEN USE THE STATEMENTS LIKE THIS: IF(textColor == notStartedColor) {EXECUTE THIS CODE} ELSE IF (textColor == inProgressColor) {EXECUTE THIS CODE} ELSE IF (textColor == finishedColor) {EXECUTE THIS CODE} im also new at this so maybe its not the propper way to do it but it works for me, Link to comment Share on other sites More sharing options...
wettofu 109 Share Posted April 22, 2020 6 hours ago, zezima247 said: i try to use this code if((getPlayerSettings().getConfig() {//codetoexecute} but im not sure how to use the debugger to see what has changed because i already started the quest so im not sure how to see if the quest is started and how to search it in the gamedebugger->player settings tab. i try to search in the widget tab and i found the id of the quest its 13 but i dont know if thats the id they mean to use in .getConfig() i learned java in 1week so im still trying to figure things out since im a php/web developer, so pleace be more specific if you can. thankss Well ima just leave this here if you ever want to use playersettings. To get the config and progress of quest, you have to pull up your player settings before starting the quest. Once you start it, there should be something like [23] [0] old [1] new, so if the quest wasn’t started it would be 0 and if the config is equal to 1 then that is when it’s started. Link to comment Share on other sites More sharing options...
zezima247 0 Author Share Posted April 22, 2020 3 hours ago, wettofu said: Well ima just leave this here if you ever want to use playersettings. To get the config and progress of quest, you have to pull up your player settings before starting the quest. Once you start it, there should be something like [23] [0] old [1] new, so if the quest wasn’t started it would be 0 and if the config is equal to 1 then that is when it’s started. thanks bro that helps alot, now we have 2 options for the community Link to comment Share on other sites More sharing options...
wettofu 109 Share Posted April 22, 2020 14 minutes ago, zezima247 said: thanks bro that helps alot, now we have 2 options for the community yea but I dont recommend your way as it works for a small amount of quests, a quest like corsair curse would be hell to do without playersettings, I would recommend that you use it just because once you understand the main points, itll be 2nd nature Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.