Jump 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.

What's the best way to communicate with Dialogues?

Featured Replies

What is the best way to talk to NPC's if there are a few click to continue buttons and a few multiple choices... I have so far used widgets for this, but my script sometimes stops randomly. I want this to be flawless.


if(dialogues.isPendingContinuation() || dialogues.clickContinue()

|| dialogues.completeDialogue("option1", "option2", "option3"))

return random(300,600);

Edited by Flamezzz

  • Author
if(dialogues.isPendingContinuation() || dialogues.clickContinue()
|| dialogues.completeDialogue("option1", "option2", "option3"))
return random(300,600);

 

 

I am sorry for being a complete noob, but how would I use that.

 

I tried entering it like this.

if(npc != null)
   if(npc.isOnScreen()){
      npc.interact("Talk-to");
	if(dialogues.isPendingContinuation() || dialogues.clickContinue()
	|| dialogues.completeDialogue("option 1"))
		 return random(300,600);
}else{
if (!npc.isOnScreen());
localWalker.walk(npc); 
}

But it's not working.

Edited by Russian_Savage


if (!dialogues.inDialogue()) {

if (npc != null) {

if (npc.isVisible()) {

if (npc.interact("Talk-to")) {

new ConditionalSleep(random(1000, 2000)) {

public boolean condition() throws InterruptedException {

return dialogues.inDialogue();

}

}.sleep();

}

} else {

getCamera().toEntity(npc);

}

}

} else {

if (dialogues.isPendingOption()) {

dialogues.completeDialogue("plebs4free", "plebs4free", "plebs4free","plebs4free");

sleep(random(400, 900));

}

if (dialogues.isPendingContinuation()) {

dialogues.clickContinue();

sleep(random(400, 900));

}

}

  • Author
		if (!dialogues.inDialogue()) {
			if (npc != null) {
				if (npc.isVisible()) {
					if (npc.interact("Talk-to")) {
				          new ConditionalSleep(random(1000, 2000)) {
				              public boolean condition() throws InterruptedException {
				                return dialogues.inDialogue();
				              }
				            }.sleep();
					}
				} else {
					getCamera().toEntity(npc);
				}
			}
		} else {
			if (dialogues.isPendingOption()) {
				dialogues.completeDialogue("plebs4free", "plebs4free", "plebs4free","plebs4free");
				sleep(random(400, 900));
			}
			if (dialogues.isPendingContinuation()) {
				dialogues.clickContinue();
				sleep(random(400, 900));
			}
		}

Thank you for the help really appreciate it. I hate being spoon fed so could you tell me why my code didn't work. Was it because i didnt check if i was in dialogue in the beginning?  minus the shit code of course. XD

Edited by Russian_Savage

  • Author

The code @Flamezzz posted is .. so wrong .. doge.png

hahaha ah ok. Gotchya.

 

 Reading your code made perfect sense after the first read. Thank you for your help I really appreciate it.

The code @Flamezzz posted is .. so wrong .. doge.png

It's not used correctly, it's supposed to be the first thing in the onLoop so that in the next lines you know you're not in a dialogue. Anyways I'm glad it's solved now.

Another handy thing to do is you can now simply press SPACE on your keyboard to continue, and the numbers 1 through x for the options.

Press space:

getKeyboard().typeKey((char)32);

Character code 32 equates to SPACE (" ")

 

A list of character codes: (Look at the DEC values)

asciifull.gif

 

If you want to press enter, you need to press 2 keys in rapid succession, which are keys 13 and 10:

getKeyboard().typeKey((char)13);
getKeyboard().typeKey((char)10);

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

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.