Thread: [508]Wealth Transfer[508]

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 39
  1. #1 [508]Wealth Transfer[508] 
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,264
    Thanks given
    405
    Thanks received
    432
    Discord
    View profile
    Rep Power
    1684
    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);
        }
    }
    open up misc.java

    place this into it

    Code:
     public static String numberOp(long i2) {
    	String s = "" + i2;
    	char c[] = s.toCharArray();
    	String s2 = "";
    	if(i2 < 1000) {
    	    return s;
    	}
    	for(int i = 0; i < c.length; i++) {
    	    switch(c.length) {
    		case 4:
    		    if(i == 1) {
    			s2 += ",";
    		    }
    		    break;
    		case 5:
    		    if(i == 2) {
    			s2 += ",";
    		    }
    		    break;
    		case 6:
    		    if(i == 3) {
    			s2 += ",";
    		    }
    		    break;
    		case 7:
    		    if(i == 1) {
    			s2 += ",";
    		    }
    		    if(i == 4) {
    			s2 += ",";
    		    }
    		    break;
    		case 8:
    		    if(i == 2) {
    			s2 += ",";
    		    }
    		    if(i == 5) {
    			s2 += ",";
    		    }
    		    break;
    		case 9:
    		    if(i == 3) {
    			s2 += ",";
    		    }
    		    if(i == 6) {
    			s2 += ",";
    		    }
    		    break;
    		case 10:
    		    if(i == 1) {
    			s2 += ",";
    		    }
    		    if(i == 4) {
    			s2 += ",";
    		    }
    		    if(i == 7) {
    			s2 += ",";
    		    }
    		    break;
    	    }
    	    s2 += "" + c[i];
    	}
    	return s2;
        }
    in data/item paste this

    [Only registered and activated users can see links. ]

    Credits
    GTest 40% loader
    Zach. 10% misc code
    me 50% making it work
     

  2. #2  
    White.
    Guest
    wow is this what u were doing while u were losing to me on cod4???
     

  3. #3  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,264
    Thanks given
    405
    Thanks received
    432
    Discord
    View profile
    Rep Power
    1684
    Quote Originally Posted by White. View Post
    wow is this what u were doing while u were losing to me on cod4???
    rofl don't make me show them the pic of when i beat you
     

  4. #4  
    White.
    Guest
    Quote Originally Posted by Jonathan View Post
    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.
     

  5. #5  
    Registered Member
    Join Date
    Feb 2008
    Posts
    51
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Edit: Thanks worked!
     

  6. #6  
    Registered Member
    Join Date
    Feb 2009
    Age
    25
    Posts
    251
    Thanks given
    0
    Thanks received
    3
    Rep Power
    72
    thanks so much just trying it now gj
     

  7. #7  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,264
    Thanks given
    405
    Thanks received
    432
    Discord
    View profile
    Rep Power
    1684
    Quote Originally Posted by Dannos View Post
    .\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 . . .


    Help?
    rofl fuck forgot imports let me update thread
     

  8. #8  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,264
    Thanks given
    405
    Thanks received
    432
    Discord
    View profile
    Rep Power
    1684
    Quote Originally Posted by Dannos View Post
    .\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 . . .


    Help?
    yeah updated it do it agn or just add imports
     

  9. #9  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,264
    Thanks given
    405
    Thanks received
    432
    Discord
    View profile
    Rep Power
    1684
    Quote Originally Posted by White. View Post
    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
     

  10. #10  
    White.
    Guest
    Quote Originally Posted by Jonathan View Post
    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
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •