CBaseAnimating

extends CBaseModelEntity

Animating models

  • ActiveSequenceDuration( ) : float
    • Returns the duration in seconds of the active sequence.
  • GetAttachmentAngles( int iAttachment ) : vector
    • Get the attachement id’s angles as a p,y,r vector.
  • GetAttachmentOrigin( int iAttachment ) : vector
    • Get the attachement id’s origin vector.
  • GetModelScale( ) : float
    • Get scale of entity’s model.
  • GetSequence( ) : cstring
    • Returns the name of the active sequence.
  • IsSequenceFinished( ) : bool
    • Ask whether the main sequence is done playing.
  • ResetSequence( cstring pSequenceName ) : void
    • Sets the active sequence by name, resetting the current cycle.
  • ScriptLookupAttachment( cstring pAttachmentName ) : int
    • Get the named attachement id.
  • SequenceDuration( cstring pSequenceName ) : float
    • Returns the duration in seconds of the given sequence name.
  • SetBodygroup( int iGroup, int iValue ) : void
    • Sets a bodygroup.
  • SetBodygroupByName( cstring pName, int iValue ) : void
    • Sets a bodygroup by name.
  • SetModelScale( float flScale ) : void
    • Set scale of entity’s model.
  • SetPoseParameter( cstring szName, float fValue ) : float
    • Set the specified pose parameter to the specified value.
  • SetSequence( cstring pSequenceName ) : void
    • Sets the active sequence by name, keeping the current cycle.

CBaseCombatCharacter

extends CBaseFlex

BaseCombatCharacter

  • GetEquippedWeapons( ) : variant
    • GetEquippedWeapons() : Returns an array of all the equipped weapons
  • GetFaction( ) : int
    • Get the combat character faction.
  • GetWeaponCount( ) : int
    • GetWeaponCount() : Gets the number of weapons currently equipped
  • ShootPosition( int nHand ) : vector
    • Returns the shoot position eyes (or hand in VR).

CBaseEntity

extends CEntityInstance

Root class of all server-side entities

  • AddEffects( int nFlags ) : void
    • AddEffects( int ): Adds the render effect flag.
  • ApplyAbsVelocityImpulse( vector vecImpulse ) : void
    • Apply a Velocity Impulse
  • ApplyLocalAngularVelocityImpulse( vector angImpulse ) : void
    • Apply an Ang Velocity Impulse
  • Attribute_GetFloatValue( cstring pName, float flDefault ) : float
    • Get float value for an entity attribute.
  • Attribute_GetIntValue( cstring pName, int nDefault ) : float
    • Get int value for an entity attribute.
  • Attribute_SetFloatValue( cstring pName, float flValue ) : void
    • Set float value for an entity attribute.
  • Attribute_SetIntValue( cstring pName, int nValue ) : void
    • Set int value for an entity attribute.
  • DeleteAttribute( cstring pName ) : void
    • Delete an entity attribute.
  • EmitSound( cstring soundname ) : void
    • Plays a sound from this entity.
  • EmitSoundParams( cstring soundname, int nPitch, float flVolume, float flDelay ) : void
    • Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol or flSoundTime is > 0.
  • EyeAngles( ) : qangle
    • Get the qangles that this entity is looking at.
  • EyePosition( ) : vector
    • Get vector to eye position - absolute coords.
  • FirstMoveChild( ) : handle

  • FollowEntity( handle hEnt, bool bBoneMerge ) : void
    • hEntity to follow, bool bBoneMerge
  • GatherCriteria( handle hResult ) : void
    • Returns a table containing the criteria that would be used for response queries on this entity. This is the same as the table that is passed to response rule script function callbacks.
  • GetAbsOrigin( ) : vector

  • GetAngles( ) : qangle

  • GetAnglesAsVector( ) : vector
    • Get entity pitch, yaw, roll as a vector.
  • GetAngularVelocity( ) : vector
    • Get the local angular velocity - returns a vector of pitch,yaw,roll
  • GetBaseVelocity( ) : vector
    • Get Base? velocity.
  • GetBoundingMaxs( ) : vector
    • Get a vector containing max bounds, centered on object.
  • GetBoundingMins( ) : vector
    • Get a vector containing min bounds, centered on object.
  • GetBounds( ) : variant
    • Get a table containing the ‘Mins’ & ‘Maxs’ vector bounds, centered on object.
  • GetCenter( ) : vector
    • Get vector to center of object - absolute coords
  • GetChildren( ) : handle
    • Get the entities parented to this entity.
  • GetContext( cstring name ) : variant
    • GetContext( name ): looks up a context and returns it if available. May return string, float, or null (if the context isn’t found).
  • GetForwardVector( ) : vector
    • Get the forward vector of the entity.
  • GetHealth( ) : int
    • Get the health of this entity.
  • GetLocalAngles( ) : qangle
    • Get entity local pitch, yaw, roll as a QAngle
  • GetLocalAngularVelocity( ) : qangle
    • Maybe local angvel
  • GetLocalOrigin( ) : vector
    • Get entity local origin as a Vector
  • GetLocalVelocity( ) : vector
    • Get Entity relative velocity.
  • GetMass( ) : float
    • Get the mass of an entity. (returns 0 if it doesn’t have a physics object)
  • GetMaxHealth( ) : int
    • Get the maximum health of this entity.
  • GetModelName( ) : cstring
    • Returns the name of the model.
  • GetMoveParent( ) : handle
    • If in hierarchy, retrieves the entity’s parent.
  • GetOrigin( ) : vector

  • GetOwner( ) : handle
    • Gets this entity’s owner
  • GetOwnerEntity( ) : handle
    • Get the owner entity, if there is one
  • GetRightVector( ) : vector
    • Get the right vector of the entity.
  • GetRootMoveParent( ) : handle
    • If in hierarchy, walks up the hierarchy to find the root parent.
  • GetSoundDuration( cstring soundname, cstring actormodel ) : float
    • Returns float duration of the sound. Takes soundname and optional actormodelname.
  • GetTeam( ) : int
    • Get the team number of this entity.
  • GetTeamNumber( ) : int
    • Get the team number of this entity.
  • GetUpVector( ) : vector
    • Get the up vector of the entity.
  • GetVelocity( ) : vector

  • HasAttribute( cstring pName ) : bool
    • See if an entity has a particular attribute.
  • IsAlive( ) : bool
    • Is this entity alive?
  • IsNPC( ) : bool
    • Is this entity an CAI_BaseNPC?
  • IsPlayer( ) : bool
    • Is this entity a player?
  • Kill( ) : void

  • NextMovePeer( ) : handle

  • OverrideFriction( float duration, float friction ) : void
    • Takes duration, value for a temporary override.
  • PrecacheScriptSound( cstring soundname ) : void
    • Precache a sound for later playing.
  • RemoveEffects( int nFlags ) : void
    • RemoveEffects( int ): Removes the render effect flag.
  • SetAbsOrigin( vector origin ) : void

  • SetAngles( float fPitch, float fYaw, float fRoll ) : void
    • Set entity pitch, yaw, roll by component.
  • SetAngularVelocity( float pitchVel, float yawVel, float rollVel ) : void
    • Set the local angular velocity - takes float pitch,yaw,roll velocities
  • SetConstraint( vector vPos ) : void
    • Set the position of the constraint.
  • SetContext( cstring pName, cstring pValue, float duration ) : void
    • SetContext( name , value, duration ): store any key/value pair in this entity’s dialog contexts. Value must be a string. Will last for duration (set 0 to mean ‘forever’).
  • SetContextNum( cstring pName, float fValue, float duration ) : void
    • SetContextNum( name , value, duration ): store any key/value pair in this entity’s dialog contexts. Value must be a number (int or float). Will last for duration (set 0 to mean ‘forever’).
  • SetContextThink( cstring pszContextName, handle hThinkFunc, float flInterval ) : void
    • Set a think function on this entity.
  • SetEntityName( cstring pName ) : void
    • Set the name of an entity.
  • SetForwardVector( vector v ) : void
    • Set the orientation of the entity to have this forward vector.
  • SetFriction( float flFriction ) : void
    • Set PLAYER friction, ignored for objects.
  • SetGravity( float flGravity ) : void
    • Set PLAYER gravity, ignored for objects.
  • SetHealth( int nHealth ) : void
    • Set the health of this entity.
  • SetLocalAngles( float fPitch, float fYaw, float fRoll ) : void
    • Set entity local pitch, yaw, roll by component
  • SetLocalOrigin( vector origin ) : void
    • Set entity local origin from a Vector
  • SetMass( float flMass ) : void
    • Set the mass of an entity. (does nothing if it doesn’t have a physics object)
  • SetMaxHealth( int amt ) : void
    • Set the maximum health of this entity.
  • SetOrigin( vector v ) : void

  • SetOwner( handle pOwner ) : void
    • Sets this entity’s owner
  • SetParent( handle hParent, cstring pAttachmentname ) : void
    • Set the parent for this entity.
  • SetTeam( int iTeamNum ) : void

  • SetVelocity( vector vecVelocity ) : void

  • StopSound( cstring soundname ) : void
    • Stops a named sound playing from this entity.
  • TakeDamage( handle hInfo ) : int
    • Apply damage to this entity. Use CreateDamageInfo() to create a damageinfo object.
  • Trigger( ) : void
    • Fires off this entity’s OnTrigger responses.
  • ValidatePrivateScriptScope( ) : void
    • Validates the private script scope and creates it if one doesn’t exist.

CBaseFlex

extends CBaseAnimating

Animated characters who have vertex flex capability.

  • GetCurrentScene( ) : handle
    • Returns the instance of the oldest active scene entity (if any).
  • GetSceneByIndex( int index ) : handle
    • Returns the instance of the scene entity at the specified index.
  • ScriptPlayScene( cstring pszScene, float flDelay ) : float
    • ( vcd file, delay ) - play specified vcd file

CBaseModelEntity

extends CBaseEntity

Base entity with model

  • GetRenderAlpha( ) : int
    • GetRenderAlpha(): Get the alpha modulation of this entity.
  • GetRenderColor( ) : vector
    • GetRenderColor(): Get the render color of the entity.
  • SetLightGroup( cstring pLightGroup ) : void
    • SetLightGroup( string ): Sets the light group of the entity.
  • SetModel( cstring pModelName ) : void

  • SetRenderAlpha( int nAlpha ) : void
    • SetRenderAlpha( int ): Set the alpha modulation of this entity.
  • SetRenderColor( int r, int g, int b ) : void
    • SetRenderColor( r, g, b ): Sets the render color of the entity.
  • SetRenderMode( int nMode ) : void
    • SetRenderMode( int ): Sets the render mode of the entity.
  • SetSize( vector mins, vector maxs ) : void

CBasePlayer

extends CBaseCombatCharacter

The player entity.

  • AreChaperoneBoundsVisible( ) : bool
    • Returns whether this player’s chaperone bounds are visible.
  • GetHMDAnchor( ) : handle
    • Returns the HMD anchor entity for this player if it exists.
  • GetHMDAvatar( ) : handle
    • Returns the HMD Avatar entity for this player if it exists.
  • GetPlayArea( int nPoint ) : vector
    • Returns the Vector position of the point you ask for. Pass 0-3 to get the four points.
  • GetUserID( ) : int
    • Returns the player’s user id.
  • GetVRControllerType( ) :
    • Returns the type of controller being used while in VR.
  • IsNoclipping( ) : bool
    • Returns true if the player is in noclip mode.
  • IsUsePressed( ) : bool
    • Returns true if the use key is pressed.
  • IsVRControllerButtonPressed( int nButton ) : bool
    • Returns true if the controller button is pressed.
  • IsVRDashboardShowing( ) : bool
    • Returns true if the SteamVR dashboard is showing for this player.
  • Quit( ) : void
    • Quit the game from script.

CBaseTrigger

extends CBaseEntity

Base Trigger for all the triggers

  • Disable( ) : void
    • Disable’s the trigger
  • Enable( ) : void
    • Enable the trigger
  • IsTouching( handle hEnt ) : bool
    • Checks whether the passed entity is touching the trigger.

CBodyComponent

Body Component Scriptdesc

  • AddImpulseAtPosition( vector, vector ) : void
    • Apply an impulse at a worldspace position to the physics
  • AddVelocity( vector, vector ) : void
    • Add linear and angular velocity to the physics object
  • DetachFromParent( ) : void
    • Detach from its parent
  • GetSequence( ) :
    • Returns the active sequence
  • IsAttachedToParent( ) : bool
    • Is attached to parent
  • LookupSequence( cstring ) :
    • Returns a sequence id given a name
  • SequenceDuration( cstring ) : float
    • Returns the duration in seconds of the specified sequence
  • SetAngularVelocity( vector ) : void

  • SetAnimation( cstring ) : void
    • Pass string for the animation to play on this model
  • SetBodyGroup( cstring ) : void

  • SetMaterialGroup( utlstringtoken ) : void

  • SetVelocity( vector ) : void

CCustomGameEventManager

!Custom game event manager

  • RegisterListener( cstring, handle ) : int
    • ( string EventName, func CallbackFunction ) - Register a callback to be called when a particular custom event arrives. Returns a listener ID that can be used to unregister later.
  • Send_ServerToAllClients( cstring, handle ) : void
    • ( string EventName, table EventData )
  • Send_ServerToPlayer( handle, cstring, handle ) : void
    • ( Entity Player, string EventName, table EventData )
  • Send_ServerToTeam( int, cstring, handle ) : void
    • ( int TeamNumber, string EventName, table EventData )
  • UnregisterListener( int ) : void
    • ( int ListnerID ) - Unregister a specific listener

CCustomNetTableManager

!Custom network table manager

  • GetTableValue( cstring, cstring ) : handle
    • ( string TableName, string KeyName )
  • SetTableValue( cstring, cstring, handle ) : bool
    • ( string TableName, string KeyName, script_table Value )

CDOTABaseAbility

extends CBaseEntity

An ability

  • CanAbilityBeUpgraded( ) :

  • CastAbility( ) : bool

  • ContinueCasting( ) : bool

  • CreateVisibilityNode( vector vLocation, float fRadius, float fDuration ) : void

  • DecrementModifierRefCount( ) : void

  • EndChannel( bool bInterrupted ) : void

  • EndCooldown( ) : void
    • Clear the cooldown remaining on this ability.
  • GetAbilityDamage( ) : int

  • GetAbilityDamageType( ) : int

  • GetAbilityIndex( ) : int

  • GetAbilityKeyValues( ) : variant
    • Gets the key values definition for this ability.
  • GetAbilityName( ) : cstring
    • Returns the name of this ability.
  • GetAbilityTargetFlags( ) : int

  • GetAbilityTargetTeam( ) : int

  • GetAbilityTargetType( ) : int

  • GetAbilityType( ) : int

  • GetAnimationIgnoresModelScale( ) : bool

  • GetAssociatedPrimaryAbilities( ) : cstring

  • GetAssociatedSecondaryAbilities( ) : cstring

  • GetAutoCastState( ) : bool

  • GetBackswingTime( ) : float

  • GetBehavior( ) : int

  • GetCastPoint( ) : float

  • GetCastRange( vector vLocation, handle hTarget ) : int
    • Gets the cast range of the ability.
  • GetCaster( ) : handle

  • GetChannelStartTime( ) : float

  • GetChannelTime( ) : float

  • GetChannelledManaCostPerSecond( int iLevel ) : int

  • GetCloneSource( ) : handle

  • GetConceptRecipientType( ) : int

  • GetCooldown( int iLevel ) : float
    • Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
  • GetCooldownTime( ) : float

  • GetCooldownTimeRemaining( ) : float

  • GetCursorPosition( ) : vector

  • GetCursorTarget( ) : handle

  • GetCursorTargetingNothing( ) : bool

  • GetDuration( ) : float

  • GetGoldCost( int iLevel ) : int

  • GetGoldCostForUpgrade( int iLevel ) : int

  • GetHeroLevelRequiredToUpgrade( ) : int

  • GetIntrinsicModifierName( ) : cstring

  • GetLevel( ) : int
    • Get the current level of the ability.
  • GetLevelSpecialValueFor( cstring szName, int nLevel ) : variant

  • GetManaCost( int iLevel ) : int

  • GetMaxLevel( ) : int

  • GetModifierValue( ) : float

  • GetModifierValueBonus( ) : float

  • GetPlaybackRateOverride( ) : float

  • GetSharedCooldownName( ) : cstring

  • GetSpecialValueFor( cstring szName ) : variant
    • Gets a value from this ability’s special value block for its current level.
  • GetStolenActivityModifier( ) : cstring

  • GetToggleState( ) : bool

  • HeroXPChange( float flXP ) : bool

  • IncrementModifierRefCount( ) : void

  • IsActivated( ) : bool

  • IsAttributeBonus( ) : bool

  • IsChanneling( ) : bool
    • Returns whether the ability is currently channeling.
  • IsCooldownReady( ) : bool

  • IsCosmetic( handle hEntity ) : bool

  • IsFullyCastable( ) : bool
    • Returns whether the ability can be cast.
  • IsHidden( ) : bool

  • IsHiddenWhenStolen( ) : bool

  • IsInAbilityPhase( ) : bool
    • Returns whether the ability is currently casting.
  • IsItem( ) : bool

  • IsOwnersGoldEnough( int nIssuerPlayerID ) : bool

  • IsOwnersGoldEnoughForUpgrade( ) : bool

  • IsOwnersManaEnough( ) : bool

  • IsPassive( ) : bool

  • IsSharedWithTeammates( ) : bool

  • IsStealable( ) : bool

  • IsStolen( ) : bool

  • IsToggle( ) : bool

  • IsTrained( ) : bool

  • MarkAbilityButtonDirty( ) : void
    • Mark the ability button for this ability as needing a refresh.
  • NumModifiersUsingAbility( ) : int

  • OnAbilityPhaseInterrupted( ) : void

  • OnAbilityPhaseStart( ) : bool

  • OnAbilityPinged( int nPlayerID ) : void

  • OnChannelFinish( bool bInterrupted ) : void

  • OnChannelThink( float flInterval ) : void

  • OnHeroCalculateStatBonus( ) : void

  • OnHeroLevelUp( ) : void

  • OnOwnerDied( ) : void

  • OnOwnerSpawned( ) : void

  • OnSpellStart( ) : void

  • OnToggle( ) : void

  • OnUpgrade( ) : void

  • PayGoldCost( ) : void

  • PayGoldCostForUpgrade( ) : void

  • PayManaCost( ) : void

  • PlaysDefaultAnimWhenStolen( ) : bool

  • ProcsMagicStick( ) : bool

  • RefCountsModifiers( ) : bool

  • RefundManaCost( ) : void

  • ResetToggleOnRespawn( ) : bool

  • SetAbilityIndex( int iIndex ) : void

  • SetActivated( bool bActivated ) : void

  • SetChanneling( bool bChanneling ) : void

  • SetHidden( bool bHidden ) : void

  • SetInAbilityPhase( bool bInAbilityPhase ) : void

  • SetLevel( int iLevel ) : void
    • Sets the level of this ability.
  • SetOverrideCastPoint( float flCastPoint ) : void

  • SetRefCountsModifiers( bool bRefCounts ) : void

  • SetStolen( bool bStolen ) : void

  • ShouldUseResources( ) : bool

  • SpeakAbilityConcept( int iConcept ) : void

  • SpeakTrigger( ) :

  • StartCooldown( float flCooldown ) : void

  • ToggleAbility( ) : void

  • ToggleAutoCast( ) : void

  • UpgradeAbility( bool bSupressSpeech ) : void

  • UseResources( bool bMana, bool bGold, bool bCooldown ) : void

CDOTABaseGameMode

extends CBaseEntity

Base game mode class

  • AreWeatherEffectsDisabled( ) : bool
    • Get if weather effects are disabled on the client.
  • ClearBountyRunePickupFilter( ) : void
    • Clear the script filter that controls bounty rune pickup behavior.
  • ClearDamageFilter( ) : void
    • Clear the script filter that controls how a unit takes damage.
  • ClearExecuteOrderFilter( ) : void
    • Clear the script filter that controls when a unit picks up an item.
  • ClearItemAddedToInventoryFilter( ) : void
    • Clear the script filter that controls the item added to inventory filter.
  • ClearModifierGainedFilter( ) : void
    • Clear the script filter that controls the modifier filter.
  • ClearModifyExperienceFilter( ) : void
    • Clear the script filter that controls how hero experience is modified.
  • ClearModifyGoldFilter( ) : void
    • Clear the script filter that controls how hero gold is modified.
  • ClearRuneSpawnFilter( ) : void
    • Clear the script filter that controls what rune spawns.
  • ClearTrackingProjectileFilter( ) : void
    • Clear the script filter that controls when tracking projectiles are launched.
  • GetAlwaysShowPlayerInventory( ) : bool
    • Show the player hero’s inventory in the HUD, regardless of what unit is selected.
  • GetAlwaysShowPlayerNames( ) : bool
    • Get whether player names are always shown, regardless of client setting.
  • GetAnnouncerDisabled( ) : bool
    • Are in-game announcers disabled?
  • GetCameraDistanceOverride( ) : float
    • Set a different camera distance; dota default is 1134.
  • GetCustomBuybackCooldownEnabled( ) : bool
    • Turns on capability to define custom buyback cooldowns.
  • GetCustomBuybackCostEnabled( ) : bool
    • Turns on capability to define custom buyback costs.
  • GetCustomHeroMaxLevel( ) : int
    • Allows definition of the max level heroes can achieve (default is 25).
  • GetFixedRespawnTime( ) : float
    • Gets the fixed respawn time.
  • GetFogOfWarDisabled( ) : bool
    • Turn the fog of war on or off.
  • GetGoldSoundDisabled( ) : bool
    • Turn the sound when gold is acquired off/on.
  • GetHUDVisible( int iElement ) : bool
    • Returns the HUD element visibility.
  • GetMaximumAttackSpeed( ) : int
    • Get the maximum attack speed for units.
  • GetMinimumAttackSpeed( ) : int
    • Get the minimum attack speed for units.
  • GetRecommendedItemsDisabled( ) : bool
    • Turn the panel for showing recommended items at the shop off/on.
  • GetStashPurchasingDisabled( ) : bool
    • Turn purchasing items to the stash off/on. If purchasing to the stash is off the player must be at a shop to purchase items.
  • GetStickyItemDisabled( ) : bool
    • Hide the sticky item in the quickbuy.
  • GetTopBarTeamValuesOverride( ) : bool
    • Override the values of the team values on the top game bar.
  • GetTopBarTeamValuesVisible( ) : bool
    • Turning on/off the team values on the top game bar.
  • GetTowerBackdoorProtectionEnabled( ) : bool
    • Enables/Disables tower backdoor protection.
  • GetUseCustomHeroLevels( ) : bool
    • Are custom-defined XP values for hero level ups in use?
  • IsBuybackEnabled( ) : bool
    • Enables or disables buyback completely.
  • IsDaynightCycleDisabled( ) : bool
    • Is the day/night cycle disabled?
  • SetAbilityTuningValueFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control the tuning values that abilities use. (Modify the table and Return true to use new values, return false to use the old values)
  • SetAlwaysShowPlayerInventory( bool bAlwaysShow ) : void
    • Show the player hero’s inventory in the HUD, regardless of what unit is selected.
  • SetAlwaysShowPlayerNames( bool bEnabled ) : void
    • Set whether player names are always shown, regardless of client setting.
  • SetAnnouncerDisabled( bool bDisabled ) : void
    • Mutes the in-game announcer.
  • SetBotThinkingEnabled( bool bEnabled ) : void
    • Enables/Disables bots in custom games. Note: this will only work with default heroes in the dota map.
  • SetBotsAlwaysPushWithHuman( bool bAlwaysPush ) : void
    • Set if the bots should try their best to push with a human player.
  • SetBotsInLateGame( bool bLateGame ) : void
    • Set if bots should enable their late game behavior.
  • SetBotsMaxPushTier( int nMaxTier ) : void
    • Set the max tier of tower that bots want to push. (-1 to disable)
  • SetBountyRunePickupFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control the behavior when a bounty rune is picked up. (Modify the table and Return true to use new values, return false to cancel the event)
  • SetBuybackEnabled( bool bEnabled ) : void
    • Enables or disables buyback completely.
  • SetCameraDistanceOverride( float flCameraDistanceOverride ) : void
    • Set a different camera distance; dota default is 1134.
  • SetCustomBuybackCooldownEnabled( bool bEnabled ) : void
    • Turns on capability to define custom buyback cooldowns.
  • SetCustomBuybackCostEnabled( bool bEnabled ) : void
    • Turns on capability to define custom buyback costs.
  • SetCustomGameForceHero( cstring pHeroName ) : void
    • Force all players to use the specified hero and disable the normal hero selection process. Must be used before hero selection.
  • SetCustomHeroMaxLevel( int ) : void
    • Allows definition of the max level heroes can achieve (default is 25).
  • SetCustomXPRequiredToReachNextLevel( handle hTable ) : void
    • Allows definition of a table of hero XP values.
  • SetDamageFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control the behavior when a unit takes damage. (Modify the table and Return true to use new values, return false to cancel the event)
  • SetDaynightCycleDisabled( bool bDisable ) : void
    • Enable or disable the day/night cycle.
  • SetExecuteOrderFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control the behavior when a unit picks up an item. (Modify the table and Return true to use new values, return false to cancel the event)
  • SetFixedRespawnTime( float flFixedRespawnTime ) : void
    • Set a fixed delay for all players to respawn after.
  • SetFogOfWarDisabled( bool bDisabled ) : void
    • Turn the fog of war on or off.
  • SetFountainConstantManaRegen( float flConstantManaRegen ) : void
    • Set the constant rate that the fountain will regen mana. (-1 for default)
  • SetFountainPercentageHealthRegen( float flPercentageHealthRegen ) : void
    • Set the percentage rate that the fountain will regen health. (-1 for default)
  • SetFountainPercentageManaRegen( float flPercentageManaRegen ) : void
    • Set the percentage rate that the fountain will regen mana. (-1 for default)
  • SetGoldSoundDisabled( bool bDisabled ) : void
    • Turn the sound when gold is acquired off/on.
  • SetHUDVisible( int iHUDElement, bool bVisible ) : void
    • Set the HUD element visibility.
  • SetItemAddedToInventoryFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control what happens to items that are added to an inventory, return false to cancel the event
  • SetKillingSpreeAnnouncerDisabled( bool bDisabled ) : void
    • Mutes the in-game killing spree announcer.
  • SetLoseGoldOnDeath( bool bEnabled ) : void
    • Use to disable gold loss on death.
  • SetMaximumAttackSpeed( int nMaxSpeed ) : void
    • Set the maximum attack speed for units.
  • SetMinimumAttackSpeed( int nMinSpeed ) : void
    • Set the minimum attack speed for units.
  • SetModifierGainedFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control modifiers that are gained, return false to destroy modifier.
  • SetModifyExperienceFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control the behavior when a hero’s experience is modified. (Modify the table and Return true to use new values, return false to cancel the event)
  • SetModifyGoldFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control the behavior when a hero’s gold is modified. (Modify the table and Return true to use new values, return false to cancel the event)
  • SetOverrideSelectionEntity( handle hOverrideEntity ) : void
    • Set an override for the default selection entity, instead of each player’s hero.
  • SetRecommendedItemsDisabled( bool bDisabled ) : void
    • Turn the panel for showing recommended items at the shop off/on.
  • SetRemoveIllusionsOnDeath( bool bRemove ) : void
    • Make it so illusions are immediately removed upon death, rather than sticking around for a few seconds.
  • SetRuneEnabled( int nRune, bool bEnabled ) : void
    • Set if a given type of rune is enabled.
  • SetRuneSpawnFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control what rune spawns. (Modify the table and Return true to use new values, return false to cancel the event)
  • SetStashPurchasingDisabled( bool bDisabled ) : void
    • Turn purchasing items to the stash off/on. If purchasing to the stash is off the player must be at a shop to purchase items.
  • SetStickyItemDisabled( bool bDisabled ) : void
    • Hide the sticky item in the quickbuy.
  • SetTopBarTeamValue( int iTeam, int nValue ) : void
    • Set the team values on the top game bar.
  • SetTopBarTeamValuesOverride( bool bOverride ) : void
    • Override the values of the team values on the top game bar.
  • SetTopBarTeamValuesVisible( bool bVisible ) : void
    • Turning on/off the team values on the top game bar.
  • SetTowerBackdoorProtectionEnabled( bool bEnabled ) : void
    • Enables/Disables tower backdoor protection.
  • SetTrackingProjectileFilter( handle hFunction, handle hContext ) : void
    • Set a filter function to control when tracking projectiles are launched. (Modify the table and Return true to use new values, return false to cancel the event)
  • SetUnseenFogOfWarEnabled( bool bEnabled ) : void
    • Enable or disable unseen fog of war. When enabled parts of the map the player has never seen will be completely hidden by fog of war.
  • SetUseCustomHeroLevels( bool bEnabled ) : void
    • Turn on custom-defined XP values for hero level ups. The table should be defined before switching this on.
  • SetWeatherEffectsDisabled( bool bDisable ) : void
    • Set if weather effects are disabled.

CDOTAGameManager

!The Dota game manager

  • GetHeroDataByName_Script( cstring ) : variant
    • Get the hero unit
  • GetHeroIDByName( cstring ) : int
    • Get the hero ID given the hero name.
  • GetHeroNameByID( int ) : cstring
    • Get the hero name given a hero ID.
  • GetHeroNameForUnitName( cstring ) : cstring
    • Get the hero name given a unit name.
  • GetHeroUnitNameByID( int ) : cstring
    • Get the hero unit name given the hero ID.

CDOTAGamerules

!DOTA GameRules

  • AddMinimapDebugPoint( int, vector, int, int, int, int, float ) : void
    • Add a point on the minimap.
  • AddMinimapDebugPointForTeam( int, vector, int, int, int, int, float, int ) : void
    • Add a point on the minimap for a specific team.
  • BeginNightstalkerNight( float ) : void
    • Begin night stalker night.
  • BeginTemporaryNight( float ) : void
    • Begin temporary night.
  • Defeated( ) : void
    • Kills the ancient, etc.
  • DidMatchSignoutTimeOut( ) : bool
    • true when we have waited some time after end of the game and not received signout
  • EnableCustomGameSetupAutoLaunch( bool ) : void
    • Enabled (true) or disable (false) auto launch for custom game setup.
  • FinishCustomGameSetup( ) : void
    • Indicate that the custom game setup phase is complete, and advance to the game.
  • GetCustomGameDifficulty( ) : int
    • Returns the difficulty level of the custom game mode
  • GetCustomGameTeamMaxPlayers( int ) : int
    • Get whether a team is selectable during game setup
  • GetDOTATime( bool, bool ) : float
    • (b IncludePregameTime b IncludeNegativeTime) Returns the actual DOTA in-game clock time.
  • GetDifficulty( ) : int
    • Returns difficulty level of the custom game mode
  • GetDroppedItem( int ) : handle
    • Gets the Xth dropped item
  • GetGameModeEntity( ) : handle
    • Get the game mode entity
  • GetGameSessionConfigValue( cstring, cstring ) : cstring
    • Get a string value from the game session config (map options)
  • GetGameTime( ) : float
    • Returns the number of seconds elapsed since map start. This time doesn’t count up when the game is paused
  • GetMatchID( ) : uint64
    • Get the MatchID for this game.
  • GetMatchSignoutComplete( ) : bool
    • Have we received the post match signout message that includes reward information
  • GetNianTotalDamageTaken( ) : int
    • For New Bloom, get total damage taken by the Nian / Year Beast
  • GetPlayerCustomGameAccountRecord( int ) : variant
    • (Preview/Unreleased) Gets the player’s custom game account record, as it looked at the start of this session
  • GetTimeOfDay( ) : float
    • Get the time of day
  • IsCheatMode( ) : bool
    • Are cheats enabled on the server
  • IsDaytime( ) : bool
    • Is it day time?
  • IsGamePaused( ) : bool
    • Returns whether the game is paused.
  • IsHeroRespawnEnabled( ) : bool
    • Returns whether hero respawn is enabled.
  • IsNightstalkerNight( ) : bool
    • Is it night stalker night-time?
  • IsTemporaryNight( ) : bool
    • Is it temporarily night-time?
  • LockCustomGameSetupTeamAssignment( bool ) : void
    • Lock (true) or unlock (false) team assignemnt. If team assignment is locked players cannot change teams.
  • MakeTeamLose( int ) : void
    • Makes ths specified team lose
  • NumDroppedItems( ) : int
    • Returns the number of items currently dropped on the ground
  • PlayerHasCustomGameHostPrivileges( handle ) : bool
    • Whether a player has custom game host privileges (shuffle teams, etc.)
  • Playtesting_UpdateAddOnKeyValues( ) : void
    • Updates custom hero, unit and ability KeyValues in memory with the latest values from disk
  • ResetDefeated( ) : void
    • Restart after killing the ancient, etc.
  • ResetToHeroSelection( ) : void
    • Restart the game at hero selection
  • SendCustomMessage( cstring, int, int ) : void
    • Sends a message on behalf of a player.
  • SendCustomMessageToTeam( cstring, int, int, int ) : void
    • Sends a message on behalf of a player to the specified team.
  • SetCreepMinimapIconScale( float ) : void
    • (flMinimapCreepIconScale) - Scale the creep icons on the minimap.
  • SetCustomGameAccountRecordSaveFunction( handle, handle ) : void
    • (Preview/Unreleased) Sets a callback to handle saving custom game account records (callback is passed a Player ID and should return a flat simple table)
  • SetCustomGameDifficulty( int ) : void
    • Set the difficulty level of the custom game mode
  • SetCustomGameEndDelay( float ) : void
    • Sets the game end delay.
  • SetCustomGameSetupAutoLaunchDelay( float ) : void
    • Set the amount of time to wait for auto launch.
  • SetCustomGameSetupRemainingTime( float ) : void
    • Set the amount of remaining time, in seconds, for custom game setup. 0 = finish immediately, -1 = wait forever
  • SetCustomGameSetupTimeout( float ) : void
    • Setup (pre-gameplay) phase timeout. 0 = instant, -1 = forever (until FinishCustomGameSetup is called)
  • SetCustomGameTeamMaxPlayers( int, int ) : void
    • Set whether a team is selectable during game setup
  • SetCustomVictoryMessage( cstring ) : void
    • Sets the victory message.
  • SetCustomVictoryMessageDuration( float ) : void
    • Sets the victory message duration.
  • SetEventMetadataCustomTable( handle ) : bool
    • Event-only ( table hMetadataTable )
  • SetFirstBloodActive( bool ) : void
    • Sets whether First Blood has been triggered.
  • SetGameWinner( int ) : void
    • Makes ths specified team win
  • SetGoldPerTick( int ) : void
    • Set the auto gold increase per timed interval.
  • SetGoldTickTime( float ) : void
    • Set the time interval between auto gold increases.
  • SetHeroMinimapIconScale( float ) : void
    • (flMinimapHeroIconScale) - Scale the hero minimap icons on the minimap.
  • SetHeroRespawnEnabled( bool ) : void
    • Control if the normal DOTA hero respawn rules apply.
  • SetHeroSelectionTime( float ) : void
    • Sets the amount of time players have to pick their hero.
  • SetHideKillMessageHeaders( bool ) : void
    • Sets whether the multikill, streak, and first-blood banners appear at the top of the screen.
  • SetOverlayHealthBarUnit( handle, int ) : void
    • Show this unit’s health on the overlay health bar
  • SetPostGameTime( float ) : void
    • Sets the amount of time players have between the game ending and the server disconnecting them.
  • SetPreGameTime( float ) : void
    • Sets the amount of time players have between picking their hero and game start.
  • SetRuneMinimapIconScale( float ) : void
    • (flMinimapRuneIconScale) - Scale the rune icons on the minimap.
  • SetRuneSpawnTime( float ) : void
    • Sets the amount of time between rune spawns.
  • SetSafeToLeave( bool ) : void
    • (bSafeToLeave) - Mark this game as safe to leave.
  • SetSameHeroSelectionEnabled( bool ) : void
    • When true, players can repeatedly pick the same hero.
  • SetShowcaseTime( float ) : void
    • Sets the amount of time players have between the strategy phase and entering the pre-game phase.
  • SetStartingGold( int ) : void
    • Set the starting gold amount.
  • SetStrategyTime( float ) : void
    • Sets the amount of time players have between the hero selection and entering the showcase phase.
  • SetTimeOfDay( float ) : void
    • Set the time of day.
  • SetTreeRegrowTime( float ) : void
    • Sets the tree regrow time in seconds.
  • SetUseBaseGoldBountyOnHeroes( bool ) : void
    • Heroes will use the basic NPC functionality for determining their bounty, rather than DOTA specific formulas.
  • SetUseCustomHeroXPValues( bool ) : void
    • Allows heroes in the map to give a specific amount of XP (this value must be set).
  • SetUseUniversalShopMode( bool ) : void
    • When true, all items are available at as long as any shop is in range.
  • State_Get( ) : int
    • Get the current Gamerules state

CDOTAPlayer

extends CBaseAnimating

dota_player

  • GetAssignedHero( ) : handle
    • Get the player’s hero.
  • GetPlayerID( ) : int
    • Get the player’s official PlayerID; notably is -1 when the player isn’t yet on a team.
  • MakeRandomHeroSelection( ) : void
    • Randoms this player’s hero.
  • SetKillCamUnit( handle hEntity ) : void
    • Set the kill cam unit for this hero.
  • SetMusicStatus( int nMusicStatus, float flIntensity ) : void
    • (nMusicStatus, flIntensity) - Set the music status for this player, note this will only really apply if dota_music_battle_enable is off.

CDOTATutorial

!DOTA Tutorial

  • AddBot( cstring, cstring, cstring, bool ) : bool
    • Add a computer controlled bot.
  • AddQuest( cstring, int, cstring, cstring ) : void
    • Add a quest to the quest log
  • AddShopWhitelistItem( cstring ) : void
    • Add an item to the shop whitelist.
  • CompleteQuest( cstring ) : void
    • Complete a quest,
  • CreateLocationTask( vector ) : void
    • Add a task to move to a specific location
  • EnableCreepAggroViz( bool ) : void
    • Alert the player when a creep becomes agro to their hero.
  • EnablePlayerOffscreenTip( bool ) : void
    • Enable the tip to alert players how to find their hero.
  • EnableTowerAggroViz( bool ) : void
    • Alert the player when a tower becomes agro to their hero.
  • FinishTutorial( ) : void
    • End the tutorial.
  • ForceGameStart( ) : void
    • Force the start of the game.
  • GetTimeFrozen( ) : bool
    • Is our time frozen?
  • IsItemInWhiteList( cstring ) : bool
    • Is this item currently in the white list.
  • RemoveShopWhitelistItem( cstring ) : void
    • Remove an item from the shop whitelist.
  • SelectHero( cstring ) : void
    • Select a hero for the local player
  • SelectPlayerTeam( cstring ) : void
    • Select the team for the local player
  • SetItemGuide( cstring ) : void
    • Set the current item guide.
  • SetOrModifyPlayerGold( int, bool ) : void
    • Set gold amount for the tutorial player. (int) GoldAmount, (bool) true=Set, false=Modify
  • SetQuickBuy( cstring ) : void
    • Set players quick buy item.
  • SetShopOpen( bool ) : void
    • Set the shop open or closed.
  • SetTimeFrozen( bool ) : void
    • Set if we should freeze time or not.
  • SetTutorialConvar( cstring, cstring ) : void
    • Set a tutorial convar
  • SetTutorialUI( int ) : void
    • Set the UI to use a reduced version to focus attention to specific elements.
  • SetWhiteListEnabled( bool ) : void
    • Set if we should whitelist shop items.
  • StartTutorialMode( ) : void
    • Initialize Tutorial Mode
  • UpgradePlayerAbility( cstring ) : void
    • Upgrade a specific ability for the local hero

CDOTAVoteSystem

!DOTA Vote System

  • StartVote( handle ) : void
    • Starts a vote, based upon a table of parameters

CDOTA_Ability_Animation_Attack

extends CDOTABaseAbility

A Dota NPC Unit

  • SetPlaybackRate( float flRate ) : void
    • Override playbackrate

CDOTA_Ability_Animation_TailSpin

extends CDOTABaseAbility

A Dota NPC Unit.

  • SetPlaybackRate( float flRate ) : void
    • Override playbackrate

CDOTA_Ability_DataDriven

extends CDOTABaseAbility

A data driven ability.

  • ApplyDataDrivenModifier( handle hCaster, handle hTarget, cstring pszModifierName, handle hModifierTable ) : handle
    • Applies a data driven modifier to the target
  • ApplyDataDrivenThinker( handle hCaster, vector vLocation, cstring pszModifierName, handle hModifierTable ) : handle
    • Applies a data driven thinker at the location

CDOTA_Ability_Lua

extends CDOTABaseAbility

A lua-based ability.

  • CastFilterResult( ) : int
    • Determine whether an issued command with no target is valid.
  • CastFilterResultLocation( vector vLocation ) : int
    • (Vector vLocation) Determine whether an issued command on a location is valid.
  • CastFilterResultTarget( handle hTarget ) : int
    • (HSCRIPT hTarget) Determine whether an issued command on a target is valid.
  • GetAssociatedPrimaryAbilities( ) : cstring
    • Returns abilities that are stolen simultaneously, or otherwise related in functionality.
  • GetAssociatedSecondaryAbilities( ) : cstring
    • Returns other abilities that are stolen simultaneously, or otherwise related in functionality. Generally hidden abilities.
  • GetBehavior( ) : int
    • Return cast behavior type of this ability.
  • GetCastAnimation( ) : int
    • Return casting animation of this ability.
  • GetCastRange( vector vLocation, handle hTarget ) : int
    • Return cast range of this ability.
  • GetChannelAnimation( ) : int
    • Return channel animation of this ability.
  • GetChannelTime( ) : float
    • Return the channel time of this ability.
  • GetChannelledManaCostPerSecond( int iLevel ) : int
    • Return mana cost at the given level per second while channeling (-1 is current).
  • GetConceptRecipientType( ) : int
    • Return who hears speech when this spell is cast.
  • GetCooldown( int iLevel ) : float
    • Return cooldown of this ability.
  • GetCustomCastError( ) : cstring
    • Return the error string of a failed command with no target.
  • GetCustomCastErrorLocation( vector vLocation ) : cstring
    • (Vector vLocation) Return the error string of a failed command on a location.
  • GetCustomCastErrorTarget( handle hTarget ) : cstring
    • (HSCRIPT hTarget) Return the error string of a failed command on a target.
  • GetGoldCost( int iLevel ) : int
    • Return gold cost at the given level (-1 is current).
  • GetIntrinsicModifierName( ) : cstring
    • Returns the name of the modifier applied passively by this ability.
  • GetManaCost( int iLevel ) : int
    • Return mana cost at the given level (-1 is current).
  • GetPlaybackRateOverride( ) : float
    • Return the animation rate of the cast animation.
  • IsHiddenAbilityCastable( ) : bool
    • Returns true if this ability can be used when not on the action panel.
  • IsHiddenWhenStolen( ) : bool
    • Returns true if this ability is hidden when stolen by Spell Steal.
  • IsRefreshable( ) : bool
    • Returns true if this ability is refreshed by Refresher Orb.
  • IsStealable( ) : bool
    • Returns true if this ability can be stolen by Spell Steal.
  • OnAbilityPhaseInterrupted( ) : void
    • Cast time did not complete successfully.
  • OnAbilityPhaseStart( ) : bool
    • Cast time begins (return true for successful cast).
  • OnChannelFinish( bool bInterrupted ) : void
    • (bool bInterrupted) Channel finished.
  • OnChannelThink( float flInterval ) : void
    • (float flInterval) Channeling is taking place.
  • OnHeroCalculateStatBonus( ) : void
    • Caster (hero only) gained a level, skilled an ability, or received a new stat bonus.
  • OnHeroDiedNearby( handle unit, handle attacker, handle table ) : void
    • A hero has died in the vicinity (ie Urn), takes table of params.
  • OnHeroLevelUp( ) : void
    • Caster gained a level.
  • OnInventoryContentsChanged( ) : void
    • Caster inventory changed.
  • OnItemEquipped( handle hItem ) : void
    • ( HSCRIPT hItem ) Caster equipped item.
  • OnOwnerDied( ) : void
    • Caster died.
  • OnOwnerSpawned( ) : void
    • Caster respawned or spawned for the first time.
  • OnProjectileHit( handle hTarget, vector vLocation ) : bool
    • (HSCRIPT hTarget, Vector vLocation) Projectile has collided with a given target or reached its destination (target is invalid).
  • OnProjectileHit_ExtraData( handle hTarget, vector vLocation, handle table ) : bool
    • (HSCRIPT hTarget, Vector vLocation, table kv) Projectile has collided with a given target or reached its destination (target is invalid).
  • OnProjectileThink( vector vLocation ) : void
    • (Vector vLocation) Projectile is actively moving.
  • OnProjectileThink_ExtraData( vector vLocation, handle table ) : void
    • (Vector vLocation, table kv ) Projectile is actively moving.
  • OnSpellStart( ) : void
    • Cast time finished, spell effects begin.
  • OnStolen( handle hSourceAbility ) : void
    • ( HSCRIPT hAbility ) Special behavior when stolen by Spell Steal.
  • OnToggle( ) : void
    • Ability is toggled on/off.
  • OnUnStolen( ) : void
    • Special behavior when lost by Spell Steal.
  • OnUpgrade( ) : void
    • Ability gained a level.
  • ProcsMagicStick( ) : bool
    • Returns true if this ability will generate magic stick charges for nearby enemies.
  • SpeakTrigger( ) : int
    • Return the type of speech used.

CDOTA_Ability_Nian_Dive

extends CDOTABaseAbility

A Dota NPC Unit

  • SetPlaybackRate( float flRate ) : void
    • Override playbackrate

CDOTA_Ability_Nian_Leap

extends CDOTABaseAbility

A Dota NPC Unit

  • SetPlaybackRate( float flRate ) : void
    • Override playbackrate

CDOTA_Ability_Nian_Roar

extends CDOTABaseAbility

Nian’s roar ability

  • GetCastCount( ) : int
    • Number of times Nian has used the roar

CDOTA_BaseNPC

extends CBaseFlex

A Dota NPC Unit

  • AddAbility( cstring pszAbilityName ) : handle
    • Add an ability to this unit by name.
  • AddItem( handle hItem ) : handle
    • Add an item to this unit’s inventory.
  • AddItemByName( cstring pszItemName ) : handle
    • Add an item to this unit’s inventory.
  • AddNewModifier( handle hCaster, handle hAbility, cstring pszScriptName, handle hModifierTable ) : handle
    • Add a modifier to this unit.
  • AddNoDraw( ) : void
    • Adds the no draw flag.
  • AddSpeechBubble( int iBubble, cstring pszSpeech, float flDuration, uint unOffsetX, uint unOffsetY ) : void
    • Add a speech bubble(1-4 live at a time) to this NPC.
  • AlertNearbyUnits( handle hAttacker, handle hAbility ) : void

  • AngerNearbyUnits( ) : void

  • AttackNoEarlierThan( float flTime ) : void

  • AttackReady( ) : bool

  • BoundingRadius2D( ) : float

  • CanEntityBeSeenByMyTeam( handle hEntity ) : bool
    • Check FoW to see if an entity is visible.
  • CanSellItems( ) : bool
    • Query if this unit can sell items.
  • CastAbilityImmediately( handle hAbility, int iPlayerIndex ) : void
    • Cast an ability immediately.
  • CastAbilityNoTarget( handle hAbility, int iPlayerIndex ) : void
    • Cast an ability with no target.
  • CastAbilityOnPosition( vector vPosition, handle hAbility, int iPlayerIndex ) : void
    • Cast an ability on a position.
  • CastAbilityOnTarget( handle hTarget, handle hAbility, int iPlayerIndex ) : void
    • Cast an ability on a target entity.
  • CastAbilityToggle( handle hAbility, int iPlayerIndex ) : void
    • Toggle an ability.
  • DestroyAllSpeechBubbles( ) : void

  • DisassembleItem( handle hItem ) : void
    • Disassemble the passed item in this unit’s inventory.
  • DropItemAtPosition( vector vDest, handle hItem ) : void
    • Drop an item at a given point.
  • DropItemAtPositionImmediate( handle hItem, vector vPosition ) : void
    • Immediately drop a carried item at a given position.
  • EjectItemFromStash( handle hItem ) : void
    • Drops the selected item out of this unit’s stash.
  • FaceTowards( vector vTarget ) : void
    • This unit will be set to face the target point.
  • FadeGesture( int nActivity ) : void
    • Fade and remove the given gesture activity.
  • FindAbilityByName( cstring pAbilityName ) : handle
    • Retrieve an ability by name from the unit.
  • FindAllModifiers( ) : variant
    • Returns a table of all of the modifiers on the NPC.
  • FindAllModifiersByName( cstring pszScriptName ) : variant
    • Returns a table of all of the modifiers on the NPC with the passed name (modifierName)
  • FindModifierByName( cstring pszScriptName ) : handle
    • Return a handle to the modifier of the given name if found, else nil (string Name )
  • FindModifierByNameAndCaster( cstring pszScriptName, handle hCaster ) : handle
    • Return a handle to the modifier of the given name from the passed caster if found, else nil ( string Name, hCaster )
  • ForceKill( bool bReincarnate ) : void
    • Kill this unit immediately.
  • ForcePlayActivityOnce( int nActivity ) : void
    • Play an activity once, and then go back to idle.
  • GetAbilityByIndex( int iIndex ) : handle
    • Retrieve an ability by index from the unit.
  • GetAbilityCount( ) : int

  • GetAcquisitionRange( ) : float
    • Gets the range at which this unit will auto-acquire.
  • GetAdditionalBattleMusicWeight( ) : float
    • Combat involving this creature will have this weight added to the music calcuations.
  • GetAggroTarget( ) : handle
    • Returns this unit’s aggro target.
  • GetAttackAnimationPoint( ) : float

  • GetAttackCapability( ) : int

  • GetAttackDamage( ) : int
    • Returns a random integer between the minimum and maximum base damage of the unit.
  • GetAttackRange( ) : float
    • Gets this unit’s attack range after all modifiers.
  • GetAttackRangeBuffer( ) : float
    • Gets the attack range buffer.
  • GetAttackSpeed( ) : float

  • GetAttackTarget( ) : handle

  • GetAttacksPerSecond( ) : float

  • GetAverageTrueAttackDamage( handle hTarget ) : int
    • Returns the average value of the minimum and maximum damage values.
  • GetBaseAttackTime( ) : float

  • GetBaseDamageMax( ) : int
    • Get the maximum attack damage of this unit.
  • GetBaseDamageMin( ) : int
    • Get the minimum attack damage of this unit.
  • GetBaseDayTimeVisionRange( ) : int
    • Returns the vision range before modifiers.
  • GetBaseHealthRegen( ) : float

  • GetBaseMagicalResistanceValue( ) : float
    • Returns base magical armor value.
  • GetBaseMaxHealth( ) : float
    • Gets the base max health value.
  • GetBaseMoveSpeed( ) : float

  • GetBaseNightTimeVisionRange( ) : int
    • Returns the vision range after modifiers.
  • GetCastPoint( bool bAttack ) : float

  • GetCloneSource( ) : handle
    • Get clone source (Meepo Prime, if this is a Meepo)
  • GetCollisionPadding( ) : float
    • Returns the size of the collision padding around the hull.
  • GetConstantBasedManaRegen( ) : float
    • This Mana regen is derived from constant bonuses like Basilius.
  • GetCreationTime( ) : float

  • GetCurrentActiveAbility( ) : handle
    • Get the ability this unit is currently casting.
  • GetCurrentVisionRange( ) : int
    • Gets the current vision range.
  • GetCursorCastTarget( ) : handle

  • GetCursorPosition( ) : vector

  • GetCursorTargetingNothing( ) : bool

  • GetDayTimeVisionRange( ) : int
    • Returns the vision range after modifiers.
  • GetDeathXP( ) : int
    • Get the XP bounty on this unit.
  • GetForceAttackTarget( ) : handle

  • GetGoldBounty( ) : int
    • Get the gold bounty on this unit.
  • GetHasteFactor( ) : float

  • GetHealthDeficit( ) : int
    • Returns integer amount of health missing from max.
  • GetHealthPercent( ) : int
    • Get the current health percent of the unit.
  • GetHealthRegen( ) : float

  • GetHullRadius( ) : float
    • Get the collision hull radius of this NPC.
  • GetIdealSpeed( ) : float
    • Returns speed after all modifiers.
  • GetIncreasedAttackSpeed( ) : float

  • GetInitialGoalEntity( ) : handle
    • Returns the initial waypoint goal for this NPC.
  • GetItemInSlot( int i ) : handle
    • Returns nth item in inventory slot (index is zero based).
  • GetLastAttackTime( ) : float

  • GetLastIdleChangeTime( ) : float
    • Get the last game time that this unit switched to/from idle state.
  • GetLevel( ) : int
    • Returns the level of this unit.
  • GetMagicalArmorValue( ) : float
    • Returns current magical armor value.
  • GetMainControllingPlayer( ) : int
    • Returns the player ID of the controlling player.
  • GetMana( ) : float
    • Get the mana on this unit.
  • GetManaPercent( ) : int
    • Get the percent of mana remaining.
  • GetManaRegen( ) : float

  • GetMaxMana( ) : float
    • Get the maximum mana of this unit.
  • GetMaximumGoldBounty( ) : int
    • Get the maximum gold bounty for this unit.
  • GetMinimumGoldBounty( ) : int
    • Get the minimum gold bounty for this unit.
  • GetModelRadius( ) : float

  • GetModifierCount( ) : int
    • How many modifiers does this unit have?
  • GetModifierNameByIndex( int nIndex ) : cstring
    • Get a modifier name by index.
  • GetModifierStackCount( cstring pszScriptName, handle hCaster ) : int
    • Gets the stack count of a given modifier.
  • GetMoveSpeedModifier( float flBaseSpeed ) : float

  • GetMustReachEachGoalEntity( ) : bool
    • Set whether this NPC is required to reach each goal entity, rather than being allowed to unkink their path.
  • GetNeverMoveToClearSpace( ) : bool
    • If set to true, we will never attempt to move this unit to clear space, even when it unphases.
  • GetNightTimeVisionRange( ) : int
    • Returns the vision range after modifiers.
  • GetOpposingTeamNumber( ) : int

  • GetPaddedCollisionRadius( ) : float
    • Get the collision hull radius (including padding) of this NPC.
  • GetPercentageBasedManaRegen( ) : float
    • This Mana regen is derived from % bonuses (from items like Void Stone).
  • GetPhysicalArmorBaseValue( ) : float
    • Returns base physical armor value.
  • GetPhysicalArmorValue( ) : float
    • Returns current physical armor value.
  • GetPlayerOwner( ) : handle
    • Returns the player that owns this unit.
  • GetPlayerOwnerID( ) : int
    • Get the owner player ID for this unit.
  • GetProjectileSpeed( ) : int

  • GetRangeToUnit( handle hNPC ) : float

  • GetRangedProjectileName( ) : cstring

  • GetSecondsPerAttack( ) : float

  • GetStatsBasedManaRegen( ) : float
    • Returns mana regen rate per intelligence.
  • GetTotalPurchasedUpgradeGoldCost( ) : int
    • Get how much gold has been spent on ability upgrades.
  • GetUnitLabel( ) : cstring

  • GetUnitName( ) : cstring
    • Get the name of this unit.
  • GiveMana( float flMana ) : void
    • Give mana to this unit, this can be used for mana gained by abilities or item usage.
  • HasAbility( cstring pszAbilityName ) : bool
    • See whether this unit has an ability by name.
  • HasAnyActiveAbilities( ) : bool

  • HasAttackCapability( ) : bool

  • HasFlyMovementCapability( ) : bool

  • HasFlyingVision( ) : bool

  • HasGroundMovementCapability( ) : bool

  • HasInventory( ) : bool
    • Does this unit have an inventory.
  • HasItemInInventory( cstring pItemName ) : bool
    • See whether this unit has an item by name.
  • HasModifier( cstring pszScriptName ) : bool
    • Sees if this unit has a given modifier.
  • HasMovementCapability( ) : bool

  • HasScepter( ) : bool

  • Heal( float flAmount, handle hInflictor ) : void
    • Heal this unit.
  • Hold( ) : void
    • Hold position.
  • Interrupt( ) : void

  • InterruptChannel( ) : void

  • InterruptMotionControllers( bool bFindClearSpace ) : void

  • IsAlive( ) : bool
    • Is this unit alive?
  • IsAncient( ) : bool
    • Is this unit an Ancient?
  • IsAttackImmune( ) : bool

  • IsAttacking( ) : bool

  • IsAttackingEntity( handle hEntity ) : bool

  • IsBarracks( ) : bool
    • Is this unit a Barracks?
  • IsBlind( ) : bool

  • IsBlockDisabled( ) : bool

  • IsBoss( ) : bool
    • Is this unit a boss?
  • IsBuilding( ) : bool
    • Is this unit a building?
  • IsChanneling( ) : bool
    • Is this unit currently channeling a spell?
  • IsClone( ) : bool
    • Is this unit a clone? (Meepo)
  • IsCommandRestricted( ) : bool

  • IsConsideredHero( ) : bool
    • Is this unit a considered a hero for targeting purposes?
  • IsControllableByAnyPlayer( ) : bool
    • Is this unit controlled by any non-bot player?
  • IsCourier( ) : bool
    • Is this unit a courier?
  • IsCreature( ) : bool
    • Is this a Creature type NPC?
  • IsCreep( ) : bool
    • Is this unit a creep?
  • IsDeniable( ) : bool

  • IsDisarmed( ) : bool

  • IsDominated( ) : bool

  • IsEvadeDisabled( ) : bool

  • IsFort( ) : bool
    • Is this unit an Ancient?
  • IsFrozen( ) : bool

  • IsHero( ) : bool
    • Is this a hero or hero illusion?
  • IsHexed( ) : bool

  • IsIdle( ) : bool
    • Is this creature currently idle?
  • IsIllusion( ) : bool

  • IsInvisible( ) : bool

  • IsInvulnerable( ) : bool

  • IsLowAttackPriority( ) : bool

  • IsMagicImmune( ) : bool

  • IsMovementImpaired( ) : bool

  • IsMoving( ) : bool
    • Is this unit moving?
  • IsMuted( ) : bool

  • IsNeutralUnitType( ) : bool
    • Is this a neutral?
  • IsNightmared( ) : bool

  • IsOpposingTeam( int nTeam ) : bool

  • IsOther( ) : bool
    • Is this unit a ward-type unit?
  • IsOutOfGame( ) : bool

  • IsOwnedByAnyPlayer( ) : bool
    • Is this unit owned by any non-bot player?
  • IsPhantom( ) : bool
    • Is this a phantom unit?
  • IsPhantomBlocker( ) : bool

  • IsPhased( ) : bool

  • IsPositionInRange( vector vPosition, float flRange ) : bool

  • IsRangedAttacker( ) : bool
    • Is this unit a ranged attacker?
  • IsRealHero( ) : bool
    • Is this a real hero?
  • IsRooted( ) : bool

  • IsShrine( ) : bool
    • Is this a shrine?
  • IsSilenced( ) : bool

  • IsSpeciallyDeniable( ) : bool

  • IsStunned( ) : bool

  • IsSummoned( ) : bool
    • Is this unit summoned?
  • IsTempestDouble( ) : bool

  • IsTower( ) : bool
    • Is this a tower?
  • IsUnableToMiss( ) : bool

  • IsUnselectable( ) : bool

  • Kill( handle hAbility, handle hAttacker ) : void
    • Kills this NPC, with the params Ability and Attacker.
  • MakeIllusion( ) : void

  • MakePhantomBlocker( ) : void

  • MakeVisibleDueToAttack( int iTeam ) : void

  • MakeVisibleToTeam( int iTeam, float flDuration ) : void

  • ManageModelChanges( ) : void

  • ModifyHealth( int iDesiredHealthValue, handle hAbility, bool bLethal, int iAdditionalFlags ) : void
    • Sets the health to a specific value, with optional flags or inflictors.
  • MoveToNPC( handle hNPC ) : void
    • Move to follow a unit.
  • MoveToNPCToGiveItem( handle hNPC, handle hItem ) : void
    • Give an item to another unit.
  • MoveToPosition( vector vDest ) : void
    • Issue a Move-To command.
  • MoveToPositionAggressive( vector vDest ) : void
    • Issue an Attack-Move-To command.
  • MoveToTargetToAttack( handle hTarget ) : void
    • Move to a target to attack.
  • NoHealthBar( ) : bool

  • NoTeamMoveTo( ) : bool

  • NoTeamSelect( ) : bool

  • NoUnitCollision( ) : bool

  • NotOnMinimap( ) : bool

  • NotOnMinimapForEnemies( ) : bool

  • NotifyWearablesOfModelChange( bool bOriginalModel ) : void

  • PassivesDisabled( ) : bool

  • PatrolToPosition( vector vDest ) : void
    • Issue a Patrol-To command.
  • PerformAttack( handle hTarget, bool bUseCastAttackOrb, bool bProcessProcs, bool bSkipCooldown, bool bIgnoreInvis, bool bUseProjectile, bool bFakeAttack, bool bNeverMiss ) : void
    • Performs an attack on a target.
  • PickupDroppedItem( handle hItem ) : void
    • Pick up a dropped item.
  • PickupRune( handle hItem ) : void
    • Pick up a rune.
  • PlayVCD( cstring pVCD ) : void
    • Play a VCD on the NPC.
  • ProvidesVision( ) : bool

  • Purge( bool bRemovePositiveBuffs, bool bRemoveDebuffs, bool bFrameOnly, bool bRemoveStuns, bool bRemoveExceptions ) : void
    • (bool RemovePositiveBuffs, bool RemoveDebuffs, bool BuffsCreatedThisFrameOnly, bool RemoveStuns, bool RemoveExceptions
  • ReduceMana( float flAmount ) : void
    • Remove mana from this unit, this can be used for involuntary mana loss, not for mana that is spent.
  • RemoveAbility( cstring pszAbilityName ) : void
    • Remove an ability from this unit by name.
  • RemoveGesture( int nActivity ) : void
    • Remove the given gesture activity.
  • RemoveHorizontalMotionController( handle hBuff ) : void

  • RemoveItem( handle hItem ) : void
    • Removes the passed item from this unit’s inventory and deletes it.
  • RemoveModifierByName( cstring pszScriptName ) : void
    • Removes a modifier.
  • RemoveModifierByNameAndCaster( cstring pszScriptName, handle hCaster ) : void
    • Removes a modifier that was cast by the given caster.
  • RemoveNoDraw( ) : void
    • Remove the no draw flag.
  • RemoveVerticalMotionController( handle hBuff ) : void

  • RespawnUnit( ) : void
    • Respawns the target unit if it can be respawned.
  • SellItem( handle hItem ) : void
    • Sells the passed item in this unit’s inventory.
  • SetAbilityByIndex( handle hAbility, int iIndex ) : void
    • Set the ability by index.
  • SetAcquisitionRange( int nRange ) : void

  • SetAdditionalBattleMusicWeight( float flWeight ) : void
    • Combat involving this creature will have this weight added to the music calcuations.
  • SetAggroTarget( handle hAggroTarget ) : void
    • Set this unit’s aggro target to a specified unit.
  • SetAttackCapability( int iAttackCapabilities ) : void

  • SetAttacking( handle hAttackTarget ) : void

  • SetBaseAttackTime( float flBaseAttackTime ) : void

  • SetBaseDamageMax( int nMax ) : void
    • Sets the maximum base damage.
  • SetBaseDamageMin( int nMin ) : void
    • Sets the minimum base damage.
  • SetBaseHealthRegen( float flHealthRegen ) : void

  • SetBaseMagicalResistanceValue( float flMagicalResistanceValue ) : void
    • Sets base magical armor value.
  • SetBaseManaRegen( float flManaRegen ) : void

  • SetBaseMaxHealth( float flBaseMaxHealth ) : void
    • Set a new base max health value.
  • SetBaseMoveSpeed( int iMoveSpeed ) : void

  • SetCanSellItems( bool bCanSell ) : void
    • Set whether or not this unit is allowed to sell items (bCanSellItems)
  • SetControllableByPlayer( int iIndex, bool bSkipAdjustingPosition ) : void
    • Set this unit controllable by the player with the passed ID.
  • SetCursorCastTarget( handle hEntity ) : void

  • SetCursorPosition( vector vLocation ) : void

  • SetCursorTargetingNothing( bool bTargetingNothing ) : void

  • SetCustomHealthLabel( cstring pLabel, int r, int g, int b ) : void

  • SetDayTimeVisionRange( int iRange ) : void
    • Set the base vision range.
  • SetDeathXP( int iXPBounty ) : void
    • Set the XP bounty on this unit.
  • SetForceAttackTarget( handle hNPC ) : void

  • SetHasInventory( bool bHasInventory ) : void
    • Set if this unit has an inventory.
  • SetHullRadius( float flHullRadius ) : void
    • Set the collision hull radius of this NPC.
  • SetIdleAcquire( bool bIdleAcquire ) : void

  • SetInitialGoalEntity( handle hGoal ) : void
    • Sets the initial waypoint goal for this NPC.
  • SetMana( float flMana ) : void
    • Set the mana on this unit.
  • SetMaximumGoldBounty( int iGoldBountyMax ) : void
    • Set the maximum gold bounty for this unit.
  • SetMinimumGoldBounty( int iGoldBountyMin ) : void
    • Set the minimum gold bounty for this unit.
  • SetModifierStackCount( cstring pszScriptName, handle hCaster, int nStackCount ) : void
    • Sets the stack count of a given modifier.
  • SetMoveCapability( int iMoveCapabilities ) : void

  • SetMustReachEachGoalEntity( bool must ) : void
    • Set whether this NPC is required to reach each goal entity, rather than being allowed to unkink their path.
  • SetNeverMoveToClearSpace( bool neverMoveToClearSpace ) : void
    • If set to true, we will never attempt to move this unit to clear space, even when it unphases.
  • SetNightTimeVisionRange( int iRange ) : void
    • Returns the vision range after modifiers.
  • SetOrigin( vector vLocation ) : void
    • Set the unit’s origin.
  • SetOriginalModel( cstring pszModelName ) : void
    • Sets the original model of this entity, which it will tend to fall back to anytime its state changes.
  • SetPhysicalArmorBaseValue( float flPhysicalArmorValue ) : void
    • Sets base physical armor value.
  • SetRangedProjectileName( cstring pProjectileName ) : void

  • SetStolenScepter( bool bStolenScepter ) : void

  • SetUnitCanRespawn( bool bCanRespawn ) : void

  • SetUnitName( cstring pName ) : void

  • ShouldIdleAcquire( ) : bool

  • SpendMana( float flManaSpent, handle hAbility ) : void
    • Spend mana from this unit, this can be used for spending mana from abilities or item usage.
  • StartGesture( int nActivity ) : void
    • Add the given gesture activity.
  • StartGestureWithPlaybackRate( int nActivity, float flRate ) : void
    • Add the given gesture activity with a playback rate override.
  • Stop( ) : void
    • Stop the current order.
  • StopFacing( ) : void

  • SwapAbilities( cstring pAbilityName1, cstring pAbilityName2, bool bEnable1, bool bEnable2 ) : void
    • Swaps the slots of the two passed abilities and sets them enabled/disabled.
  • SwapItems( int nSlot1, int nSlot2 ) : void
    • Swap the contents of two item slots (slot1, slot2)
  • TakeItem( handle hItem ) : handle
    • Removed the passed item from this unit’s inventory.
  • TimeUntilNextAttack( ) : float

  • TriggerModifierDodge( ) : bool

  • TriggerSpellAbsorb( handle hAbility ) : bool

  • TriggerSpellReflect( handle hAbility ) : void
    • Trigger the Lotus Orb-like effect.(hAbility)
  • UnitCanRespawn( ) : bool

CDOTA_BaseNPC_Building

extends CDOTA_BaseNPC

A building.

  • GetInvulnCount( ) : int
    • Get the invulnerability count for a building.
  • SetInvulnCount( int nInvulnCount ) : void
    • Set the invulnerability counter of this building.

CDOTA_BaseNPC_Creature

extends CDOTA_BaseNPC

A Dota NPC Unit

  • AddItemDrop( handle hDropData ) : void
    • Add the specified item drop to this creature
  • CreatureLevelUp( int iLevels ) : void
    • Level the creature up by the specified number of levels
  • IsChampion( ) : bool
    • Is this unit a champion?
  • SetArmorGain( float flArmorGain ) : void
    • Set the armor gained per level on this creature.
  • SetAttackTimeGain( float flAttackTimeGain ) : void
    • Set the attack time gained per level on this creature.
  • SetBountyGain( int nBountyGain ) : void
    • Set the bounty gold gained per level on this creature.
  • SetChampion( bool bIsChampion ) : void
    • Flag this unit as a champion creature.
  • SetDamageGain( int nDamageGain ) : void
    • Set the damage gained per level on this creature.
  • SetDisableResistanceGain( float flDisableResistanceGain ) : void
    • Set the disable resistance gained per level on this creature.
  • SetHPGain( int nHPGain ) : void
    • Set the hit points gained per level on this creature.
  • SetHPRegenGain( float flHPRegenGain ) : void
    • Set the hit points regen gained per level on this creature.
  • SetMagicResistanceGain( float flMagicResistanceGain ) : void
    • Set the magic resistance gained per level on this creature.
  • SetManaGain( int nManaGain ) : void
    • Set the mana points gained per level on this creature.
  • SetManaRegenGain( float flManaRegenGain ) : void
    • Set the mana points regen gained per level on this creature.
  • SetMoveSpeedGain( int nMoveSpeedGain ) : void
    • Set the move speed gained per level on this creature.
  • SetXPGain( int nXPGain ) : void
    • Set the xp reward gained per level on this creature.

CDOTA_BaseNPC_Hero

extends CDOTA_BaseNPC

A Dota Hero NPC

  • AddExperience( float flXP, int nReason, bool bApplyBotDifficultyScaling, bool bIncrementTotal ) : bool
    • Params: Float XP, Bool applyBotDifficultyScaling
  • Buyback( ) : void
    • Spend the gold and buyback with this hero.
  • CalculateStatBonus( ) : void
    • Recalculate all stats after the hero gains stats.
  • CanEarnGold( ) : bool
    • Returns boolean value result of buyback gold limit time less than game time.
  • ClearLastHitMultikill( ) : void
    • Value is stored in PlayerResource.
  • ClearLastHitStreak( ) : void
    • Value is stored in PlayerResource.
  • ClearStreak( ) : void
    • Value is stored in PlayerResource.
  • GetAbilityPoints( ) : int
    • Gets the current unspent ability points.
  • GetAdditionalOwnedUnits( ) : variant

  • GetAgility( ) : float

  • GetAgilityGain( ) : float

  • GetAssists( ) : int
    • Value is stored in PlayerResource.
  • GetAttacker( int nIndex ) : int

  • GetBaseAgility( ) : float

  • GetBaseDamageMax( ) : int
    • Hero damage is also affected by attributes.
  • GetBaseDamageMin( ) : int
    • Hero damage is also affected by attributes.
  • GetBaseIntellect( ) : float

  • GetBaseStrength( ) : float

  • GetBonusDamageFromPrimaryStat( ) : int

  • GetBuybackCooldownTime( ) : float
    • Return float value for the amount of time left on cooldown for this hero’s buyback.
  • GetBuybackCost( ) : int
    • Return integer value for the gold cost of a buyback.
  • GetBuybackGoldLimitTime( ) : float
    • Returns the amount of time gold gain is limited after buying back.
  • GetCurrentXP( ) : int
    • Returns the amount of XP
  • GetDeathGoldCost( ) : int

  • GetDeaths( ) : int
    • Value is stored in PlayerResource.
  • GetDenies( ) : int
    • Value is stored in PlayerResource.
  • GetGold( ) : int
    • Returns gold amount for the player owning this hero
  • GetGoldBounty( ) : int

  • GetHealthRegen( ) : float
    • Hero health regen is affected by attributes.
  • GetIncreasedAttackSpeed( ) : float
    • Hero attack speed is also affected by agility.
  • GetIntellect( ) : float

  • GetIntellectGain( ) : float

  • GetKills( ) : int
    • Value is stored in PlayerResource.
  • GetLastHits( ) : int
    • Value is stored in PlayerResource.
  • GetManaRegen( ) : float
    • Hero mana regen is affected by attributes.
  • GetMostRecentDamageTime( ) : float

  • GetMultipleKillCount( ) : int

  • GetNumAttackers( ) : int

  • GetNumItemsInInventory( ) : int

  • GetNumItemsInStash( ) : int

  • GetPhysicalArmorValue( ) : float
    • Hero armor is affected by attributes.
  • GetPlayerID( ) : int
    • Returns player ID of the player owning this hero
  • GetPrimaryAttribute( ) : int
    • 0 = strength, 1 = agility, 2 = intelligence.
  • GetPrimaryStatValue( ) : float

  • GetRespawnTime( ) : float

  • GetRespawnsDisabled( ) : bool
    • Is this hero prevented from respawning?
  • GetStatsBasedManaRegen( ) : float
    • Returns only the regen based on Intelligence.
  • GetStreak( ) : int
    • Value is stored in PlayerResource.
  • GetStrength( ) : float

  • GetStrengthGain( ) : float

  • GetTimeUntilRespawn( ) : float

  • GetTogglableWearable( int nSlotType ) : handle
    • Get wearable entity in slot (slot)
  • HasAnyAvailableInventorySpace( ) : bool

  • HasFlyingVision( ) : bool

  • HasOwnerAbandoned( ) : bool

  • HasRoomForItem( cstring pItemName, bool bIncludeStashCombines, bool bAllowSelling ) : int
    • Args: const char* pItemName, bool bIncludeStashCombines, bool bAllowSelling
  • HeroLevelUp( bool bPlayEffects ) : void
    • Levels up the hero, true or false to play effects.
  • IncrementAssists( int iKillerID ) : void
    • Value is stored in PlayerResource.
  • IncrementDeaths( int iKillerID ) : void
    • Value is stored in PlayerResource.
  • IncrementDenies( ) : void
    • Value is stored in PlayerResource.
  • IncrementKills( int iVictimID ) : void
    • Passed ID is for the victim, killer ID is ID of the current hero. Value is stored in PlayerResource.
  • IncrementLastHitMultikill( ) : void
    • Value is stored in PlayerResource.
  • IncrementLastHitStreak( ) : void
    • Value is stored in PlayerResource.
  • IncrementLastHits( ) : void
    • Value is stored in PlayerResource.
  • IncrementNearbyCreepDeaths( ) : void
    • Value is stored in PlayerResource.
  • IncrementStreak( ) : void
    • Value is stored in PlayerResource.
  • IsBuybackDisabledByReapersScythe( ) : bool

  • IsReincarnating( ) : bool

  • KilledHero( handle hHero, handle hInflictor ) : void
    • Args: Hero, Inflictor
  • ModifyAgility( float flNewAgility ) : void
    • Adds passed value to base attribute value, then calls CalculateStatBonus.
  • ModifyGold( int iGoldChange, bool bReliable, int iReason ) : int
    • Gives this hero some gold. Args: int nGoldChange, bool bReliable, int reason
  • ModifyIntellect( float flNewIntellect ) : void
    • Adds passed value to base attribute value, then calls CalculateStatBonus.
  • ModifyStrength( float flNewStrength ) : void
    • Adds passed value to base attribute value, then calls CalculateStatBonus.
  • PerformTaunt( ) : void

  • RecordLastHit( ) : void

  • RespawnHero( bool bBuyBack, bool bIsActuallyBeingSpawnedForTheFirstTime, bool bRespawnPenalty ) : void
    • Respawn this hero.
  • SetAbilityPoints( int iPoints ) : void
    • Sets the current unspent ability points.
  • SetBaseAgility( float flAgility ) : void

  • SetBaseIntellect( float flIntellect ) : void

  • SetBaseStrength( float flStrength ) : void

  • SetBotDifficulty( int nDifficulty ) : void

  • SetBuyBackDisabledByReapersScythe( bool bBuybackDisabled ) : void

  • SetBuybackCooldownTime( float flTime ) : void
    • Sets the buyback cooldown time.
  • SetBuybackGoldLimitTime( float flTime ) : void
    • Set the amount of time gold gain is limited after buying back.
  • SetCustomDeathXP( int iValue ) : void
    • Sets a custom experience value for this hero. Note, GameRules boolean must be set for this to work!
  • SetGold( int iGold, bool bReliable ) : void
    • Sets the gold amount for the player owning this hero
  • SetPlayerID( int iPlayerID ) : void

  • SetPrimaryAttribute( int nPrimaryAttribute ) : void
    • Set this hero’s primary attribute value.
  • SetRespawnPosition( vector vOrigin ) : void

  • SetRespawnsDisabled( bool bDisableRespawns ) : void
    • Prevent this hero from respawning.
  • SetTimeUntilRespawn( float time ) : void

  • ShouldDoFlyHeightVisual( ) : bool

  • SpendGold( int iCost, int iReason ) : void
    • Args: int nGold, int nReason
  • UnitCanRespawn( ) : bool

  • UpgradeAbility( handle hAbility ) : void
    • This upgrades the passed ability if it exists and the hero has enough ability points.
  • WillReincarnate( ) : bool

CDOTA_Buff

A modifier.

  • AddParticle( int i, bool bDestroyImmediately, bool bStatusEffect, int iPriority, bool bHeroEffect, bool bOverheadEffect ) : void
    • (index, bDestroyImmediately, bStatusEffect, priority, bHeroEffect, bOverheadEffect
  • DecrementStackCount( ) : void
    • Decrease this modifier’s stack count by 1.
  • Destroy( ) : void
    • Run all associated destroy functions, then remove the modifier.
  • ForceRefresh( ) : void
    • Run all associated refresh functions on this modifier as if it was re-applied.
  • GetAbility( ) : handle
    • Get the ability that generated the modifier.
  • GetAuraDuration( ) : float
    • Returns aura stickiness (default 0.5)
  • GetCaster( ) : handle
    • Get the owner of the ability responsible for the modifier.
  • GetClass( ) : cstring

  • GetCreationTime( ) : float

  • GetDieTime( ) : float

  • GetDuration( ) : float

  • GetElapsedTime( ) : float

  • GetName( ) : cstring

  • GetParent( ) : handle
    • Get the unit the modifier is parented to.
  • GetRemainingTime( ) : float

  • GetStackCount( ) : int

  • IncrementStackCount( ) : void
    • Increase this modifier’s stack count by 1.
  • SetDuration( float flDuration, bool bInformClient ) : void
    • (flTime, bInformClients)
  • SetStackCount( int iCount ) : void

  • StartIntervalThink( float flInterval ) : void
    • Start this modifier’s think function (OnIntervalThink) with the given interval (float). To stop, call with -1.

CDOTA_CustomUIManager

!Custom HUD manager

  • DynamicHud_Create( int, cstring, cstring, handle ) : void
    • Create a new custom UI HUD element for the specified player(s). ( int PlayerID /-1 means everyone/, string ElementID /* should be unique /, string LayoutFileName, table DialogVariables / can be nil */ )
  • DynamicHud_Destroy( int, cstring ) : void
    • Destroy a custom hud element ( int PlayerID /-1 means everyone/, string ElementID )
  • DynamicHud_SetDialogVariables( int, cstring, handle ) : void
    • Add or modify dialog variables for an existing custom hud element ( int PlayerID /-1 means everyone/, string ElementID, table DialogVariables )
  • DynamicHud_SetVisible( int, cstring, bool ) : void
    • Toggle the visibility of an existing custom hud element ( int PlayerID /-1 means everyone/, string ElementID, bool Visible )

CDOTA_Item

extends CDOTABaseAbility

A usable item.

  • CanBeUsedOutOfInventory( ) : bool

  • GetContainer( ) : handle
    • Get the container for this item.
  • GetCost( ) : int

  • GetCurrentCharges( ) : int
    • Get the number of charges this item currently has.
  • GetInitialCharges( ) : int
    • Get the initial number of charges this item has.
  • GetItemState( ) : int
    • Gets whether item is unequipped or ready.
  • GetPurchaseTime( ) : float
    • Get the purchase time of this item
  • GetPurchaser( ) : handle
    • Get the purchaser for this item.
  • GetShareability( ) : int

  • IsAlertableItem( ) : bool

  • IsCastOnPickup( ) : bool

  • IsCombinable( ) : bool

  • IsDisassemblable( ) : bool

  • IsDroppable( ) : bool

  • IsItem( ) : bool

  • IsKillable( ) : bool

  • IsMuted( ) : bool

  • IsPermanent( ) : bool

  • IsPurchasable( ) : bool

  • IsRecipe( ) : bool

  • IsRecipeGenerated( ) : bool

  • IsSellable( ) : bool

  • IsStackable( ) : bool

  • LaunchLoot( bool bAutoUse, float flHeight, float flDuration, vector vEndPoint ) : void

  • LaunchLootInitialHeight( bool bAutoUse, float flInitialHeight, float flLaunchHeight, float flDuration, vector vEndPoint ) : void

  • OnEquip( ) : void

  • OnUnequip( ) : void

  • RequiresCharges( ) : bool

  • SetCanBeUsedOutOfInventory( bool bValue ) : void

  • SetCurrentCharges( int iCharges ) : void
    • Set the number of charges on this item
  • SetDroppable( bool bDroppable ) : void

  • SetItemState( int iState ) : void
    • Sets whether item is unequipped or ready.
  • SetPurchaseTime( float flTime ) : void
    • Set the purchase time of this item
  • SetPurchaser( handle hPurchaser ) : void
    • Set the purchaser of record for this item.
  • SetSellable( bool bSellable ) : void

  • SetStacksWithOtherOwners( bool bStacksWithOtherOwners ) : void

  • SpendCharge( ) : void

  • StacksWithOtherOwners( ) : bool

  • Think( ) : void
    • Think this item

CDOTA_ItemSpawner

extends CBaseEntity

Spawns a physical item

  • GetItemName( ) : cstring
    • Returns the item name

CDOTA_Item_DataDriven

extends CDOTA_Item

A data driven usable item.

  • ApplyDataDrivenModifier( handle hCaster, handle hTarget, cstring pszModifierName, handle hModifierTable ) : void
    • Applies a data driven modifier to the target
  • ApplyDataDrivenThinker( handle hCaster, vector vLocation, cstring pszModifierName, handle hModifierTable ) : handle
    • Applies a data driven thinker at the location

CDOTA_Item_Lua

extends CDOTA_Item

A lua-based item.

  • CastFilterResult( ) : int
    • Determine whether an issued command with no target is valid.
  • CastFilterResultLocation( vector vLocation ) : int
    • (Vector vLocation) Determine whether an issued command on a location is valid.
  • CastFilterResultTarget( handle hTarget ) : int
    • (HSCRIPT hTarget) Determine whether an issued command on a target is valid.
  • GetAssociatedPrimaryAbilities( ) : cstring
    • Returns abilities that are stolen simultaneously, or otherwise related in functionality.
  • GetAssociatedSecondaryAbilities( ) : cstring
    • Returns other abilities that are stolen simultaneously, or otherwise related in functionality. Generally hidden abilities.
  • GetBehavior( ) : int
    • Return cast behavior type of this ability.
  • GetCastRange( vector vLocation, handle hTarget ) : int
    • Return cast range of this ability.
  • GetChannelTime( ) : float
    • Return the channel time of this ability.
  • GetChannelledManaCostPerSecond( int iLevel ) : int
    • Return mana cost at the given level per second while channeling (-1 is current).
  • GetConceptRecipientType( ) : int
    • Return who hears speech when this spell is cast.
  • GetCooldown( int iLevel ) : float
    • Return cooldown of this ability.
  • GetCustomCastError( ) : cstring
    • Return the error string of a failed command with no target.
  • GetCustomCastErrorLocation( vector vLocation ) : cstring
    • (Vector vLocation) Return the error string of a failed command on a location.
  • GetCustomCastErrorTarget( handle hTarget ) : cstring
    • (HSCRIPT hTarget) Return the error string of a failed command on a target.
  • GetGoldCost( int iLevel ) : int
    • Return gold cost at the given level (-1 is current).
  • GetIntrinsicModifierName( ) : cstring
    • Returns the name of the modifier applied passively by this ability.
  • GetManaCost( int iLevel ) : int
    • Return mana cost at the given level (-1 is current).
  • GetPlaybackRateOverride( ) : float
    • Return the animation rate of the cast animation.
  • IsHiddenAbilityCastable( ) : bool
    • Returns true if this ability can be used when not on the action panel.
  • IsHiddenWhenStolen( ) : bool
    • Returns true if this ability is hidden when stolen by Spell Steal.
  • IsRefreshable( ) : bool
    • Returns true if this ability is refreshed by Refresher Orb.
  • IsStealable( ) : bool
    • Returns true if this ability can be stolen by Spell Steal.
  • OnAbilityPhaseInterrupted( ) : void
    • Cast time did not complete successfully.
  • OnAbilityPhaseStart( ) : bool
    • Cast time begins (return true for successful cast).
  • OnChannelFinish( bool bInterrupted ) : void
    • (bool bInterrupted) Channel finished.
  • OnChannelThink( float flInterval ) : void
    • (float flInterval) Channeling is taking place.
  • OnHeroCalculateStatBonus( ) : void
    • Caster (hero only) gained a level, skilled an ability, or received a new stat bonus.
  • OnHeroDiedNearby( handle unit, handle attacker, handle table ) : void
    • A hero has died in the vicinity (ie Urn), takes table of params.
  • OnHeroLevelUp( ) : void
    • Caster gained a level.
  • OnInventoryContentsChanged( ) : void
    • Caster inventory changed.
  • OnItemEquipped( handle hItem ) : void
    • ( HSCRIPT hItem ) Caster equipped item.
  • OnOwnerDied( ) : void
    • Caster died.
  • OnOwnerSpawned( ) : void
    • Caster respawned or spawned for the first time.
  • OnProjectileHit( handle hTarget, vector vLocation ) : bool
    • (HSCRIPT hTarget, Vector vLocation) Projectile has collided with a given target or reached its destination (target is invalid).
  • OnProjectileThink( vector vLocation ) : void
    • (Vector vLocation) Projectile is actively moving.
  • OnSpellStart( ) : void
    • Cast time finished, spell effects begin.
  • OnStolen( handle hSourceAbility ) : void
    • ( HSCRIPT hAbility ) Special behavior when stolen by Spell Steal.
  • OnToggle( ) : void
    • Ability is toggled on/off.
  • OnUnStolen( ) : void
    • Special behavior when lost by Spell Steal.
  • OnUpgrade( ) : void
    • Ability gained a level.
  • ProcsMagicStick( ) : bool
    • Returns true if this ability will generate magic stick charges for nearby enemies.
  • SpeakTrigger( ) : int
    • Return the type of speech used.

CDOTA_Item_Physical

extends CBaseAnimating

A physical item dropped in the world

  • GetContainedItem( ) : handle
    • Returned the contained item.
  • GetCreationTime( ) : float
    • Returns the game time when this item was created in the world
  • SetContainedItem( handle hItem ) : void
    • Set the contained item.

CDOTA_MapTree

extends CBaseEntity

A tree in the Dota map

  • CutDown( int nTreeNumberKnownTo ) : void
    • Cuts down this tree. Parameters: int nTeamNumberKnownTo (-1 = invalid team)
  • CutDownRegrowAfter( float flRegrowAfter, int nTeamNumberKnownTo ) : void
    • Cuts down this tree. Parameters: float flRegrowAfter (-1 = never regrow), int nTeamNumberKnownTo (-1 = invalid team)
  • GrowBack( ) : void
    • Grows back the tree if it was cut down.
  • IsStanding( ) : bool
    • Returns true if the tree is standing, false if it has been cut down

CDOTA_Modifier_Lua

extends CDOTA_Buff

A lua-based modifier.

  • AllowIllusionDuplicate( ) : bool
    • True/false if this modifier is active on illusions.
  • DestroyOnExpire( ) : bool
    • True/false if this buff is removed when the duration expires.
  • GetAttributes( ) : int
    • Return the types of attributes applied to this modifier (enum value from DOTAModifierAttribute_t
  • GetAuraDuration( ) : float
    • Returns aura stickiness
  • GetAuraEntityReject( handle hEntity ) : bool
    • Return true/false if this entity should receive the aura under specific conditions
  • GetAuraRadius( ) : int
    • Return the range around the parent this aura tries to apply its buff.
  • GetAuraSearchFlags( ) : int
    • Return the unit flags this aura respects when placing buffs.
  • GetAuraSearchTeam( ) : int
    • Return the teams this aura applies its buff to.
  • GetAuraSearchType( ) : int
    • Return the unit classifications this aura applies its buff to.
  • GetEffectAttachType( ) : int
    • Return the attach type of the particle system from GetEffectName.
  • GetEffectName( ) : cstring
    • Return the name of the particle system that is created while this modifier is active.
  • GetHeroEffectName( ) : cstring
    • Return the name of the hero effect particle system that is created while this modifier is active.
  • GetModifierAura( ) : cstring
    • The name of the secondary modifier that will be applied by this modifier (if it is an aura).
  • GetPriority( ) : int
    • Return the priority order this modifier will be applied over others.
  • GetStatusEffectName( ) : cstring
    • Return the name of the status effect particle system that is created while this modifier is active.
  • GetTexture( ) : cstring
    • Return the name of the buff icon to be shown for this modifier.
  • HeroEffectPriority( ) : int
    • Relationship of this hero effect with those from other buffs (higher is more likely to be shown).
  • IsAura( ) : bool
    • True/false if this modifier is an aura.
  • IsAuraActiveOnDeath( ) : bool
    • True/false if this aura provides buffs when the parent is dead.
  • IsDebuff( ) : bool
    • True/false if this modifier should be displayed as a debuff.
  • IsHidden( ) : bool
    • True/false if this modifier should be displayed on the buff bar.
  • IsPermanent( ) : bool

  • IsPurgable( ) : bool
    • True/false if this modifier can be purged.
  • IsPurgeException( ) : bool
    • True/false if this modifier can be purged by strong dispels.
  • IsStunDebuff( ) : bool
    • True/false if this modifier is considered a stun for purge reasons.
  • OnCreated( handle table ) : void
    • Runs when the modifier is created.
  • OnDestroy( ) : void
    • Runs when the modifier is destroyed (after unit loses modifier).
  • OnIntervalThink( ) : void
    • Runs when the think interval occurs.
  • OnRefresh( handle table ) : void
    • Runs when the modifier is refreshed.
  • OnRemoved( ) : void
    • Runs when the modifier is destroyed (before unit loses modifier).
  • OnStackCountChanged( int iStackCount ) : void
    • Runs when stack count changes (param is old count).
  • RemoveOnDeath( ) : bool
    • True/false if this modifier is removed when the parent dies.
  • StatusEffectPriority( ) : int
    • Relationship of this status effect with those from other buffs (higher is more likely to be shown).

CDOTA_Modifier_Lua_Horizontal_Motion

extends CDOTA_Modifier_Lua

A lua-based horizontal motion controller.

  • ApplyHorizontalMotionController( ) : bool
    • Starts the horizontal motion controller effects for this buff. Returns true if successful.
  • GetPriority( ) : int
    • Get the priority
  • OnHorizontalMotionInterrupted( ) : void
    • Called when the motion gets interrupted.
  • SetPriority( int nMotionPriority ) : void
    • Set the priority
  • UpdateHorizontalMotion( handle me, float dt ) : void
    • Perform any motion from the given interval on the NPC.

CDOTA_Modifier_Lua_Motion_Both

extends CDOTA_Modifier_Lua

A lua-based motion controller controlling both vertical and horizontal.

  • ApplyHorizontalMotionController( ) : bool
    • Starts the horizontal motion controller effects for this buff. Returns true if successful.
  • ApplyVerticalMotionController( ) : bool
    • Starts the vertical motion controller effects for this buff. Returns true if successful.
  • GetPriority( ) : int
    • Get the priority
  • OnHorizontalMotionInterrupted( ) : void
    • Called when the motion gets interrupted.
  • OnVerticalMotionInterrupted( ) : void
    • Called when the motion gets interrupted.
  • SetPriority( int nMotionPriority ) : void
    • Set the priority
  • UpdateHorizontalMotion( handle me, float dt ) : void
    • Perform any motion from the given interval on the NPC.
  • UpdateVerticalMotion( handle me, float dt ) : void
    • Perform any motion from the given interval on the NPC.

CDOTA_Modifier_Lua_Vertical_Motion

extends CDOTA_Modifier_Lua

A lua-based vertical motion controller.

  • ApplyVerticalMotionController( ) : bool
    • Starts the vertical motion controller effects for this buff. Returns true if successful.
  • GetMotionPriority( ) : int
    • Get the priority
  • OnVerticalMotionInterrupted( ) : void
    • Called when the motion gets interrupted.
  • SetMotionPriority( int nMotionPriority ) : void
    • Set the priority
  • UpdateVerticalMotion( handle me, float dt ) : void
    • Perform any motion from the given interval on the NPC.

CDOTA_PlayerResource

extends CBaseEntity

Interface to player data

  • AddAegisPickup( int iPlayerID ) : void

  • AddClaimedFarm( int iPlayerID, float flFarmValue, bool bEarnedValue ) : void

  • AddGoldSpentOnSupport( int iPlayerID, int iCost ) : void

  • AddRunePickup( int iPlayerID ) : void

  • AreUnitsSharedWithPlayerID( int nUnitOwnerPlayerID, int nOtherPlayerID ) : bool

  • CanRepick( int iPlayerID ) : bool

  • ClearKillsMatrix( int iPlayerID ) : void

  • ClearLastHitMultikill( int iPlayerID ) : void

  • ClearLastHitStreak( int iPlayerID ) : void

  • ClearRawPlayerDamageMatrix( int iPlayerID ) : void

  • ClearStreak( int iPlayerID ) : void

  • GetAegisPickups( int iPlayerID ) : int

  • GetAssists( int iPlayerID ) : int

  • GetBroadcasterChannel( int iPlayerID ) : uint

  • GetBroadcasterChannelSlot( int iPlayerID ) : uint

  • GetClaimedDenies( int iPlayerID ) : int

  • GetClaimedFarm( int iPlayerID, bool bOnlyEarned ) : float

  • GetClaimedMisses( int iPlayerID ) : int

  • GetConnectionState( int iPlayerID ) :

  • GetCreepDamageTaken( int iPlayerID, bool bTotal ) : int

  • GetCustomBuybackCooldown( int iPlayerID ) : float

  • GetCustomBuybackCost( int iPlayerID ) : int

  • GetCustomTeamAssignment( int iPlayerID ) : int
    • Get the current custom team assignment for this player.
  • GetDamageDoneToHero( int iPlayerID, int iVictimID ) : int

  • GetDeaths( int iPlayerID ) : int

  • GetDenies( int iPlayerID ) : int

  • GetEventPointsForPlayerID( int iPlayerID ) : uint

  • GetEventPremiumPoints( int iPlayerID ) : uint

  • GetEventRanks( int iPlayerID ) :

  • GetGold( int iPlayerID ) : int

  • GetGoldLostToDeath( int iPlayerID ) : int

  • GetGoldPerMin( int iPlayerID ) : float

  • GetGoldSpentOnBuybacks( int iPlayerID ) : int

  • GetGoldSpentOnConsumables( int iPlayerID ) : int

  • GetGoldSpentOnItems( int iPlayerID ) : int

  • GetGoldSpentOnSupport( int iPlayerID ) : int

  • GetHealing( int iPlayerID ) : float

  • GetHeroDamageTaken( int iPlayerID, bool bTotal ) : int

  • GetKills( int iPlayerID ) : int

  • GetKillsDoneToHero( int iPlayerID, int iVictimID ) : int

  • GetLastHitMultikill( int iPlayerID ) : int

  • GetLastHitStreak( int iPlayerID ) : int

  • GetLastHits( int iPlayerID ) : int

  • GetLevel( int iPlayerID ) : int

  • GetMisses( int iPlayerID ) : int

  • GetNearbyCreepDeaths( int iPlayerID ) : int

  • GetNthCourierForTeam( int nCourierIndex, int nTeamNumber ) : handle

  • GetNthPlayerIDOnTeam( int iTeamNumber, int iNthPlayer ) : int

  • GetNumConsumablesPurchased( int iPlayerID ) : int

  • GetNumCouriersForTeam( int nTeamNumber ) : int

  • GetNumItemsPurchased( int iPlayerID ) : int

  • GetPlayer( int iPlayerID ) : handle

  • GetPlayerCount( ) : int
    • Includes spectators and players not assigned to a team
  • GetPlayerCountForTeam( int iTeam ) : int

  • GetPlayerLoadedCompletely( int iPlayerID ) : bool

  • GetPlayerName( int iPlayerID ) : cstring

  • GetRawPlayerDamage( int iPlayerID ) : int

  • GetReliableGold( int iPlayerID ) : int

  • GetRespawnSeconds( int iPlayerID ) : int

  • GetRoshanKills( int iPlayerID ) : int

  • GetRunePickups( int iPlayerID ) : int

  • GetSelectedHeroEntity( int iPlayerID ) : handle

  • GetSelectedHeroID( int iPlayerID ) : int

  • GetSelectedHeroName( int iPlayerID ) : cstring

  • GetSteamAccountID( int iPlayerID ) : uint

  • GetSteamID( int iPlayerID ) : uint64
    • Get the 64 bit steam ID for a given player.
  • GetStreak( int iPlayerID ) : int

  • GetStuns( int iPlayerID ) : float

  • GetTeam( int iPlayerID ) : int

  • GetTeamKills( int iTeam ) : int

  • GetTeamPlayerCount( ) : int
    • Players on a valid team (radiant, dire, or custom*) who haven’t abandoned the game
  • GetTimeOfLastConsumablePurchase( int iPlayerID ) : float

  • GetTimeOfLastDeath( int iPlayerID ) : float

  • GetTimeOfLastItemPurchase( int iPlayerID ) : float

  • GetTotalEarnedGold( int iPlayerID ) : int

  • GetTotalEarnedXP( int iPlayerID ) : int

  • GetTotalGoldSpent( int iPlayerID ) : int

  • GetTowerDamageTaken( int iPlayerID, bool bTotal ) : int

  • GetTowerKills( int iPlayerID ) : int

  • GetUnitShareMaskForPlayer( int nPlayerID, int nOtherPlayerID ) : int

  • GetUnreliableGold( int iPlayerID ) : int

  • GetXPPerMin( int iPlayerID ) : float

  • HasCustomGameTicketForPlayerID( int iPlayerID ) : bool
    • Does this player have a custom game ticket for this game?
  • HasRandomed( int iPlayerID ) : bool

  • HasSelectedHero( int iPlayerID ) : bool

  • HaveAllPlayersJoined( ) : bool

  • IncrementAssists( int iPlayerID, int iVictimID ) : void

  • IncrementClaimedDenies( int iPlayerID ) : void

  • IncrementClaimedMisses( int iPlayerID ) : void

  • IncrementDeaths( int iPlayerID, int iKillerID ) : void

  • IncrementDenies( int iPlayerID ) : void

  • IncrementKills( int iPlayerID, int iVictimID ) : void

  • IncrementLastHitMultikill( int iPlayerID ) : void

  • IncrementLastHitStreak( int iPlayerID ) : void

  • IncrementLastHits( int iPlayerID ) : void

  • IncrementMisses( int iPlayerID ) : void

  • IncrementNearbyCreepDeaths( int iPlayerID ) : void

  • IncrementStreak( int iPlayerID ) : void

  • IncrementTotalEarnedXP( int iPlayerID, int iXP, int nReason ) : void

  • IsBroadcaster( int iPlayerID ) : bool

  • IsDisableHelpSetForPlayerID( int nPlayerID, int nOtherPlayerID ) : bool

  • IsFakeClient( int iPlayerID ) : bool

  • IsHeroSelected( cstring pHeroname ) : bool

  • IsHeroSharedWithPlayerID( int nUnitOwnerPlayerID, int nOtherPlayerID ) : bool

  • IsValidPlayer( int iPlayerID ) : bool

  • IsValidPlayerID( int iPlayerID ) : bool

  • IsValidTeamPlayer( int iPlayerID ) : bool

  • IsValidTeamPlayerID( int iPlayerID ) : bool

  • ModifyGold( int iPlayerID, int iGoldChange, bool bReliable, int nReason ) : int

  • ReplaceHeroWith( int iPlayerID, cstring pszHeroClass, int nGold, int nXP ) : handle
    • (playerID, heroClassName, gold, XP) - replaces the player’s hero with a new one of the specified class, gold and XP
  • ResetBuybackCostTime( int nPlayerID ) : void

  • ResetTotalEarnedGold( int iPlayerID ) : void

  • SetBuybackCooldownTime( int nPlayerID, float flBuybackCooldown ) : void

  • SetBuybackGoldLimitTime( int nPlayerID, float flBuybackCooldown ) : void

  • SetCameraTarget( int nPlayerID, handle hTarget ) : void
    • (playerID, entity) - force the given player’s camera to follow the given entity
  • SetCanRepick( int iPlayerID, bool bCanRepick ) : void

  • SetCustomBuybackCooldown( int iPlayerID, float flCooldownTime ) : void
    • Set the buyback cooldown for this player.
  • SetCustomBuybackCost( int iPlayerID, int iGoldCost ) : void
    • Set the buyback cost for this player.
  • SetCustomPlayerColor( int iPlayerID, int r, int g, int b ) : void
    • Set custom color for player (minimap, scoreboard, etc)
  • SetCustomTeamAssignment( int iPlayerID, int iTeamAssignment ) : void
    • Set custom team assignment for this player.
  • SetGold( int iPlayerID, int iGold, bool bReliable ) : void

  • SetHasRandomed( int iPlayerID ) : void

  • SetLastBuybackTime( int iPlayerID, int iLastBuybackTime ) : void

  • SetOverrideSelectionEntity( int nPlayerID, handle hEntity ) : void
    • Set the forced selection entity for a player.
  • SetUnitShareMaskForPlayer( int nPlayerID, int nOtherPlayerID, int nFlag, bool bState ) : void

  • SpendGold( int iPlayerID, int iCost, int iReason ) : void

  • UpdateTeamSlot( int iPlayerID, int iTeamNumber, int desiredSlot ) : void

  • WhoSelectedHero( cstring pHeroFilename ) : int

CDOTA_SimpleObstruction

extends CBaseEntity

Simple obstruction

  • IsEnabled( ) : bool
    • Returns whether the obstruction is currently active
  • SetEnabled( bool bEnabled, bool bForce ) : void
    • Enable or disable the obstruction

CDOTA_Unit_Courier

extends CDOTA_BaseNPC

A courier.

  • UpgradeToFlyingCourier( ) : bool
    • Upgrade to a flying courier

CDOTA_Unit_Nian

extends CDOTA_BaseNPC_Creature

A Dota NPC Unit

  • GetHorn( ) : handle
    • Is the Nian horn?
  • GetTail( ) : handle
    • Is the Nian’s tail broken?
  • IsHornAlive( ) : bool
    • Is the Nian’s horn broken?
  • IsTailAlive( ) : bool
    • Is the Nian’s tail broken?

CDebugOverlayScriptHelper

Wrapper class over g_pDebugOverlay instance

  • Axis( vector, quaternion, float, bool, float ) : void
    • Draws an axis. Specify origin + orientation in world space.
  • Box( vector, vector, int, int, int, int, bool, float ) : void
    • Draws a world-space axis-aligned box. Specify bounds in world space.
  • BoxAngles( vector, vector, vector, quaternion, int, int, int, int, bool, float ) : void
    • Draws an oriented box at the origin. Specify bounds in local space.
  • Capsule( vector, quaternion, float, float, int, int, int, int, bool, float ) : void
    • Draws a capsule. Specify base in world space.
  • Circle( vector, quaternion, float, int, int, int, int, bool, float ) : void
    • Draws a circle. Specify center in world space.
  • CircleScreenOriented( vector, float, int, int, int, int, bool, float ) : void
    • Draws a circle oriented to the screen. Specify center in world space.
  • Cone( vector, vector, float, float, int, int, int, int, bool, float ) : void
    • Draws a wireframe cone. Specify endpoint and direction in world space.
  • Cross( vector, float, int, int, int, int, bool, float ) : void
    • Draws a screen-aligned cross. Specify origin in world space.
  • Cross3D( vector, float, int, int, int, int, bool, float ) : void
    • Draws a world-aligned cross. Specify origin in world space.
  • Cross3DOriented( vector, quaternion, float, int, int, int, int, bool, float ) : void
    • Draws an oriented cross. Specify origin in world space.
  • DrawTickMarkedLine( vector, vector, float, int, int, int, int, int, bool, float ) : void
    • Draws a dashed line. Specify endpoints in world space.
  • EntityAttachments( ehandle, float, float ) : void
    • Draws the attachments of the entity
  • EntityAxis( ehandle, float, bool, float ) : void
    • Draws the axis of the entity origin
  • EntityBounds( ehandle, int, int, int, int, bool, float ) : void
    • Draws bounds of an entity
  • EntitySkeleton( ehandle, float ) : void
    • Draws the skeleton of the entity
  • EntityText( ehandle, int, cstring, int, int, int, int, float ) : void
    • Draws text on an entity
  • FilledRect2D( vector2d, vector2d, int, int, int, int, float ) : void
    • Draws a screen-space filled 2D rectangle. Coordinates are in pixels.
  • HorzArrow( vector, vector, float, int, int, int, int, bool, float ) : void
    • Draws a horizontal arrow. Specify endpoints in world space.
  • Line( vector, vector, int, int, int, int, bool, float ) : void
    • Draws a line between two points
  • Line2D( vector2d, vector2d, int, int, int, int, float ) : void
    • Draws a line between two points in screenspace
  • PopDebugOverlayScope( ) : void
    • Pops the identifier used to group overlays. Overlays marked with this identifier can be deleted in a big batch.
  • PushAndClearDebugOverlayScope( utlstringtoken ) : void
    • Pushes an identifier used to group overlays. Deletes all existing overlays using this overlay id.
  • PushDebugOverlayScope( utlstringtoken ) : void
    • Pushes an identifier used to group overlays. Overlays marked with this identifier can be deleted in a big batch.
  • RemoveAllInScope( utlstringtoken ) : void
    • Removes all overlays marked with a specific identifier, regardless of their lifetime.
  • SolidCone( vector, vector, float, float, int, int, int, int, bool, float ) : void
    • Draws a solid cone. Specify endpoint and direction in world space.
  • Sphere( vector, float, int, int, int, int, bool, float ) : void
    • Draws a wireframe sphere. Specify center in world space.
  • SweptBox( vector, vector, vector, vector, quaternion, int, int, int, int, float ) : void
    • Draws a swept box. Specify endpoints in world space and the bounds in local space.
  • Text( vector, int, cstring, float, int, int, int, int, float ) : void
    • Draws 2D text. Specify origin in world space.
  • Texture( cstring, vector2d, vector2d, int, int, int, int, vector2d, vector2d, float ) : void
    • Draws a screen-space texture. Coordinates are in pixels.
  • Triangle( vector, vector, vector, int, int, int, int, bool, float ) : void
    • Draws a filled triangle. Specify vertices in world space.
  • UnitTestCycleOverlayRenderType( ) : void
    • Toggles the overlay render type, for unit tests
  • VectorText3D( vector, quaternion, cstring, int, int, int, int, bool, float ) : void
    • Draws 3D text. Specify origin + orientation in world space.
  • VertArrow( vector, vector, float, int, int, int, int, bool, float ) : void
    • Draws a vertical arrow. Specify endpoints in world space.
  • YawArrow( vector, float, float, float, int, int, int, int, bool, float ) : void
    • Draws a arrow associated with a specific yaw. Specify endpoints in world space.

CDotaQuest

extends CBaseEntity

A quest

  • AddSubquest( handle hSubquest ) : void
    • Add a subquest to this quest
  • CompleteQuest( ) : void
    • Mark this quest complete
  • GetSubquest( int nIndex ) : handle
    • Finds a subquest from this quest by index
  • GetSubquestByName( cstring pszName ) : handle
    • Finds a subquest from this quest by name
  • RemoveSubquest( handle hSubquest ) : void
    • Remove a subquest from this quest
  • SetTextReplaceString( cstring pszString ) : void
    • Set the text replace string for this quest
  • SetTextReplaceValue( int valueSlot, int value ) : void
    • Set a quest value

CDotaSubquestBase

extends CBaseEntity

A subquest

  • CompleteSubquest( ) : void
    • Mark this subquest complete
  • SetTextReplaceString( cstring pszString ) : void
    • Set the text replace string for this subquest
  • SetTextReplaceValue( int valueSlot, int value ) : void
    • Set a subquest value

CEntities

!The global list of entities

  • CreateByClassname( cstring ) : handle
    • Creates an entity by classname
  • FindAllByClassname( cstring ) : variant
    • Finds all entities by class name. Returns an array containing all the found entities.
  • FindAllByClassnameWithin( cstring, vector, float ) : variant
    • Find entities by class name within a radius.
  • FindAllByModel( cstring ) : variant
    • Find entities by model name.
  • FindAllByName( cstring ) : variant
    • Find all entities by name. Returns an array containing all the found entities in it.
  • FindAllByNameWithin( cstring, vector, float ) : variant
    • Find entities by name within a radius.
  • FindAllByTarget( cstring ) : variant
    • Find entities by targetname.
  • FindAllInSphere( vector, float ) : variant
    • Find entities within a radius.
  • FindByClassname( handle, cstring ) : handle
    • Find entities by class name. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • FindByClassnameNearest( cstring, vector, float ) : handle
    • Find entities by class name nearest to a point.
  • FindByClassnameWithin( handle, cstring, vector, float ) : handle
    • Find entities by class name within a radius. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • FindByModel( handle, cstring ) : handle
    • Find entities by model name. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • FindByModelWithin( handle, cstring, vector, float ) : handle
    • Find entities by model name within a radius. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • FindByName( handle, cstring ) : handle
    • Find entities by name. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • FindByNameNearest( cstring, vector, float ) : handle
    • Find entities by name nearest to a point.
  • FindByNameWithin( handle, cstring, vector, float ) : handle
    • Find entities by name within a radius. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • FindByTarget( handle, cstring ) : handle
    • Find entities by targetname. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • FindInSphere( handle, vector, float ) : handle
    • Find entities within a radius. Pass ‘null’ to start an iteration, or reference to a previously found entity to continue a search
  • First( ) : handle
    • Begin an iteration over the list of entities
  • Next( handle ) : handle
    • Continue an iteration over the list of entities, providing reference to a previously found entity

CEntityInstance

CEntityInstance: Root class for all entities

  • ConnectOutput( cstring, cstring ) : void
    • Adds an I/O connection that will call the named function on this entity when the specified output fires.
  • Destroy( ) : void

  • DisconnectOutput( cstring, cstring ) : void
    • Removes a connected script function from an I/O event on this entity.
  • DisconnectRedirectedOutput( cstring, cstring, handle ) : void
    • Removes a connected script function from an I/O event on the passed entity.
  • FireOutput( cstring, handle, handle, variant, float ) : void
    • Fire an entity output
  • GetClassname( ) : cstring

  • GetDebugName( ) : cstring
    • Get the entity name w/help if not defined (i.e. classname/etc)
  • GetEntityHandle( ) : ehandle
    • Get the entity as an EHANDLE
  • GetEntityIndex( ) : int

  • GetIntAttr( cstring ) : int
    • Get Integer Attribute
  • GetName( ) : cstring

  • GetOrCreatePrivateScriptScope( ) : handle
    • Retrieve, creating if necessary, the private per-instance script-side data associated with an entity
  • GetOrCreatePublicScriptScope( ) : handle
    • Retrieve, creating if necessary, the public script-side data associated with an entity
  • GetPrivateScriptScope( ) : handle
    • Retrieve the private per-instance script-side data associated with an entity
  • GetPublicScriptScope( ) : handle
    • Retrieve the public script-side data associated with an entity
  • RedirectOutput( cstring, cstring, handle ) : void
    • Adds an I/O connection that will call the named function on the passed entity when the specified output fires.
  • RemoveSelf( ) : void
    • Delete this entity
  • SetIntAttr( cstring, int ) : void
    • Set Integer Attribute
  • entindex( ) : int

CEntityScriptFramework

C-side of entity framework

CEnvEntityMaker

extends CBaseEntity

env_entity_maker

  • SpawnEntity( ) : void
    • Create an entity at the location of the maker
  • SpawnEntityAtEntityOrigin( handle hEntity ) : void
    • Create an entity at the location of a specified entity instance
  • SpawnEntityAtLocation( vector vecAlternateOrigin, vector vecAlternateAngles ) : void
    • Create an entity at a specified location and orientaton, orientation is Euler angle in degrees (pitch, yaw, roll)
  • SpawnEntityAtNamedEntityOrigin( cstring pszName ) : void
    • Create an entity at the location of a named entity

CEnvProjectedTexture

extends CBaseEntity

Dynamic, shadow casting light source.

  • SetFarRange( float flRange ) : void
    • Set light maximum range
  • SetLinearAttenuation( float flAtten ) : void
    • Set light linear attenuation value
  • SetNearRange( float flRange ) : void
    • Set light minimum range
  • SetQuadraticAttenuation( float flAtten ) : void
    • Set light quadratic attenuation value
  • SetVolumetrics( bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset ) : void
    • Turn on/off light volumetrics: bool bOn, float flIntensity, float flNoise, int nPlanes, float flPlaneOffset

CInfoData

extends CBaseEntity

Info Data

  • QueryColor( utlstringtoken tok, vector vDefault ) : vector
    • Query color data for this key
  • QueryFloat( utlstringtoken tok, float flDefault ) : float
    • Query float data for this key
  • QueryInt( utlstringtoken tok, int nDefault ) : int
    • Query int data for this key
  • QueryNumber( utlstringtoken tok, float flDefault ) : float
    • Query number data for this key
  • QueryString( utlstringtoken tok, cstring pDefault ) : cstring
    • Query string data for this key
  • QueryVector( utlstringtoken tok, vector vDefault ) : vector
    • Query vector data for this key

CLogicScript

extends CBaseEntity

Container for game scripts.

CMarkupVolumeTagged

extends CBaseEntity

Volume to add tags to the world

  • HasTag( cstring pszTagName ) : bool
    • Does this volume have the given tag.

CNativeOutputs

Container to hold outputs published by script to game

  • AddOutput( cstring, cstring ) : void
    • Add an output
  • Init( int ) : void
    • Initialize with number of outputs

CPhysicsProp

extends CBaseAnimating

Physics props

  • DisableMotion( ) : void
    • Disable motion for the prop
  • EnableMotion( ) : void
    • Enable motion for the prop
  • SetDynamicVsDynamicContinuous( bool bIsDynamicVsDynamicContinuousEnabled ) : void
    • Enable/disable dynamic vs dynamic continuous collision traces

CPointClientUIWorldPanel

extends CBaseModelEntity

In-world UI panel

  • AcceptUserInput( ) : void
    • Tells the panel to accept user input.
  • AddCSSClasses( cstring pszClasses ) : void
    • Adds CSS class(es) to the panel
  • IgnoreUserInput( ) : void
    • Tells the panel to ignore user input.
  • RemoveCSSClasses( cstring pszClasses ) : void
    • Remove CSS class(es) from the panel

CPointTemplate

extends CBaseEntity

point_template

  • DeleteCreatedSpawnGroups( ) : void
    • DeleteCreatedSpawnGroups() : Deletes any spawn groups that this point_template has spawned. Note: The point_template will not be deleted by this.
  • ForceSpawn( ) : void
    • ForceSpawn() : Spawns all of the entities the point_template is pointing at.
  • GetSpawnedEntities( ) : handle
    • GetSpawnedEntities() : Get the list of the most recent spawned entities
  • SetSpawnCallback( handle hCallbackFunc, handle hCallbackScope ) : void
    • SetSpawnCallback( hCallbackFunc, hCallbackScope, hCallbackData ) : Set a callback for when the template spawns entities. The spawned entities will be passed in as an array.

CPointWorldText

extends CBaseModelEntity

World-space text

  • SetMessage( cstring pMessage ) : void
    • Set the message on this entity.

CPropHMDAvatar

extends CBaseAnimating

HMD Avatar that owns the VR hands

  • GetVRHand( int nHandID ) : handle
    • Get VR hand by ID

CPropVRHand

extends CBaseAnimating

VR hand that controls poses and controller state

  • AddHandAttachment( handle hAttachment ) : void
    • Add the attachment to this hand
  • AddHandModelOverride( cstring pModelName ) : handle
    • Add a model override for this hand
  • FindHandModelOverride( cstring pModelName ) : handle
    • Find a specific model override for this hand
  • FireHapticPulse( int nStrength ) : void
    • Fire a haptic pulse on this hand. [0,2] for strength.
  • GetHandAttachment( ) : handle
    • Get the attachment on this hand
  • GetHandID( ) : int
    • Get hand ID
  • GetPlayer( ) : handle
    • Get the player for this hand
  • RemoveAllHandModelOverrides( ) : void
    • Remove all model overrides for this hand
  • RemoveHandAttachmentByHandle( handle hAttachment ) : void
    • Remove hand attachment by handle
  • RemoveHandModelOverride( cstring pModelName ) : void
    • Remove a model override for this hand
  • SetHandAttachment( handle hAttachment ) : void
    • Set the attachment for this hand

CSceneEntity

extends CBaseEntity

Choreographed scene which controls animation and/or dialog on one or more actors.

  • AddBroadcastTeamTarget( int ) : void
    • Adds a team (by index) to the broadcast list
  • Cancel( ) : void
    • Cancel scene playback
  • EstimateLength( ) : float
    • Returns length of this scene in seconds.
  • FindCamera( ) : handle
    • Get the camera
  • FindNamedEntity( cstring ) : handle
    • given an entity reference, such as !target, get actual entity from scene object
  • IsPaused( ) : bool
    • If this scene is currently paused.
  • IsPlayingBack( ) : bool
    • If this scene is currently playing.
  • LoadSceneFromString( cstring, cstring ) : bool
    • given a dummy scene name and a vcd string, load the scene
  • RemoveBroadcastTeamTarget( int ) : void
    • Removes a team (by index) from the broadcast list
  • Start( handle ) : void
    • Start scene playback, takes activatorEntity as param

CScriptHTTPRequest

A HTTP request object.

  • Send( handle ) : bool
    • Send a HTTP request.
  • SetHTTPRequestAbsoluteTimeoutMS( uint ) : bool
    • Set the total timeout on the request.
  • SetHTTPRequestGetOrPostParameter( cstring, cstring ) : bool
    • Set a POST or GET parameter on the request.
  • SetHTTPRequestHeaderValue( cstring, cstring ) : bool
    • Set a header value on the request.
  • SetHTTPRequestNetworkActivityTimeout( uint ) : bool
    • Set the network timeout on the request - this timer is reset when any data is received.
  • SetHTTPRequestRawPostBody( cstring, cstring ) : bool
    • Set the literal body of a post - invalid after setting a post parameter.

CScriptHeroList

!The global list of heroes

  • GetAllHeroes( ) : variant
    • Returns all the heroes in the world
  • GetHero( int ) : handle
    • Get the Nth hero in the Hero List
  • GetHeroCount( ) : int
    • Returns the number of heroes in the world

CScriptKeyValues

Container to hold keyvalues published to spawn functions in script

  • GetValue( cstring ) : variant
    • Reads a spawn key

CScriptParticleManager

!Used to create and manage particle effects

  • CreateParticle( cstring, int, handle ) : int
    • Creates a new particle effect
  • CreateParticleForPlayer( cstring, int, handle, handle ) : int
    • Creates a new particle effect that only plays for the specified player
  • CreateParticleForTeam( cstring, int, handle, int ) : int
    • Creates a new particle effect that only plays for the specified team
  • DestroyParticle( int, bool ) : void
    • (int index, bool bDestroyImmediately) - Destroy a particle, if bDestroyImmediately destroy it without playing end caps.
  • GetParticleReplacement( cstring, handle ) : cstring

  • ReleaseParticleIndex( int ) : void
    • Frees the specified particle index
  • SetParticleAlwaysSimulate( int ) : void

  • SetParticleControl( int, int, vector ) : void
    • Set the control point data for a control on a particle effect
  • SetParticleControlEnt( int, int, handle, int, cstring, vector, bool ) : void

  • SetParticleControlForward( int, int, vector ) : void
    • (int nFXIndex, int nPoint, vForward)
  • SetParticleControlOrientation( int, int, vector, vector, vector ) : void
    • (int nFXIndex, int nPoint, vForward, vRight, vUp)

CScriptPrecacheContext

Container to hold context published to precache functions in script

  • AddResource( cstring ) : void
    • Precaches a specific resource
  • GetValue( cstring ) : variant
    • Reads a spawn key

Convars

!Access to convar functions

  • GetBool( cstring ) : variant
    • GetBool(name) : returns the convar as a boolean flag.
  • GetCommandClient( ) : handle
    • GetCommandClient() : returns the player who issued this console command.
  • GetDOTACommandClient( ) : handle
    • GetDOTACommandClient() : returns the DOTA player who issued this console command.
  • GetFloat( cstring ) : variant
    • GetFloat(name) : returns the convar as a float. May return null if no such convar.
  • GetInt( cstring ) : variant
    • GetInt(name) : returns the convar as an int. May return null if no such convar.
  • GetStr( cstring ) : variant
    • GetStr(name) : returns the convar as a string. May return null if no such convar.
  • RegisterCommand( cstring, handle, cstring, int ) : void
    • RegisterCommand(name, fn, helpString, flags) : register a console command.
  • RegisterConvar( cstring, cstring, cstring, int ) : void
    • RegisterConvar(name, defaultValue, helpString, flags): register a new console variable.
  • SetBool( cstring, bool ) : void
    • SetBool(name, val) : sets the value of the convar to the bool.
  • SetFloat( cstring, float ) : void
    • SetFloat(name, val) : sets the value of the convar to the float.
  • SetInt( cstring, int ) : void
    • SetInt(name, val) : sets the value of the convar to the int.
  • SetStr( cstring, cstring ) : void
    • SetStr(name, val) : sets the value of the convar to the string.

Global

####

  • AddFOWViewer( int, vector, float, float, bool ) : void
    • Add temporary vision for a given team ( nTeamID, vLocation, flRadius, flDuration, bObstructedVision)
  • AngleDiff( float, float ) : float
    • Returns the number of degrees difference between two yaw angles
  • AppendToLogFile( cstring, cstring ) : void
    • Appends a string to a log file on the server
  • ApplyDamage( handle ) : float
    • Damage an npc.
  • AxisAngleToQuaternion( vector, float ) : quaternion
    • (vector,float) constructs a quaternion representing a rotation by angle around the specified vector axis
  • CalcClosestPointOnEntityOBB( handle, vector ) : vector
    • Compute the closest point on the OBB of an entity.
  • CalcDistanceBetweenEntityOBB( handle, handle ) : float
    • 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( vector, vector, vector ) : float

  • CancelEntityIOEvents( ehandle ) : void
    • Create all I/O events for a particular entity
  • ClearTeamCustomHealthbarColor( int ) : void
    • ( teamNumber )
  • CreateDamageInfo( handle, handle, vector, vector, float, int ) : handle
    • (hInflictor, hAttacker, flDamage) - Allocate a damageinfo object, used as an argument to TakeDamage(). Call DestroyDamageInfo( hInfo ) to free the object.
  • CreateEffect( handle ) : bool
    • Pass table - Inputs: entity, effect
  • CreateHTTPRequestScriptVM( cstring, cstring ) : handle
    • Create an HTTP request.
  • CreateHeroForPlayer( cstring, handle ) : handle
    • Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player’s controlled hero
  • CreateItem( cstring, handle, handle ) : handle
    • Create a DOTA item
  • CreateItemOnPositionForLaunch( vector, handle ) : handle
    • Create a physical item at a given location, can start in air (but doesn’t clear a space)
  • CreateItemOnPositionSync( vector, handle ) : handle
    • Create a physical item at a given location
  • CreateModifierThinker( handle, handle, cstring, handle, vector, int, bool ) : handle
    • Create a modifier not associated with an NPC. ( hCaster, hAbility, modifierName, paramTable, vOrigin, nTeamNumber, bPhantomBlocker )
  • CreateSceneEntity( cstring ) : handle
    • Create a scene entity to play the specified scene.
  • CreateTempTree( vector, float ) : void
    • Create a temporary tree. (vLocation, flDuration).
  • CreateTrigger( vector, vector, vector ) : handle
    • CreateTrigger( vecMin, vecMax ) : Creates and returns an AABB trigger
  • CreateTriggerRadiusApproximate( vector, float ) : handle
    • CreateTriggerRadiusApproximate( vecOrigin, flRadius ) : Creates and returns an AABB trigger thats bigger than the radius provided
  • CreateUnitByName( cstring, vector, bool, handle, handle, int ) : handle
    • Creates a DOTA unit by its dota_npc_units.txt name
  • CreateUnitByNameAsync( cstring, vector, bool, handle, handle, int, handle ) : int
    • Creates a DOTA unit by its dota_npc_units.txt name
  • CreateUnitFromTable( handle, vector ) : handle
    • Creates a DOTA unit by its dota_npc_units.txt name from a table of entity key values and a position to spawn at.
  • DebugBreak( ) : void
    • Breaks in the debugger
  • DebugDrawBox( vector, vector, vector, int, int, int, int, float ) : void
    • Draw a debug overlay box (origin, mins, maxs, forward, r, g, b, a, duration )
  • DebugDrawBoxDirection( vector, vector, vector, vector, vector, float, float ) : void
    • Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
  • DebugDrawCircle( vector, vector, float, float, bool, float ) : void
    • Draw a debug circle (center, vRgb, a, rad, ztest, duration)
  • DebugDrawClear( ) : void
    • Try to clear all the debug overlay info
  • DebugDrawLine( vector, vector, int, int, int, bool, float ) : void
    • Draw a debug overlay line (origin, target, r, g, b, ztest, duration)
  • DebugDrawLine_vCol( vector, vector, vector, bool, float ) : void
    • Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
  • DebugDrawScreenTextLine( float, float, int, cstring, int, int, int, int, float ) : void
    • Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration)
  • DebugDrawSphere( vector, vector, float, float, bool, float ) : void
    • Draw a debug sphere (center, vRgb, a, rad, ztest, duration)
  • DebugDrawText( vector, cstring, bool, float ) : void
    • Draw text in 3d (origin, text, bViewCheck, duration)
  • DebugScreenTextPretty( float, float, int, cstring, int, int, int, int, float, cstring, int, bool ) : void
    • Draw pretty debug text (x, y, lineOffset, text, r, g, b, a, duration, font, size, bBold)
  • DestroyDamageInfo( handle ) : void
    • Free a damageinfo object that was created with CreateDamageInfo().
  • DoCleaveAttack( handle, handle, handle, float, float, float, float, cstring ) : int
    • (hAttacker, hTarget, hAbility, fDamage, fRadius, effectName)
  • DoEntFire( cstring, cstring, cstring, float, handle, handle ) : void
    • #EntFire:Generate and entity i/o event
  • DoEntFireByInstanceHandle( handle, cstring, cstring, float, handle, handle ) : void
    • #EntFireByHandle:Generate and entity i/o event
  • DoIncludeScript( cstring, handle ) : bool
    • Execute a script (internal)
  • DoScriptAssert( bool, cstring ) : void
    • #ScriptAssert:Asserts the passed in value. Prints out a message and brings up the assert dialog.
  • DoUniqueString( cstring ) : cstring
    • #UniqueString: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( cstring ) : void
    • Emit an announcer sound for all players.
  • EmitAnnouncerSoundForPlayer( cstring, int ) : void
    • Emit an announcer sound for a player.
  • EmitAnnouncerSoundForTeam( cstring, int ) : void
    • Emit an announcer sound for a team.
  • EmitAnnouncerSoundForTeamOnLocation( cstring, int, vector ) : void
    • Emit an announcer sound for a team at a specific location.
  • EmitGlobalSound( cstring ) : void
    • Play named sound for all players
  • EmitSoundOn( cstring, handle ) : void
    • Play named sound on Entity
  • EmitSoundOnClient( cstring, handle ) : void
    • Play named sound only on the client for the passed in player
  • EmitSoundOnLocationForAllies( vector, cstring, handle ) : void
    • Emit a sound on a location from a unit, only for players allied with that unit (vLocation, soundName, hCaster
  • EmitSoundOnLocationWithCaster( vector, cstring, handle ) : void
    • Emit a sound on a location from a unit. (vLocation, soundName, hCaster).
  • EntIndexToHScript( int ) : handle
    • Turn an entity index integer to an HScript representing that entity’s script instance.
  • ExecuteOrderFromTable( handle ) : void
    • Issue an order from a script table
  • ExponentialDecay( float, float, float ) : float
    • Smooth curve decreasing slower as it approaches zero
  • FindClearSpaceForUnit( handle, vector, bool ) : bool
    • Place a unit somewhere not already occupied.
  • FindUnitsInLine( int, vector, vector, handle, float, int, int, int ) : variant
    • Find units that intersect the given line with the given flags.
  • FindUnitsInRadius( int, vector, handle, float, int, int, int, int, bool ) : variant
    • Finds the units in a given radius with the given flags.
  • FireEntityIOInputNameOnly( ehandle, cstring ) : void
    • Fire Entity’s Action Input w/no data
  • FireEntityIOInputString( ehandle, cstring, cstring ) : void
    • Fire Entity’s Action Input with passed String - you own the memory
  • FireEntityIOInputVec( ehandle, cstring, vector ) : void
    • Fire Entity’s Action Input with passed Vector - you own the memory
  • FireGameEvent( cstring, handle ) : void
    • Fire a game event.
  • FireGameEventLocal( cstring, handle ) : void
    • Fire a game event without broadcasting to the client.
  • FrameTime( ) : float
    • Get the time spent on the server in the last frame
  • GetEntityIndexForTreeId( uint ) :
    • Get the enity index for a tree id specified as the entindex_target of a DOTA_UNIT_ORDER_CAST_TARGET_TREE.
  • GetFrameCount( ) : int
    • Returns the engines current frame count
  • GetFrostyBoostAmount( int, int ) : float

  • GetFrostyPointsForRound( int, int, int ) : int

  • GetGoldFrostyBoostAmount( int, int ) : float

  • GetGoldFrostyPointsForRound( int, int, int ) : int

  • GetGroundHeight( vector, handle ) : float

  • GetGroundPosition( vector, handle ) : vector
    • Returns the supplied position moved to the ground. Second parameter is an NPC for measuring movement collision hull offset.
  • GetItemCost( cstring ) : int
    • Get the cost of an item by name.
  • GetListenServerHost( ) : handle
    • Get the local player on a listen server.
  • GetMapName( ) : cstring
    • Get the name of the map.
  • GetMaxOutputDelay( ehandle, cstring ) : float
    • Get the longest delay for all events attached to an output
  • GetPhysAngularVelocity( handle ) : vector
    • 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( handle ) : vector
    • Get Velocity for VPHYS or normal object
  • GetSystemDate( ) : cstring
    • Get the current real world date
  • GetSystemTime( ) : cstring
    • Get the current real world time
  • GetTeamHeroKills( int ) : int
    • ( int teamID )
  • GetTeamName( int ) : cstring
    • ( int teamID )
  • GetTreeIdForEntityIndex( int ) : int
    • Given and entity index of a tree, get the tree id for use for use with with unit orders.
  • GetWorldMaxX( ) : float
    • Gets the world’s maximum X position.
  • GetWorldMaxY( ) : float
    • Gets the world’s maximum Y position.
  • GetWorldMinX( ) : float
    • Gets the world’s minimum X position.
  • GetWorldMinY( ) : float
    • Gets the world’s minimum Y position.
  • InitLogFile( cstring, cstring ) : void
    • If the given file doesn’t exist, creates it with the given contents; does nothing if it exists
  • IsClient( ) : bool
    • Returns true if this is lua running from the client.dll.
  • IsDedicatedServer( ) : bool
    • Returns true if this server is a dedicated server.
  • IsInToolsMode( ) : bool
    • Returns true if this is lua running within tools mode.
  • IsMarkedForDeletion( handle ) : bool
    • Returns true if the entity is valid and marked for deletion.
  • IsServer( ) : bool
    • Returns true if this is lua running from the server.dll.
  • IsValidEntity( handle ) : bool
    • Checks to see if the given hScript is a valid entity
  • LimitPathingSearchDepth( float ) : void
    • Set the limit on the pathfinding search space.
  • LinkLuaModifier( cstring, cstring, int ) : void
    • Link a lua-defined modifier with the associated class ( className, fileName, LuaModifierType).
  • ListenToGameEvent( cstring, handle, handle ) : int
    • Register as a listener for a game event from script.
  • LoadKeyValues( cstring ) : variant
    • Creates a table from the specified keyvalues text file
  • LoadKeyValuesFromString( cstring ) : variant
    • Creates a table from the specified keyvalues string
  • MakeStringToken( cstring ) : int
    • Checks to see if the given hScript is a valid entity
  • MinimapEvent( int, handle, int, int, int, int ) : void
    • Start a minimap event. (nTeamID, hEntity, nXCoord, nYCoord, nEventType, nEventDuration).
  • PauseGame( bool ) : void
    • Pause or unpause the game.
  • PlayerInstanceFromIndex( int ) : handle
    • Get a script instance of a player by index.
  • PrecacheEntityFromTable( cstring, handle, handle ) : void
    • Precache an entity from KeyValues in table
  • PrecacheEntityListFromTable( handle, handle ) : void
    • Precache a list of entity KeyValues tables
  • PrecacheItemByNameAsync( cstring, handle ) : void
    • Asynchronously precaches a DOTA item by its dota_npc_items.txt name, provides a callback when it’s finished.
  • PrecacheItemByNameSync( cstring, handle ) : void
    • Precaches a DOTA item by its dota_npc_items.txt name
  • PrecacheModel( cstring, handle ) : void
    • ( modelName, context ) - Manually precache a single model
  • PrecacheResource( cstring, cstring, handle ) : void
    • Manually precache a single resource
  • PrecacheUnitByNameAsync( cstring, handle, int ) : void
    • Asynchronously precaches a DOTA unit by its dota_npc_units.txt name, provides a callback when it’s finished.
  • PrecacheUnitByNameSync( cstring, handle, int ) : void
    • Precaches a DOTA unit by its dota_npc_units.txt name
  • PrecacheUnitFromTableAsync( handle, handle ) : void
    • Precaches a DOTA unit from a table of entity key values.
  • PrecacheUnitFromTableSync( handle, handle ) : void
    • Precaches a DOTA unit from a table of entity key values.
  • PrintLinkedConsoleMessage( cstring, cstring ) : void
    • Print a console message with a linked console command
  • RandomFloat( float, float ) : float
    • Get a random float within a range
  • RandomInt( int, int ) : int
    • Get a random int within a range
  • RandomVector( float ) : vector
    • Get a random 2D vector of the given length.
  • RegisterCustomAnimationScriptForModel( cstring, cstring ) : void
    • Register a custom animation script to run when a model loads
  • RegisterSpawnGroupFilterProxy( cstring ) : void
    • Create a C proxy for a script-based spawn group filter
  • ReloadMOTD( ) : void
    • Reloads the MotD file
  • RemoveSpawnGroupFilterProxy( cstring ) : void
    • Remove the C proxy for a script-based spawn group filter
  • ResolveNPCPositions( vector, float ) : void
    • Check and fix units that have been assigned a position inside collision radius of other NPCs.
  • RollPercentage( int ) : bool
    • Rolls a number from 1 to 100 and returns true if the roll is less than or equal to the number specified
  • RotateOrientation( qangle, qangle ) : qangle
    • Rotate a QAngle by another QAngle.
  • RotatePosition( vector, qangle, vector ) : vector
    • Rotate a Vector around a point.
  • RotateQuaternionByAxisAngle( quaternion, vector, float ) : quaternion
    • (quaternion,vector,float) rotates a quaternion by the specified angle around the specified vector axis
  • RotationDelta( qangle, qangle ) : qangle
    • Find the delta between two QAngles.
  • RotationDeltaAsAngularVelocity( qangle, qangle ) : vector
    • converts delta QAngle to an angular velocity Vector
  • Say( handle, cstring, bool ) : void
    • Have Entity say string, and teamOnly or not
  • ScreenShake( vector, float, float, float, float, int, bool ) : void
    • Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
  • SendFrostivusTimeElapsedToGC( ) : void

  • SendFrostyPointsMessageToGC( handle ) : void

  • SendOverheadEventMessage( handle, int, handle, int, handle ) : void
    • ( DOTAPlayer sendToPlayer, int iMessageType, Entity targetEntity, int iValue, DOTAPlayer sourcePlayer ) - sendToPlayer and sourcePlayer can be nil - iMessageType is one of OVERHEAD_ALERT_*
  • SendToConsole( cstring ) : void
    • Send a string to the console as a client command
  • SendToServerConsole( cstring ) : void
    • Send a string to the console as a server command
  • SetOpvarFloatAll( cstring, cstring, cstring, float ) : void
    • Sets an opvar value for all players
  • SetOpvarFloatPlayer( cstring, cstring, cstring, float, handle ) : void
    • Sets an opvar value for a single player
  • SetPhysAngularVelocity( handle, vector ) : void
    • 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( cstring ) : void
    • Set the current quest name.
  • SetQuestPhase( int ) : void
    • Set the current quest phase.
  • SetRenderingEnabled( ehandle, bool ) : void
    • Set rendering on/off for an ehandle
  • SetTeamCustomHealthbarColor( int, int, int, int ) : void
    • ( teamNumber, r, g, b )
  • ShowCustomHeaderMessage( cstring, int, int, float ) : void
    • ( const char *pszMessage, int nPlayerID, int nValue, float flTime ) - Supports localized strings - %s1 = PlayerName, %s2 = Value, %s3 = TeamName
  • ShowGenericPopup( cstring, cstring, cstring, cstring, int ) : void
    • Show a generic popup dialog for all players.
  • ShowGenericPopupToPlayer( handle, cstring, cstring, cstring, cstring, int ) : void
    • Show a generic popup dialog to a specific player.
  • ShowMessage( cstring ) : void
    • Print a hud message on all clients
  • SpawnEntityFromTableSynchronous( cstring, handle ) : handle
    • Synchronously spawns a single entity from a table
  • SpawnEntityGroupFromTable( handle, bool, handle ) : bool
    • Hierarchically spawn an entity group from a set of spawn tables.
  • SpawnEntityListFromTableAsynchronous( handle, handle ) : int
    • Asynchronously spawn an entity group from a list of spawn tables. A callback will be triggered when the spawning is complete
  • SpawnEntityListFromTableSynchronous( handle ) : handle
    • Synchronously spawn an entity group from a list of spawn tables.
  • SplineQuaternions( quaternion, quaternion, float ) : quaternion
    • (quaternion,quaternion,float) very basic interpolation of v0 to v1 over t on [0,1]
  • SplineVectors( vector, vector, float ) : vector
    • (vector,vector,float) very basic interpolation of v0 to v1 over t on [0,1]
  • StartSoundEvent( cstring, handle ) : void
    • Start a sound event
  • StartSoundEventFromPosition( cstring, vector ) : void
    • Start a sound event from position
  • StartSoundEventFromPositionReliable( cstring, vector ) : void
    • Start a sound event from position with reliable delivery
  • StartSoundEventFromPositionUnreliable( cstring, vector ) : void
    • Start a sound event from position with optional delivery
  • StartSoundEventReliable( cstring, handle ) : void
    • Start a sound event with reliable delivery
  • StartSoundEventUnreliable( cstring, handle ) : void
    • Start a sound event with optional delivery
  • StopEffect( handle, cstring ) : void
    • Pass entity and effect name
  • StopListeningToAllGameEvents( handle ) : void
    • Stop listening to all game events within a specific context.
  • StopListeningToGameEvent( int ) : bool
    • Stop listening to a particular game event.
  • StopSoundEvent( cstring, handle ) : void
    • Stops a sound event
  • StopSoundOn( cstring, handle ) : void
    • Stop named sound on Entity
  • Time( ) : float
    • Get the current server time
  • TraceCollideable( handle ) : bool
    • Pass table - Inputs: start, end, ent, (optional mins, maxs) – outputs: pos, fraction, hit, startsolid, normal
  • TraceHull( handle ) : bool
    • Pass table - Inputs: start, end, min, max, mask, ignore – outputs: pos, fraction, hit, enthit, startsolid
  • TraceLine( handle ) : bool
    • Pass table - Inputs: startpos, endpos, mask, ignore – outputs: pos, fraction, hit, enthit, startsolid
  • UTIL_MessageText( int, cstring, int, int, int, int ) : void
    • Sends colored text to one client.
  • UTIL_MessageTextAll( cstring, int, int, int, int ) : void
    • Sends colored text to all clients.
  • UTIL_MessageTextAll_WithContext( cstring, int, int, int, int, handle ) : void
    • Sends colored text to all clients. (Valid context keys: player_id, value, team_id)
  • UTIL_MessageText_WithContext( int, cstring, int, int, int, int, handle ) : void
    • Sends colored text to one client. (Valid context keys: player_id, value, team_id)
  • UTIL_Remove( handle ) : void
    • Removes the specified entity
  • UTIL_RemoveImmediate( handle ) : void
    • Immediately removes the specified entity
  • UTIL_ResetMessageText( int ) : void
    • Clear all message text on one client.
  • UTIL_ResetMessageTextAll( ) : void
    • Clear all message text from all clients.
  • UnitFilter( handle, int, int, int, int ) : int
    • Check if a unit passes a set of filters. (hNPC, nTargetTeam, nTargetType, nTargetFlags, nTeam
  • UnloadSpawnGroup( cstring ) : void
    • Unload a spawn group by name
  • UnloadSpawnGroupByHandle( int ) : void
    • Unload a spawn group by handle
  • UpdateEventPoints( handle ) : void

  • VectorToAngles( vector ) : qangle
    • Get Qangles (with no roll) for a Vector.
  • cvar_getf( cstring ) : float
    • Gets the value of the given cvar, as a float.
  • cvar_setf( cstring, float ) : bool
    • Sets the value of the given cvar, as a float.
  • rr_AddDecisionRule( handle ) : bool
    • Add a rule to the decision database.
  • rr_CommitAIResponse( handle, handle ) : bool
    • Commit the result of QueryBestResponse back to the given entity to play. Call with params (entity, airesponse)
  • rr_GetResponseTargets( ) : handle
    • Retrieve a table of all available expresser targets, in the form { name : handle, name: handle }.
  • rr_QueryBestResponse( handle, handle, handle ) : bool
    • Params: (entity, query) : tests ‘query’ against entity’s response system and returns the best response found (or null if none found).

GlobalSys

!Access to global system functions

  • CommandLineCheck( cstring ) : variant
    • CommandLineCheck(name) : returns true if the command line param was used, otherwise false.
  • CommandLineFloat( cstring, float ) : variant
    • CommandLineFloat(name) : returns the command line param as a float.
  • CommandLineInt( cstring, int ) : variant
    • CommandLineInt(name) : returns the command line param as an int.
  • CommandLineStr( cstring, cstring ) : variant
    • CommandLineStr(name) : returns the command line param as a string.

GridNav

!The grid navigation system

  • CanFindPath( vector, vector ) : bool
    • Determine if it is possible to reach the specified end point from the specified start point. bool (vStart, vEnd)
  • DestroyTreesAroundPoint( vector, float, bool ) : void
    • Destroy all trees in the area(vPosition, flRadius, bFullCollision
  • FindPathLength( vector, vector ) : float
    • Find a path between the two points an return the length of the path. If there is not a path between the points the returned value will be -1. float (vStart, vEnd )
  • GetAllTreesAroundPoint( vector, float, bool ) : variant
    • Returns a table full of tree HSCRIPTS (vPosition, flRadius, bFullCollision).
  • GridPosToWorldCenterX( int ) : float
    • Get the X position of the center of a given X index
  • GridPosToWorldCenterY( int ) : float
    • Get the Y position of the center of a given Y index
  • IsBlocked( vector ) : bool
    • Checks whether the given position is blocked
  • IsNearbyTree( vector, float, bool ) : bool
    • (position, radius, checkFullTreeRadius?) Checks whether there are any trees overlapping the given point
  • IsTraversable( vector ) : bool
    • Checks whether the given position is traversable
  • RegrowAllTrees( ) : void
    • Causes all trees in the map to regrow
  • WorldToGridPosX( float ) : int
    • Get the X index of a given world X position
  • WorldToGridPosY( float ) : int
    • Get the Y index of a given world Y position

ProjectileManager

!The projectile manager

  • CreateLinearProjectile( handle ) : int
    • Creates a linear projectile and returns the projectile ID
  • CreateTrackingProjectile( handle ) : void
    • Creates a tracking projectile
  • DestroyLinearProjectile( int ) : void
    • Destroys the linear projectile matching the argument ID
  • GetLinearProjectileVelocity( int ) : vector
    • Returns a vector representing the current velocity of the projectile.
  • ProjectileDodge( handle ) : void
    • Makes the specified unit dodge projectiles