Get an estimate of how much damage a bot can do in the specified timeframe. Takes into account item and ability usage based on current mana/cooldowns for allies, for enemies it assumes all items/abilities are available. Uses no positional/situation info. Basically asks ‘How scary is X to Y?’.

GetEvasion(
) : float

Gets the evasion resist of the unit.

GetExtrapolatedLocation(
float fDelay ) : vector

Extrapolates their location in the future, based on past movement.

GetFacing(
) : int

Get a bot’s facing (0-359).

GetGold(
) : int

Get the bot’s current gold.

GetGroundHeight(
) : int

Get a bot’s height value.

GetHealth(
) : int

Get a bot’s current health.

GetHealthRegen(
) : float

Get a bot’s health regen rate.

GetHealthRegenPerStr(
) : float

Get amount of health regen given per unit of strength.

GetIncomingTrackingProjectiles(
) : variant

Gets the location and ability of projectiles incoming at this unit.

GetItemInSlot(
int nSlot ) : handle

Get a bot’s item by slot

GetItemSlotType(
int nSlot ) : int

Get the type of the specified item slot

GetLastAttackTime(
) : float

Gets the last attack time of the unit.

GetLastHits(
) : int

Get the last hit count of this bot.

GetLevel(
) : int

Get the bot’s current level.

GetLocation(
) : vector

Geta bot’s 2D location.

GetMagicResist(
) : float

Gets the magic resist of the unit.

GetMana(
) : int

Get a bot’s current mana.

GetManaRegen(
) : float

Get a bot’s mana regen rate.

GetManaRegenPerInt(
) : float

Get amount of mana regen given per unit of intellect.

GetMaxHealth(
) : int

Get a bot’s maximum health.

GetMaxMana(
) : int

Get a bot’s maximum mana.

GetModifierAuxiliaryUnits(
int nModifier ) : variant

Get a table of a modifier’s auxiliary units.

GetModifierByName(
cstring pszModifierName ) : int

Get the modifier index of a specified modifier.

GetModifierList(
) : variant

Gets a table of all the modifiers on this unit.

GetModifierName(
int nModifier ) : cstring

Get a specific modifier name.

GetModifierRemainingDuration(
int nModifier ) : float

Get a modifier’s remaining duration.

GetModifierStackCount(
int nModifier ) : int

Get a modifier’s stack count.

GetMostRecentPing(
) : variant

Get the most recent ping by this player.

GetMovementDirectionStability(
) : float

Indicates how consistent the unit’s movement has been over the last few seconds. 1 is a straight line, 0 is serpentine.

GetNearbyBarracks(
int nRadius, bool bEnemies ) : variant

Get all nearby barracks.

GetNearbyCreeps(
int nRadius, bool bEnemies ) : variant

Get nearby creeps (lane or neutral) that we can see.

GetNearbyFillers(
int nRadius, bool bEnemies ) : variant

Get all nearby filler buildings.

GetNearbyHeroes(
int nRadius, bool bEnemies, int eBotMode ) : variant

Get nearby heroes that we can see in a mode. Can specify a bot mode when querying allies. BOT_MODE_NONE does no mode filtering.

GetNearbyLaneCreeps(
int nRadius, bool bEnemies ) : variant

Get nearby lane creeps that we can see.

GetNearbyNeutralCreeps(
int nRadius ) : variant

Get nearby neutral creeps that we can see.

GetNearbyShrines(
int nRadius, bool bEnemies ) : variant

Get all nearby shrines.

GetNearbyTowers(
int nRadius, bool bEnemies ) : variant

Get all nearby towers.

GetNearbyTrees(
int nRadius ) : variant

Get nearby trees.

GetNetWorth(
) : int

Get the bot’s current net worth.

GetNextItemPurchaseValue(
) : int

Gets the purchase value of the next item the unit wants to purchase.

GetNightTimeVisionRange(
) : int

Get the unit’s vision range during the night.

GetOffensivePower(
) : float

Get the unit’s current offensive power.

GetPlayerID(
) : int

Get the unit’s controlling player id.

GetPrimaryAttribute(
) : int

Gets the evasion resist of the unit.

GetQueuedActionType(
int nQueuedAction ) : int

Get the specified action in the queue.

GetRawOffensivePower(
) : float

Get the unit’s raw offensive power.

GetRemainingLifespan(
) : float

Get remaining lifespan of a unit.

GetRespawnTime(
) : float

Get the time in seconds until a bot respawns.

GetSecondsPerAttack(
) : float

Gets the number of seconds per attack that a unit can do.

GetSlowDuration(
bool bCurrentlyAvailable ) : float

Get the duration of available slows.

GetSpellAmp(
) : float

Gets the spell damage amplification of the unit.

GetStashValue(
) : int

Get the value of the items in the bot’s stash.

GetStunDuration(
bool bCurrentlyAvailable ) : float

Get the duration of available stuns.

GetTalent(
int nLevel, int nSide ) : handle

Get one of the talents at the specified level

GetTarget(
) : handle

Get the current target of this bot.

GetTeam(
) : int

Get the unit’s team.

GetUnitName(
) : cstring

Get the unit’s name.

GetVelocity(
) : vector

Get the velocity the unit has moved over the last two seconds.

GetXPNeededToLevel(
) : int

Get the amount of XP needed to level up.

HasBlink(
bool bCurrentlyAvailable ) : bool

Does the bot have a blink available?

HasBuyback(
) : bool

Can the bot buy back?

HasInvisibility(
bool bCurrentlyAvailable ) : bool

Does the bot have invisibility available?

HasMinistunOnAttack(
) : bool

Does the bot have ministuns on attack?

HasModifier(
cstring pszModifierName ) : bool

Does the bot have the specified modifier?

HasScepter(
) : bool

Does the unit have Aghanim’s Scepter?

HasSilence(
bool bCurrentlyAvailable ) : bool

Does the bot have a silence available?

IsAlive(
) : bool

Is a bot alive?

IsAncientCreep(
) : bool

Is this unit an ancient creep?

IsAttackImmune(
) : bool

Is the unit attack immune?

IsBlind(
) : bool

Is the unit blind?

IsBlockDisabled(
) : bool

Is the unit block disabled?

IsBot(
) : bool

Is this unit owned by a bot?

IsBuilding(
) : bool

Is this unit a building?

IsCastingAbility(
) : bool

Is this bot currently casting an ability?

IsChanneling(
) : bool

Is this bot currently channeling an ability?

IsCourier(
) : bool

Is this a courier?

IsCreep(
) : bool

Is this unit a creep?

IsDisarmed(
) : bool

Is the unit disarmed?

IsDominated(
) : bool

Is the unit dominated?

IsEvadeDisabled(
) : bool

Is the unit evade disabled?

IsFacingLocation(
vector vLocation, int nDegrees ) : bool

Is the unit facing this location, within the specified degree tolerance?

IsFort(
) : bool

Is this unit a fort (the main ancient building)?

IsHero(
) : bool

Is this unit a hero?

IsHexed(
) : bool

Is the unit hexed?

IsIllusion(
) : bool

Is this unit an illusion?

IsInvisible(
) : bool

Is the unit invisible?

IsInvulnerable(
) : bool

Is the unit invulnerable?

IsMagicImmune(
) : bool

Is the unit magic immune?

IsMinion(
) : bool

Is this a bot’s minion?

IsMuted(
) : bool

Is the unit muted?

IsNightmared(
) : bool

Is the unit nightmared?

IsRooted(
) : bool

Is the unit rooted?

IsSilenced(
) : bool

Is the unit silenced?

IsSpeciallyDeniable(
) : bool

Is the unit specially deniable?

IsStunned(
) : bool

Is the unit stunned?

IsTower(
) : bool

Is this unit a tower?

IsUnableToMiss(
) : bool

Is the unit unable to miss?

IsUsingAbility(
) : bool

Is this bot currently using an ability?

NumModifiers(
) : int

Get the number of modifiers on this bot.

NumQueuedActions(
) : int

Get the number actions currently queued.

SetNextItemPurchaseValue(
int nGold ) : void

Sets the value of the next item the unit wants to purchase.

SetTarget(
handle ) : void

Set the current target of this bot. Causes no actions, but is used for coordinating between modes and ability/item usage.

TimeSinceDamagedByAnyHero(
) : float

How long as it been since the unit was damaged by any enemy?

TimeSinceDamagedByCreep(
) : float

How long as it been since the unit was damaged by a creep?

TimeSinceDamagedByHero(
handle hHero ) : float

How long as it been since the unit was damaged by an specific enemy?

TimeSinceDamagedByPlayer(
int nPlayerID ) : float

How long as it been since the unit was damaged by an specific player?

TimeSinceDamagedByTower(
) : float

How long as it been since the unit was damaged by a tower?

UsingItemBreaksInvisibility(
) : bool

Will using an item break invisibiilty?

WasRecentlyDamagedByAnyHero(
float fTime ) : bool

Was the unit recently damaged by any enemy?

WasRecentlyDamagedByCreep(
float fTime ) : bool

Was the unit recently damaged by a creep?

WasRecentlyDamagedByHero(
handle hHero, float fTime ) : bool

Was the unit recently damaged by an specific enemy?

WasRecentlyDamagedByPlayer(
int nPlayerID, float fTime ) : bool

Was the unit recently damaged by an specific player?

WasRecentlyDamagedByTower(
float fTime ) : bool

Was the unit recently damaged by a tower?

CDOTA_TeamCommander

A Dota Bot Team Commander

Global

####

AddAvoidanceZone(
vector, float ) : int

Adds a global avoidance zone for use with GeneratePath.

AddConditionalAvoidanceZone(
vector, handle ) : int

Adds a global avoidance zone for use with GeneratePath, with a conditional function for whether it’s active or not.

CMBanHero(
cstring ) : void

Ban a hero in Captain’s mode by name.

CMPickHero(
cstring ) : void

Pick a hero in Captain’s mode by name.

Clamp(
float, float, float ) : float

Clamps the value between the two supplied values.

CreateHTTPRequest(
cstring ) : handle

Create a localhost HTTP request.

CreateRemoteHTTPRequest(
cstring ) : handle

Create a remote HTTP request.

DebugDrawCircle(
vector, float, int, int, int ) : void

Draws a circle for one frame

DebugDrawLine(
vector, vector, int, int, int ) : void

Draws a line for one frame

DebugDrawText(
float, float, cstring, int, int, int ) : void

Draws text for one frame

DebugPause(
) : void

Pauses the game

DotaTime(
) : float

Gets the game time – matches the in-game clock. Pauses with game pause.

GameTime(
) : float

Gets the time since the hero picking phase started. Pauses with game pause.

GeneratePath(
vector, vector, handle, handle ) : int

Generates a path, avoiding the specified zones.

GetAllTrees(
) : variant

Returns a table with all tree locations

GetAmountAlongLane(
int, vector ) : variant

Calculates the amount along the lane (and distance from the lane) for the specified location.

GetAncient(
int ) : handle

Gets the ancient on the specified team.

GetAvoidanceZones(
) : variant

Gets an array of all visible avoidance zones in a {ability, location, radius} table.

GetBarracks(
int, int ) : handle

Gets the specified barracks on the specified team.

GetBot(
) : handle

Get the bot on which script is currently being run.

GetBotAbilityByHandle(
uint ) : handle

Get the bot ability specified by the supplied handle.

GetBotByHandle(
uint ) : handle

Get the bot specified by the supplied handle.

GetCMCaptain(
) : int

Gets player ID of the Captain’s Mode captain.

GetCMPhaseTimeRemaining(
) : float

Get the amount of time remaining in the current Captain’s Mode phase.

GetCourier(
int ) : handle

Gets a specific courier.

GetCourierState(
handle ) : int

Gets a specific courier’s current state.

GetDefendLaneDesire(
int ) : float

Gets the team-wide desire to defend a lane.

GetDroppedItemList(
) : variant

Returns the array of items that we can see that have been dropped on the ground.