First, create a new package in rs2 > world, which would be called ge and then extract these files into it:
Download link here: http://**********/3NBXTT
Usage:
Import what you have to (palidino76.rs2.world.ge.*), then use GrandExchange class to get what you have to, here are example usages:
Code:
public class exampleusage extends GrandExchange {
public void buyItem(Player p, int howMuch)
{
// ..this is an extended class so we don't use static methods..
buy ( p , "ITEM NAME TO BUY" , howMuch ) ;
// buy:
// Player p = The player who's buying the item..
// String itemName = The item name to buy (no underscores, just spaces and lowercase)
// int amount = The amount of the item you want to buy (the more you buy, higher price)
}
public void sellItem(Player p)
{
// ..this is an extended class so we don't use static methods..
sell ( p , ITEM ID TO SELL, new int[] { minimum price , maximum price } , amount ) ;
// sell:
// Player p = The player who's selling this item (he cannot buy his own item)
// int itemId = The item id the player is selling..
// int[] prices = Start from minimum price to maxmimum price (medium price is set auto)
// int amount = The amount of what you are selling (prices increase by medium price range)
}
public void printMarketItems(Player p)
{
// ..this is an extended class so we don't use static methods..
marketItems ( p ) ;
// marketItems:
// Player p = The player to print the market items to (also prices from min to max)
}
public void costOfItem()
{
// ..this is an extended class so we don't use static methods..
System.out.println ( cost ( "ITEM NAME TO CHECK COST" ) );
// cost:
// String itemName = The item name to check (must be lowercase)
}
}