AddFOWViewer(teamDOTATeam_t, locationVector, radiusfloat, durationfloat, obstructedVisionbool): nil
s
c
#

Add temporary vision for a given team.
AngleDiff(arg1float, arg2float): float
s
c
#

Returns the number of degrees difference between two yaw angles.
AppendToLogFile(arg1string, arg2string): nil
s
c
#
ApplyDamage(optionsApplyDamageOptions): float
s
c
#
ApplyDamageOptions
attacker: CDOTA_BaseNPC
damage: float
damage_type: DAMAGE_TYPES
damage_flags?: DOTADamageFlag_t

Damage an npc.
AxisAngleToQuaternion(arg1Vector, arg2float): Quaternion
s
c
#

Constructs a quaternion representing a rotation by angle around the specified vector axis.
CalcClosestPointOnEntityOBB(arg1handle, arg2Vector): Vector
s
c
#

Compute the closest point on the OBB of an entity.
CalcDistanceBetweenEntityOBB(arg1handle, arg2handle): float
s
c
#

Compute the distance between two entity OBB. A negative return value indicates an input error. A return value of zero indicates that the OBBs are overlapping.
CalcDistanceToLineSegment2D(arg1Vector, arg2Vector, arg3Vector): float
s
c
#
CancelEntityIOEvents(arg1ehandle): nil
s
c
#

Create all I/O events for a particular entity.
ClearTeamCustomHealthbarColor(teamDOTATeam_t): nil
s
c
#
CreateDamageInfo(arg1handle, arg2handle, arg3Vector, arg4Vector, arg5float, arg6int): CTakeDamageInfo
s
c
#

Allocate a damageinfo object, used as an argument to TakeDamage(). Call DestroyDamageInfo( hInfo ) to free the object.
CreateEffect(arg1handle): bool
s
c
#

Pass table - Inputs: entity, effect.
CreateHeroForPlayer(heroNamestring, playerCDOTAPlayer): CDOTA_BaseNPC_Hero
s
c
#

Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero.
CreateHTTPRequest(methodstring, urlstring): CScriptHTTPRequest
s
c
#

Create an HTTP request.
CreateHTTPRequestScriptVM(methodstring, urlstring): CScriptHTTPRequest
s
c
#

Create an HTTP request.
CreateIllusions(ownerCBaseEntity, heroToCopyCDOTA_BaseNPC_Hero, modifierKeysCreateIllusionsModifierKeys, numIllusionsint, paddingint, scramblePositionbool, findClearSpacebool): [CDOTA_BaseNPC_Hero]
s
c
#
CreateIllusionsModifierKeys
outgoing_damage?: float
incoming_damage?: float
bounty_base?: float
bounty_growth?: float
outgoing_damage_structure?: float
outgoing_damage_roshan?: float

Create illusions of the passed hero that belong to passed unit using passed modifier data.
CreateItem(itemNamestring, ownerCDOTAPlayer | nil, purchaserCDOTAPlayer | nil): CDOTA_Item | nil
s
c
#

Create a DOTA item.
CreateItemOnPositionForLaunch(locationVector, itemCDOTA_Item | nil): CDOTA_Item_Physical
s
c
#

Create a physical item at a given location, can start in air (but doesn't clear a space).
CreateItemOnPositionSync(locationVector, itemCDOTA_Item | nil): CDOTA_Item_Physical
s
c
#

Create a physical item at a given location.
CreateModifierThinker(casterhandle, abilityhandle, modifierNamestring, paramTablehandle, originVector, teamNumberint, phantomBlockerbool): handle
s
c
#

Create a modifier not associated with an NPC.
CreateSceneEntity(arg1string): CSceneEntity
s
c
#

Create a scene entity to play the specified scene.
CreateTempTree(locationVector, durationfloat): CBaseAnimating
s
c
#

Create a temporary tree, uses a default tree model.
CreateTempTreeWithModel(locationVector, durationfloat, modelNamestring): CBaseAnimating
s
c
#

Create a temporary tree, specifying the tree model name.
CreateTrigger(arg1Vector, arg2Vector, arg3Vector): CBaseTrigger
s
c
#

Creates and returns an AABB trigger.
CreateTriggerRadiusApproximate(vecOriginVector, radiusfloat): CBaseTrigger
s
c
#

Creates and returns an AABB trigger thats bigger than the radius provided.
CreateUnitByName(unitNamestring, locationVector, findClearSpacebool, npcOwnerCBaseEntity | nil, unitOwnerCDOTAPlayer | nil, teamNumberDOTATeam_t): CDOTA_BaseNPC
s
c
#

Creates a DOTA unit by its dota_npc_units.txt name.
CreateUnitByNameAsync(unitNamestring, locationVector, findClearSpacebool, npcOwnerCDOTA_BaseNPC | nil, playerOwnerCDOTAPlayer | nil, teamDOTATeam_t, callback(unitCDOTA_BaseNPC) nil): int
s
c
#

Creates a DOTA unit by its dota_npc_units.txt name.
CreateUnitFromTable(arg1handle, arg2Vector): handle
s
c
#

Creates a DOTA unit by its dota_npc_units.txt name from a table of entity key values and a position to spawn at.
CrossVectors(arg1Vector, arg2Vector): Vector
s
c
#

Cross product between two vectors.
cvar_getf(arg1string): float
s
c
#

Gets the value of the given cvar, as a float.
cvar_setf(arg1string, arg2float): bool
s
c
#

Sets the value of the given cvar, as a float.
DebugBreak(): nil
s
c
#

Breaks in the debugger.
DebugDrawBox(arg1Vector, arg2Vector, arg3Vector, arg4int, arg5int, arg6int, arg7int, arg8float): nil
s
c
#

Draw a debug overlay box.
DebugDrawBoxDirection(centVector, minVector, maxVector, forwardVector, rgbVector, afloat, durationfloat): nil
s
c
#

Draw a debug forward box.
DebugDrawCircle(centerVector, rgbVector, afloat, radfloat, ztestbool, durationfloat): nil
s
c
#

Draw a debug circle.
DebugDrawClear(): nil
s
c
#

Try to clear all the debug overlay info.
DebugDrawLine(originVector, targetVector, rint, gint, bint, ztestbool, durationfloat): nil
s
c
#

Draw a debug overlay line.
DebugDrawLine_vCol(arg1Vector, arg2Vector, arg3Vector, arg4bool, arg5float): nil
s
c
#

Draw a debug line using color vec.
DebugDrawScreenTextLine(xfloat, yfloat, lineOffsetint, textstring, rint, gint, bint, aint, durationfloat): nil
s
c
#

Draw text with a line offset.
DebugDrawSphere(centerVector, rgbVector, afloat, radfloat, ztestbool, durationfloat): nil
s
c
#

Draw a debug sphere.
DebugDrawText(originVector, textstring, viewCheckbool, durationfloat): nil
s
c
#

Draw text in 3d.
DebugScreenTextPretty(xfloat, yfloat, lineOffsetint, textstring, rint, gint, bint, aint, durationfloat, fontstring, sizeint, boldbool): nil
s
c
#

Draw pretty debug text.
DestroyDamageInfo(damageInfoCTakeDamageInfo): nil
s
c
#

Free a damageinfo object that was created with CreateDamageInfo().
DoCleaveAttack(attackerCDOTA_BaseNPC, targetCDOTA_BaseNPC, abilityCDOTABaseAbility, damagefloat, startRadiusfloat, endRadiusfloat, distancefloat, effectNamestring): int
s
c
#
DoEntFire(arg1string, arg2string, arg3string, arg4float, arg5handle, arg6handle): nil
s
c
#

Generate and entity i/o event.
DoEntFireByInstanceHandle(arg1handle, arg2string, arg3string, arg4float, arg5handle, arg6handle): nil
s
c
#

Generate and entity i/o event.
DoIncludeScript(arg1string, arg2handle): bool
s
c
#

Execute a script (internal).
DoScriptAssert(arg1bool, arg2string): nil
s
c
#

Asserts the passed in value. Prints out a message and brings up the assert dialog.
DotProduct(arg1Vector, arg2Vector): float
s
c
#
DoUniqueString(seedstring): string
s
c
#

Generate a string guaranteed to be unique across the life of the script VM, with an optional root string. Useful for adding data to tables when not sure what keys are already in use in that table.
EmitAnnouncerSound(soundNamestring): nil
s
c
#

Emit an announcer sound for all players.
EmitAnnouncerSoundForPlayer(soundNamestring, playerIdPlayerID): nil
s
c
#

Emit an announcer sound for a player.
EmitAnnouncerSoundForTeam(soundNamestring, teamDOTATeam_t): nil
s
c
#

Emit an announcer sound for a team.
EmitAnnouncerSoundForTeamOnLocation(soundNamestring, teamDOTATeam_t, locationVector): nil
s
c
#

Emit an announcer sound for a team at a specific location.
EmitGlobalSound(soundNamestring): nil
s
c
#

Play named sound for all players.
EmitSoundOn(soundNamestring, entityCBaseEntity): nil
s
c
#

Play named sound on Entity.
EmitSoundOnClient(soundNamestring, arg2handle): nil
s
c
#

Play named sound only on the client for the passed in player.
EmitSoundOnLocationForAllies(locationVector, soundNamestring, casterCBaseEntity): nil
s
c
#

Emit a sound on a location from a unit, only for players allied with that unit.
EmitSoundOnLocationWithCaster(locationVector, soundNamestring, casterCDOTA_BaseNPC): nil
s
c
#

Emit a sound on a location from a unit.
EntIndexToHScript(entityIndexEntityIndex): CBaseEntity | nil
s
c
#

Turn an entity index integer to an HScript representing that entity's script instance.
ExecuteOrderFromTable(ordertable): nil
s
c
#

Issue an order from a script table.
ExponentialDecay(arg1float, arg2float, arg3float): float
s
c
#

Smooth curve decreasing slower as it approaches zero.
FindClearRandomPositionAroundUnit(arg1handle, arg2handle, arg3int): bool
s
c
#

Finds a clear random position around a given target unit, using the target unit's padded collision radius.
FindClearSpaceForUnit(unitCDOTA_BaseNPC, locationVector, arg3bool): bool
s
c
#

Place a unit somewhere not already occupied.
FindUnitsInLine(teamDOTATeam_t, startPosVector, endPosVector, cacheUnitCBaseEntity | nil, widthfloat, teamFilterDOTA_UNIT_TARGET_TEAM, typeFilterDOTA_UNIT_TARGET_TYPE, flagFilterDOTA_UNIT_TARGET_FLAGS): [CDOTA_BaseNPC]
s
c
#

Find units that intersect the given line with the given flags.
FindUnitsInRadius(teamDOTATeam_t, locationVector, cacheUnitCBaseEntity | nil, radiusfloat, teamFilterDOTA_UNIT_TARGET_TEAM, typeFilterDOTA_UNIT_TARGET_TYPE, flagFilterDOTA_UNIT_TARGET_FLAGS, orderint, canGrowCachebool): [CDOTA_BaseNPC]
s
c
#

Finds the units in a given radius with the given flags.
FireEntityIOInputNameOnly(arg1ehandle, arg2string): nil
s
c
#

Fire Entity's Action Input w/no data.
FireEntityIOInputString(arg1ehandle, arg2string, arg3string): nil
s
c
#

Fire Entity's Action Input with passed String - you own the memory.
FireEntityIOInputVec(arg1ehandle, arg2string, arg3Vector): nil
s
c
#

Fire Entity's Action Input with passed Vector - you own the memory.
FireGameEvent(eventNamestring, eventDatatable): nil
s
c
#

Fire a game event.
FireGameEventLocal(eventNamestring, eventDatatable): nil
s
c
#

Fire a game event without broadcasting to the client.
FrameTime(): float
s
c
#

Get the time spent on the server in the last frame.
GetDedicatedServerKey(versionstring): string
s
c
#
GetDedicatedServerKeyV2(versionstring): string
s
c
#
GetEntityIndexForTreeId(treeIduint): EntityIndex
s
c
#

Get the enity index for a tree id specified as the entindex_target of a DOTA_UNIT_ORDER_CAST_TARGET_TREE.
GetFrameCount(): int
s
c
#

Returns the engines current frame count.
GetGroundHeight(locationVector, unitHullCDOTA_BaseNPC | nil): float
s
c
#
GetGroundPosition(locationVector, unitHullCDOTA_BaseNPC | nil): Vector
s
c
#

Returns the supplied position moved to the ground. Second parameter is an NPC for measuring movement collision hull offset.
GetItemCost(arg1string): int
s
c
#

Get the cost of an item by name.
GetItemDefOwnedCount(arg1int, arg2int): int
s
c
#
GetItemDefQuantity(arg1int, arg2int): int
s
c
#
GetListenServerHost(): CDOTAPlayer
s
c
#

Get the local player on a listen server.
GetLobbyEventGameDetails(): table
s
c
#
GetLocalPlayerID(): int
s
c
#

Get the local player ID.
GetLocalPlayerTeam(): int
s
c
#

Get the local player team.
GetMapName(): string
s
c
#

Get the name of the map.
GetMaxOutputDelay(arg1ehandle, arg2string): float
s
c
#

Get the longest delay for all events attached to an output.
GetPhysAngularVelocity(arg1handle): Vector
s
c
#

Get Angular Velocity for VPHYS or normal object. Returns a vector of the axis of rotation, multiplied by the degrees of rotation per second.
GetPhysVelocity(arg1handle): Vector
s
c
#

Get Velocity for VPHYS or normal object.
GetSystemDate(): string
s
c
#

Get the current real world date.
GetSystemTime(): string
s
c
#

Get the current real world time.
GetTargetAOELocation(arg1int, arg2int, arg3int, arg4Vector, arg5int, arg6int, arg7int): Vector
s
c
#
GetTargetLinearLocation(arg1int, arg2int, arg3int, arg4Vector, arg5int, arg6int, arg7int): Vector
s
c
#
GetTeamHeroKills(teamDOTATeam_t): int
s
c
#
GetTeamName(teamDOTATeam_t): string
s
c
#
GetTreeIdForEntityIndex(entityIndexEntityIndex): int
s
c
#

Given and entity index of a tree, get the tree id for use for use with with unit orders.
GetWorldMaxX(): float
s
c
#

Gets the world's maximum X position.
GetWorldMaxY(): float
s
c
#

Gets the world's maximum Y position.
GetWorldMinX(): float
s
c
#

Gets the world's minimum X position.
GetWorldMinY(): float
s
c
#

Gets the world's minimum Y position.
InitLogFile(arg1string, arg2string): nil
s
c
#
IsClient(): bool
s
c
#

Returns true if this is lua running from the client.dll.
IsDedicatedServer(): bool
s
c
#

Returns true if this server is a dedicated server.
IsInToolsMode(): bool
s
c
#

Returns true if this is lua running within tools mode.
IsLocationVisible(teamDOTATeam_t, locationVector): bool
s
c
#

Ask fog of war if a location is visible to a certain team.
IsMarkedForDeletion(entityCBaseEntity): bool
s
c
#

Returns true if the entity is valid and marked for deletion.
IsServer(): bool
s
c
#

Returns true if this is lua running from the server.dll.
IsValidEntity(entitytable | nil): bool
s
c
#

Checks to see if the given hScript is a valid entity.
LerpVectors(arg1Vector, arg2Vector, arg3float): Vector
s
c
#

Lerp between two vectors by a float factor returning new vector.
LimitPathingSearchDepth(arg1float): nil
s
c
#

Set the limit on the pathfinding search space.
LinkLuaModifier(classNamestring, filePathstring, luaModifierTypeLuaModifierType): nil
s
c
#

Link a lua-defined modifier with the associated class.
ListenToGameEvent(eventNamestring, listener(eventtable) nil, contexttable | nil): EventListenerID
s
c
#

Register as a listener for a game event from script.
LoadKeyValues(filePathstring): table
s
c
#

Creates a table from the specified keyvalues text file.
LoadKeyValuesFromString(kvStringstring): table
s
c
#

Creates a table from the specified keyvalues string.
LocalTime(): LocalTime
s
c
#

Get the current local time.
MakeStringToken(arg1string): int
s
c
#

Checks to see if the given hScript is a valid entity.
MinimapEvent(teamDOTATeam_t, entityCBaseEntity, xCoordint, yCoordint, eventTypeDOTAMinimapEvent_t, eventDurationint): nil
s
c
#

Start a minimap event.
Msg(messagestring): nil
s
c
#

Print a message.
PauseGame(pausedbool): nil
s
c
#

Pause or unpause the game.
PlayerInstanceFromIndex(entityIndexEntityIndex): CDOTAPlayer | nil
s
c
#

Get a script instance of a player by index.
PrecacheEntityFromTable(arg1string, arg2handle, contextCScriptPrecacheContext): nil
s
c
#

Precache an entity from KeyValues in table.
PrecacheEntityListFromTable(arg1handle, contextCScriptPrecacheContext): nil
s
c
#

Precache a list of entity KeyValues tables.
PrecacheItemByNameAsync(itemNamestring, callback(precacheIdint) nil): nil
s
c
#

Asynchronously precaches a DOTA item by its dota_npc_items.txt name, provides a callback when it's finished.
PrecacheItemByNameSync(itemNamestring, contextCScriptPrecacheContext): nil
s
c
#

Precaches a DOTA item by its dota_npc_items.txt name.
PrecacheModel(modelNamestring, contextCScriptPrecacheContext): nil
s
c
#

Manually precache a single model.
PrecacheResource(arg1string, arg2string, contextCScriptPrecacheContext): nil
s
c
#

Manually precache a single resource.
PrecacheUnitByNameAsync(unitNamestring, callback(precacheIdint) nil, playerIdPlayerID | nil): nil
s
c
#

Asynchronously precaches a DOTA unit by its dota_npc_units.txt name, provides a callback when it's finished.
PrecacheUnitByNameSync(unitNamestring, contextCScriptPrecacheContext, playerIdPlayerID | nil): nil
s
c
#

Precaches a DOTA unit by its dota_npc_units.txt name.
PrecacheUnitFromTableAsync(arg1handle, callback(precacheIdint) nil): nil
s
c
#

Precaches a DOTA unit from a table of entity key values.
PrecacheUnitFromTableSync(arg1handle, contextCScriptPrecacheContext): nil
s
c
#

Precaches a DOTA unit from a table of entity key values.
PrintLinkedConsoleMessage(messagestring, tooltipstring): nil
s
c
#

Print a console message with a linked console command.
RandomFloat(minfloat, maxfloat): float
s
c
#

Get a random float within a range.
RandomInt(minint, maxint): int
s
c
#

Get a random int within a range.
RandomVector(lengthfloat): Vector
s
c
#

Get a random 2D vector of the given length.
RegisterCustomAnimationScriptForModel(arg1string, arg2string): nil
s
c
#

Register a custom animation script to run when a model loads.
RegisterSpawnGroupFilterProxy(arg1string): nil
s
c
#

Create a C proxy for a script-based spawn group filter.
ReloadMOTD(): nil
s
c
#

Reloads the MotD file.
RemoveSpawnGroupFilterProxy(arg1string): nil
s
c
#

Remove the C proxy for a script-based spawn group filter.
ResolveNPCPositions(locationVector, radiusfloat): nil
s
c
#

Check and fix units that have been assigned a position inside collision radius of other NPCs.
RollPercentage(successPercentageint): bool
s
c
#

Rolls a number from 1 to 100 and returns true if the roll is less than or equal to the number specified.
RotateOrientation(arg1QAngle, arg2QAngle): QAngle
s
c
#

Rotate a QAngle by another QAngle.
RotatePosition(arg1Vector, arg2QAngle, arg3Vector): Vector
s
c
#

Rotate a Vector around a point.
RotateQuaternionByAxisAngle(arg1Quaternion, arg2Vector, arg3float): Quaternion
s
c
#
Quaternion
Invalid type.

Rotates a quaternion by the specified angle around the specified vector axis.
RotationDelta(arg1QAngle, arg2QAngle): QAngle
s
c
#

Find the delta between two QAngles.
RotationDeltaAsAngularVelocity(arg1QAngle, arg2QAngle): Vector
s
c
#

Converts delta QAngle to an angular velocity Vector.
rr_AddDecisionRule(arg1handle): bool
s
c
#

Add a rule to the decision database.
rr_CommitAIResponse(entityhandle, airesponsehandle): bool
s
c
#

Commit the result of QueryBestResponse back to the given entity to play. Call with params.
rr_GetResponseTargets(): handle
s
c
#

Retrieve a table of all available expresser targets, in the form { name : handle, name: handle }.
rr_QueryBestResponse(arg1handle, arg2handle, arg3handle): bool
s
c
#

Params: (entity, query) : tests 'query' against entity's response system and returns the best response found (or null if none found).
Say(entityCBaseEntity, messagestring, teamOnlybool): nil
s
c
#

Have Entity say string, and teamOnly or not.
ScreenShake(centerVector, amplitudefloat, frequencyfloat, durationfloat, radiusfloat, command0 | 1, airShakebool): nil
s
c
#

  • command - SHAKE_START = 0, SHAKE_STOP = 1
  • Start a screenshake.
    SendOverheadEventMessage(sendToPlayerCDOTAPlayer, messageTypeint, targetEntityCDOTA_BaseNPC, valueint, sourcePlayerCDOTAPlayer): nil
    s
    c
    #

    SendToPlayer and sourcePlayer can be nil - iMessageType is one of OVERHEAD_ALERT_*.
    SendToConsole(arg1string): nil
    s
    c
    #

    Send a string to the console as a client command.
    SendToServerConsole(arg1string): nil
    s
    c
    #

    Send a string to the console as a server command.
    SetOpvarFloatAll(arg1string, arg2string, arg3string, arg4float): nil
    s
    c
    #

    Sets an opvar value for all players.
    SetOpvarFloatPlayer(arg1string, arg2string, arg3string, arg4float, arg5handle): nil
    s
    c
    #

    Sets an opvar value for a single player.
    SetPhysAngularVelocity(arg1handle, arg2Vector): nil
    s
    c
    #

    Set Angular Velocity for VPHYS or normal object, from a vector of the axis of rotation, multiplied by the degrees of rotation per second.
    SetQuestName(arg1string): nil
    s
    c
    #

    Set the current quest name.
    SetQuestPhase(arg1int): nil
    s
    c
    #

    Set the current quest phase.
    SetRenderingEnabled(arg1ehandle, arg2bool): nil
    s
    c
    #

    Set rendering on/off for an ehandle.
    SetTeamCustomHealthbarColor(teamDOTATeam_t, rint, gint, bint): nil
    s
    c
    #
    ShowCustomHeaderMessage(messagestring, playerIdPlayerID, valueint, timefloat): nil
    s
    c
    #

    Supports localized strings - %s1 = PlayerName, %s2 = Value, %s3 = TeamName.
    ShowGenericPopup(arg1string, arg2string, arg3string, arg4string, arg5int): nil
    s
    c
    #

    Show a generic popup dialog for all players.
    ShowGenericPopupToPlayer(arg1handle, arg2string, arg3string, arg4string, arg5string, arg6int): nil
    s
    c
    #

    Show a generic popup dialog to a specific player.
    ShowMessage(arg1string): nil
    s
    c
    #

    Print a hud message on all clients.
    SpawnDOTAShopTriggerRadiusApproximate(originVector, radiusfloat): CDOTA_ShopTrigger
    s
    c
    #
    SpawnEntityFromTableSynchronous(baseclassstring, datatable): CBaseEntity
    s
    c