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
  • Quest state and dialogue


    Skinners

    Recommended Posts

    Hello. 
    I figured it would be smart if my scripts kept track on how far into the quest they have gotten. I am currently stuck in a situation, where I dont know how to check the current state of the quest (Lets take the Quest Romeo and Juliet as an example). 
    For the development of the script I use flags (booleans) to check if certain requirements have been fulfilled (like starting the quest at Romeo in center Varrock). For this I used: 

    if(Quests.isStarted(FreeQuest.ROMEO_AND_JULIET)){flags goes true/false}
    

    Next in the quest I am supposed to have a chat with Juliet, and this is where things goes south. There is a lot of cut scenes (where screen is black or NPC is walking). 
    I want to continue the dialogue with Juliet until a state in the quest log have been fulfilled (which means I can continue with the quest)... 
    How do check if a certain thing in the QuestLog have been fulfilled? 

    Link to comment
    Share on other sites

    Just a wild guess, but maybe you could click to view the quest scroll, then use widgets to get a list item and check against text colour?

    Widgets.getWidgetChild(xxx).getTextColor()
    Link to comment
    Share on other sites

    Enable developer mode on your client, open up Game Explorer, and go to Playersettings option. This is what you need to keep track of. For example you'll notice that when you advance in a quest -- you'll see it in the Playersettings tab. It's a bit annoying to learn it as it has a bit of a learning curve, but that's the best way. Then you can just do states or nodes, whatever you prefer.

    Link to comment
    Share on other sites

    Romeo & Juliet is one of the older quests so its unlikely you will have nice PlayerSettings to work with, like @una_maquina said id grab all the player settings for the quest then go from there. you will have to build some logic around handling the cutscenes but from what i remember when your in a cutscene a PlayerSetting is updated so you can use that

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • 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.