Class GroundItemPackets


  • public class GroundItemPackets
    extends java.lang.Object
    Utility class for creating and queuing ground item packets.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RSPacketBufferNode createFifthAction​(int id, int worldPointX, int worldPointY, boolean ctrlDown)
      Creates a packet buffer node for the fifth action with the given parameters.
      static RSPacketBufferNode createFirstAction​(int id, int worldPointX, int worldPointY, boolean ctrlDown)
      Creates an RSPacketBufferNode with the given parameters.
      static RSPacketBufferNode createFourthAction​(int id, int worldPointX, int worldPointY, boolean ctrlDown)
      Creates a packet buffer node for the fourth action with given parameters.
      static RSPacketBufferNode createItemOnGroundItem​(int groundItemId, int worldPointX, int worldPointY, int itemSlot, int itemId, int itemWidgetId, boolean ctrlDown)
      Creates a packet buffer node to create an item on the ground at a specified location in the game world.
      static RSPacketBufferNode createSecondAction​(int id, int worldPointX, int worldPointY, boolean ctrlDown)
      Creates a second action packet buffer node with the given parameters.
      static RSPacketBufferNode createSpellOnGroundItem​(int id, int worldPointX, int worldPointY, int spellWidgetId, boolean ctrlDown)
      Creates a RSPacketBufferNode object to cast a spell on a ground item.
      static RSPacketBufferNode createThirdAction​(int id, int worldPointX, int worldPointY, boolean ctrlDown)
      Creates a third action packet buffer node.
      static RSPacketBufferNode createWidgetOnGroundItem​(int id, int worldPointX, int worldPointY, int sourceSlot, int sourceItemId, int sourceWidgetId, boolean ctrlDown)
      Creates a packet buffer node for sending a widget on ground item creation packet.
      static void groundItemAction​(GroundItem item, java.lang.String action, boolean ctrlDown)
      Executes the corresponding ground item action based on the given action string.
      static void groundItemFifthOption​(GroundItem item, boolean ctrlDown)
      Performs the fifth option for a ground item.
      static void groundItemFirstOption​(GroundItem item, boolean ctrlDown)
      Performs the first option action on a ground item.
      static void groundItemFourthOption​(GroundItem item, boolean ctrlDown)
      Sends the fourth option ground item action packet.
      static void groundItemSecondOption​(GroundItem item, boolean ctrlDown)
      Sends a packet to perform the second option action on a ground item.
      static void groundItemThirdOption​(GroundItem item, boolean ctrlDown)
      Performs the third option action on the specified ground item.
      static void queueGroundItemAction1Packet​(int groundItemId, int worldPointX, int worldPointY, boolean ctrlDown)
      Queues a ground item action 1 packet to be sent.
      static void queueGroundItemAction2Packet​(int groundItemId, int worldPointX, int worldPointY, boolean ctrlDown)
      Queues a packet to send the second action for a ground item with the specified ID at the given world coordinates.
      static void queueGroundItemAction3Packet​(int groundItemId, int worldPointX, int worldPointY, boolean ctrlDown)
      Sends a packet to queue the third action for a ground item.
      static void queueGroundItemAction4Packet​(int groundItemId, int worldPointX, int worldPointY, boolean ctrlDown)
      Queues the fourth action packet for a ground item with the specified ID, coordinates, and control key state.
      static void queueGroundItemAction5Packet​(int groundItemId, int worldPointX, int worldPointY, boolean ctrlDown)
      Queues and sends a packet to perform the fifth action on a ground item.
      static void queueItemUseOnGroundObjectPacket​(int groundItemId, int worldPointX, int worldPointY, int itemSlot, int itemId, int itemWidgetId, boolean ctrlDown)
      Queues a packet to use an item on a ground object.
      static void queueSpellOnGroundObjectPacket​(int groundItemId, int worldPointX, int worldPointY, int spellWidgetId, boolean ctrlDown)
      Queues a packet to create a spell on a ground object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GroundItemPackets

        public GroundItemPackets()
    • Method Detail

      • groundItemFirstOption

        public static void groundItemFirstOption​(GroundItem item,
                                                 boolean ctrlDown)
        Performs the first option action on a ground item.
        Parameters:
        item - the ground item to perform the action on
        ctrlDown - true if the control key is pressed, false otherwise
      • groundItemSecondOption

        public static void groundItemSecondOption​(GroundItem item,
                                                  boolean ctrlDown)
        Sends a packet to perform the second option action on a ground item.
        Parameters:
        item - the ground item to perform the action on
        ctrlDown - true if the control key is held down, false otherwise
      • groundItemThirdOption

        public static void groundItemThirdOption​(GroundItem item,
                                                 boolean ctrlDown)
        Performs the third option action on the specified ground item.
        Parameters:
        item - the ground item to perform the action on
        ctrlDown - true if the control key is being held down, false otherwise
      • groundItemFourthOption

        public static void groundItemFourthOption​(GroundItem item,
                                                  boolean ctrlDown)
        Sends the fourth option ground item action packet.
        Parameters:
        item - the ground item to perform the action on
        ctrlDown - whether the control key is held down
      • groundItemFifthOption

        public static void groundItemFifthOption​(GroundItem item,
                                                 boolean ctrlDown)
        Performs the fifth option for a ground item.
        Parameters:
        item - the ground item to perform the action on
        ctrlDown - true if the "Ctrl" key is pressed down, false otherwise
      • groundItemAction

        public static void groundItemAction​(GroundItem item,
                                            java.lang.String action,
                                            boolean ctrlDown)
        Executes the corresponding ground item action based on the given action string.
        Parameters:
        item - the ground item to perform the action on
        action - the action to be performed
        ctrlDown - true if the control key is being held down, false otherwise
      • queueItemUseOnGroundObjectPacket

        public static void queueItemUseOnGroundObjectPacket​(int groundItemId,
                                                            int worldPointX,
                                                            int worldPointY,
                                                            int itemSlot,
                                                            int itemId,
                                                            int itemWidgetId,
                                                            boolean ctrlDown)
        Queues a packet to use an item on a ground object.
        Parameters:
        groundItemId - the ID of the ground item
        worldPointX - the x-coordinate of the world point
        worldPointY - the y-coordinate of the world point
        itemSlot - the slot of the item
        itemId - the ID of the item
        itemWidgetId - the ID of the item widget
        ctrlDown - whether the control key is down
      • queueSpellOnGroundObjectPacket

        public static void queueSpellOnGroundObjectPacket​(int groundItemId,
                                                          int worldPointX,
                                                          int worldPointY,
                                                          int spellWidgetId,
                                                          boolean ctrlDown)
        Queues a packet to create a spell on a ground object.
        Parameters:
        groundItemId - the id of the ground item
        worldPointX - the x-coordinate of the world point
        worldPointY - the y-coordinate of the world point
        spellWidgetId - the id of the spell widget
        ctrlDown - true if the control key is pressed, false otherwise
      • queueGroundItemAction1Packet

        public static void queueGroundItemAction1Packet​(int groundItemId,
                                                        int worldPointX,
                                                        int worldPointY,
                                                        boolean ctrlDown)
        Queues a ground item action 1 packet to be sent.
        Parameters:
        groundItemId - the ID of the ground item
        worldPointX - the x coordinate of the world point
        worldPointY - the y coordinate of the world point
        ctrlDown - true if the control key is being held down, false otherwise
      • queueGroundItemAction2Packet

        public static void queueGroundItemAction2Packet​(int groundItemId,
                                                        int worldPointX,
                                                        int worldPointY,
                                                        boolean ctrlDown)
        Queues a packet to send the second action for a ground item with the specified ID at the given world coordinates.
        Parameters:
        groundItemId - the ID of the ground item
        worldPointX - the x coordinate of the world point
        worldPointY - the y coordinate of the world point
        ctrlDown - true if the control key is held down, false otherwise
      • queueGroundItemAction3Packet

        public static void queueGroundItemAction3Packet​(int groundItemId,
                                                        int worldPointX,
                                                        int worldPointY,
                                                        boolean ctrlDown)
        Sends a packet to queue the third action for a ground item.
        Parameters:
        groundItemId - the ID of the ground item
        worldPointX - the x-coordinate of the world point
        worldPointY - the y-coordinate of the world point
        ctrlDown - true if the CTRL key is down, false otherwise
      • queueGroundItemAction4Packet

        public static void queueGroundItemAction4Packet​(int groundItemId,
                                                        int worldPointX,
                                                        int worldPointY,
                                                        boolean ctrlDown)
        Queues the fourth action packet for a ground item with the specified ID, coordinates, and control key state.
        Parameters:
        groundItemId - the ID of the ground item
        worldPointX - the x-coordinate of the world point
        worldPointY - the y-coordinate of the world point
        ctrlDown - true if the control key is down, false otherwise
      • queueGroundItemAction5Packet

        public static void queueGroundItemAction5Packet​(int groundItemId,
                                                        int worldPointX,
                                                        int worldPointY,
                                                        boolean ctrlDown)
        Queues and sends a packet to perform the fifth action on a ground item.
        Parameters:
        groundItemId - the ID of the ground item
        worldPointX - the x-coordinate of the world point
        worldPointY - the y-coordinate of the world point
        ctrlDown - true if control key is pressed, false otherwise
      • createItemOnGroundItem

        public static RSPacketBufferNode createItemOnGroundItem​(int groundItemId,
                                                                int worldPointX,
                                                                int worldPointY,
                                                                int itemSlot,
                                                                int itemId,
                                                                int itemWidgetId,
                                                                boolean ctrlDown)
        Creates a packet buffer node to create an item on the ground at a specified location in the game world.
        Parameters:
        groundItemId - the ID of the ground item
        worldPointX - the x-coordinate of the location
        worldPointY - the y-coordinate of the location
        itemSlot - the slot index of the item
        itemId - the ID of the item
        itemWidgetId - the ID of the item widget
        ctrlDown - true if the control key is held down, false otherwise
        Returns:
        the created packet buffer node
      • createWidgetOnGroundItem

        public static RSPacketBufferNode createWidgetOnGroundItem​(int id,
                                                                  int worldPointX,
                                                                  int worldPointY,
                                                                  int sourceSlot,
                                                                  int sourceItemId,
                                                                  int sourceWidgetId,
                                                                  boolean ctrlDown)
        Creates a packet buffer node for sending a widget on ground item creation packet.
        Parameters:
        id - the id of the widget on ground item
        worldPointX - the x coordinate of the world point
        worldPointY - the y coordinate of the world point
        sourceSlot - the source slot
        sourceItemId - the source item id
        sourceWidgetId - the source widget id
        ctrlDown - true if the control key is down, else false
        Returns:
        the packet buffer node for sending the widget on ground item creation packet
      • createSpellOnGroundItem

        public static RSPacketBufferNode createSpellOnGroundItem​(int id,
                                                                 int worldPointX,
                                                                 int worldPointY,
                                                                 int spellWidgetId,
                                                                 boolean ctrlDown)
        Creates a RSPacketBufferNode object to cast a spell on a ground item.
        Parameters:
        id - the ID of the ground item
        worldPointX - the x-coordinate of the ground item
        worldPointY - the y-coordinate of the ground item
        spellWidgetId - the ID of the spell widget
        ctrlDown - true if the Ctrl key is pressed, false otherwise
        Returns:
        the created RSPacketBufferNode object
      • createFirstAction

        public static RSPacketBufferNode createFirstAction​(int id,
                                                           int worldPointX,
                                                           int worldPointY,
                                                           boolean ctrlDown)
        Creates an RSPacketBufferNode with the given parameters.
        Parameters:
        id - the ID of the packet
        worldPointX - the X coordinate of the world point
        worldPointY - the Y coordinate of the world point
        ctrlDown - indicates if the control key is pressed
        Returns:
        the created RSPacketBufferNode
      • createSecondAction

        public static RSPacketBufferNode createSecondAction​(int id,
                                                            int worldPointX,
                                                            int worldPointY,
                                                            boolean ctrlDown)
        Creates a second action packet buffer node with the given parameters.
        Parameters:
        id - ID of the action.
        worldPointX - X-coordinate of the world point.
        worldPointY - Y-coordinate of the world point.
        ctrlDown - true if the ctrl key was pressed, false otherwise.
        Returns:
        the created RSPacketBufferNode.
      • createThirdAction

        public static RSPacketBufferNode createThirdAction​(int id,
                                                           int worldPointX,
                                                           int worldPointY,
                                                           boolean ctrlDown)
        Creates a third action packet buffer node.
        Parameters:
        id - the ID of the action.
        worldPointX - the X coordinate of the world point.
        worldPointY - the Y coordinate of the world point.
        ctrlDown - true if the control key is down, false otherwise.
        Returns:
        the packet buffer node created.
      • createFourthAction

        public static RSPacketBufferNode createFourthAction​(int id,
                                                            int worldPointX,
                                                            int worldPointY,
                                                            boolean ctrlDown)
        Creates a packet buffer node for the fourth action with given parameters.
        Parameters:
        id - the id value
        worldPointX - the x coordinate value in the world
        worldPointY - the y coordinate value in the world
        ctrlDown - indicates if the control key is pressed down
        Returns:
        the created packet buffer node
      • createFifthAction

        public static RSPacketBufferNode createFifthAction​(int id,
                                                           int worldPointX,
                                                           int worldPointY,
                                                           boolean ctrlDown)
        Creates a packet buffer node for the fifth action with the given parameters.
        Parameters:
        id - the ID of the action
        worldPointX - the X coordinate of the world point
        worldPointY - the Y coordinate of the world point
        ctrlDown - true if the control key is down, false otherwise
        Returns:
        the created packet buffer node