Record Class GameAction
java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.GameAction
- Record Components:
actionId- the action type ID (seeActionTypes)param1- first action parameter (often the option / op index)param2- second action parameter (for a COMPONENT action, the slot / sub-component id, or-1when there is none)param3- third action parameter (for a COMPONENT action, the packed(iface<<16)|compcomponent hash)
A game action to be queued for execution via the pipe RPC.
Actions represent interactions such as clicking entities, using items, or
interacting with interface components. The meaning of the parameters depends on
the actionId.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGameAction(int actionId, int param1, int param2, int param3) Creates an instance of aGameActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintactionId()Returns the value of theactionIdrecord component.static GameActioncomponentTrigger(int interfaceId, int componentId, int subId, int triggerType, int arg) AActionTypes.COMPONENT_TRIGGERaction: fire the CS2 event trigger of typetriggerTypeon a component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intparam1()Returns the value of theparam1record component.intparam2()Returns the value of theparam2record component.intparam3()Returns the value of theparam3record component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GameAction
public GameAction(int actionId, int param1, int param2, int param3) Creates an instance of aGameActionrecord class.
-
-
Method Details
-
componentTrigger
public static GameAction componentTrigger(int interfaceId, int componentId, int subId, int triggerType, int arg) AActionTypes.COMPONENT_TRIGGERaction: fire the CS2 event trigger of typetriggerTypeon a component. The packing is the agent's:param1 = (interfaceId << 16) | componentId,param2 = (triggerType << 16) | (subId & 0xFFFF),param3 = arg.- Parameters:
subId- sub-component id, or-1for the component itselfarg- type-dependent argument; for a key trigger the packedKeyStroke.packed()
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
actionId
-
param1
-
param2
-
param3
-