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.

Anyone knows how to stop spam clicking an npc?

Featured Replies

Good morning everyone (GMT+1). 

 

I'm currently studying program developing in The Netherlands. Which means i can just program OSbot scripts at school laugh.png

A classmate/friend of mine challenged me to make a tutorial island script, so he can do the tutorial that he doesn't want to do with hand.

I know there are scripts for Tutorial Island, but i'm making this for my own knowledge and will not post the script on the forums..

 

Now my question is: MyPlayer keeps clicking the guide. Like, spam clicking. I tried a lot of things to solve this.

At first i was like: I'm going to add a sleep timer. But this sleeps the whole script, and that's what we don't want.

 

Im clueless now lol.

 

This is my code: 

		if (spawnArea.contains(myPlayer())) {
			    NPC guide = npcs.closest("RuneScape Guide");
		        if(guide != null && !myPlayer().isInteracting(guide)){
		            guide.interact("Talk-To");    
		            // Need to do something here
		        }
		        if(guide != null && myPlayer().isInteracting(guide)) {
		        	dialogueGuide();
		        }

Edited by OSRS Sebastian

ConditionSleep?

 

return if in dialogue

  • Author

 

ConditionSleep?

 

return if in dialogue

 

Still does the same.. I have tried the conditional sleep in both statements. didn't work.

		if (spawnArea.contains(myPlayer())) {
			    NPC guide = npcs.closest("RuneScape Guide");
		        if(guide != null && !myPlayer().isInteracting(guide)){
		            guide.interact("Talk-To");   
		            dialogueGuide();
					new ConditionalSleep(5000) {
						@Override
						public boolean condition() throws InterruptedException {
							return dialogues.inDialogue();
						}

					}.sleep();
		        }
		        if(guide != null && myPlayer().isInteracting(guide)) {
		        	dialogueGuide();
		        	
		        }
			}

Edited by OSRS Sebastian

Does it click while talking or only before? If it spams before it's quite a human attribute which you should just roll with.

  • Author

Does it click while talking or only before? If it spams before it's quite a human attribute which you should just roll with.

 

When in dialogue, it clicks the Tutorial Guy again and again and again and again.

 

So: Talking to the Tutorial Guy, open dialogue. Click next and clicks the tutorial guy again.

I need to somehow script it like: Only click Talk-To when i say so. 

 

Like: First stage: Click Tutorial guy.

        Second stage: Click on the settings tab

        Third stage: Click the Tutorial guy again

        Fourth stage: Click on the door and walk to the other tutorial guy.

Edited by OSRS Sebastian

Yeah I remember it always says in dialogue because it shows the progress. I found this in my tut script, perhaps it's helpful:

 

if(dialogues.inDialogue() &&
            (widgets.get(372,0) == null || !widgets.get(372,0).isVisible()) &&
            (widgets.get(231,1) != null && widgets.get(231,1).isVisible())
            || widgets.get(219,0) != null && widgets.get(219,0).isVisible()) // tutorial messages

    {
    // in dialogue


    }

For the stages you want to use configs. configs.get(281) returns the current stage of tut island. You could then use the config debugger to determine the values.

Edited by Flamezzz

  • Author

Yeah I remember it always says in dialogue because it shows the progress. I found this in my tut script, perhaps it's helpful:

 

if(dialogues.inDialogue() &&
            (widgets.get(372,0) == null || !widgets.get(372,0).isVisible()) &&
            (widgets.get(231,1) != null && widgets.get(231,1).isVisible())
            || widgets.get(219,0) != null && widgets.get(219,0).isVisible()) // tutorial messages

    {
    // in dialogue


    }

For the stages you want to use configs. configs.get(281) returns the current stage of tut island. You could then use the config debugger to determine the values.

 

Can you explain this better? I'm very new to scripting and i'm honest if i say that i don't understand the code you just posted nor the configs thing tongue.png . You can msg me if you like

Edited by OSRS Sebastian

NPC#isInteracting doesn't do what you seem to think it does.

 

It will return the NPC guide while the player is 'focusing' him. But that focus is lost as soon as you've interacted with him. Instead you should check if the current dialogue contains whatever it is the guide says.

 

Also, to stop spam clicking, sleep for a bit after interacting. Either with a ConditionalSleep or a simple randomized sleep()

 

Edited by FrostBug

  • Author

NPC#isInteracting doesn't do what you seem to think it does.

 

It will return the NPC guide while the player is 'focusing' him. But that focus is lost as soon as you've interacted with him. Instead you should check if the current dialogue contains whatever it is the guide says.

 

Also, to stop spam clicking, sleep for a bit after interacting. Either with a ConditionalSleep or a simple randomized sleep()

 

Thanks for the reply and information!

 

Is there some sort of tutorial on Dialogues and configs?

Thanks for the reply and information!

 

Is there some sort of tutorial on Dialogues and configs?

 

I don't think there's any particular guide on configs. They're somewhat self explanatory though.

The game has a bunch of configs. A config (also called varpbits), is an integer packed with information used by the client. Eg. a bit register where each bit may have a specific meaning. They can be debugged with the client config debugger.

 

You can check if a dialogue with a certain text exists by getWidgets().containingText("Some dialogue text").isEmpty(), if this returned list is not empty, then the dialogue widget exists

 

  • Author

I don't think there's any particular guide on configs. They're somewhat self explanatory though.

The game has a bunch of configs. A config (also called varpbits), is an integer packed with information used by the client. Eg. a bit register where each bit may have a specific meaning. They can be debugged with the client config debugger.

 

You can check if a dialogue with a certain text exists by getWidgets().containingText("Some dialogue text").isEmpty(), if this returned list is not empty, then the dialogue widget exists

 

 

This explains a lot! I'm going to give it a try!

 

EDIT: So just to be clear. Is the photo under this text a config? or is it when i talk to an npc?

 

mtm454.jpg

 

Thanks!

Edited by OSRS Sebastian

 

Good morning everyone (GMT+1). 

 

I'm currently studying program developing in The Netherlands. Which means i can just program OSbot scripts at school laugh.png

A classmate/friend of mine challenged me to make a tutorial island script, so he can do the tutorial that he doesn't want to do with hand.

I know there are scripts for Tutorial Island, but i'm making this for my own knowledge and will not post the script on the forums..

 

Now my question is: MyPlayer keeps clicking the guide. Like, spam clicking. I tried a lot of things to solve this.

At first i was like: I'm going to add a sleep timer. But this sleeps the whole script, and that's what we don't want.

 

Im clueless now lol.

 

This is my code: 

		if (spawnArea.contains(myPlayer())) {
			    NPC guide = npcs.closest("RuneScape Guide");
		        if(guide != null && !myPlayer().isInteracting(guide)){
		            guide.interact("Talk-To");    
		            // Need to do something here
		        }
		        if(guide != null && myPlayer().isInteracting(guide)) {
		        	dialogueGuide();
		        }

 

In the case of Tutorial Island,  every interaction with an NPC is followed by the user selecting continue. So you can use:

final ConditionalSleep dialogSleep = new ConditionalSleep(5000) {
    @Override
    public boolean condition() throws InterruptedException {

        return script.getDialogues().isPendingContinuation();
    }
};

Edited by Explv

  • Author

In the case of Tutorial Island, every interaction with an NPC is followed by the user selecting continue. So you can use:

final ConditionalSleep dialogSleep = new ConditionalSleep(5000) {    @Override    public boolean condition() throws InterruptedException {        return script.getDialogues().isPendingContinuation();    }};

Thanks bro! Will try this today when i wake up!

 

EDIT: Didn't have time to program today. Going to give it a shot again tomorrow! Will let you guys know.

Edited by OSRS Sebastian

Work backwards + conditional sleeps:

IF speaking WITH Guide
--DO interact WITH Guide dialogue
ELSE
--IF DO interact WITH Guide
----DO conditional sleep UNTIL (IF speaking WITH Guide)

Edited by liverare

 

Work backwards + conditional sleeps:

IF speaking WITH Guide
--DO interact WITH Guide dialogue
ELSE
--IF DO interact WITH Guide
----DO conditional sleep UNTIL (IF speaking WITH Guide)

 

Except that doesn't work in this instance doge.png  hence the other answers :doge: x 2

Edited by Explv

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.