You are viewing our Forum Archives. To view or take place in current topics click here.
Solution To RsBot FIx Loading Screen
Posted:
Solution To RsBot FIx Loading ScreenPosted:
Status: Offline
Joined: Apr 19, 201014Year Member
Posts: 1,724
Reputation Power: 81
Status: Offline
Joined: Apr 19, 201014Year Member
Posts: 1,724
Reputation Power: 81
I can't find the page where I got help but it was from Powerbot.org, This help is credited to Powerbot.org, I am going off the top of my head. You will need the Jave download. "JDK"
Just google it.
First you will need to download Winrar. (Google "Cnet winrar") and the first link should be the download.
Take your notepad and copy this code and save it as "Crawler.Java"
Go to your documents, Open your RSbot folder and put the "Crawler.Java" in your RSbot/Scripts/Sources Folder. Then compile the scripts (You must have the jdk to work)There is another way to compile without the JDK but you will have to look that up for yourself. After you compile look in your scripts folder. You will see a file called "Crawler.Class" file. Copy this.
Now open your winrar. Use your winrar to open the Rsbot.exe and you will put the "Crawler.Class" file in org/rsbot/bot folder. You will copy and paste the "Crawler.Class" file in the bot folder and you will replace it.
After that just start it up again and it should be working.
ALso. remove the "Crawler.Class" and "Crawler.Java' from the sources folder before starting it up or it won't work.
Just google it.
First you will need to download Winrar. (Google "Cnet winrar") and the first link should be the download.
Take your notepad and copy this code and save it as "Crawler.Java"
package org.rsbot.bot;
import org.rsbot.util.GlobalConfiguration;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.HashMap;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Crawler {
private static final Logger log = Logger.getLogger(Crawler.class.getName());
private static HashMap<String, String> parameters;
private String world_prefix;
public Crawler(String root) {
final String index = firstMatch("<a id=\"continue\" class=\"barItem\" href=\"([^\"]+)\"\\s+onclick=\"[^\"]+\">Continue to Full Site for News and Game Help", downloadPage(root, null));
final String frame = root + "game.ws";
final String game = firstMatch("<frame id=\"[^\"]+\" style=\"[^\"]+\" src=\"([^\"]+)\"", downloadPage(frame, index));
world_prefix = game.substring(12, game.indexOf(".runescape"));
final Pattern pattern = Pattern.compile("<param name=\"?([^\\s]+)\"?\\s+value=\"?([^>]*)\"?>", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
final Matcher matcher = pattern.matcher(downloadPage(game, frame));
parameters = new HashMap<String, String>();
while (matcher.find()) {
final String key = removeTrailingChar(matcher.group(1), '"');
final String value = removeTrailingChar(matcher.group(2), '"');
if (!parameters.containsKey(key)) {
parameters.put(key, value);
}
}
final String ie = "haveie6";
if (parameters.containsKey(ie)) {
parameters.remove(ie);
}
parameters.put("haveie6", "0");
log.fine("Parameters: " + parameters);
}
private String downloadPage(final String url, final String referer) {
try {
final BufferedReader reader = new BufferedReader(new InputStreamReader(GlobalConfiguration.getURLConnection(new URL(url), referer).getInputStream()));
final StringBuilder buf = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
buf.append(line);
}
reader.close();
return buf.toString();
} catch (final Exception e) {
e.printStackTrace();
}
return null;
}
private String firstMatch(final String regex, final String str) {
final Pattern pattern = Pattern.compile(regex);
final Matcher matcher = pattern.matcher(str);
while (matcher.find())
return matcher.group(1);
return null;
}
public HashMap<String, String> getParameters() {
return parameters;
}
public String getWorldPrefix() {
return world_prefix;
}
private String removeTrailingChar(final String str, final char ch) {
if ((str == null) || str.isEmpty())
return str;
else if (str.length() == 1)
return str.charAt(0) == ch ? "" : str;
try {
final int l = str.length() - 1;
if (str.charAt(l) == ch)
return str.substring(0, l);
return str;
} catch (final Exception e) {
return str;
}
}
}
import org.rsbot.util.GlobalConfiguration;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.HashMap;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Crawler {
private static final Logger log = Logger.getLogger(Crawler.class.getName());
private static HashMap<String, String> parameters;
private String world_prefix;
public Crawler(String root) {
final String index = firstMatch("<a id=\"continue\" class=\"barItem\" href=\"([^\"]+)\"\\s+onclick=\"[^\"]+\">Continue to Full Site for News and Game Help", downloadPage(root, null));
final String frame = root + "game.ws";
final String game = firstMatch("<frame id=\"[^\"]+\" style=\"[^\"]+\" src=\"([^\"]+)\"", downloadPage(frame, index));
world_prefix = game.substring(12, game.indexOf(".runescape"));
final Pattern pattern = Pattern.compile("<param name=\"?([^\\s]+)\"?\\s+value=\"?([^>]*)\"?>", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
final Matcher matcher = pattern.matcher(downloadPage(game, frame));
parameters = new HashMap<String, String>();
while (matcher.find()) {
final String key = removeTrailingChar(matcher.group(1), '"');
final String value = removeTrailingChar(matcher.group(2), '"');
if (!parameters.containsKey(key)) {
parameters.put(key, value);
}
}
final String ie = "haveie6";
if (parameters.containsKey(ie)) {
parameters.remove(ie);
}
parameters.put("haveie6", "0");
log.fine("Parameters: " + parameters);
}
private String downloadPage(final String url, final String referer) {
try {
final BufferedReader reader = new BufferedReader(new InputStreamReader(GlobalConfiguration.getURLConnection(new URL(url), referer).getInputStream()));
final StringBuilder buf = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
buf.append(line);
}
reader.close();
return buf.toString();
} catch (final Exception e) {
e.printStackTrace();
}
return null;
}
private String firstMatch(final String regex, final String str) {
final Pattern pattern = Pattern.compile(regex);
final Matcher matcher = pattern.matcher(str);
while (matcher.find())
return matcher.group(1);
return null;
}
public HashMap<String, String> getParameters() {
return parameters;
}
public String getWorldPrefix() {
return world_prefix;
}
private String removeTrailingChar(final String str, final char ch) {
if ((str == null) || str.isEmpty())
return str;
else if (str.length() == 1)
return str.charAt(0) == ch ? "" : str;
try {
final int l = str.length() - 1;
if (str.charAt(l) == ch)
return str.substring(0, l);
return str;
} catch (final Exception e) {
return str;
}
}
}
Go to your documents, Open your RSbot folder and put the "Crawler.Java" in your RSbot/Scripts/Sources Folder. Then compile the scripts (You must have the jdk to work)There is another way to compile without the JDK but you will have to look that up for yourself. After you compile look in your scripts folder. You will see a file called "Crawler.Class" file. Copy this.
Now open your winrar. Use your winrar to open the Rsbot.exe and you will put the "Crawler.Class" file in org/rsbot/bot folder. You will copy and paste the "Crawler.Class" file in the bot folder and you will replace it.
After that just start it up again and it should be working.
ALso. remove the "Crawler.Class" and "Crawler.Java' from the sources folder before starting it up or it won't work.
#2. Posted:
Status: Offline
Joined: Apr 19, 201014Year Member
Posts: 1,724
Reputation Power: 81
Status: Offline
Joined: Apr 19, 201014Year Member
Posts: 1,724
Reputation Power: 81
Name
Age
location
Reason
How many Jtags you have
Age
location
Reason
How many Jtags you have
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.