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.

Dialogues issue (returns true, when it is closed)

Featured Replies

1. OSBot Version (do NOT put "current version", be specific)


2.4.53


 


2. A description of the issue. Include relevant logs.


 


CODE:


 


ec9c76bb0d.png


 


The code shows a Task called HandleKebabDialog.


 


It runs if 2 conditions are met:


1) A dialogue is open (Options, Continue, Any other dialogue)


2) Inside the area kebab house


 


Below you can see OSBot open, there is no dialogue open. Yet one of the dialogue methods is returning true: inDialogue(), isPendingOption(), isPendingContinuation().


 


We know this because the logger shows the text HandleKebabDialog, proving that shouldRun() returned true, and void run subsequently was called.


 


5f6862790f.jpg


 


Important note:


 


I used to use widgets.get(231/217/219) - those are the widget ids for each of the 3 dialogues. (OPTION, NPC_CHAT_HEAD, PLAYER_CHAT_HEAD)


 


This worked, but after a few hours Kebab buyer was incorrectly being told widget.getVisible(231/217/219) was visible when it was not, or vice versa. So I switched to the OSBot API Dialogues.


 


Yet this problem/something similar still happens with it. Very odd. Please let me know because people are reporting this issue on my thread (that the script randomly stops). Now I know why.


 


 


3. Are you receiving any errors in the client canvas or the logger? 


No


 


4. How can you replicate the issue?


Leave kebab buyer running for a few hours, but when it happens script stops moving the mouse, so it logs out after 5 minutes, and the script recovers. So it's hard to catch it, today I was lucky.


 


5. Has this issue persisted through multiple versions? If so, how far back?


at least a few months


I need something which is simple and reproducible. Your method shouldRun() is using 3 dialogue methods and an area check. Pin this down to one method in the dialogues class and I'll thoroughly investigate it.

  • Author

I need something which is simple and reproducible. Your method shouldRun() is using 3 dialogue methods and an area check. Pin this down to one method in the dialogues class and I'll thoroughly investigate it.

 

I have narrowed it down further now.

 

In the shouldRun() method, I removed the 3rd check: dialogues.inDialogue()

 

So shouldRun now only does 2 checks, and it works perfectly now:

 

c02f640b42.png

 

 

After 20 minutes to 2 hours, dialogues.inDialogue() was always returning true (even if dialogue was closed). Are widgets being cached or something? I don't know. (People reported this bug as "the script randomly freezes, then it logs out and starts working again")

 

I let the script run, and was able to re-produce this after about 45 minutes of it running perfectly. I tried clicking Talk-to Karim manually (which opens the NPC). The script state stays then works through the Kebab Dialogues (clicking continue, doing the various options, and then after it buys the Kebab, the dialogue closes again, and the script freezes).

 

If I manually logout, (or let the script sit for 5 minutes so it logs out), AutoLogin random event runs: the bot logs back in - and the script recovers. The dialogues.inDialogue() *seems* to recover on login, and it starts working as normal. (If you do not logout/in again it always returns true). Hard for me to reproduce this except for letting the script run, waiting for it to occur and giving you my teamviewer details to connect remotely.

 

(Since removing the 3rd check from shouldRun,  inDialogue(), people are now reporting that Kebab Buyer does not freeze anymore after 20min-2hrs)

 

NOTE: Because this simple script runs well for a long period, I hope this helps to show you I am not being a derp :p

Edited by DragonAlpha

  • 1 month later...
Guest
This topic is now closed to further replies.

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.