Well guys i'm getting this:
Code:
DeltaClean by Jonny J
Initiating Start Methods.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 45
at NPCHandler.loadNPCDrops(NPCHandler.java:2332)
at NPCHandler.<init>(NPCHandler.java:418)
at Server.main(Server.java:110)
after i did this tut:
http://www.rune-server.org/runescape...ops-rates.html
in line 2332:
Code:
public boolean loadNPCDrops(String FileName) {
String line = "";
String token = "";
String token2 = "";
String token2_2 = "";
String[] token3 = new String[10];
boolean EndOfFile = false;
BufferedReader characterfile = null;
try {
characterfile = new BufferedReader(new FileReader("config\\"
+ FileName));
} catch (FileNotFoundException fileex) {
Misc.println(FileName + ": file not found.");
return false;
}
try {
line = characterfile.readLine();
} catch (IOException ioexception) {
Misc.println(FileName + ": error loading file.");
return false;
}
while ((EndOfFile == false) && (line != null)) {
line = line.trim();
int spot = line.indexOf("=");
if (spot > -1) {
token = line.substring(0, spot);
token = token.trim();
token2 = line.substring(spot + 1);
token2 = token2.trim();
token2_2 = token2.replaceAll("\t\t", "\t");
token2_2 = token2_2.replaceAll("\t\t", "\t");
token2_2 = token2_2.replaceAll("\t\t", "\t");
token2_2 = token2_2.replaceAll("\t\t", "\t");
token2_2 = token2_2.replaceAll("\t\t", "\t");
token3 = token2_2.split("\t");
if (token.equals("npcdrop")) {
if (Integer.parseInt(token3[0]) <= -1)
continue;
drops[Integer.parseInt(token3[0])][dropCount[Integer
.parseInt(token3[0])]] = Integer
.parseInt(token3[1]);
drops[Integer.parseInt(token3[0])][dropCount[Integer
.parseInt(token3[0])] + 1] = Integer
.parseInt(token3[2]);
drops[Integer.parseInt(token3[0])][dropCount[Integer
.parseInt(token3[0])] + 2] = Integer
.parseInt(token3[3]);
dropCount[Integer.parseInt(token3[0])] += 3;
}
} else {
if (line.equals("[ENDOFNPCDROPLIST]")) {
try {
characterfile.close();
} catch (IOException ioexception) {
}
return true;
}
}
try {
line = characterfile.readLine();
} catch (IOException ioexception1) {
EndOfFile = true;
}
}
try {
characterfile.close();
} catch (IOException ioexception) {
}
return false;
}