Package rsb.methods
Class GrandExchange
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.GrandExchange
Obtains information on tradeable items from the Grand Exchange website and
Grand Exchange ingame interaction.
- Author:
- GigiaJ
-
Field Summary
Fields inherited from class rsb.methods.MethodProvider
methods -
Method Summary
Modifier and TypeMethodDescriptionbooleanbuy(int id, int quantity, int priceChange, boolean roundQuantity) Buys an item from the grand exchangebooleanBuys an item from the grand exchangebooleanbuyItem(int id, int quantity, boolean roundQuantity) Buys an item from the grand exchangebooleanbuyItem(int id, int quantity, int priceChange) Buys an item from the grand exchangebooleanbuyItem(int id, int quantity, int priceChange, boolean roundQuantity) Buys an item from the grand exchangebooleanBuys an item from the grand exchangebooleanBuys an item from the grand exchangebooleanBuys an item from the grand exchangebooleancheckCompleted(int slot) Will check a slot for to see if an item has completed.checkSlot(int slot) Checks Grand Exchange slot and returns namebooleancheckSlotIsEmpty(int slot) Checks Grand Exchange slots for an any activity (1-8)booleancheckSlotLocked(int slot) Checks if the Grand Exchange slot is locked or notbooleanclose()voidcollect(boolean asNote) A method to collect items from a slot as note or as the item itselfvoidcollectItem(int slot) Gets any item that is in the offer as the item and to the inventoryvoidcollectItem(int slot, boolean asNote) Gets any item that is in the offer as the item and in the form designatedvoidcollectItem(int slot, boolean toBank, boolean asNote) Gets any items that may be in the offer.booleancreateOffer(int quantity, int priceChange) Creates an offer based on the parameters givenintChecks Grand Exchange slots for an item.intfreeSlot()Finds first empty slot.booleanisOpen()Checks if Grand Exchange is open.booleanopen()Opens Grand Exchange window.booleansell(int id, int quantity, int priceChange, boolean roundQuantity) Sells an item in the grand exchangebooleanSells an item in the grand exchangebooleansellItem(int id, int quantity) Sells an item in the grand exchangebooleansellItem(int id, int quantity, boolean roundQuantity) Sells an item in the grand exchangebooleansellItem(int id, int quantity, int priceChange) Sells an item in the grand exchangebooleansellItem(int id, int quantity, int priceChange, boolean roundQuantity) Sells an item in the grand exchangebooleanSells an item in the grand exchangebooleanSells an item in the grand exchangebooleanSells an item in the grand exchangebooleanSells an item in the grand exchangevoidsetPrice(int priceChange) Decides how many times to press the respective button to set the price per item (-5% or +5%)voidsetQuantity(int quantity) Sets the quantity of items in the offer interface randomizing how it goes about doing so too
-
Method Details
-
isOpen
public boolean isOpen()Checks if Grand Exchange is open.- Returns:
- True if it's open, otherwise false.
-
open
public boolean open()Opens Grand Exchange window.- Returns:
- True if it's open, otherwise false.
-
close
public boolean close() -
checkSlotIsEmpty
public boolean checkSlotIsEmpty(int slot) Checks Grand Exchange slots for an any activity (1-8)- Parameters:
slot- An int for the corresponding slot.- Returns:
Trueif the slot is free from activity.
-
checkSlotLocked
public boolean checkSlotLocked(int slot) Checks if the Grand Exchange slot is locked or not- Parameters:
slot- An int for the corresponding slot.- Returns:
Trueif the user is a member elsefalsefor slots 4-8
-
checkSlot
Checks Grand Exchange slot and returns name- Parameters:
slot- The slot to check- Returns:
- The item name as a string equal to the item being sold/brought Will return null if no items are being sold.
-
findItem
Checks Grand Exchange slots for an item.- Parameters:
name- The name of the item to check for.- Returns:
- An int of the corresponding slot. 0 = Not found.
-
freeSlot
public int freeSlot()Finds first empty slot.- Returns:
- An int of the corresponding slot. 0 = No empty slots.
-
checkCompleted
public boolean checkCompleted(int slot) Will check a slot for to see if an item has completed.- Parameters:
slot- The slot to check.- Returns:
trueif Complete, otherwisefalse
-
collect
public void collect(boolean asNote) A method to collect items from a slot as note or as the item itself- Parameters:
asNote- whether the item should be withdrawn as a note
-
collectItem
public void collectItem(int slot) Gets any item that is in the offer as the item and to the inventory- Parameters:
slot- An int for the corresponding slot, of which to check
-
collectItem
public void collectItem(int slot, boolean asNote) Gets any item that is in the offer as the item and in the form designated- Parameters:
slot- An int for the corresponding slot, of which to checkasNote- whether the item should be withdrawn as a note
-
collectItem
public void collectItem(int slot, boolean toBank, boolean asNote) Gets any items that may be in the offer.- Parameters:
slot- An int for the corresponding slot, of which to checktoBank- whether the item should be sent to the bankasNote- whether the item should be withdrawn as a note
-
createOffer
public boolean createOffer(int quantity, int priceChange) Creates an offer based on the parameters given- Parameters:
quantity- the number of items to list forpriceChange- the number of times to press the price per item +5% or -5% buttons- Returns:
trueif the offer was attempted to be made; otherwisefalse
-
setPrice
public void setPrice(int priceChange) Decides how many times to press the respective button to set the price per item (-5% or +5%)- Parameters:
priceChange- the number of button presses
-
setQuantity
public void setQuantity(int quantity) Sets the quantity of items in the offer interface randomizing how it goes about doing so too- Parameters:
quantity- the quantity to list
-
buy
public boolean buy(int id, int quantity, int priceChange, boolean roundQuantity) Buys an item from the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
buy
Buys an item from the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
buyItem
Buys an item from the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)- Returns:
Trueunless we can't buy
-
buyItem
Buys an item from the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buyroundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
buyItem
Buys an item from the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
buyItem
public boolean buyItem(int id, int quantity, int priceChange) Buys an item from the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)- Returns:
Trueunless we can't buy
-
buyItem
public boolean buyItem(int id, int quantity, boolean roundQuantity) Buys an item from the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buyroundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
buyItem
public boolean buyItem(int id, int quantity, int priceChange, boolean roundQuantity) Buys an item from the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
sell
public boolean sell(int id, int quantity, int priceChange, boolean roundQuantity) Sells an item in the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
sell
Sells an item in the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
sellItem
Sells an item in the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
sellItem
Sells an item in the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)- Returns:
Trueunless we can't buy
-
sellItem
Sells an item in the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buyroundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
sellItem
Sells an item in the grand exchange- Parameters:
name- the name of the itemquantity- the number of items to buy- Returns:
Trueunless we can't buy
-
sellItem
public boolean sellItem(int id, int quantity, int priceChange, boolean roundQuantity) Sells an item in the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)roundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
sellItem
public boolean sellItem(int id, int quantity, int priceChange) Sells an item in the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buypriceChange- the number of times to press the price change buttons (-5% or +5%)- Returns:
Trueunless we can't buy
-
sellItem
public boolean sellItem(int id, int quantity, boolean roundQuantity) Sells an item in the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buyroundQuantity- decides whether we need exactly this amount or not- Returns:
Trueunless we can't buy
-
sellItem
public boolean sellItem(int id, int quantity) Sells an item in the grand exchange- Parameters:
id- the id of the itemquantity- the number of items to buy- Returns:
Trueunless we can't buy
-