Package rs.kreme.ksbot.api.wrappers
Class KSGroundItem
- java.lang.Object
-
- rs.kreme.ksbot.api.wrappers.KSGroundItem
-
- All Implemented Interfaces:
Locatable
,Positionable
public final class KSGroundItem extends java.lang.Object implements Locatable
-
-
Constructor Summary
Constructors Constructor Description KSGroundItem(int id, int quantity)
KSGroundItem(int id, int quantity, net.runelite.api.Tile tile)
KSGroundItem(net.runelite.client.game.ItemStack itemStack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
distanceTo()
Calculates the distance from the player to the ground item.java.lang.String[]
getActions()
Retrieves the available actions for the item.net.runelite.api.coords.LocalPoint
getLocalLocation()
long
getPrice()
Gets the item's price.net.runelite.api.coords.WorldPoint
getWorldLocation()
Retrieves the world location of the ground item.boolean
hasAction(java.lang.String action)
Checks if the item has a specific action.void
interact(int action)
Interacts with the item based on the provided action index.void
interact(java.lang.String option)
Interacts with the item based on the provided option string.void
interact(net.runelite.api.MenuAction menuAction)
Interacts with the item based on the provided MenuAction.boolean
isNoted()
Checks if the item is noted (i.e., has a note ID).java.lang.String
toString()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface rs.kreme.ksbot.api.interfaces.Locatable
distanceTo, distanceTo, getPlane, getWorldX, getWorldY
-
-
-
-
Method Detail
-
getWorldLocation
public net.runelite.api.coords.WorldPoint getWorldLocation()
Retrieves the world location of the ground item.- Specified by:
getWorldLocation
in interfaceLocatable
- Specified by:
getWorldLocation
in interfacePositionable
- Returns:
- The WorldPoint of the ground item.
-
isNoted
public boolean isNoted()
Checks if the item is noted (i.e., has a note ID).- Returns:
- true if the item is noted, false otherwise.
-
getPrice
public long getPrice()
Gets the item's price.- Returns:
- The price of the item.
-
distanceTo
public int distanceTo()
Calculates the distance from the player to the ground item.- Returns:
- The distance to the item.
-
interact
public void interact(int action)
Interacts with the item based on the provided action index.- Parameters:
action
- The action index.
-
interact
public void interact(java.lang.String option)
Interacts with the item based on the provided option string.- Parameters:
option
- The action string.
-
getActions
public java.lang.String[] getActions()
Retrieves the available actions for the item.- Returns:
- An array of available actions.
-
hasAction
public boolean hasAction(java.lang.String action)
Checks if the item has a specific action.- Parameters:
action
- The action string.- Returns:
- true if the item has the action, false otherwise.
-
interact
public void interact(net.runelite.api.MenuAction menuAction)
Interacts with the item based on the provided MenuAction.- Parameters:
menuAction
- The MenuAction to perform.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getLocalLocation
public net.runelite.api.coords.LocalPoint getLocalLocation()
- Specified by:
getLocalLocation
in interfaceLocatable
-
-