- Joined
- Mar 14, 2017
- Messages
- 156
- Thread Author
- #1
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
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
@Party
@Cloud
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