Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

Player

Source

player localPlayer

Source

player array(dimensions = 1) players

Source

Use this array instead of Player() to avoid leaks

function static player.addGold(int val)

Source

function static player.addLumber(int val)

Source

function static player.addState(playerstate state, int val)

Source

function static player.clearSelection()

Source

Clears the selection for the player, deselecting all widgets.

function static player.decTechResearched(int techId, int levels)

Source

function static player.disableUserControl()

Source

Disable UI control for the player

function static player.enableUserControl()

Source

Enable UI control for the player

function static player.forceStartLocation(int index)

Source

function static player.getController() returns mapcontrol

Source

function static player.getCurrentSupply() returns int

Source

function static player.getCursorFocus() returns unit

Source

Get unit focused by mouse cursor.

function static player.getGold() returns int

Source

function static player.getId() returns int

Source

function static player.getLocale() returns string

Source

Return language locale for local player. Returns null for non-local player.

function static player.getLumber() returns int

Source

function static player.getMaxSupply() returns int

Source

function static player.getName() returns string

Source

function static player.getName(boolean removeHash) returns string

Source

Reforged names have a number attached after a hash tag, like Bob#1234

function static player.getPlayerAlliance(player otherPlayer, alliancetype whichAllianceSetting) returns boolean

Source

function static player.getScreenSize() returns vec2

Source

Get width and height of current Warcraft 3 client window. Returns vec2(0,0) for non-local player.

function static player.getSlotState() returns playerslotstate

Source

function static player.getStartLocation() returns vec2

Source

function static player.getState(playerstate state) returns int

Source

function static player.getTaxRate(player otherPlayer, playerstate whichResource) returns int

Source

function static player.getTeam() returns int

Source

function static player.hasVisibility(unit target) returns boolean

Source

function static player.hasVisibility(vec2 pos) returns boolean

Source

function static player.isAllyOf(player p) returns boolean

Source

function static player.isEnemyOf(player p) returns boolean

Source

function static player.isIngame() returns boolean

Source

function static player.isRacePrefSet(racepreference preference) returns boolean

Source

function static player.isScreenActive() returns boolean

Source

Check if client window is active. Will return false always for non-local player.

function static player.isSelectable() returns boolean

Source

function static player.isSelectionCircleEnabled() returns boolean

Source

Get if Selection Circle is enabled for local player. Returns always false for non-local player.

function static player.isSelectionEnabled() returns boolean

Source

Get if Selection is enabled for local player. Returns always false for non-local player.

function static player.isTargetIndicatorEnabled() returns boolean

Source

Return if Target Indicator is enabled for local player. Returns false for non-local player.

function static player.panCamToTimed(unit u, real time)

Source

function static player.select(unit u)

Source

function static player.selectSingle(unit u)

Source

function static player.sendSyncData(string prefix, string data) returns boolean

Source

function static player.setAbilityAvailable(int abilityId, boolean avail)

Source

function static player.setCursorEnabled(boolean enableCursor)

Source

Enable or disable mouse cursor..

function static player.setGold(int val)

Source

function static player.setHeroMaxAllowed(int amount)

Source

Sets the maximum allowed hero amount for a player

function static player.setLumber(int val)

Source

function static player.setMinimapTerrainTex(string texFile) returns boolean

Source

function static player.setName(string name)

Source

function static player.setPlayerAlliance(player otherPlayer, alliancetype whichAllianceSetting, boolean value)

Source

function static player.setPosCursor(vec2 pos)

Source

Set cursor position on screen. Uses int values internally.

function static player.setRacePreference(racepreference whichRacePreference)

Source

function static player.setRaceSelectable(boolean value)

Source

function static player.setSelectionsEnabled(boolean enableSelection, boolean enableSelectionCircle)

Source

Enable or disable player selections.

function static player.setState(playerstate state, int val)

Source

function static player.setTargetIndicator(boolean enableTargetIndicator)

Source

Set if Target Indicator is enabled for local player.

function static player.setTaxRate(player otherPlayer, playerstate whichResource, int rate)

Source

function static player.setUserControl(boolean enable)

Source

Enables / disables user UI control for the player

function static player.showChatMessage(int recipient, string message)

Source

function static player.subGold(int val)

Source

function static player.subState(playerstate state, int val)

Source

function static player.unselect(unit u)

Source