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
  • Dialogues.getNPCName


    Recommended Posts

    I'm trying to make some sort of generic condition. Is there a method in the API that does as stated in title in the API. Trying to make sure the Player is in a dialogue (talking) to a specific NPC. 

    Following works initally but after the first Dialogue appears the Player is no longer interacting and thus fails.

    Dialogues.inDialogue() && Players.localPlayer().isInteracting(NPCs.closest(getNPCname()))

    I could manually use the Widgets API and scrape the name of the NPC from the text box but that seems prone to breaking later if different id's are used..

    Link to comment
    Share on other sites

    Hey you can check if youre in a dialouge and use 


    to get the npc youre interacting with  :) 

    Link to comment
    Share on other sites

    Definitely checking out this method. Alright I actually just tried this and it seems to do exactly what I want. Thank you very much!

    I assume the players loses the 'interaction' with the NPC but not the other way around somehow?

    Link to comment
    Share on other sites


    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.