Class: Unit#

Hierarchy#

Constructors#

constructor#

new Unit(owner: number | MapPlayer, unitId: number, x: number, y: number, face: number, skinId?: number): Unit

Creates a unit.

Parameters:#

NameTypeDescription
ownernumber | MapPlayerThe owner of the unit.
unitIdnumberThe rawcode of the unit.
xnumberThe x-coordinate of the unit.
ynumberThe y-coordinate of the unit.
facenumberThe direction that the unit will be facing in degrees.
skinId?numberThe skin of the unit.

Returns: Unit

Defined in: handles/unit.ts:15

Properties#

handle#

• Readonly handle: unit

Overrides: Widget.handle

Defined in: handles/unit.ts:15

Accessors#

acquireRange#

acquireRange(): number

Sets a unit's acquire range. This is the value that a unit uses to choose targets to engage with. Note that this is not the attack range. When acquisition range is greater than attack range, the unit will attempt to move towards acquired targets, and then attack. Setting acquisition range lower than attack range in the object editor limits the unit's attack range to the acquisition range, but changing a unit's acquisition range with this native does not change its attack range, nor the value displayed in the UI.

Returns: number

Defined in: handles/unit.ts:49

acquireRange(value: number): void

Sets a unit's acquire range. This is the value that a unit uses to choose targets to engage with. Note that this is not the attack range. When acquisition range is greater than attack range, the unit will attempt to move towards acquired targets, and then attack. Setting acquisition range lower than attack range in the object editor limits the unit's attack range to the acquisition range, but changing a unit's acquisition range with this native does not change its attack range, nor the value displayed in the UI.

note It is a myth that reducing acquire range with this native can limit a unit's attack range.

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:45


agility#

agility(): number

Returns: number

Defined in: handles/unit.ts:53

agility(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:57


armor#

armor(): number

Returns: number

Defined in: handles/unit.ts:61

armor(armorAmount: number): void

Parameters:#

NameType
armorAmountnumber

Returns: void

Defined in: handles/unit.ts:65


canSleep#

canSleep(): boolean

Returns: boolean

Defined in: handles/unit.ts:73

canSleep(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:69


collisionSize#

collisionSize(): number

Returns: number

Defined in: handles/unit.ts:77


color#

color(whichColor: playercolor): void

Parameters:#

NameType
whichColorplayercolor

Returns: void

Defined in: handles/unit.ts:81


currentOrder#

currentOrder(): number

Returns: number

Defined in: handles/unit.ts:85


defaultAcquireRange#

defaultAcquireRange(): number

Returns: number

Defined in: handles/unit.ts:89


defaultFlyHeight#

defaultFlyHeight(): number

Returns: number

Defined in: handles/unit.ts:93


defaultMoveSpeed#

defaultMoveSpeed(): number

Returns: number

Defined in: handles/unit.ts:97


defaultPropWindow#

defaultPropWindow(): number

Returns a unit's default propulsion window angle in degrees.

note This function is the odd case in the asymmetric prop window API, since the other prop window natives use radians.

Returns: number

Defined in: handles/unit.ts:106


defaultTurnSpeed#

defaultTurnSpeed(): number

Returns: number

Defined in: handles/unit.ts:110


experience#

experience(): number

Returns: number

Defined in: handles/unit.ts:114

experience(newXpVal: number): void

Parameters:#

NameType
newXpValnumber

Returns: void

Defined in: handles/unit.ts:118


facing#

facing(): number

Returns: number

The units facing in degrees.

Defined in: handles/unit.ts:129

facing(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:122


foodMade#

foodMade(): number

Returns: number

Defined in: handles/unit.ts:133


foodUsed#

foodUsed(): number

Returns: number

Defined in: handles/unit.ts:137


id#

id(): number

Get the unique ID of the handle. The ID is recycled once you destroy the object.

Returns: number

The unique ID of a handle object.

Defined in: handles/handle.ts:18


ignoreAlarmToggled#

ignoreAlarmToggled(): boolean

Returns: boolean

Defined in: handles/unit.ts:141


intelligence#

intelligence(): number

Returns: number

Defined in: handles/unit.ts:145

intelligence(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:149


inventorySize#

inventorySize(): number

Returns: number

Defined in: handles/unit.ts:153


invulnerable#

invulnerable(): boolean

Renders a unit invulnerable/lifts that specific invulnerability.

Returns: boolean

Defined in: handles/unit.ts:167

invulnerable(flag: boolean): void

Renders a unit invulnerable/lifts that specific invulnerability.

note The native seems to employ the 'Avul' ability, which is defined in the default AbilityData.slk. If there is no 'Avul' defined, this will crash the game.

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:163


level#

level(): number

Returns: number

Defined in: handles/unit.ts:171


life#

life(): number

Get the Widget's life.

Returns: number

Defined in: handles/widget.ts:9

life(value: number): void

Set the Widget's life.

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/widget.ts:16


localZ#

localZ(): number

Returns: number

Defined in: handles/unit.ts:175


mana#

mana(): number

Returns: number

Defined in: handles/unit.ts:179

mana(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:183


maxLife#

maxLife(): number

Returns: number

Defined in: handles/unit.ts:187

maxLife(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:191


maxMana#

maxMana(): number

Returns: number

Defined in: handles/unit.ts:195

maxMana(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:199


moveSpeed#

moveSpeed(): number

Returns: number

Defined in: handles/unit.ts:207

moveSpeed(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:203


name#

name(): string

async

Returns: string

Defined in: handles/unit.ts:214

name(value: string): void

Parameters:#

NameType
valuestring

Returns: void

Defined in: handles/unit.ts:218


nameProper#

nameProper(): string

Returns the hero's "Proper Name", which is the name displayed above the level bar.

note Will return 'null' on non-hero units.

Returns: string

Defined in: handles/unit.ts:231

nameProper(value: string): void

Parameters:#

NameType
valuestring

Returns: void

Defined in: handles/unit.ts:222


owner#

owner(): MapPlayer

Returns: MapPlayer

Defined in: handles/unit.ts:239

owner(whichPlayer: MapPlayer): void

Parameters:#

NameType
whichPlayerMapPlayer

Returns: void

Defined in: handles/unit.ts:235


paused#

paused(): boolean

Pauses a unit. A paused unit has the following properties:

  1. Buffs/effects are suspended
  2. Orders are stored when paused and fired on unpause
  3. The paused unit does not accept powerups. addItem returns true but the item is not picked up

Returns: boolean

true if the unit is paused

Defined in: handles/unit.ts:256

paused(flag: boolean): void

Pauses a unit. A paused unit has the following properties:

  1. Buffs/effects are suspended
  2. Orders are stored when paused and fired on unpause
  3. The paused unit does not accept powerups. addItem returns true but the item is not picked up

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:249


point#

point(): Point

bug If the unit is loaded into a zeppelin this will not return the position of the zeppelin but the last position of the unit before it was loaded into the zeppelin.

Returns: Point

Defined in: handles/unit.ts:265

point(whichPoint: Point): void

Parameters:#

NameType
whichPointPoint

Returns: void

Defined in: handles/unit.ts:269


pointValue#

pointValue(): number

Returns: number

Defined in: handles/unit.ts:273


propWindow#

propWindow(): number

Returns a unit's propulsion window angle in radians.

http://www.hiveworkshop.com/forums/2391397-post20.html

Returns: number

Defined in: handles/unit.ts:298

propWindow(newPropWindowAngle: number): void

Sets a unit's propulsion window to the specified angle (in radians). The propulsion window determines at which facing angle difference to the target command's location (move, attack, patrol, smart) a unit will begin to move if movement is required to fulfil the command, or if it will turn without movement. A propulsion window of 0 makes the unit unable to move at all. A propulsion window of 180 will force it to start moving as soon as the command is given (if movement is required). In practice, this means that setting a unit's prop window to 0 will prevent it from attacking.

http://www.hiveworkshop.com/forums/2391397-post20.html

Parameters:#

NameTypeDescription
newPropWindowAnglenumberThe propulsion window angle to assign. Should be in radians.

Returns: void

Defined in: handles/unit.ts:291


race#

race(): race

Returns: race

Defined in: handles/unit.ts:302


rallyDestructable#

rallyDestructable(): Destructable

Returns: Destructable

Defined in: handles/unit.ts:306


rallyPoint#

rallyPoint(): Point

Returns: Point

Defined in: handles/unit.ts:310


rallyUnit#

rallyUnit(): Unit

Returns: Unit

Defined in: handles/unit.ts:314


resourceAmount#

resourceAmount(): number

Returns: number

Defined in: handles/unit.ts:322

resourceAmount(amount: number): void

Parameters:#

NameType
amountnumber

Returns: void

Defined in: handles/unit.ts:318


selectable#

selectable(): boolean

Returns: boolean

Defined in: handles/unit.ts:326


selectionScale#

selectionScale(): number

Returns: number

Defined in: handles/unit.ts:334

selectionScale(scale: number): void

Parameters:#

NameType
scalenumber

Returns: void

Defined in: handles/unit.ts:330


show#

show(): boolean

Returns: boolean

Defined in: handles/unit.ts:343

show(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:339


skillPoints#

skillPoints(): number

Returns the units available skill points.

Returns: number

Defined in: handles/unit.ts:358

skillPoints(skillPointDelta: number): void

Adds the amount to the units available skill points. Calling with a negative number reduces the skill points by that amount. Returns false if the amount of available skill points is already zero and if it's called with any non-positive number. Returns true in any other case.

note If skillPointDelta is greater than the amount of skillpoints the hero actually can spend (like 9 for three 3-level abilities) only that amount will be added. Negative skillPointDelta works as expected.

Parameters:#

NameType
skillPointDeltanumber

Returns: void

Defined in: handles/unit.ts:372


skin#

skin(): number

Returns: number

Defined in: handles/unit.ts:347

skin(skinId: number): void

Parameters:#

NameType
skinIdnumber

Returns: void

Defined in: handles/unit.ts:351


sleeping#

sleeping(): boolean

Returns: boolean

Defined in: handles/unit.ts:376


strength#

strength(): number

Returns: number

Defined in: handles/unit.ts:380

strength(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:384


turnSpeed#

turnSpeed(): number

Returns: number

Defined in: handles/unit.ts:392

turnSpeed(value: number): void

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:388


typeId#

typeId(): number

Returns: number

Defined in: handles/unit.ts:396


userData#

userData(): number

Returns: number

Defined in: handles/unit.ts:400

userData(value: number): void

Sets a single custom integer for a unit.

note This value is not used by any standard mechanisms in Warcraft III.

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:409


waygateActive#

waygateActive(): boolean

Returns: boolean

Defined in: handles/unit.ts:417

waygateActive(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:413


x#

x(): number

bug If the unit is loaded into a zeppelin this will not return the position of the zeppelin but the last position of the unit before it was loaded into the zeppelin.

Returns: number

Defined in: handles/unit.ts:426

x(value: number): void

note If the unit has movementspeed of zero the unit will be moved but the model of the unit will not move.

note This does not cancel orders of the unit. setPosition does cancel orders.

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:434


y#

y(): number

Returns: number

Defined in: handles/unit.ts:438

y(value: number): void

note If the unit has movementspeed of zero the unit will be moved but the model of the unit will not move.

note This does not cancel orders of the unit. setPosition does cancel orders.

Parameters:#

NameType
valuenumber

Returns: void

Defined in: handles/unit.ts:446


z#

z(): number

Returns: number

Defined in: handles/unit.ts:450

Methods#

addAbility#

addAbility(abilityId: number): boolean

Parameters:#

NameType
abilityIdnumber

Returns: boolean

Defined in: handles/unit.ts:454


addAnimationProps#

addAnimationProps(animProperties: string, add: boolean): void

Parameters:#

NameType
animPropertiesstring
addboolean

Returns: void

Defined in: handles/unit.ts:458


addExperience#

addExperience(xpToAdd: number, showEyeCandy: boolean): void

Adds the input value of experience to the hero unit specified.

If the experience added exceeds the amount required for the hero to gain a level, then it will force the unit to gain a level and the remaining experience will spill over for the next level.

bug Adding negative value to experience will decrease it by the stated value, but won't lower the level even if the experience value after deduction is lower than the lower bound of the experience required to get the stated level.

bug If the value will become lower than zero, the experience won't be negative, instead of it it'll be equal to 4294967296+(supposed_negative_experience_value).

Parameters:#

NameTypeDescription
xpToAddnumberThe amount of experience to add to the hero unit.
showEyeCandybooleanIf the boolean input is true, then the hero-level-gain effect will be shown if the hero gains a level from the added experience.

Returns: void

Defined in: handles/unit.ts:478


addIndicator#

addIndicator(red: number, blue: number, green: number, alpha: number): void

Parameters:#

NameType
rednumber
bluenumber
greennumber
alphanumber

Returns: void

Defined in: handles/unit.ts:482


addItem#

addItem(whichItem: Item): boolean

Parameters:#

NameType
whichItemItem

Returns: boolean

Defined in: handles/unit.ts:486


addItemById#

addItemById(itemId: number): Item

Parameters:#

NameType
itemIdnumber

Returns: Item

Defined in: handles/unit.ts:490


addItemToSlotById#

addItemToSlotById(itemId: number, itemSlot: number): boolean

Parameters:#

NameType
itemIdnumber
itemSlotnumber

Returns: boolean

Defined in: handles/unit.ts:494


addItemToStock#

addItemToStock(itemId: number, currentStock: number, stockMax: number): void

Parameters:#

NameType
itemIdnumber
currentStocknumber
stockMaxnumber

Returns: void

Defined in: handles/unit.ts:498


addResourceAmount#

addResourceAmount(amount: number): void

Adds the amount more gold to the whichUnit gold mine.

bug If the value after adding negative amount will be less than zero, then it will display negative resource amount, but if some peasant or peon will try to gather resources from such a mine, he will bring back 0 gold and the mine will be auto-destroyed.

Parameters:#

NameTypeDescription
amountnumberThe amount of resources to add to the unit.

Returns: void

Defined in: handles/unit.ts:511


addSleepPerm#

addSleepPerm(add: boolean): void

Parameters:#

NameType
addboolean

Returns: void

Defined in: handles/unit.ts:515


addType#

addType(whichUnitType: unittype): boolean

Parameters:#

NameType
whichUnitTypeunittype

Returns: boolean

Defined in: handles/unit.ts:519


addUnitToStock#

addUnitToStock(unitId: number, currentStock: number, stockMax: number): void

Parameters:#

NameType
unitIdnumber
currentStocknumber
stockMaxnumber

Returns: void

Defined in: handles/unit.ts:523


applyTimedLife#

applyTimedLife(buffId: number, duration: number): void

Parameters:#

NameType
buffIdnumber
durationnumber

Returns: void

Defined in: handles/unit.ts:527


attachSound#

attachSound(sound: Sound): void

Parameters:#

NameType
soundSound

Returns: void

Defined in: handles/unit.ts:531


canSleepPerm#

canSleepPerm(): boolean

Returns: boolean

Defined in: handles/unit.ts:539


cancelTimedLife#

cancelTimedLife(): void

Returns: void

Defined in: handles/unit.ts:535


countBuffs#

countBuffs(removePositive: boolean, removeNegative: boolean, magic: boolean, physical: boolean, timedLife: boolean, aura: boolean, autoDispel: boolean): number

Parameters:#

NameType
removePositiveboolean
removeNegativeboolean
magicboolean
physicalboolean
timedLifeboolean
auraboolean
autoDispelboolean

Returns: number

Defined in: handles/unit.ts:543


damageAt#

damageAt(delay: number, radius: number, x: number, y: number, amount: number, attack: boolean, ranged: boolean, attackType: attacktype, damageType: damagetype, weaponType: weapontype): boolean

Parameters:#

NameType
delaynumber
radiusnumber
xnumber
ynumber
amountnumber
attackboolean
rangedboolean
attackTypeattacktype
damageTypedamagetype
weaponTypeweapontype

Returns: boolean

Defined in: handles/unit.ts:547


damageTarget#

damageTarget(target: widget, amount: number, attack: boolean, ranged: boolean, attackType: attacktype, damageType: damagetype, weaponType: weapontype): boolean

Deals damage to target widget from a source unit.

note For some insight about the different configurations of the different types see this post.

Parameters:#

NameTypeDescription
targetwidgetThe target being damaged.
amountnumberHow much damage is being dealt.
attackbooleanConsider the damage dealt as being an attack.
rangedbooleanConsider the damage dealt as being from a ranged source.
attackTypeattacktype
damageTypedamagetype
weaponTypeweapontype

Returns: boolean

Defined in: handles/unit.ts:574


decAbilityLevel#

decAbilityLevel(abilCode: number): number

Decreases the level of a unit's ability by 1. The level will not go below 1.

Parameters:#

NameTypeDescription
abilCodenumberThe four digit rawcode representation of the ability.

Returns: number

The new ability level.

Defined in: handles/unit.ts:583


destroy#

destroy(): void

Instantly removes the unit from the game.

Returns: void

Defined in: handles/unit.ts:590


disableAbility#

disableAbility(abilId: number, flag: boolean, hideUI: boolean): void

Parameters:#

NameType
abilIdnumber
flagboolean
hideUIboolean

Returns: void

Defined in: handles/unit.ts:594


dropItem#

dropItem(whichItem: Item, x: number, y: number): boolean

Parameters:#

NameType
whichItemItem
xnumber
ynumber

Returns: boolean

Defined in: handles/unit.ts:598


dropItemFromSlot#

dropItemFromSlot(whichItem: Item, slot: number): boolean

Parameters:#

NameType
whichItemItem
slotnumber

Returns: boolean

Defined in: handles/unit.ts:602


dropItemTarget#

dropItemTarget(whichItem: Item, target: Widget): boolean

Parameters:#

NameType
whichItemItem
targetWidget

Returns: boolean

Defined in: handles/unit.ts:606


endAbilityCooldown#

endAbilityCooldown(abilCode: number): void

Parameters:#

NameType
abilCodenumber

Returns: void

Defined in: handles/unit.ts:610


getAbility#

getAbility(abilId: number): ability

Parameters:#

NameType
abilIdnumber

Returns: ability

Defined in: handles/unit.ts:614


getAbilityByIndex#

getAbilityByIndex(index: number): ability

Parameters:#

NameType
indexnumber

Returns: ability

Defined in: handles/unit.ts:618


getAbilityCooldown#

getAbilityCooldown(abilId: number, level: number): number

Parameters:#

NameType
abilIdnumber
levelnumber

Returns: number

Defined in: handles/unit.ts:622


getAbilityCooldownRemaining#

getAbilityCooldownRemaining(abilId: number): number

Parameters:#

NameType
abilIdnumber

Returns: number

Defined in: handles/unit.ts:626


getAbilityLevel#

getAbilityLevel(abilCode: number): number

Returns the level of the ability for the unit.

note This function is not zero indexed.

Parameters:#

NameType
abilCodenumber

Returns: number

Defined in: handles/unit.ts:634


getAbilityManaCost#

getAbilityManaCost(abilId: number, level: number): number

Parameters:#

NameType
abilIdnumber
levelnumber

Returns: number

Defined in: handles/unit.ts:638


getAgility#

getAgility(includeBonuses: boolean): number

Parameters:#

NameType
includeBonusesboolean

Returns: number

Defined in: handles/unit.ts:642


getAttackCooldown#

getAttackCooldown(weaponIndex: number): number

Parameters:#

NameType
weaponIndexnumber

Returns: number

Defined in: handles/unit.ts:646


getBaseDamage#

getBaseDamage(weaponIndex: number): number

Parameters:#

NameType
weaponIndexnumber

Returns: number

Defined in: handles/unit.ts:650


getDiceNumber#

getDiceNumber(weaponIndex: number): number

Parameters:#

NameType
weaponIndexnumber

Returns: number

Defined in: handles/unit.ts:654


getDiceSides#

getDiceSides(weaponIndex: number): number

Parameters:#

NameType
weaponIndexnumber

Returns: number

Defined in: handles/unit.ts:658


getField#

getField(field: unitbooleanfield | unitintegerfield | unitrealfield | unitstringfield): string | number | boolean

Parameters:#

NameType
fieldunitbooleanfield | unitintegerfield | unitrealfield | unitstringfield

Returns: string | number | boolean

Defined in: handles/unit.ts:662


getHeroLevel#

getHeroLevel(): number

Returns: number

Defined in: handles/unit.ts:691


getIgnoreAlarm#

getIgnoreAlarm(flag: boolean): boolean

Parameters:#

NameType
flagboolean

Returns: boolean

Defined in: handles/unit.ts:695


getIntelligence#

getIntelligence(includeBonuses: boolean): number

Parameters:#

NameType
includeBonusesboolean

Returns: number

Defined in: handles/unit.ts:699


getItemInSlot#

getItemInSlot(slot: number): Item

Parameters:#

NameType
slotnumber

Returns: Item

Defined in: handles/unit.ts:703


getState#

getState(whichUnitState: unitstate): number

Parameters:#

NameType
whichUnitStateunitstate

Returns: number

Defined in: handles/unit.ts:707


getStrength#

getStrength(includeBonuses: boolean): number

Parameters:#

NameType
includeBonusesboolean

Returns: number

Defined in: handles/unit.ts:711


getflyHeight#

getflyHeight(): number

Returns: number

Defined in: handles/unit.ts:687


hasBuffs#

hasBuffs(removePositive: boolean, removeNegative: boolean, magic: boolean, physical: boolean, timedLife: boolean, aura: boolean, autoDispel: boolean): boolean

Parameters:#

NameType
removePositiveboolean
removeNegativeboolean
magicboolean
physicalboolean
timedLifeboolean
auraboolean
autoDispelboolean

Returns: boolean

Defined in: handles/unit.ts:715


hasItem#

hasItem(whichItem: Item): boolean

Parameters:#

NameType
whichItemItem

Returns: boolean

Defined in: handles/unit.ts:719


hideAbility#

hideAbility(abilId: number, flag: boolean): void

Parameters:#

NameType
abilIdnumber
flagboolean

Returns: void

Defined in: handles/unit.ts:723


inForce#

inForce(whichForce: Force): boolean

Parameters:#

NameType
whichForceForce

Returns: boolean

Defined in: handles/unit.ts:741


inGroup#

inGroup(whichGroup: Group): boolean

Parameters:#

NameType
whichGroupGroup

Returns: boolean

Defined in: handles/unit.ts:745


inRange#

inRange(x: number, y: number, distance: number): boolean

Parameters:#

NameType
xnumber
ynumber
distancenumber

Returns: boolean

Defined in: handles/unit.ts:749


inRangeOfPoint#

inRangeOfPoint(whichPoint: Point, distance: number): boolean

Parameters:#

NameType
whichPointPoint
distancenumber

Returns: boolean

Defined in: handles/unit.ts:753


inRangeOfUnit#

inRangeOfUnit(otherUnit: Unit, distance: number): boolean

Parameters:#

NameType
otherUnitUnit
distancenumber

Returns: boolean

Defined in: handles/unit.ts:757


inTransport#

inTransport(whichTransport: Unit): boolean

Parameters:#

NameType
whichTransportUnit

Returns: boolean

Defined in: handles/unit.ts:765


incAbilityLevel#

incAbilityLevel(abilCode: number): number

Increases the level of a unit's ability by 1.

note incAbilityLevel can increase an abilities level to maxlevel+1. On maxlevel+1 all ability fields are 0.

http://www.wc3c.net/showthread.php?p=1029039#post1029039 http://www.hiveworkshop.com/forums/lab-715/silenceex-everything-you-dont-know-about-silence-274351/.

Parameters:#

NameTypeDescription
abilCodenumberThe four digit rawcode representation of the ability.

Returns: number

The new ability level.

Defined in: handles/unit.ts:737


interruptAttack#

interruptAttack(): void

Returns: void

Defined in: handles/unit.ts:761


isAlive#

isAlive(): boolean

Returns: boolean

Defined in: handles/unit.ts:769


isAlly#

isAlly(whichPlayer: MapPlayer): boolean

Parameters:#

NameType
whichPlayerMapPlayer

Returns: boolean

Defined in: handles/unit.ts:773


isEnemy#

isEnemy(whichPlayer: MapPlayer): boolean

Parameters:#

NameType
whichPlayerMapPlayer

Returns: boolean

Defined in: handles/unit.ts:777


isExperienceSuspended#

isExperienceSuspended(): boolean

Returns: boolean

Defined in: handles/unit.ts:781


isFogged#

isFogged(whichPlayer: MapPlayer): boolean

Parameters:#

NameType
whichPlayerMapPlayer

Returns: boolean

Defined in: handles/unit.ts:785


isHero#

isHero(): boolean

Returns: boolean

Defined in: handles/unit.ts:789


isIllusion#

isIllusion(): boolean

Returns: boolean

Defined in: handles/unit.ts:793


isLoaded#

isLoaded(): boolean

Returns: boolean

Defined in: handles/unit.ts:797


isMasked#

isMasked(whichPlayer: MapPlayer): boolean

Parameters:#

NameType
whichPlayerMapPlayer

Returns: boolean

Defined in: handles/unit.ts:801


isSelected#

isSelected(whichPlayer: MapPlayer): boolean

Parameters:#

NameType
whichPlayerMapPlayer

Returns: boolean

Defined in: handles/unit.ts:805


isUnit#

isUnit(whichSpecifiedUnit: Unit): boolean

note Useless. Use operator == instead.

Parameters:#

NameType
whichSpecifiedUnitUnit

Returns: boolean

Defined in: handles/unit.ts:844


isUnitType#

isUnitType(whichUnitType: unittype): boolean

note This native returns a boolean, which when typecasted to integer might be greater than 1. It's probably implemented via a bitset.

note In past patches this native bugged when used in conditionfuncs. The fix back then was to compare with true (==true). I cannot reproduce the faulty behaviour in patch 1.27 so this is only a note.

Parameters:#

NameTypeDescription
whichUnitTypeunittype

Returns: boolean

Defined in: handles/unit.ts:855


isVisible#

isVisible(whichPlayer: MapPlayer): boolean

Parameters:#

NameType
whichPlayerMapPlayer

Returns: boolean

Defined in: handles/unit.ts:859


issueBuildOrder#

issueBuildOrder(unit: string | number, x: number, y: number): boolean

Parameters:#

NameType
unitstring | number
xnumber
ynumber

Returns: boolean

Defined in: handles/unit.ts:809


issueImmediateOrder#

issueImmediateOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest): boolean

Parameters:#

NameType
orderstring | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest

Returns: boolean

Defined in: handles/unit.ts:813


issueInstantOrderAt#

issueInstantOrderAt(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, x: number, y: number, instantTargetWidget: Widget): boolean

Parameters:#

NameType
orderstring | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest
xnumber
ynumber
instantTargetWidgetWidget

Returns: boolean

Defined in: handles/unit.ts:817


issueInstantTargetOrder#

issueInstantTargetOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, targetWidget: Widget, instantTargetWidget: Widget): boolean

Parameters:#

NameType
orderstring | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest
targetWidgetWidget
instantTargetWidgetWidget

Returns: boolean

Defined in: handles/unit.ts:823


issueOrderAt#

issueOrderAt(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, x: number, y: number): boolean

Parameters:#

NameType
orderstring | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest
xnumber
ynumber

Returns: boolean

Defined in: handles/unit.ts:829


issuePointOrder#

issuePointOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, whichPoint: Point): boolean

Parameters:#

NameType
orderstring | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest
whichPointPoint

Returns: boolean

Defined in: handles/unit.ts:833


issueTargetOrder#

issueTargetOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, targetWidget: Widget): boolean

Parameters:#

NameType
orderstring | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest
targetWidgetWidget

Returns: boolean

Defined in: handles/unit.ts:837


kill#

kill(): void

Kills the unit.

Returns: void

Defined in: handles/unit.ts:866


lookAt#

lookAt(whichBone: string, lookAtTarget: Unit, offsetX: number, offsetY: number, offsetZ: number): void

Locks a unit's bone to face the target until ResetUnitLookAt is called.

The offset coordinates ( X, Y, Z ) are taken from the target's origin. The bones will lock to the lookAtTarget, offset by those coordinates. You can't have both the head and the chest locked to the target at the same time.

note The parameter whichBone can only move the head bones and the chest bones. All other input will default to the head bone. However, the function only looks for the helper named "Bone_Head" (or "Bone_Chest") in the MDL, so you can just rename a helper so that it will move that set of bones instead.

note SetUnitLookAt is affected by animation speed and blend time.

note How to instantly set a unit's facing

Parameters:#

NameTypeDescription
whichBonestringThe bone to lock onto the target. The engine only supports locking the head and the chest. To lock the head, you can put in any input except a null string. To lock the chest, the string must start with "bone_chest". All leading spaces are ignored, it is case insensitive, and anything after the first non-leading space will be ignored.
lookAtTargetUnit-
offsetXnumberThe x-offset from lookAtTarget's origin point.
offsetYnumberThe y-offset from lookAtTarget's origin point.
offsetZnumberThe z-offset from lookAtTarget's origin point (this already factors in the terrain Z).

Returns: void

Defined in: handles/unit.ts:892


makeAbilityPermanent#

makeAbilityPermanent(permanent: boolean, abilityId: number): void

This native is used to keep abilities when morphing units

Parameters:#

NameType
permanentboolean
abilityIdnumber

Returns: void

Defined in: handles/unit.ts:899


modifySkillPoints#

modifySkillPoints(skillPointDelta: number): boolean

Parameters:#

NameType
skillPointDeltanumber

Returns: boolean

Defined in: handles/unit.ts:903


pauseEx#

pauseEx(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:907


pauseTimedLife#

pauseTimedLife(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:911


queueAnimation#

queueAnimation(whichAnimation: string): void

Parameters:#

NameType
whichAnimationstring

Returns: void

Defined in: handles/unit.ts:915


recycleGuardPosition#

recycleGuardPosition(): void

Returns: void

Defined in: handles/unit.ts:919


removeAbility#

removeAbility(abilityId: number): boolean

Parameters:#

NameType
abilityIdnumber

Returns: boolean

Defined in: handles/unit.ts:923


removeBuffs#

removeBuffs(removePositive: boolean, removeNegative: boolean): void

Parameters:#

NameType
removePositiveboolean
removeNegativeboolean

Returns: void

Defined in: handles/unit.ts:927


removeBuffsEx#

removeBuffsEx(removePositive: boolean, removeNegative: boolean, magic: boolean, physical: boolean, timedLife: boolean, aura: boolean, autoDispel: boolean): void

Parameters:#

NameType
removePositiveboolean
removeNegativeboolean
magicboolean
physicalboolean
timedLifeboolean
auraboolean
autoDispelboolean

Returns: void

Defined in: handles/unit.ts:931


removeGuardPosition#

removeGuardPosition(): void

Returns: void

Defined in: handles/unit.ts:935


removeItem#

removeItem(whichItem: Item): void

The item is removed from the Hero and placed on the ground at the Hero's feet.

Parameters:#

NameTypeDescription
whichItemItemThe item to remove.

Returns: void

Defined in: handles/unit.ts:943


removeItemFromSlot#

removeItemFromSlot(itemSlot: number): Item

If an item exists in the given slot, it is removed from the Hero and placed on the ground at the Hero's feed

Parameters:#

NameTypeDescription
itemSlotnumber

Returns: Item

Defined in: handles/unit.ts:952


removeItemFromStock#

removeItemFromStock(itemId: number): void

Parameters:#

NameType
itemIdnumber

Returns: void

Defined in: handles/unit.ts:956


removeType#

removeType(whichUnitType: unittype): boolean

Parameters:#

NameType
whichUnitTypeunittype

Returns: boolean

Defined in: handles/unit.ts:960


removeUnitFromStock#

removeUnitFromStock(itemId: number): void

Parameters:#

NameType
itemIdnumber

Returns: void

Defined in: handles/unit.ts:964


resetCooldown#

resetCooldown(): void

Returns: void

Defined in: handles/unit.ts:968


resetLookAt#

resetLookAt(): void

Unlocks the bone oriented by lookAt, allowing it to move in accordance to the unit's regular animations.

Returns: void

Defined in: handles/unit.ts:975


revive#

revive(x: number, y: number, doEyecandy: boolean): boolean

Parameters:#

NameType
xnumber
ynumber
doEyecandyboolean

Returns: boolean

Defined in: handles/unit.ts:979


reviveAtPoint#

reviveAtPoint(whichPoint: Point, doEyecandy: boolean): boolean

Parameters:#

NameType
whichPointPoint
doEyecandyboolean

Returns: boolean

Defined in: handles/unit.ts:983


select#

select(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:987


selectSkill#

selectSkill(abilCode: number): void

Parameters:#

NameType
abilCodenumber

Returns: void

Defined in: handles/unit.ts:991


setAbilityCooldown#

setAbilityCooldown(abilId: number, level: number, cooldown: number): void

Parameters:#

NameType
abilIdnumber
levelnumber
cooldownnumber

Returns: void

Defined in: handles/unit.ts:995


setAbilityLevel#

setAbilityLevel(abilCode: number, level: number): number

Parameters:#

NameType
abilCodenumber
levelnumber

Returns: number

Defined in: handles/unit.ts:999


setAbilityManaCost#

setAbilityManaCost(abilId: number, level: number, manaCost: number): void

Parameters:#

NameType
abilIdnumber
levelnumber
manaCostnumber

Returns: void

Defined in: handles/unit.ts:1003


setAgility#

setAgility(value: number, permanent: boolean): void

Parameters:#

NameType
valuenumber
permanentboolean

Returns: void

Defined in: handles/unit.ts:1007


setAnimation#

setAnimation(whichAnimation: string | number): void

Parameters:#

NameType
whichAnimationstring | number

Returns: void

Defined in: handles/unit.ts:1011


setAnimationWithRarity#

setAnimationWithRarity(whichAnimation: string, rarity: raritycontrol): void

Parameters:#

NameType
whichAnimationstring
rarityraritycontrol

Returns: void

Defined in: handles/unit.ts:1019


setAttackCooldown#

setAttackCooldown(cooldown: number, weaponIndex: number): void

Parameters:#

NameType
cooldownnumber
weaponIndexnumber

Returns: void

Defined in: handles/unit.ts:1023


setBaseDamage#

setBaseDamage(baseDamage: number, weaponIndex: number): void

Parameters:#

NameType
baseDamagenumber
weaponIndexnumber

Returns: void

Defined in: handles/unit.ts:1027


setBlendTime#

setBlendTime(timeScale: number): void

Parameters:#

NameType
timeScalenumber

Returns: void

Defined in: handles/unit.ts:1031


setConstructionProgress#

setConstructionProgress(constructionPercentage: number): void

Parameters:#

NameType
constructionPercentagenumber

Returns: void

Defined in: handles/unit.ts:1035


setCreepGuard#

setCreepGuard(creepGuard: boolean): void

Parameters:#

NameType
creepGuardboolean

Returns: void

Defined in: handles/unit.ts:1039


setDiceNumber#

setDiceNumber(diceNumber: number, weaponIndex: number): void

Parameters:#

NameType
diceNumbernumber
weaponIndexnumber

Returns: void

Defined in: handles/unit.ts:1043


setDiceSides#

setDiceSides(diceSides: number, weaponIndex: number): void

Parameters:#

NameType
diceSidesnumber
weaponIndexnumber

Returns: void

Defined in: handles/unit.ts:1047


setExperience#

setExperience(newXpVal: number, showEyeCandy: boolean): void

Parameters:#

NameType
newXpValnumber
showEyeCandyboolean

Returns: void

Defined in: handles/unit.ts:1051


setExploded#

setExploded(exploded: boolean): void

Parameters:#

NameType
explodedboolean

Returns: void

Defined in: handles/unit.ts:1055


setFacingEx#

setFacingEx(facingAngle: number): void

Parameters:#

NameType
facingAnglenumber

Returns: void

Defined in: handles/unit.ts:1059


setField#

setField(field: unitbooleanfield | unitintegerfield | unitrealfield | unitstringfield, value: string | number | boolean): boolean

Parameters:#

NameType
fieldunitbooleanfield | unitintegerfield | unitrealfield | unitstringfield
valuestring | number | boolean

Returns: boolean

Defined in: handles/unit.ts:1063


setHeroLevel#

setHeroLevel(level: number, showEyeCandy: boolean): void

Parameters:#

NameType
levelnumber
showEyeCandyboolean

Returns: void

Defined in: handles/unit.ts:1083


setIntelligence#

setIntelligence(value: number, permanent: boolean): void

Parameters:#

NameType
valuenumber
permanentboolean

Returns: void

Defined in: handles/unit.ts:1087


setItemTypeSlots#

setItemTypeSlots(slots: number): void

Parameters:#

NameType
slotsnumber

Returns: void

Defined in: handles/unit.ts:1091


setOwner#

setOwner(whichPlayer: MapPlayer, changeColor: boolean): void

Parameters:#

NameType
whichPlayerMapPlayer
changeColorboolean

Returns: void

Defined in: handles/unit.ts:1095


setPathing#

setPathing(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:1099


setPosition#

setPosition(x: number, y: number): void

note This cancels the orders of the unit. If you want to move a unit without canceling its orders set x/y.

Parameters:#

NameType
xnumber
ynumber

Returns: void

Defined in: handles/unit.ts:1106


setRescuable#

setRescuable(byWhichPlayer: MapPlayer, flag: boolean): void

Parameters:#

NameType
byWhichPlayerMapPlayer
flagboolean

Returns: void

Defined in: handles/unit.ts:1110


setRescueRange#

setRescueRange(range: number): void

Parameters:#

NameType
rangenumber

Returns: void

Defined in: handles/unit.ts:1114


setScale#

setScale(scaleX: number, scaleY: number, scaleZ: number): void

bug Only takes scaleX into account and uses scaleX for all three dimensions.

Parameters:#

NameTypeDescription
scaleXnumberThis is actually the scale for all dimensions
scaleYnumberThis parameter is not taken into account
scaleZnumberThis parameter is not taken into account

Returns: void

Defined in: handles/unit.ts:1124


setState#

setState(whichUnitState: unitstate, newVal: number): void

Parameters:#

NameType
whichUnitStateunitstate
newValnumber

Returns: void

Defined in: handles/unit.ts:1128


setStrength#

setStrength(value: number, permanent: boolean): void

Parameters:#

NameType
valuenumber
permanentboolean

Returns: void

Defined in: handles/unit.ts:1132


setTimeScale#

setTimeScale(timeScale: number): void

Parameters:#

NameType
timeScalenumber

Returns: void

Defined in: handles/unit.ts:1136


setUnitAttackCooldown#

setUnitAttackCooldown(cooldown: number, weaponIndex: number): void

Parameters:#

NameType
cooldownnumber
weaponIndexnumber

Returns: void

Defined in: handles/unit.ts:1140


setUnitTypeSlots#

setUnitTypeSlots(slots: number): void

Parameters:#

NameType
slotsnumber

Returns: void

Defined in: handles/unit.ts:1144


setUpgradeProgress#

setUpgradeProgress(upgradePercentage: number): void

Parameters:#

NameType
upgradePercentagenumber

Returns: void

Defined in: handles/unit.ts:1148


setUseAltIcon#

setUseAltIcon(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:1152


setUseFood#

setUseFood(useFood: boolean): void

Parameters:#

NameType
useFoodboolean

Returns: void

Defined in: handles/unit.ts:1156


setVertexColor#

setVertexColor(red: number, green: number, blue: number, alpha: number): void

Sets the unit's color to the color defined by (red,green,blue,alpha).

Parameters:#

NameTypeDescription
rednumberAn integer from 0-255 determining the amount of red color.
greennumberAn integer from 0-255 determining the amount of green color.
bluenumberAn integer from 0-255 determining the amount of blue color.
alphanumberAn integer from 0-255 determining the amount of alpha color.

Returns: void

Defined in: handles/unit.ts:1167


setflyHeight#

setflyHeight(value: number, rate: number): void

Parameters:#

NameType
valuenumber
ratenumber

Returns: void

Defined in: handles/unit.ts:1079


shareVision#

shareVision(whichPlayer: MapPlayer, share: boolean): void

Parameters:#

NameType
whichPlayerMapPlayer
shareboolean

Returns: void

Defined in: handles/unit.ts:1171


showTeamGlow#

showTeamGlow(show: boolean): void

Parameters:#

NameType
showboolean

Returns: void

Defined in: handles/unit.ts:1175


startAbilityCooldown#

startAbilityCooldown(abilCode: number, cooldown: number): void

Parameters:#

NameType
abilCodenumber
cooldownnumber

Returns: void

Defined in: handles/unit.ts:1179


stripLevels#

stripLevels(howManyLevels: number): boolean

Parameters:#

NameType
howManyLevelsnumber

Returns: boolean

Defined in: handles/unit.ts:1183


suspendDecay#

suspendDecay(suspend: boolean): void

Parameters:#

NameType
suspendboolean

Returns: void

Defined in: handles/unit.ts:1187


suspendExperience#

suspendExperience(flag: boolean): void

Parameters:#

NameType
flagboolean

Returns: void

Defined in: handles/unit.ts:1191


useItem#

useItem(whichItem: Item): boolean

Parameters:#

NameType
whichItemItem

Returns: boolean

Defined in: handles/unit.ts:1195


useItemAt#

useItemAt(whichItem: Item, x: number, y: number): boolean

Parameters:#

NameType
whichItemItem
xnumber
ynumber

Returns: boolean

Defined in: handles/unit.ts:1199


useItemTarget#

useItemTarget(whichItem: Item, target: Widget): boolean

Parameters:#

NameType
whichItemItem
targetWidget

Returns: boolean

Defined in: handles/unit.ts:1203


wakeUp#

wakeUp(): void

Returns: void

Defined in: handles/unit.ts:1207


waygateGetDestinationX#

waygateGetDestinationX(): number

Returns: number

Defined in: handles/unit.ts:1211


waygateGetDestinationY#

waygateGetDestinationY(): number

Returns: number

Defined in: handles/unit.ts:1215


waygateSetDestination#

waygateSetDestination(x: number, y: number): void

Parameters:#

NameType
xnumber
ynumber

Returns: void

Defined in: handles/unit.ts:1219


foodMadeByType#

static foodMadeByType(unitId: number): number

Parameters:#

NameType
unitIdnumber

Returns: number

Defined in: handles/unit.ts:1223


foodUsedByType#

static foodUsedByType(unitId: number): number

Parameters:#

NameType
unitIdnumber

Returns: number

Defined in: handles/unit.ts:1227


fromEnum#

static fromEnum(): Unit

Returns: Unit

Defined in: handles/unit.ts:1231


fromEvent#

static fromEvent(): Unit

Returns: Unit

Overrides: Widget

Defined in: handles/unit.ts:1235


fromFilter#

static fromFilter(): Unit

Returns: Unit

Defined in: handles/unit.ts:1239


fromHandle#

static fromHandle(handle: unit): Unit

Parameters:#

NameType
handleunit

Returns: Unit

Overrides: Widget

Defined in: handles/unit.ts:1243


getPointValueByType#

static getPointValueByType(unitType: number): number

Parameters:#

NameType
unitTypenumber

Returns: number

Defined in: handles/unit.ts:1247


isUnitIdHero#

static isUnitIdHero(unitId: number): boolean

Parameters:#

NameType
unitIdnumber

Returns: boolean

Defined in: handles/unit.ts:1251


isUnitIdType#

static isUnitIdType(unitId: number, whichUnitType: unittype): boolean

Parameters:#

NameType
unitIdnumber
whichUnitTypeunittype

Returns: boolean

Defined in: handles/unit.ts:1255