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.

Getting quest status / progress

Featured Replies

For the life of me this code doesn't do what I think it does

idea64_Agl2bGjHtP.png.9ad2bc7b767bad5c34aee7755a450275.png

Believe it or not the code inside this if statement executes when the quest is STARTED

In other words NOT is quest started is evaluating to TRUE when the quest IS started ⁉️

 

Does anyone have any best practices or any resources on code snippets to getting quest state / progress?

I've been going in raw just from the API and pulling my hair out.

 

 

Edited by EsotericRS

A lot of the Quest API doesn't work and it would take a long time to fix it as there's so many quests. 
Much easier for Scripters just to use configs to code their own quests when needed. Quests aren't a very popular thing with bots 

  • Author
15 hours ago, Juggles said:

A lot of the Quest API doesn't work and it would take a long time to fix it as there's so many quests. 
Much easier for Scripters just to use configs to code their own quests when needed. Quests aren't a very popular thing with bots 

Thanks for this -- I did go ahead and try to move and grab the config when Goblin Diplomacy is picked up.

I captured 62:3 the moment the quest was accepted... Is there anything else to it? 

2 minutes ago, EsotericRS said:

Thanks for this -- I did go ahead and try to move and grab the config when Goblin Diplomacy is picked up.

I captured 62:3 the moment the quest was accepted... Is there anything else to it? 

Nope that's it. 

public void startedQuest() {

if (configs().get(62)==3) {

return true;

}

return false;

}

im on mobile you get the idea

1 hour ago, Juggles said:

Nope that's it. 

public void startedQuest() {

if (configs().get(62)==3) {

return true;

}

return false;

}

im on mobile you get the idea

10/10 S2 ability. Goodluck returning a void method 😉

public boolean isQuestStarted(Quest quest) {
	return quest.getConfig() > 0;
}

public enum Quest {
	GOBLIN_DIPLOMACY(63);
	
	int questConfig;
	
	Quest(int questConfig) {
		this.questConfig = questConfig;
	}

	public int getConfig() {
		return questConfig;
	}
}

I'd do something like this. Store all your quests in an enum and just check the config is > 0 to check if it's started. Quests also have finished settings, so you can store those in this enum as well and add an isQuestFinished method etc. :) Hope this helps.

1 hour ago, Juggles said:

Nope that's it. 

public void startedQuest() {

if (configs().get(62)==3) {

return true;

}

return false;

}

im on mobile you get the idea

I didn't know a void method could return a value 🤔

Set up constants and then just do like 

if (setting < 1)

or 

boolean hasStarted() {
	return api.getsetting(questSetting) > 0;
}

can be done a million ways other than the way that @Juggles posted.

53 minutes ago, HeyImJamie said:

10/10 S2 ability. Goodluck returning a void method 😉


public boolean isQuestStarted(Quest quest) {
	return quest.getConfig() > 0;
}

public enum Quest {
	GOBLIN_DIPLOMACY(63);
	
	int questConfig;
	
	Quest(int questConfig) {
		this.questConfig = questConfig;
	}

	public int getConfig() {
		return questConfig;
	}
}

I'd do something like this. Store all your quests in an enum and just check the config is > 0 to check if it's started. Quests also have finished settings, so you can store those in this enum as well and add an isQuestFinished method etc. :) Hope this helps.

 

34 minutes ago, godspower33 said:

I didn't know a void method could return a value 🤔

Set up constants and then just do like 


if (setting < 1)

or 


boolean hasStarted() {
	return api.getsetting(questSetting) > 0;
}

can be done a million ways other than the way that @Juggles posted.

Rip me a new one fam. I meant Boolean LOL. 

Thats why you don't type in a harry

  • Author
2 minutes ago, Juggles said:

 

Rip me a new one fam. I meant Boolean LOL. 

Thats why you don't type in a harry

LOL they are giving you a hard time, I understood exactly what you meant and it was what I was going for 🤣

 

Quote

Store all your quests in an enum and just check the config is > 0 to check if it's started.

This is great advice. Thank you.

 

Thanks everyone :)

 

👍

16 hours ago, Patrick said:

You can't just check for config > 0 for all of them, some quests use a certain bitrange. 

Based on this response, wouldn't it be more ideal to check whether the config is not = to 0 ( Quest not started ) & not equal to ... ( Quest finished ), so >

 

    private boolean Goblin() {
        return getConfigs().get(63) != 0 && getConfigs().get(63) != (INT = to completed);
    }

this would check if the quest is started and not finished.

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.