Package net.eternalclient.api.packets
Class GroundItemPackets
- java.lang.Object
-
- net.eternalclient.api.packets.GroundItemPackets
-
public class GroundItemPackets extends java.lang.Object
Utility class for creating and queuing ground item packets.
-
-
Constructor Summary
Constructors Constructor Description GroundItemPackets()
-
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.
-
-
-
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 onctrlDown
- 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 onctrlDown
- 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 onctrlDown
- 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 onctrlDown
- 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 onctrlDown
- 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 onaction
- the action to be performedctrlDown
- 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 itemworldPointX
- the x-coordinate of the world pointworldPointY
- the y-coordinate of the world pointitemSlot
- the slot of the itemitemId
- the ID of the itemitemWidgetId
- the ID of the item widgetctrlDown
- 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 itemworldPointX
- the x-coordinate of the world pointworldPointY
- the y-coordinate of the world pointspellWidgetId
- the id of the spell widgetctrlDown
- 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 itemworldPointX
- the x coordinate of the world pointworldPointY
- the y coordinate of the world pointctrlDown
- 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 itemworldPointX
- the x coordinate of the world pointworldPointY
- the y coordinate of the world pointctrlDown
- 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 itemworldPointX
- the x-coordinate of the world pointworldPointY
- the y-coordinate of the world pointctrlDown
- 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 itemworldPointX
- the x-coordinate of the world pointworldPointY
- the y-coordinate of the world pointctrlDown
- 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 itemworldPointX
- the x-coordinate of the world pointworldPointY
- the y-coordinate of the world pointctrlDown
- 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 itemworldPointX
- the x-coordinate of the locationworldPointY
- the y-coordinate of the locationitemSlot
- the slot index of the itemitemId
- the ID of the itemitemWidgetId
- the ID of the item widgetctrlDown
- 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 itemworldPointX
- the x coordinate of the world pointworldPointY
- the y coordinate of the world pointsourceSlot
- the source slotsourceItemId
- the source item idsourceWidgetId
- the source widget idctrlDown
- 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 itemworldPointX
- the x-coordinate of the ground itemworldPointY
- the y-coordinate of the ground itemspellWidgetId
- the ID of the spell widgetctrlDown
- 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 packetworldPointX
- the X coordinate of the world pointworldPointY
- the Y coordinate of the world pointctrlDown
- 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 valueworldPointX
- the x coordinate value in the worldworldPointY
- the y coordinate value in the worldctrlDown
- 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 actionworldPointX
- the X coordinate of the world pointworldPointY
- the Y coordinate of the world pointctrlDown
- true if the control key is down, false otherwise- Returns:
- the created packet buffer node
-
-