1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved Quests API Functions

Discussion in 'Client & Site Support' started by sickness0666, May 21, 2017.

  1. sickness0666

    Joined:
    Mar 14, 2017
    Messages:
    156
    Likes Received:
    48
    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 (Text):
    1.  
    2. public Quest getQuest(String questName){
    3.    return Quests.getAll().stream()
    4.          .filter(quest -> quest.getName().equals(questName))
    5.          .findFirst()
    6.          .get();
    7. }
    8.  
    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 (Text):
    1.  
    2. java.util.NoSuchElementException: No value present
    3.     at java.util.Optional.get(Optional.java:135)
    4.     at com.sickness0666.bots.sickquester.SickQuests.getQuest(SickQuests.java:131)
    5.     at com.sickness0666.bots.sickquester.RootBranch.validate(RootBranch.java:32)
    6.     at com.runemate.game.api.script.framework.tree.TreeBot.onLoop(ocb:76)
    7.     at com.runemate.game.api.script.framework.LoopingBot.run(rab:13)
    8.     at com.runemate.game.api.script.framework.AbstractBot.start(kdb:11252)
    9.     at nul.iiiIiIiiIiiiI.run(bec:72)
    10.  

    @Party
    --- Double Post Merged, May 21, 2017, Original Post Date: May 13, 2017 ---
    @Cloud
     
  2. Best Answer:
    Post #2 by Cloud, May 22, 2017
  3. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    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.
     

Share This Page

Loading...