Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • need help with my quest bot


    zezima247
     Share

    Recommended Posts

    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

    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

    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

    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

    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.

    Edited by wettofu
    Link to comment
    Share on other sites

    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

    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

    Edited by wettofu
    Link to comment
    Share on other sites

    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
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.