Jump to content

Stronghold of security door solver


Markoz

Recommended Posts

I was going to use this on a script but i decided to stop the development, so before scrapping it i decided to release it:

 

This holds the answers: 

String[] strongholdTexts = {
"To help me recover my password if I forget it or it is stolen",
"Use the 'Recover a Lost Password' section on the RuneScape website",
"Don't give them the information and send an", "Nowhere",
"Recovering your account if it is stolen.",
"Every couple of months", "Don't tell them anything and click the",
"Virus scan my computer then change my password and recoveries",
"does not block your password", "Only on the RuneScape website",
"Game Inbox on the RuneScape website", "No",
"No, it might steal my password", "Don't give him my password",
"Nobody", "Don't tell them anything and inform", "Memorable",
"The birthday of a famous person or event",
"Politely tell them no and then use the" };

 

 

This clicks the first interface:

if (client.getInterface(242) != null) {
if (client.getInterface(242).getChild(2).getMessage()
.contains("To pass you must answer me this:")) {
if (client.getInterface(242).getChild(4) != null) {
selectInterfaceOption(242, 4, "Continue");
sleep(1000);
}
}
}

This answers the second one:

if (client.getInterface(230) != null) {
if (client.getInterface(230).getChild(6) != null) {
int childLength = client.getInterface(230).getChildren().length;

for (int i = 0; i < childLength; i++) {
for (int a = 0; a < strongholdTexts.length; a++) {
if (client.getInterface(230).getChild(i).getMessage()
.contains(strongholdTexts[a])) {
selectInterfaceOption(230, i, "Continue");
sleep(1000);
}
}
}
}
}

And this clicks the last interface(which vary interface child and parent numbers, idk why):

 

if (client.getInterface(243) != null) {
if (client.getInterface(243).getChild(2) != null) {
if (client.getInterface(243).getChild(2).getMessage()
.contains("Correct!")) {
int childLength = client.getInterface(243).getChildren().length;
selectInterfaceOption(243, childLength - 1, "Continue");
sleep(1000);
}
}
}

if (client.getInterface(244) != null) {
if (client.getInterface(244).getChild(2) != null) {
if (client.getInterface(244).getChild(2).getMessage()
.contains("Correct!")) {
int childLength = client.getInterface(244).getChildren().length;
selectInterfaceOption(244, childLength - 1, "Continue");
sleep(1000);
}
}
}

if (client.getInterface(242) != null) {
if (client.getInterface(242).getChild(2) != null) {
if (client.getInterface(242).getChild(2).getMessage()
.contains("Correct!")) {
int childLength = client.getInterface(242).getChildren().length;
selectInterfaceOption(242, childLength - 1, "Continue");
sleep(1000);
}
}
}

if (client.getInterface(241) != null) {
if (client.getInterface(241).getChild(2) != null) {
if (client.getInterface(241).getChild(2).getMessage()
.contains("Correct!")) {
int childLength = client.getInterface(241).getChildren().length;
selectInterfaceOption(241, childLength - 1, "Continue");
sleep(1000);
}
}
}

 

It may not be the best way to do this, but it was a working quick fix for me =p, feel free to grab the code or even clean it a little bit for us.

And if someone with bigger knowledge could point out some bad pratices, etc. I would be grateful

ps: i know its simple.. but could save someones time

Edited by Markoz
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...