Ok you guys lucky im in good mood today or else u would get this rofl
ok open up ptrade.java
under public void showFirst() {
add
Code:
long price = 0;
for(int i = 0; i < p.pTrade.getItemsArray()[0].length; i++) {
for(geList list : Engine.geLoader.geList) {
if(list == null) {
continue;
}
if(list.itemId == p.pTrade.getItemsArray()[0][i]) {
int minPrice = list.low;
int maxPrice = list.high;
int midPrice = (minPrice + maxPrice)/ 2 * p.pTrade.getItemsArray()[1][i];
if(list.itemId == 995) {
midPrice = 1 * p.pTrade.getItemsArray()[1][i];
}
price += (long) midPrice;
}
}
}
for(int i = 0; i < getPartner().pTrade.getItemsArray()[0].length; i++) {
for(geList list : Engine.geLoader.geList) {
if(list == null) {
continue;
}
if(list.itemId == getPartner().pTrade.getItemsArray()[0][i]) {
int minPrice = list.low;
int maxPrice = list.high;
int midPrice = (minPrice + maxPrice)/ 2 * getPartner().pTrade.getItemsArray()[1][i];
if(list.itemId == 995) {
midPrice = 1 * getPartner().pTrade.getItemsArray()[1][i];
}
price -= (long) midPrice;
}
}
}
if(price > 0) { // higher then 0
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.numberOp(price) + " Coins Worth To " + Misc.capitalize(getPartner().username), 335, 41);
} else if(price < 0) { // lower then 0
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.numberOp(-price) + " Coins' Worth To Me", 335, 41);
} else {
p.frames.setString(p, "No wealth transfer", 335, 41);
}
also in p trade.java import
Code:
import Source.world.geList;
import Source.util.*;
The open up the Engine class
declare
Code:
public static geLoader geLoader = new geLoader();
add this to your imports too
Code:
import Source.world.geLoader;
Now in the world folder create net class geList.java and paste this into it
Code:
/*
* Class geList
*
* Version 1.0
*
* Created by Jonathan
*/
package palidino76.rs2.world;
public class geList {
public int itemId = -1;
public int low = -1;
public int high = -1;
public geList(int id, int l, int h) {
itemId = id;
low = l;
high = h;
}
}
in the same folder create another class named geLoader.java and paste this into it
Code:
package palidino76.rs2.world;
import palidino76.rs2.Engine;
import palidino76.rs2.util.Misc;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class geLoader {
public int maxListedItems = 16000;
public geList[] geList = new geList[maxListedItems];
public String sell = "";
public String buy = "";
public geLoader() {
System.out.println("[Ge Prices loaded]");
try {
loadprices();
} catch (IOException e) {
e.printStackTrace();
}
}
public void loadprices() throws IOException {
String line = "";
FileReader fr = new FileReader("../Data/items/grandExchange.cfg");
BufferedReader br = new BufferedReader(fr);
String s= "";
while ((s = br.readLine()) != null) {
String Read[] = s.split("\t");
if(Read[0].contains("["))
{
break;
}
String itemId = Read[0].substring(7);
if (Read[1].contains("m")) {
sell = Read[1].replace("m", "00000");
} else if (Read[1].contains("k")) {
sell = Read[1].replace("k", "00");
} else {
sell = Read[1].replace(",", "");
}
if (Read[2].contains("m")) {
buy = Read[2].replace("m", "00000");
} else if (Read[2].contains("k")) {
buy = Read[2].replace("k", "00");
} else {
buy = Read[2].replace(",", "");
}
sell = sell.replace(".", "").replace(" ", "");
buy = buy.replace(".", "").replace(" ", "");
if (sell.equals("null")) {
sell = "0";
}
if (buy.equals("null")) {
buy = "0";
}
newItemList(Integer.parseInt(itemId), Integer.parseInt(sell), Integer.parseInt(buy));
}
}
private void newItemList(int ItemId, int buy, int sell) {
if (ItemId > maxListedItems) {
Misc.println("maxListedItems to low.");
return;
}
geList[ItemId] = new geList(ItemId, buy, sell);
}
}
rofl don't make me show them the pic of when i beat you
LOL just 2 point differnece .... and that was one game lol
i owned u in so many games if it wasnt for me u would of been on the losing team all the time
easy way to say this : ps3 master on cod4!!! owned everyone.
.\Bulby\Engine.java:134: cannot find symbol
symbol : class geLoader
location: class Bulby.Engine
public static geLoader geLoader = new geLoader();
^
.\Bulby\Engine.java:134: cannot find symbol
symbol : class geLoader
location: class Bulby.Engine
public static geLoader geLoader = new geLoader();
^
.\Bulby\players\ptrade\PTrade.java:311: cannot find symbol
symbol : class geList
location: class Bulby.players.ptrade.PTrade
for(geList list : Engine.geLoader.geList) {
^
.\Bulby\players\ptrade\PTrade.java:327: cannot find symbol
symbol : class geList
location: class Bulby.players.ptrade.PTrade
for(geList list : Engine.geLoader.geList) {
^
.\Bulby\players\ptrade\PTrade.java:343: cannot find symbol
symbol : variable Misc
location: class Bulby.players.ptrade.PTrade
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.number
Op(price) + " Coins Worth To " + Misc.capitalize(getPartner().username), 335, 41
);
^
.\Bulby\players\ptrade\PTrade.java:343: cannot find symbol
symbol : variable Misc
location: class Bulby.players.ptrade.PTrade
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.number
Op(price) + " Coins Worth To " + Misc.capitalize(getPartner().username), 335, 41
);
^
.\Bulby\players\ptrade\PTrade.java:345: cannot find symbol
symbol : variable Misc
location: class Bulby.players.ptrade.PTrade
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.number
Op(-price) + " Coins' Worth To Me", 335, 41);
^
7 errors
Press any key to continue . . .
.\Bulby\Engine.java:134: cannot find symbol
symbol : class geLoader
location: class Bulby.Engine
public static geLoader geLoader = new geLoader();
^
.\Bulby\Engine.java:134: cannot find symbol
symbol : class geLoader
location: class Bulby.Engine
public static geLoader geLoader = new geLoader();
^
.\Bulby\players\ptrade\PTrade.java:311: cannot find symbol
symbol : class geList
location: class Bulby.players.ptrade.PTrade
for(geList list : Engine.geLoader.geList) {
^
.\Bulby\players\ptrade\PTrade.java:327: cannot find symbol
symbol : class geList
location: class Bulby.players.ptrade.PTrade
for(geList list : Engine.geLoader.geList) {
^
.\Bulby\players\ptrade\PTrade.java:343: cannot find symbol
symbol : variable Misc
location: class Bulby.players.ptrade.PTrade
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.number
Op(price) + " Coins Worth To " + Misc.capitalize(getPartner().username), 335, 41
);
^
.\Bulby\players\ptrade\PTrade.java:343: cannot find symbol
symbol : variable Misc
location: class Bulby.players.ptrade.PTrade
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.number
Op(price) + " Coins Worth To " + Misc.capitalize(getPartner().username), 335, 41
);
^
.\Bulby\players\ptrade\PTrade.java:345: cannot find symbol
symbol : variable Misc
location: class Bulby.players.ptrade.PTrade
p.frames.setString(p, "<col=ff0000> Wealth Transfer: " + Misc.number
Op(-price) + " Coins' Worth To Me", 335, 41);
^
7 errors
Press any key to continue . . .
LOL just 2 point differnece .... and that was one game lol
i owned u in so many games if it wasnt for me u would of been on the losing team all the time
easy way to say this : ps3 master on cod4!!! owned everyone.
Yeah because you make me fucking play with hard core nerds and im only level 23..... and i still owned some half of them
Yeah because you make me fucking play with hard core nerds and im only level 23..... and i still owned some half of them
LOL that wasnt my fault i thought i was going to play with all lvl 10, 55 prestiges then i find there all the same lvl as you was very disappointed but then again came ontop every round except for the one game were u had a 2 point lead