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 TypeMethodDescriptionboolean
buy
(int id, int quantity, int priceChange, boolean roundQuantity) Buys an item from the grand exchangeboolean
Buys an item from the grand exchangeboolean
buyItem
(int id, int quantity, boolean roundQuantity) Buys an item from the grand exchangeboolean
buyItem
(int id, int quantity, int priceChange) Buys an item from the grand exchangeboolean
buyItem
(int id, int quantity, int priceChange, boolean roundQuantity) Buys an item from the grand exchangeboolean
Buys an item from the grand exchangeboolean
Buys an item from the grand exchangeboolean
Buys an item from the grand exchangeboolean
checkCompleted
(int slot) Will check a slot for to see if an item has completed.checkSlot
(int slot) Checks Grand Exchange slot and returns nameboolean
checkSlotIsEmpty
(int slot) Checks Grand Exchange slots for an any activity (1-8)boolean
checkSlotLocked
(int slot) Checks if the Grand Exchange slot is locked or notboolean
close()
void
collect
(boolean asNote) A method to collect items from a slot as note or as the item itselfvoid
collectItem
(int slot) Gets any item that is in the offer as the item and to the inventoryvoid
collectItem
(int slot, boolean asNote) Gets any item that is in the offer as the item and in the form designatedvoid
collectItem
(int slot, boolean toBank, boolean asNote) Gets any items that may be in the offer.boolean
createOffer
(int quantity, int priceChange) Creates an offer based on the parameters givenint
Checks Grand Exchange slots for an item.int
freeSlot()
Finds first empty slot.boolean
isOpen()
Checks if Grand Exchange is open.boolean
open()
Opens Grand Exchange window.boolean
sell
(int id, int quantity, int priceChange, boolean roundQuantity) Sells an item in the grand exchangeboolean
Sells an item in the grand exchangeboolean
sellItem
(int id, int quantity) Sells an item in the grand exchangeboolean
sellItem
(int id, int quantity, boolean roundQuantity) Sells an item in the grand exchangeboolean
sellItem
(int id, int quantity, int priceChange) Sells an item in the grand exchangeboolean
sellItem
(int id, int quantity, int priceChange, boolean roundQuantity) Sells an item in the grand exchangeboolean
Sells an item in the grand exchangeboolean
Sells an item in the grand exchangeboolean
Sells an item in the grand exchangeboolean
Sells an item in the grand exchangevoid
setPrice
(int priceChange) Decides how many times to press the respective button to set the price per item (-5% or +5%)void
setQuantity
(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:
True
if 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:
True
if the user is a member elsefalse
for 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:
true
if 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:
true
if 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless 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:
True
unless we can't buy
-