Class Backpack

java.lang.Object
net.botwithus.rs3.game.inventories.Backpack

public final class Backpack extends Object
Backpack is a class to interact with the backpack interface
See Also:
  • Method Details

    • isEmpty

      public static boolean isEmpty()
    • isFull

      public static boolean isFull()
    • interact

      public static boolean interact(String name, String option)
      Interact with an item in the backpack
      Parameters:
      name - the name of the items to interact with
      option - the option to interact with
      Returns:
      true if the interaction was successful
    • interact

      public static boolean interact(int id, String option)
      Interact with an item in the backpack
      Parameters:
      id - the id of the item to interact with
      option - the option to interact with
      Returns:
      true if the interaction was successful
    • use

      public static boolean use(int id)
    • use

      public static boolean use(String name)
    • getSlot

      public static Item getSlot(int slot)
    • interactByCategory

      public static boolean interactByCategory(int category, String option)
      Interact with an item in the backpack
      Parameters:
      category - the category of the items to interact with
      option - the option to interact with
      Returns:
      true if the interaction was successful
    • contains

      public static boolean contains(String name)
      Check if the backpack contains a specific item
      Parameters:
      name - the name of the items to check for
      Returns:
      true if the backpack contains the item
    • contains

      public static boolean contains(int id)
      Check if the backpack contains a specific item
      Parameters:
      id - the id of the item to check for
      Returns:
      true if the backpack contains the item
    • contains

      public static boolean contains(String name, long amount)
    • contains

      public static boolean contains(int id, int amount)
    • containsByCategory

      public static boolean containsByCategory(int category)
    • print

      public static void print(Script script)
    • container

      public static InventoryContainer container()
      Get the InventoryContainer for the backpack
      Returns:
      the InventoryContainer for the backpack