Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Quests API Functions

Joined
Mar 14, 2017
Messages
156
when using the quest functions, (testing on osrs atm), no matter what you feed into Quests.get(String) it always returns the information for Plague City quest (same thing if you do Quests.get("") )

also, because the quests filter is based on the quest name color (remember that being mentioned within slack), if you hover over a quest, it turns white, which isnt within the red, yellow, green search

i switched over to this to bypass the issues with only returning Plague City

Code:
public Quest getQuest(String questName){
   return Quests.getAll().stream()
         .filter(quest -> quest.getName().equals(questName))
         .findFirst()
         .get();
}

this works well for me, but if the quest gets hovered over (text color changes to white), i get a no such element option with it, (Line 131 of the main class where the error occurs is the ".get();" portion of the above

Code:
java.util.NoSuchElementException: No value present
    at java.util.Optional.get(Optional.java:135)
    at com.sickness0666.bots.sickquester.SickQuests.getQuest(SickQuests.java:131)
    at com.sickness0666.bots.sickquester.RootBranch.validate(RootBranch.java:32)
    at com.runemate.game.api.script.framework.tree.TreeBot.onLoop(ocb:76)
    at com.runemate.game.api.script.framework.LoopingBot.run(rab:13)
    at com.runemate.game.api.script.framework.AbstractBot.start(kdb:11252)
    at nul.iiiIiIiiIiiiI.run(bec:72)


@Party
 
@Cloud
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
In the next release, it'll detect quests that are white but report it's state as UNKNOWN (impossible to determine). Regarding the first point, I think I'll have that fixed too but I'll need you to confirm.
 
Top