Jump to content

Is there something wrong with getQuests().isComplete()?


Recommended Posts

Posted (edited)

It's like it wants to work sometimes and sometimes it just doesn't. I made a script that handles a few f2p quests for me but it randomly locks up in different areas on different accounts. If it gets locked up and I close the client and let the bot manager open it back up it begins to work again. Just wondering if its something with these functions or something that's broken in my code itself?

Edit. It seems to be locking up on completion of quests.

Edited by Alakazizam
Posted (edited)

This is the basic loop I'm using. I have logs put in place for troubleshooting but when it locks up the only log that gets put out is my 'start' log

 

public int onLoop() throws InterruptedException {
        if(!myPlayer().isMoving() || !myPlayer().isAnimating()) {
            getTabs().open(Tab.INVENTORY);
            log("start");
            if (PreparedToQuest) {
                if (getDialogues().inDialogue()) {
                    log("Handling dialogue");
                    HandleDialogue();
                } else if (getQuests().isComplete(Quests.Quest.RUNE_MYSTERIES)) {
                    log("Wrapping it up");
                    Step06WrapItUp();
                } else if (getQuests().isComplete(Quests.Quest.WITCHS_POTION)) {
                    log("doing Final Stretch");
                    Step05FinalStretch();
                } else if (getQuests().isComplete(Quests.Quest.GOBLIN_DIPLOMACY)) {
                    log("doing Witches Potion");
                    Step04Witch();
                } else if (getQuests().isComplete(Quests.Quest.DORICS_QUEST)) {
                    log("doing Goblin Diplomacy");
                    Step03Goblin();
                } else if (!getQuests().isComplete(Quests.Quest.DORICS_QUEST) && inventory.contains("Iron ore")) {
                    log("doing Dorics Quest");
                    Step02Doric();
                }
            } else {
                log("preparing");
                Step01Prepare();
            }
        } else {
            log("flag 1");
        }
        return 602;

 

Edited by Alakazizam
Posted
6 hours ago, Khaleesi said:

Happends sometimes when you complete a quest, I guess it doesn't refresh.
Just check the config value yourself and use that :)

It's kind of weird. That "Final Stretch" involves like 5 quests, it does steps in an efficient order instead of just doing the quest and moving to the next one. 
But if I finish Imp Catcher or Cooks Assistant or something, Witches Potion starts returning false and the whole section just stops doing its thing.

I had this working great a couple weeks ago I wonder what changed. Oh well, I'll figure out those configs and rewrite it lol

 

Posted
2 hours ago, Alakazizam said:

It's kind of weird. That "Final Stretch" involves like 5 quests, it does steps in an efficient order instead of just doing the quest and moving to the next one. 
But if I finish Imp Catcher or Cooks Assistant or something, Witches Potion starts returning false and the whole section just stops doing its thing.

I had this working great a couple weeks ago I wonder what changed. Oh well, I'll figure out those configs and rewrite it lol

 

It's hard to tell what's wrong right away for me at this point, but try this and let me know :)

Posted
13 hours ago, Alakazizam said:

It's kind of weird. That "Final Stretch" involves like 5 quests, it does steps in an efficient order instead of just doing the quest and moving to the next one. 
But if I finish Imp Catcher or Cooks Assistant or something, Witches Potion starts returning false and the whole section just stops doing its thing.

I had this working great a couple weeks ago I wonder what changed. Oh well, I'll figure out those configs and rewrite it lol

 

Cooks Assistant (29)
- End value = 2

Imp Catcher (160)
- End value = 2

Witch's Potion(67)
- End value = 3

I grabbed these in 2019 so not sure if they are still valid or not. Just grabbed them from an old github repo. If they are good then just dm me on discord ill send u the old github source

  • Like 2
Posted
26 minutes ago, Chris said:

Cooks Assistant (29)
- End value = 2

Imp Catcher (160)
- End value = 2

Witch's Potion(67)
- End value = 3

I grabbed these in 2019 so not sure if they are still valid or not. Just grabbed them from an old github repo. If they are good then just dm me on discord ill send u the old github source

Thanks. I managed to find all the ones I needed aside from Dorics in the forums. A couple people started putting them together but it doesn't look like it was completed. I may collect them all myself and get them in 1 post since I'm sort of working on that anyway,

 

Quote
11 hours ago, Khaleesi said:

It's hard to tell what's wrong right away for me at this point, but try this and let me know :)

The configs worked, script runs smooth now 👍

  • Heart 1

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
  • Recently Browsing   0 members

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