Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Difference between completeDialogueU and completeDialogue?

Featured Replies

Looking at the API it looks like they're identical with the exception of completeDialogueU not throwing java.lang.InterruptedException. Is it recommended to use one over the other?

 

completeDialogueU

 
public boolean completeDialogueU(java.lang.String... options)

Completes the current dialogue using the specified options when available.

WARNING - This method loops until either the player is not in a dialogue, the "Select an Option" menu does not contain any of the specified options, or an option selection event failed.

Parameters:
    options - The options to choose while completing the dialogue.
Returns:
    True if the player completed the dialogue successfully.

 

completeDialogue

 
public boolean completeDialogue(java.lang.String... options)
                         throws java.lang.InterruptedException

Completes the current dialogue using the specified options when available.

WARNING - This method loops until either the player is not in a dialogue, the "Select an Option" menu does not contain any of the specified options, or an option selection event failed.

Parameters:
    options - The options to choose while completing the dialogue.
Returns:
    True if the player completed the dialogue successfully.
Throws:
    java.lang.InterruptedException
 
 

I believe the difference is that completeDialogueU is surrounded in a try-catch, while the other is not.

So you can use completeDialogueU without having to catch the exception yourself.

Edited by BravoTaco

  • Author
7 hours ago, BravoTaco said:

I believe the difference is that completeDialogueU is surrounded in a try-catch, while the other is not.

So you can use completeDialogueU without having to catch the exception yourself.

 

54 minutes ago, Camaro said:

completeDialogU() does surround completeDialog() in a try/catch, but in doing so, consumes the current threads interrupted status, which is pretty bad programming practice. 

https://stackoverflow.com/questions/3976344/handling-interruptedexception-in-java

onLoop() throws InterruptedException for a reason. Use completeDialog().

 

Thanks for the responses! I appreciate the insight.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.