Title Is catchy ehh?
well i noticed that the item.cfg is loaded wrong in almost all servers from delta to devo to czar. well here is the fix! now you can use the alch values instead of the shop value...
Code:
public boolean loadItemList(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("./bin/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("item")) {
int[] Bonuses = new int[12];
for (int i = 0; i < 12; i++) {
if (token3[(6 + i)] != null) {
Bonuses[i] = Integer.parseInt(token3[(6 + i)]);
} else {
break;
}
}
newItemList(Integer.parseInt(token3[0]), token3[1]
.replaceAll("_", " "), token3[2].replaceAll("_",
" "), Double.parseDouble(token3[3]), Double
.parseDouble(token3[4]), Double
.parseDouble(token3[5]), Bonuses);
}
} else {
if (line.equals("[ENDOFITEMLIST]")) {
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;
}
all that was really changed was this...
Code:
newItemList(Integer.parseInt(token3[0]), token3[1]
.replaceAll("_", " "), token3[2].replaceAll("_",
" "), Double.parseDouble(token3[3]), Double
.parseDouble(token3[4]), Double
.parseDouble(token3[5]), Bonuses);
i mean seriously do people know how to count?
it goes
not