Input
Provides interaction with the game world through skill casting, item usage, movement, and more.
Anti-Cheat Awareness
These functions send packets to the game server mimicking legitimate actions. Spamming inputs may send more requests than humanly possible, risking account safety. Use appropriate delays and checks in your scripts.
Game Interaction
core.input.use_skill(skill_id: number)
Attempts to cast a skill. Check cooldown with core.skill_book.is_skill_on_cooldown() first.
core.input.use_item(item_id: number)
Attempts to use an item from inventory. Verify existence with core.inventory.has_item() first.
core.input.talk_to_npc(npc_id: number) -> boolean
Begins dialogue with the specified NPC.
Returns: true if the dialogue packet was sent, false if the NPC isn't on the current map or the player is outside interaction range.
No Auto-Teleport
This function no longer teleports the player to the NPC. Position the character within range first (e.g. via core.rusher.rush() or core.input.teleport_safe()) before calling.
core.input.enter_portal()
Enters the portal at the player's current position. Ensure character is standing on a portal.
core.input.press_key(key_code: number)
Presses a key for the player. Requires a valid local player object. Does not use Windows API.
Key codes: Virtual Key Codes Reference
core.input.get_mouse_position() -> {x: number, y: number} | nil
Returns the current cursor position relative to the game window client area.
Returns: A table with x and y, or nil if the game window is unavailable or the cursor is outside the game window.
Movement
core.input.teleport(x: number, y: number)
Instantly teleports to coordinates.
Anti-Cheat Risk
Only use for one-time teleports to portals or NPCs. For repeated teleports, use teleport_safe(). Spamming this function will trigger anti-cheat detection.
core.input.teleport_safe(x: number, y: number, x_offset?: number, y_offset?: number)
Teleports toward coordinates over time with optional offsets. Functions like Kami hack.
Parameters:
x_offset(optional) - X coordinate offsety_offset(optional) - Y coordinate offset
INFO
The following movement functions do not account for manual player movement.
core.input.is_moving() -> boolean
Returns true if the player is moving.
core.input.stop_moving()
Stops player movement.
core.input.move_x(x_coord: number)
Moves player to the specified X coordinate.
core.input.move_y(y_coord: number)
Moves player to the specified Y coordinate.