Game

object Game

Types

MouseToggleAction
Link copied to clipboard
enum MouseToggleAction : Enum<Game.MouseToggleAction>

The current set button of the mouse toggle button.

Settings
Link copied to clipboard
class Settings
Tab
Link copied to clipboard
enum Tab : Enum<Game.Tab>

Tabs which represent the different interfaces within the user interface of the game.

Functions

bottomLineTabs
Link copied to clipboard
fun bottomLineTabs(): Boolean

Whether or not the game tabs are in a bottom line.

clientState
Link copied to clipboard
fun clientState(): Int

The current client state.

closeOpenTab
Link copied to clipboard
fun closeOpenTab(): Boolean

Closes any open tab on the mobile client. This is useful because the mobile client's canvas is often underneath the tabs and when openened they can cause interaction issues. Only does something on mobile clients.

dimensions
Link copied to clipboard
fun dimensions(): Dimension

The dimensions of the Applet.

floor
Link copied to clipboard
fun floor(): Int

The current floor the client is at.

getMouseToggle
Link copied to clipboard
fun getMouseToggle(): Game.MouseToggleAction

Gets the mouse toggle state for mobile.

inViewport
Link copied to clipboard
fun inViewport(p: Point, checkIfObstructed: Boolean = true): Boolean

Whether or not the 2-dimension point is within the viewport of the applet.

isTileRendered
Link copied to clipboard
fun isTileRendered(tile: Tile): Boolean
fun isTileRendered(x: Int, y: Int, floor: Int = floor()): Boolean
loggedIn
Link copied to clipboard
fun loggedIn(): Boolean

Whether or not the player is currently logged in.

loginMessages
Link copied to clipboard
fun loginMessages(): List<String?>
loginState
Link copied to clipboard
fun loginState(): Int
logout
Link copied to clipboard
fun logout(): Boolean

Logs out of the game into either the lobby or login screen.

mapComponent
Link copied to clipboard
fun mapComponent(): Component

Returns the component of the mini-map. If the client is not loaded or the mini-map is not visible, this will return a Nil component.

mapOffset
Link copied to clipboard
fun mapOffset(): Tile

The relative offset tile for the map.

pointInViewport
Link copied to clipboard
fun pointInViewport(x: Int, y: Int, checkIfObstructed: Boolean = true): Boolean

Whether or not the 2-dimension point is within the viewport of the applet.

setMouseActionToggled
Link copied to clipboard
fun setMouseActionToggled(enabled: Boolean): Boolean

Sets the mouse toggle button to return to expected clicking for mobile.

setSingleTapToggle
Link copied to clipboard
fun setSingleTapToggle(b: Boolean)
singleTapEnabled
Link copied to clipboard
fun singleTapEnabled(): Boolean

Checks if single tap is enabled

tab
Link copied to clipboard
fun tab(): Game.Tab

Returns the current tab which is opened.

fun tab(tab: Game.Tab): Boolean

Attempts to open the specified game tab on the user interface. If the tab is already opened, it will return true.

tileHeight
Link copied to clipboard
fun tileHeight(relativeX: Int, relativeZ: Int): Int

Returns the tile height of the relative 2-dimensional tile. The 3-dimensional axis is flipped to represent the X axis being horizontal, Y axis being Vertical, and Z axis to be depth.

tileToMap
Link copied to clipboard
fun tileToMap(tile: Tile): Point

Converts the 3-dimensional tile to a 2-dimensional point on the mini-map component.

viewport
Link copied to clipboard
fun viewport(): Component
worldToScreen
Link copied to clipboard
fun worldToScreen(relativeX: Int, relativeZ: Int, h: Int): Point
fun worldToScreen(relativeX: Int, relativeY: Int?, relativeZ: Int, h: Int): Point

Converts a 3-dimensional point within the overworld to a 2-dimensional point on the screen. The 3-dimensional axis is flipped to represent the X axis being horizontal, Y axis being vertical, and Z axis to be depth.

Properties

ARRAY_COS
Link copied to clipboard
val ARRAY_COS: IntArray
ARRAY_SIN
Link copied to clipboard
val ARRAY_SIN: IntArray