Package net.eternalclient.api.packets
Class PlayerPackets
- java.lang.Object
-
- net.eternalclient.api.packets.PlayerPackets
-
public class PlayerPackets extends java.lang.Object
Utility class for creating and queuing player packets.
-
-
Constructor Summary
Constructors Constructor Description PlayerPackets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RSPacketBufferNode
createEighthAction(int id, boolean ctrlDown)
Creates a packet buffer node for sending the eighth player action.static RSPacketBufferNode
createFifthAction(int id, boolean ctrlDown)
Creates a packet buffer node for the fifth action.static RSPacketBufferNode
createFirstAction(int id, boolean ctrlDown)
Creates a packet buffer node for the first action with the given ID and control key input.static RSPacketBufferNode
createFourthAction(int id, boolean ctrlDown)
Creates a packet buffer node for the fourth action with the given ID and ctrlDown flag.static RSPacketBufferNode
createItemOnPlayerPacket(int playerIndex, int itemId, int itemSlot, int itemWidgetId, boolean ctrlDown)
Creates a packet buffer node for creating an item on a player.static RSPacketBufferNode
createSecondAction(int id, boolean ctrlDown)
Creates a second action packet buffer node.static RSPacketBufferNode
createSeventhAction(int id, boolean ctrlDown)
Creates and prepares a RSPacketBufferNode for the seventh action with the given id and ctrlDown value.static RSPacketBufferNode
createSixthAction(int id, boolean ctrlDown)
Creates a packet buffer node for the sixth action with the given id and ctrlDown value.static RSPacketBufferNode
createSpellOnPlayer(int id, int spellWidgetId, boolean ctrlDown)
Creates a RSPacketBufferNode for casting a spell on a player.static RSPacketBufferNode
createThirdAction(int id, boolean ctrlDown)
Creates a third action packet buffer node.static RSPacketBufferNode
createWidgetOnPlayer(int id, int sourceItemId, int sourceSlot, int sourceWidgetId, boolean ctrlDown)
Creates a packet buffer node for creating a widget on a player.static void
queueItemUseOnPlayerPacket(int playerIndex, int itemId, int itemSlot, int itemWidgetId, boolean ctrlDown)
Sends a packet to use an item on a player.static void
queuePlayerAction1Packet(int playerIndex, boolean ctrlDown)
Queues a player's action packet and sends it.static void
queuePlayerAction2Packet(int playerIndex, boolean ctrlDown)
Queues a player action and sends it as a packet.static void
queuePlayerAction3Packet(int playerIndex, boolean ctrlDown)
Queues a player action packet with the specified player index and control key state.static void
queuePlayerAction4Packet(int playerIndex, boolean ctrlDown)
Sends the fourth player action packet.static void
queuePlayerAction5Packet(int playerIndex, boolean ctrlDown)
Queues the 5th action packet for a player.static void
queuePlayerAction6Packet(int playerIndex, boolean ctrlDown)
Queues and sends a player action packet with the specified player index and control status.static void
queuePlayerAction7Packet(int playerIndex, boolean ctrlDown)
Queues the 7th player action packet and sends it.static void
queuePlayerAction8Packet(int playerIndex, boolean ctrlDown)
Queues the player's eighth action packet with the specified player index and control key state.static void
queueSpellOnPlayerPacket(int playerIndex, int spellWidgetId, boolean ctrlDown)
Queues a spell packet to be sent to a player.
-
-
-
Method Detail
-
queueItemUseOnPlayerPacket
public static void queueItemUseOnPlayerPacket(int playerIndex, int itemId, int itemSlot, int itemWidgetId, boolean ctrlDown)
Sends a packet to use an item on a player.- Parameters:
playerIndex
- the index of the player to use the item onitemId
- the ID of the item to be useditemSlot
- the slot of the item in the player's inventoryitemWidgetId
- the widget ID of the itemctrlDown
- true if the control key is being held down, false otherwise
-
queueSpellOnPlayerPacket
public static void queueSpellOnPlayerPacket(int playerIndex, int spellWidgetId, boolean ctrlDown)
Queues a spell packet to be sent to a player.- Parameters:
playerIndex
- the index of the playerspellWidgetId
- the widget ID of the spellctrlDown
- indicates if the control key is being held down
-
queuePlayerAction1Packet
public static void queuePlayerAction1Packet(int playerIndex, boolean ctrlDown)
Queues a player's action packet and sends it.- Parameters:
playerIndex
- the index of the playerctrlDown
- true if the control key is down, false otherwise
-
queuePlayerAction2Packet
public static void queuePlayerAction2Packet(int playerIndex, boolean ctrlDown)
Queues a player action and sends it as a packet.- Parameters:
playerIndex
- the index of the playerctrlDown
- true if the control key is down, false otherwise
-
queuePlayerAction3Packet
public static void queuePlayerAction3Packet(int playerIndex, boolean ctrlDown)
Queues a player action packet with the specified player index and control key state.- Parameters:
playerIndex
- the index of the playerctrlDown
- true if the control key is pressed, false otherwise
-
queuePlayerAction4Packet
public static void queuePlayerAction4Packet(int playerIndex, boolean ctrlDown)
Sends the fourth player action packet.- Parameters:
playerIndex
- the index of the playerctrlDown
- true if the control key is down, false otherwise
-
queuePlayerAction5Packet
public static void queuePlayerAction5Packet(int playerIndex, boolean ctrlDown)
Queues the 5th action packet for a player.- Parameters:
playerIndex
- the index of the playerctrlDown
- true if the control key is down, false otherwise
-
queuePlayerAction6Packet
public static void queuePlayerAction6Packet(int playerIndex, boolean ctrlDown)
Queues and sends a player action packet with the specified player index and control status.- Parameters:
playerIndex
- the index of the playerctrlDown
- true if the control key is down, false otherwise
-
queuePlayerAction7Packet
public static void queuePlayerAction7Packet(int playerIndex, boolean ctrlDown)
Queues the 7th player action packet and sends it.- Parameters:
playerIndex
- the index of the playerctrlDown
- the flag indicating whether the CTRL key is down or not
-
queuePlayerAction8Packet
public static void queuePlayerAction8Packet(int playerIndex, boolean ctrlDown)
Queues the player's eighth action packet with the specified player index and control key state.- Parameters:
playerIndex
- the index of the playerctrlDown
- true if the control key is down, false otherwise
-
createItemOnPlayerPacket
public static RSPacketBufferNode createItemOnPlayerPacket(int playerIndex, int itemId, int itemSlot, int itemWidgetId, boolean ctrlDown)
Creates a packet buffer node for creating an item on a player.- Parameters:
playerIndex
- the index of the player to create the item onitemId
- the id of the item to createitemSlot
- the slot of the item to createitemWidgetId
- the widget id of the item to createctrlDown
- true if the control key is pressed while creating the item, false otherwise- Returns:
- the created RSPacketBufferNode
-
createWidgetOnPlayer
public static RSPacketBufferNode createWidgetOnPlayer(int id, int sourceItemId, int sourceSlot, int sourceWidgetId, boolean ctrlDown)
Creates a packet buffer node for creating a widget on a player.- Parameters:
id
- the widget idsourceItemId
- the source item idsourceSlot
- the source slotsourceWidgetId
- the source widget idctrlDown
- true if the control key is down, false otherwise- Returns:
- the created packet buffer node
-
createSpellOnPlayer
public static RSPacketBufferNode createSpellOnPlayer(int id, int spellWidgetId, boolean ctrlDown)
Creates a RSPacketBufferNode for casting a spell on a player.- Parameters:
id
- the ID of the spellspellWidgetId
- the ID of the spell widgetctrlDown
- true if the control key is pressed, false otherwise- Returns:
- the created RSPacketBufferNode
-
createFirstAction
public static RSPacketBufferNode createFirstAction(int id, boolean ctrlDown)
Creates a packet buffer node for the first action with the given ID and control key input.- Parameters:
id
- the ID of the actionctrlDown
- true if control key is down, false otherwise- Returns:
- the packet buffer node for the first action
-
createSecondAction
public static RSPacketBufferNode createSecondAction(int id, boolean ctrlDown)
Creates a second action packet buffer node.- Parameters:
id
- the ID of the actionctrlDown
- a boolean indicating whether the control key is pressed- Returns:
- the packet buffer node with the specified ID and control key status
-
createThirdAction
public static RSPacketBufferNode createThirdAction(int id, boolean ctrlDown)
Creates a third action packet buffer node.- Parameters:
id
- the ID of the actionctrlDown
- a boolean indicating if the control key is pressed down- Returns:
- the created packet buffer node
-
createFourthAction
public static RSPacketBufferNode createFourthAction(int id, boolean ctrlDown)
Creates a packet buffer node for the fourth action with the given ID and ctrlDown flag.- Parameters:
id
- the ID for the actionctrlDown
- true if the Ctrl key is down, false otherwise- Returns:
- the created RSPacketBufferNode
-
createFifthAction
public static RSPacketBufferNode createFifthAction(int id, boolean ctrlDown)
Creates a packet buffer node for the fifth action.- Parameters:
id
- the id of the actionctrlDown
- indicates if the control key is pressed- Returns:
- the created packet buffer node
-
createSixthAction
public static RSPacketBufferNode createSixthAction(int id, boolean ctrlDown)
Creates a packet buffer node for the sixth action with the given id and ctrlDown value.- Parameters:
id
- the id of the sixth actionctrlDown
- true if the ctrl key is pressed, false otherwise- Returns:
- the created RSPacketBufferNode
-
createSeventhAction
public static RSPacketBufferNode createSeventhAction(int id, boolean ctrlDown)
Creates and prepares a RSPacketBufferNode for the seventh action with the given id and ctrlDown value.- Parameters:
id
- the id of the actionctrlDown
- true if the control key is pressed, false otherwise- Returns:
- the prepared RSPacketBufferNode
-
createEighthAction
public static RSPacketBufferNode createEighthAction(int id, boolean ctrlDown)
Creates a packet buffer node for sending the eighth player action.- Parameters:
id
- the id of the actionctrlDown
- whether the control key is down- Returns:
- the created packet buffer node
-
-