Jump to content

Welcome to DreamBot

VIP Enhancement

Want to upgrade your DreamBot experience? Consider signing up for VIP!
VIP allows you to run as many accounts as you want, view the forums ad-free, receive 10% off all script purchases, and so much more!
Visit the store to learn about all of these great features!

Upgrade to VIP Now
Frequently Asked Questions
  • Are you not able to open the client? Make sure you have Java 8 installed
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
Lem0nz

Client can't detect quest finished

Recommended Posts

int notStartedColor = 16711680;
int inProgressColor = 16776960;
int finishedColor = 901389;
				
int sheepShearer = getQuestIndex("Sheep Shearer");

int textColor = getWidgets().getWidget(399).getChild(6).getChild(sheepShearer).getTextColor();
		
if(textColor == notStartedColor) {
	log("Quest has not been started");
}else if(textColor == inProgressColor) {
	log("Quest is in progress");
}else if(textColor == finishedColor) {
	log("Quest is finished");
}
public int getQuestIndex(String questName) {
	WidgetChild[] quests = getWidgets().getWidget(399).getChild(6).getChildren();
	for(int i = 0; i < quests.length; i++) {
		if(quests[i].getText().equals(questName)) {
			return i;
		}
	}
		
	return -1;
}


Here's a work around until fixed.

Share this post


Link to post
Share on other sites
7 hours ago, Milasoft said:

Those enum values aren't updated anymore. You will have to check them manually using player settings.

That's a sad fucking story 😕

7 hours ago, numberkarl said:

int notStartedColor = 16711680;
int inProgressColor = 16776960;
int finishedColor = 901389;
				
int sheepShearer = getQuestIndex("Sheep Shearer");

int textColor = getWidgets().getWidget(399).getChild(6).getChild(sheepShearer).getTextColor();
		
if(textColor == notStartedColor) {
	log("Quest has not been started");
}else if(textColor == inProgressColor) {
	log("Quest is in progress");
}else if(textColor == finishedColor) {
	log("Quest is finished");
}

public int getQuestIndex(String questName) {
	WidgetChild[] quests = getWidgets().getWidget(399).getChild(6).getChildren();
	for(int i = 0; i < quests.length; i++) {
		if(quests[i].getText().equals(questName)) {
			return i;
		}
	}
		
	return -1;
}


Here's a work around until fixed.

I appreciate that, saved me a couple of time +1 xD

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...