User talk:Tet: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Created page with "Dost thou even hoist? ~~~~")
 
No edit summary
Line 1: Line 1:
Dost thou even hoist? —[[User:Mattshu|Mattshu]] 17:47, 1 March 2013 (PST)
Dost thou even hoist? —[[User:Mattshu|Mattshu]] 17:47, 1 March 2013 (PST)
=== CScriptParticleManager ===
''!Used to create and manage particle effects''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| CreateParticle
| <code>int CreateParticle( cstring, int, hscript )</code>
| Creates a new particle effect
|-
| CreateParticleForPlayer
| <code>int CreateParticleForPlayer( cstring, int, hscript, hscript )</code>
| Creates a new particle effect that only plays for the specified player
|-
| SetParticleControl
| <code>void SetParticleControl( int, int, vector )</code>
| Set the control point data for a control on a particle effect
|-
| ReleaseParticleIndex
| <code>void ReleaseParticleIndex( int )</code>
| Frees the specified particle index
|}
|-
| DoIncludeScript
| <code>bool DoIncludeScript( cstring, hscript )</code>
| Execute a script (internal)
=== CEntityScriptFramework ===
''C-side of entity framework''
=== CEntities ===
''!The global list of entities''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| First
| <code>hscript First()</code>
| Begin an iteration over the list of entities
|-
| Next
| <code>hscript Next( hscript )</code>
| Continue an iteration over the list of entities, providing reference to a previously found entity
|-
| CreateByClassname
| <code>hscript CreateByClassname( cstring )</code>
| Creates an entity by classname
|-
| FindByClassname
| <code>hscript FindByClassname( hscript, cstring )</code>
| Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| FindAllByClassname
| <code>variant FindAllByClassname( cstring )</code>
| Finds all entities by class name. Returns an array containing all the found entities.
|-
| FindByName
| <code>hscript FindByName( hscript, cstring )</code>
| Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| FindAllByName
| <code>variant FindAllByName( cstring )</code>
| Find all entities by name. Returns an array containing all the found entities in it.
|-
| FindInSphere
| <code>hscript FindInSphere( hscript, vector, float )</code>
| Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| FindAllInSphere
| <code>variant FindAllInSphere( vector, float )</code>
| Find entities within a radius.
|-
| FindByTarget
| <code>hscript FindByTarget( hscript, cstring )</code>
| Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| FindAllByTarget
| <code>variant FindAllByTarget( cstring )</code>
| Find entities by targetname.
|-
| FindByModel
| <code>hscript FindByModel( hscript, cstring )</code>
| Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| FindAllByModel
| <code>variant FindAllByModel( cstring )</code>
| Find entities by model name.
|-
| FindByNameNearest
| <code>hscript FindByNameNearest( cstring, vector, float )</code>
| Find entities by name nearest to a point.
|-
| FindByNameWithin
| <code>hscript FindByNameWithin( hscript, cstring, vector, float )</code>
| Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
|-
| FindAllByNameWithin
| <code>variant FindAllByNameWithin( cstring, vector, float )</code>
| Find entities by name within a radius.
|-
| FindByClassnameNearest
| <code>hscript FindByClassnameNearest( cstring, vector, float )</code>
| Find entities by class name nearest to a point.
|-
| FindByClassnameWithin
| <code>hscript FindByClassnameWithin( hscript, cstring, vector, float )</code>
| 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
|-
| FindAllByClassnameWithin
| <code>variant FindAllByClassnameWithin( cstring, vector, float )</code>
| Find entities by class name within a radius.
|}
=== Convars ===
''!Access to convar functions''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| GetFloat
| <code>variant GetFloat( cstring )</code>
| GetFloat(name) : returns the convar as a float. May return null if no such convar.
|-
| GetStr
| <code>variant GetStr( cstring )</code>
| GetFloat(name) : returns the convar as a string. May return null if no such convar.
|-
| GetBool
| <code>variant GetBool( cstring )</code>
| GetBool(name) : returns the convar as a boolean flag.
|-
| RegisterCommand
| <code>void RegisterCommand( cstring, hscript, cstring, int )</code>
| RegisterCommand(name, fn, helpString, flags) : register a console command.
|-
| RegisterConvar
| <code>void RegisterConvar( cstring, cstring, cstring, int )</code>
| RegisterConvar(name, defaultValue, helpString, flags): register a new console variable.
|-
| GetCommandClient
| <code>hscript GetCommandClient()</code>
| GetCommandClient() : returns the player who issued this console command.
|-
| GetDOTACommandClient
| <code>hscript GetDOTACommandClient()</code>
| GetDOTACommandClient() : returns the DOTA player who issued this console command.
|}
|-
| GetWorldMinX
| <code>float GetWorldMinX()</code>
| Gets the world's minimum X position.
|-
| GetWorldMinY
| <code>float GetWorldMinY()</code>
| Gets the world's maximum Y position.
|-
| GetWorldMaxX
| <code>float GetWorldMaxX()</code>
| Gets the world's minimum X position.
|-
| GetWorldMaxY
| <code>float GetWorldMaxY()</code>
| Gets the world's maximum Y position.
|-
| GetSystemTime
| <code>cstring GetSystemTime()</code>
| Get the current real world time
|-
| GetSystemDate
| <code>cstring GetSystemDate()</code>
| Get the current real world date
|-
| ListenToGameEvent
| <code>int ListenToGameEvent( cstring, hscript, hscript )</code>
| Register as a listener for a game event from script.
|-
| StopListeningToGameEvent
| <code>bool StopListeningToGameEvent( int )</code>
| Stop listening to a particular game event.
|-
| FireGameEvent
| <code>void FireGameEvent( cstring, hscript )</code>
| Fire a game event.
|-
| FireGameEventLocal
| <code>void FireGameEventLocal( cstring, hscript )</code>
| Fire a game event without broadcasting to the client.
|-
| PauseGame
| <code>void PauseGame( bool )</code>
| Pause or unpause the game.
|-
| EmitGlobalSound
| <code>void EmitGlobalSound( cstring )</code>
| Play named sound for all players
|-
| CreateUnitByName
| <code>hscript CreateUnitByName( cstring, vector, bool, hscript, hscript, int )</code>
| Creates a DOTA unit by its dota_npc_units.txt name
|-
| PrecacheUnitByName
| <code>bool PrecacheUnitByName( cstring )</code>
| Precaches a DOTA unit by its dota_npc_units.txt name
|-
| CreateHeroForPlayer
| <code>hscript CreateHeroForPlayer( cstring, hscript )</code>
| Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero
|-
| CreateItem
| <code>hscript CreateItem( cstring, hscript, hscript )</code>
| Create a DOTA item
|-
| CreateItemOnPosition
| <code>hscript CreateItemOnPosition( vector )</code>
| Create a physical item at a given location
|-
| FindClearSpaceForUnit
| <code>void FindClearSpaceForUnit( hscript, vector, bool )</code>
| Place a unit somewhere not already occupied.
|-
| FindUnitsInRadius
| <code>variant FindUnitsInRadius( int, vector, hscript, float, int, int, int, int, bool )</code>
| Finds the units in a given radius with the given flags.
|-
| PrecacheUnit
| <code>void PrecacheUnit( cstring, hscript )</code>
| Precaches all the resources for a given unit.
|-
| GetGroundPosition
| <code>vector GetGroundPosition( vector, hscript )</code>
| Returns the supplied position moved to the ground. Second parameter is an NPC for measuring movement collision hull offset.
|-
| PrecacheResource
| <code>void PrecacheResource( cstring, cstring )</code>
| Manually precache a single resource
|-
| GetFrostyPointsForRound
| <code>int GetFrostyPointsForRound( int, int, int )</code>
|
|-
| GetGoldFrostyPointsForRound
| <code>int GetGoldFrostyPointsForRound( int, int, int )</code>
|
|-
| GetFrostyBoostAmount
| <code>float GetFrostyBoostAmount( int, int )</code>
|
|-
| GetGoldFrostyBoostAmount
| <code>float GetGoldFrostyBoostAmount( int, int )</code>
|
|-
| SendFrostyPointsMessageToGC
| <code>void SendFrostyPointsMessageToGC( hscript )</code>
|
|-
| SendFrostivusTimeElapsedToGC
| <code>void SendFrostivusTimeElapsedToGC()</code>
|
|-
| UpdateEventPoints
| <code>void UpdateEventPoints( hscript )</code>
|
|-
| ExecuteOrderFromTable
| <code>void ExecuteOrderFromTable( hscript )</code>
| Issue an order from a script table
|-
| ShowGenericPopup
| <code>void ShowGenericPopup( cstring, cstring, cstring, cstring, int )</code>
| Show a generic popup dialog for all players.
|-
| ShowGenericPopupToPlayer
| <code>void ShowGenericPopupToPlayer( hscript, cstring, cstring, cstring, cstring, int )</code>
| Show a generic popup dialog to a specific player.
=== CScriptHeroList ===
''!The global list of heroes''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| GetHero
| <code>hscript GetHero( int )</code>
| Get the Nth hero in the Hero List
|-
| GetHeroCount
| <code>int GetHeroCount()</code>
| Returns the number of heroes in the world
|-
| GetAllHeroes
| <code>variant GetAllHeroes()</code>
| Returns all the heroes in the world
|}
=== CDOTAGamerules ===
''!DOTA GameRules''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| State_Get
| <code>unknown_variant_type State_Get()</code>
| Get the current Gamerules state
|-
| GetGameTime
| <code>float GetGameTime()</code>
| Returns the number of seconds elapsed since map start. This time doesn't count up when the game is paused
|-
| GetDifficulty
| <code>int GetDifficulty()</code>
| Returns difficulty level of the custom game mode
|-
| GetCustomGameDifficulty
| <code>int GetCustomGameDifficulty()</code>
| Returns the difficulty level of the custom game mode
|-
| Defeated
| <code>void Defeated()</code>
| Kills the ancient, etc.
|-
| ResetDefeated
| <code>void ResetDefeated()</code>
| Restart after killing the ancient, etc.
|-
| SetGameWinner
| <code>void SetGameWinner( int )</code>
| Makes ths specified team win
|-
| MakeTeamLose
| <code>void MakeTeamLose( int )</code>
| Makes ths specified team lose
|-
| ResetMap
| <code>void ResetMap( int )</code>
| Resets the map in one of several ways
|-
| GetDroppedItem
| <code>hscript GetDroppedItem( int )</code>
| Gets the Xth dropped item
|-
| NumDroppedItems
| <code>int NumDroppedItems()</code>
| Returns the number of items currently dropped on the ground
|-
| SendCustomMessage
| <code>void SendCustomMessage( cstring, int, int )</code>
| Sends a string to the defined team.
|-
| SetHeroRespawnEnabled
| <code>void SetHeroRespawnEnabled( bool )</code>
| Control if the normal DOTA hero respawn rules apply.
|-
| Playtesting_UpdateCustomKeyValues
| <code>void Playtesting_UpdateCustomKeyValues()</code>
| Updates custom hero, unit and ability KeyValues in memory with the latest values from disk
|-
| ResetToHeroSelection
| <code>void ResetToHeroSelection()</code>
| Restart the game at hero selection
|-
| SetTreeRegrowTime
| <code>void SetTreeRegrowTime( float )</code>
| Sets the tree regrow time in seconds.
|-
| SetHeroSelectionTime
| <code>void SetHeroSelectionTime( float )</code>
| Sets the amount of time players have to pick their hero.
|-
| SetPreGameTime
| <code>void SetPreGameTime( float )</code>
| Sets the amount of time players have between picking their hero and game start.
|-
| SetPostGameTime
| <code>void SetPostGameTime( float )</code>
| Sets the amount of time players have between the game ending and the server disconnecting them.
|-
| SetRuneSpawnTime
| <code>void SetRuneSpawnTime( float )</code>
| Sets the amount of time between rune spawns.
|-
| SetSameHeroSelectionEnabled
| <code>void SetSameHeroSelectionEnabled( bool )</code>
| When true, players can repeatedly pick the same hero.
|-
| SetUseUniversalShopMode
| <code>void SetUseUniversalShopMode( bool )</code>
| When true, all items are available at as long as any shop is in range.
|-
| SetTimeOfDay
| <code>void SetTimeOfDay( float )</code>
| Set the time of day.
|-
| SetOverlayHealthBarUnit
| <code>void SetOverlayHealthBarUnit( hscript, int )</code>
| Show this unit's health on the overlay health bar
|-
| SetHeroMinimapIconSize
| <code>void SetHeroMinimapIconSize( int )</code>
| (nMinimapHeroIconSize) - Set the hero minimap icon size.
|-
| SetCreepMinimapIconScale
| <code>void SetCreepMinimapIconScale( float )</code>
| (flMinimapCreepIconScale) - Scale the creep icons on the minimap.
|-
| SetRuneMinimapIconScale
| <code>void SetRuneMinimapIconScale( float )</code>
| (flMinimapRuneIconScale) - Scale the rune icons on the minimap.
|-
| SetSafeToLeave
| <code>void SetSafeToLeave( bool )</code>
| (bSafeToLeave) - Mark this game as safe to leave.
|-
| SetUseCustomHeroXPValues
| <code>void SetUseCustomHeroXPValues( bool )</code>
| Allows heroes in the map to give a specific amount of XP (this value must be set).
|-
| SetCustomGameDifficulty
| <code>void SetCustomGameDifficulty( int )</code>
| Set the difficulty level of the custom game mode
|-
| SetGoldTickTime
| <code>void SetGoldTickTime( float )</code>
| Set the time interval between auto gold increases.
|-
| SetGoldPerTick
| <code>void SetGoldPerTick( int )</code>
| Set the auto gold increase per timed interval.
|-
| SetNianFightStartTime
| <code>void SetNianFightStartTime( float )</code>
| Sets the start time for the Nian fight
|-
| GetNianFightStartTime
| <code>float GetNianFightStartTime()</code>
| Gets the start time for the Nian fight
|-
| GetMatchSignoutComplete
| <code>bool GetMatchSignoutComplete()</code>
| Have we received the post match signout message that includes reward information
|-
| DidMatchSignoutTimeOut
| <code>bool DidMatchSignoutTimeOut()</code>
| true when we have waited some time after end of the game and not received signout
|-
| GetNianTotalDamageTaken
| <code>int GetNianTotalDamageTaken()</code>
| For New Bloom, get total damage taken by the Nian / Year Beast
|}
=== CDOTAVoteSystem ===
''!DOTA Vote System''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| StartVote
| <code>void StartVote( hscript )</code>
| Starts a vote, based upon a table of parameters
|}
=== CBaseEntity ===
''Root class of all server-side entities''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| ConnectOutput
| <code>void ConnectOutput( cstring, cstring )</code>
| Adds an I/O connection that will call the named function when the specified output fires
|-
| DisconnectOutput
| <code>void DisconnectOutput( cstring, cstring )</code>
| Removes a connected script function from an I/O event.
|-
| GetHealth
| <code>int GetHealth()</code>
|
|-
| SetHealth
| <code>void SetHealth( int )</code>
|
|-
| GetMaxHealth
| <code>int GetMaxHealth()</code>
|
|-
| SetMaxHealth
| <code>void SetMaxHealth( int )</code>
|
|-
| IsAlive
| <code>bool IsAlive()</code>
|
|-
| Remove
| <code>void Remove()</code>
|
|-
| SetModel
| <code>void SetModel( cstring )</code>
|
|-
| GetModelName
| <code>cstring GetModelName()</code>
| Returns the name of the model
|-
| EmitSound
| <code>void EmitSound( cstring )</code>
| Plays a sound from this entity.
|-
| EmitSoundParams
| <code>void EmitSoundParams( cstring, int, float )</code>
| Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol is > 0.
|-
| StopSound
| <code>void StopSound( cstring )</code>
| Stops a named sound playing from this entity.
|-
| PrecacheSoundScript
| <code>void PrecacheSoundScript( cstring )</code>
| Precache a sound for later playing.
|-
| GetSoundDuration
| <code>float GetSoundDuration( cstring, cstring )</code>
| Returns float duration of the sound. Takes soundname and optional actormodelname.
|-
| GetClassname
| <code>cstring GetClassname()</code>
|
|-
| GetName
| <code>cstring GetName()</code>
|
|-
| GetPreTemplateName
| <code>cstring GetPreTemplateName()</code>
| Get the entity name stripped of template unique decoration
|-
| GetAbsOrigin
| <code>vector GetAbsOrigin()</code>
|
|-
| SetAbsOrigin
| <code>void SetAbsOrigin( vector )</code>
|
|-
| GetOrigin
| <code>vector GetOrigin()</code>
|
|-
| SetAbsOrigin
| <code>void SetAbsOrigin( vector )</code>
| SetOrigin
|-
| SetOrigin
| <code>void SetOrigin( vector )</code>
|
|-
| GetForwardVector
| <code>vector GetForwardVector()</code>
| Get the forward vector of the entity
|-
| GetRightVector
| <code>vector GetRightVector()</code>
| Get the right vector of the entity
|-
| GetUpVector
| <code>vector GetUpVector()</code>
| Get the up vector of the entity
|-
| SetForwardVector
| <code>void SetForwardVector( vector )</code>
| Set the orientation of the entity to have this forward vector
|-
| GetVelocity
| <code>vector GetVelocity()</code>
|
|-
| SetVelocity
| <code>void SetVelocity( vector )</code>
|
|-
| SetAngularVelocity
| <code>void SetAngularVelocity( float, float, float )</code>
| Set the local angular velocity - takes float pitch,yaw,roll velocities
|-
| GetAngularVelocity
| <code>vector GetAngularVelocity()</code>
| Get the local angular velocity - returns a vector of pitch,yaw,roll
|-
| GetCenter
| <code>vector GetCenter()</code>
| Get vector to center of object - absolute coords
|-
| EyePosition
| <code>vector EyePosition()</code>
| Get vector to eye position - absolute coords
|-
| SetAngles
| <code>void SetAngles( float, float, float )</code>
| Set entity pitch, yaw, roll
|-
| GetAngles
| <code>vector GetAngles()</code>
| Get entity pitch, yaw, roll as a vector
|-
| SetSize
| <code>void SetSize( vector, vector )</code>
|
|-
| GetBoundingMins
| <code>vector GetBoundingMins()</code>
| Get a vector containing min bounds, centered on object
|-
| GetBoundingMaxs
| <code>vector GetBoundingMaxs()</code>
| Get a vector containing max bounds, centered on object
|-
| Destroy
| <code>void Destroy()</code>
|
|-
| SetOwner
| <code>void SetOwner( hscript )</code>
|
|-
| GetTeam
| <code>int GetTeam()</code>
|
|-
| SetTeam
| <code>void SetTeam( int )</code>
|
|-
| GetMoveParent
| <code>hscript GetMoveParent()</code>
| If in hierarchy, retrieves the entity's parent
|-
| GetRootMoveParent
| <code>hscript GetRootMoveParent()</code>
| If in hierarchy, walks up the hierarchy to find the root parent
|-
| FirstMoveChild
| <code>hscript FirstMoveChild()</code>
|
|-
| NextMovePeer
| <code>hscript NextMovePeer()</code>
|
|-
| __KeyValueFromString
| <code>bool __KeyValueFromString( cstring, cstring )</code>
| @
|-
| __KeyValueFromFloat
| <code>bool __KeyValueFromFloat( cstring, float )</code>
| @
|-
| __KeyValueFromInt
| <code>bool __KeyValueFromInt( cstring, int )</code>
| @
|-
| __KeyValueFromVector
| <code>bool __KeyValueFromVector( cstring, vector )</code>
| @
|-
| Trigger
| <code>void Trigger()</code>
| Fires off this entity's OnTrigger responses
|-
| ValidateScriptScope
| <code>bool ValidateScriptScope()</code>
| Ensure that an entity's script scope has been created
|-
| GetScriptScope
| <code>hscript GetScriptScope()</code>
| Retrieve the script-side data associated with an entity
|-
| GetScriptId
| <code>cstring GetScriptId()</code>
| Retrieve the unique identifier used to refer to the entity within the scripting system
|-
| GetOwner
| <code>hscript GetOwner()</code>
| Gets this entity's owner
|-
| SetOwner
| <code>void SetOwner( hscript )</code>
| Sets this entity's owner
|-
| entindex
| <code>unknown_variant_type entindex()</code>
|
|}
=== CDOTA_PlayerResource extends CBaseEntity ===
''Interface to player data''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetHasRepicked
| <code>void SetHasRepicked( int )</code>
|
|-
| HasRepicked
| <code>bool HasRepicked( int )</code>
|
|-
| SetHasRandomed
| <code>void SetHasRandomed( int )</code>
|
|-
| HasRandomed
| <code>bool HasRandomed( int )</code>
|
|-
| IsValidTeamPlayerID
| <code>bool IsValidTeamPlayerID( int )</code>
|
|-
| IsValidTeamPlayer
| <code>bool IsValidTeamPlayer( int )</code>
|
|-
| IsValidPlayerID
| <code>bool IsValidPlayerID( int )</code>
|
|-
| IsValidPlayer
| <code>bool IsValidPlayer( int )</code>
|
|-
| GetLevel
| <code>int GetLevel( int )</code>
|
|-
| IncrementKills
| <code>void IncrementKills( int, int )</code>
|
|-
| IncrementAssists
| <code>void IncrementAssists( int )</code>
|
|-
| IncrementDeaths
| <code>void IncrementDeaths( int )</code>
|
|-
| GetKills
| <code>int GetKills( int )</code>
|
|-
| GetAssists
| <code>int GetAssists( int )</code>
|
|-
| GetDeaths
| <code>int GetDeaths( int )</code>
|
|-
| GetStuns
| <code>float GetStuns( int )</code>
|
|-
| GetHealing
| <code>float GetHealing( int )</code>
|
|-
| GetTowerKills
| <code>int GetTowerKills( int )</code>
|
|-
| GetRoshanKills
| <code>int GetRoshanKills( int )</code>
|
|-
| GetTeamKills
| <code>int GetTeamKills( int )</code>
|
|-
| IncrementStreak
| <code>void IncrementStreak( int )</code>
|
|-
| ClearStreak
| <code>void ClearStreak( int )</code>
|
|-
| GetStreak
| <code>int GetStreak( int )</code>
|
|-
| ModifyGold
| <code>int ModifyGold( int, int, bool, int )</code>
|
|-
| SetGold
| <code>void SetGold( int, int, bool )</code>
|
|-
| SpendGold
| <code>void SpendGold( int, int, int )</code>
|
|-
| GetGold
| <code>int GetGold( int )</code>
|
|-
| GetReliableGold
| <code>int GetReliableGold( int )</code>
|
|-
| GetUnreliableGold
| <code>int GetUnreliableGold( int )</code>
|
|-
| ResetTotalEarnedGold
| <code>void ResetTotalEarnedGold( int )</code>
|
|-
| GetTotalEarnedGold
| <code>int GetTotalEarnedGold( int )</code>
|
|-
| GetTotalGoldSpent
| <code>int GetTotalGoldSpent( int )</code>
|
|-
| AddGoldSpentOnSupport
| <code>void AddGoldSpentOnSupport( int, int )</code>
|
|-
| GetGoldSpentOnSupport
| <code>int GetGoldSpentOnSupport( int )</code>
|
|-
| GetGoldSpentOnConsumables
| <code>int GetGoldSpentOnConsumables( int )</code>
|
|-
| GetGoldSpentOnItems
| <code>int GetGoldSpentOnItems( int )</code>
|
|-
| GetGoldLostToDeath
| <code>int GetGoldLostToDeath( int )</code>
|
|-
| GetGoldSpentOnBuybacks
| <code>int GetGoldSpentOnBuybacks( int )</code>
|
|-
| GetGoldPerMin
| <code>float GetGoldPerMin( int )</code>
|
|-
| GetXPPerMin
| <code>float GetXPPerMin( int )</code>
|
|-
| GetAegisPickups
| <code>int GetAegisPickups( int )</code>
|
|-
| AddAegisPickup
| <code>void AddAegisPickup( int )</code>
|
|-
| GetRunePickups
| <code>int GetRunePickups( int )</code>
|
|-
| AddRunePickup
| <code>void AddRunePickup( int )</code>
|
|-
| GetNumConsumablesPurchased
| <code>int GetNumConsumablesPurchased( int )</code>
|
|-
| GetNumItemsPurchased
| <code>int GetNumItemsPurchased( int )</code>
|
|-
| GetTimeOfLastItemPurchase
| <code>float GetTimeOfLastItemPurchase( int )</code>
|
|-
| GetTimeOfLastConsumablePurchase
| <code>float GetTimeOfLastConsumablePurchase( int )</code>
|
|-
| GetTimeOfLastDeath
| <code>float GetTimeOfLastDeath( int )</code>
|
|-
| GetRespawnSeconds
| <code>int GetRespawnSeconds( int )</code>
|
|-
| IncrementTotalEarnedXP
| <code>void IncrementTotalEarnedXP( int, int )</code>
|
|-
| GetTotalEarnedXP
| <code>int GetTotalEarnedXP( int )</code>
|
|-
| AddClaimedFarm
| <code>void AddClaimedFarm( int, float )</code>
|
|-
| GetClaimedFarm
| <code>float GetClaimedFarm( int )</code>
|
|-
| GetRawPlayerDamage
| <code>int GetRawPlayerDamage( int )</code>
|
|-
| ClearRawPlayerDamageMatrix
| <code>void ClearRawPlayerDamageMatrix( int )</code>
|
|-
| ClearKillsMatrix
| <code>void ClearKillsMatrix( int )</code>
|
|-
| GetTowerDamageTaken
| <code>int GetTowerDamageTaken( int )</code>
|
|-
| GetCreepDamageTaken
| <code>int GetCreepDamageTaken( int )</code>
|
|-
| GetHeroDamageTaken
| <code>int GetHeroDamageTaken( int )</code>
|
|-
| GetDamageDoneToHero
| <code>int GetDamageDoneToHero( int, int )</code>
|
|-
| GetKillsDoneToHero
| <code>int GetKillsDoneToHero( int, int )</code>
|
|-
| GetSelectedHeroName
| <code>cstring GetSelectedHeroName( int )</code>
|
|-
| GetSelectedHeroID
| <code>int GetSelectedHeroID( int )</code>
|
|-
| IsHeroSelected
| <code>bool IsHeroSelected( cstring )</code>
|
|-
| WhoSelectedHero
| <code>int WhoSelectedHero( cstring )</code>
|
|-
| GetSelectedHeroEntity
| <code>hscript GetSelectedHeroEntity( int )</code>
|
|-
| HasSelectedHero
| <code>bool HasSelectedHero( int )</code>
|
|-
| GetPlayer
| <code>hscript GetPlayer( int )</code>
|
|-
| GetNthPlayerIDOnTeam
| <code>int GetNthPlayerIDOnTeam( int, int )</code>
|
|-
| IncrementLastHits
| <code>void IncrementLastHits( int )</code>
|
|-
| GetLastHits
| <code>int GetLastHits( int )</code>
|
|-
| IncrementGoldBagsCollected
| <code>void IncrementGoldBagsCollected( int )</code>
|
|-
| GetGoldBagsCollected
| <code>int GetGoldBagsCollected( int )</code>
|
|-
| IncrementLastHitStreak
| <code>void IncrementLastHitStreak( int )</code>
|
|-
| ClearLastHitStreak
| <code>void ClearLastHitStreak( int )</code>
|
|-
| GetLastHitStreak
| <code>int GetLastHitStreak( int )</code>
|
|-
| IncrementLastHitMultikill
| <code>void IncrementLastHitMultikill( int )</code>
|
|-
| ClearLastHitMultikill
| <code>void ClearLastHitMultikill( int )</code>
|
|-
| GetLastHitMultikill
| <code>int GetLastHitMultikill( int )</code>
|
|-
| IncrementNearbyCreepDeaths
| <code>void IncrementNearbyCreepDeaths( int )</code>
|
|-
| GetNearbyCreepDeaths
| <code>int GetNearbyCreepDeaths( int )</code>
|
|-
| IncrementDenies
| <code>void IncrementDenies( int )</code>
|
|-
| GetDenies
| <code>int GetDenies( int )</code>
|
|-
| IncrementClaimedMisses
| <code>void IncrementClaimedMisses( int )</code>
|
|-
| GetClaimedMisses
| <code>int GetClaimedMisses( int )</code>
|
|-
| IncrementClaimedDenies
| <code>void IncrementClaimedDenies( int )</code>
|
|-
| GetClaimedDenies
| <code>int GetClaimedDenies( int )</code>
|
|-
| IncrementMisses
| <code>void IncrementMisses( int )</code>
|
|-
| GetMisses
| <code>int GetMisses( int )</code>
|
|-
| UpdateTeamSlot
| <code>void UpdateTeamSlot( int, int )</code>
|
|-
| GetTeam
| <code>int GetTeam( int )</code>
|
|-
| IsBroadcaster
| <code>bool IsBroadcaster( int )</code>
|
|-
| GetBroadcasterChannel
| <code>uint GetBroadcasterChannel( int )</code>
|
|-
| GetBroadcasterChannelSlot
| <code>uint GetBroadcasterChannelSlot( int )</code>
|
|-
| GetSteamAccountID
| <code>uint GetSteamAccountID( int )</code>
|
|-
| IsFakeClient
| <code>bool IsFakeClient( int )</code>
|
|-
| HaveAllPlayersJoined
| <code>bool HaveAllPlayersJoined()</code>
|
|-
| GetPlayerLoadedCompletely
| <code>bool GetPlayerLoadedCompletely( int )</code>
|
|-
| SetPlayerReservedState
| <code>void SetPlayerReservedState( int, bool )</code>
|
|-
| GetPlayerReservedState
| <code>bool GetPlayerReservedState( int )</code>
|
|-
| GetConnectionState
| <code>unknown_variant_type GetConnectionState( int )</code>
|
|-
| HeroLevelUp
| <code>void HeroLevelUp( int )</code>
|
|-
| SetLastBuybackTime
| <code>void SetLastBuybackTime( int, int )</code>
|
|-
| GetPlayerName
| <code>cstring GetPlayerName( int )</code>
|
|-
| GetUnitShareMaskForPlayer
| <code>int GetUnitShareMaskForPlayer( int, int )</code>
|
|-
| IsHeroSharedWithPlayerID
| <code>bool IsHeroSharedWithPlayerID( int, int )</code>
|
|-
| AreUnitsSharedWithPlayerID
| <code>bool AreUnitsSharedWithPlayerID( int, int )</code>
|
|-
| IsDisableHelpSetForPlayerID
| <code>bool IsDisableHelpSetForPlayerID( int, int )</code>
|
|-
| SetUnitShareMaskForPlayer
| <code>void SetUnitShareMaskForPlayer( int, int, int, bool )</code>
|
|-
| GetNumCouriersForTeam
| <code>int GetNumCouriersForTeam( int )</code>
|
|-
| GetNthCourierForTeam
| <code>hscript GetNthCourierForTeam( int, int )</code>
|
|-
| SetBuybackCooldownTime
| <code>void SetBuybackCooldownTime( int, float )</code>
|
|-
| SetBuybackGoldLimitTime
| <code>void SetBuybackGoldLimitTime( int, float )</code>
|
|-
| ResetBuybackCostTime
| <code>void ResetBuybackCostTime( int )</code>
|
|-
| ReplaceHeroWith
| <code>hscript ReplaceHeroWith( int, cstring, int, int )</code>
| (playerID, heroClassName, gold, XP) - replaces the player's hero with a new one of the specified class, gold and XP
|-
| SetCustomBuybackCost
| <code>void SetCustomBuybackCost( int, int )</code>
| Set the buyback cost for this player.
|-
| SetCustomBuybackCooldown
| <code>void SetCustomBuybackCooldown( int, float )</code>
| Set the buyback cooldown for this player.
|-
| GetCustomBuybackCost
| <code>int GetCustomBuybackCost( int )</code>
|
|-
| GetCustomBuybackCooldown
| <code>float GetCustomBuybackCooldown( int )</code>
|
|-
| SetCameraTarget
| <code>void SetCameraTarget( int, hscript )</code>
| (playerID, entity) - force the given player's camera to follow the given entity
|-
| GetEventPointsForPlayerID
| <code>int GetEventPointsForPlayerID( int )</code>
|
|-
| GetEventPremiumPointsGranted
| <code>int GetEventPremiumPointsGranted( int )</code>
|
|-
| GetEventRankGranted
| <code>int GetEventRankGranted( int )</code>
|
|}
=== CDOTABaseGameMode extends CBaseEntity ===
''Base game mode class''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| BeginThink
| <code>bool BeginThink( cstring, hscript, float )</code>
| Start a think callback. Takes a function and an interval
|-
| EndThink
| <code>void EndThink( cstring )</code>
| Stop a think callback.
|-
| SetAlwaysShowPlayerInventory
| <code>void SetAlwaysShowPlayerInventory( bool )</code>
| Show the player hero's inventory in the HUD, regardless of what unit is selected.
|-
| SetGoldSoundDisabled
| <code>void SetGoldSoundDisabled( bool )</code>
| Turn the sound when gold is acquired off/on. Takes a bool.
|-
| SetRecommendedItemsDisabled
| <code>void SetRecommendedItemsDisabled( bool )</code>
| Turn the panel for showing recommended items at the shop off/on. Takes a bool.
|-
| SetCameraDistanceOverride
| <code>void SetCameraDistanceOverride( float )</code>
| Set a different camera distance; dota default is 1134.
|-
| SetOverrideSelectionEntity
| <code>void SetOverrideSelectionEntity( hscript )</code>
| Set an override for the default selection entity, instead of each player's hero.
|-
| SetRemoveIllusionsOnDeath
| <code>void SetRemoveIllusionsOnDeath( bool )</code>
| Make it so illusions are immediately removed upon death, rather than sticking around for a few seconds.
|-
| ClientLoadGridNav
| <code>void ClientLoadGridNav()</code>
| Tell clients that they need to load gridnav information. Used for things like allowing clients to identify valid locations to place buildings.
|-
| SetFogOfWarDisabled
| <code>void SetFogOfWarDisabled( bool )</code>
| Turn the fog of war on or off.
|-
| SetCustomBuybackCostEnabled
| <code>void SetCustomBuybackCostEnabled( bool )</code>
| Turns on capability to define custom buyback costs.
|-
| SetCustomBuybackCooldownEnabled
| <code>void SetCustomBuybackCooldownEnabled( bool )</code>
| Turns on capability to define custom buyback cooldowns.
|-
| SetTopBarTeamValuesOverride
| <code>void SetTopBarTeamValuesOverride( bool )</code>
| Override the values of the team values on the top game bar.
|-
| SetTopBarTeamValuesVisible
| <code>void SetTopBarTeamValuesVisible( bool )</code>
| Turning on/off the team values on the top game bar.
|-
| SetTopBarTeamValue
| <code>void SetTopBarTeamValue( int, int )</code>
| Set the team values on the top game bar.
|}
=== CBaseAnimating extends CBaseEntity ===
''Animating models''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| LookupAttachment
| <code>int LookupAttachment( cstring )</code>
| Get the named attachement id
|-
| GetAttachmentOrigin
| <code>vector GetAttachmentOrigin( int )</code>
| Get the attachement id's origin vector
|-
| GetAttachmentAngles
| <code>vector GetAttachmentAngles( int )</code>
| Get the attachement id's angles as a p,y,r vector
|-
| IsSequenceFinished
| <code>bool IsSequenceFinished()</code>
| Ask whether the main sequence is done playing
|-
| SetBodygroup
| <code>void SetBodygroup( int, int )</code>
| Sets a bodygroup
|-
| SetModelScale
| <code>void SetModelScale( float, float )</code>
| Set the model scale
|}
=== CBaseFlex extends CBaseAnimating ===
''Animated characters who have vertex flex capability.''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| GetCurrentScene
| <code>hscript GetCurrentScene()</code>
| Returns the instance of the oldest active scene entity (if any).
|-
| GetSceneByIndex
| <code>hscript GetSceneByIndex( int )</code>
| Returns the instance of the scene entity at the specified index.
|}
=== CDOTA_BaseNPC extends CBaseFlex ===
''A Dota NPC Unit''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| IsAncient
| <code>bool IsAncient()</code>
| Is this creature an Ancient?
|-
| IsNeutralUnitType
| <code>bool IsNeutralUnitType()</code>
| Is this a neutral?
|-
| IsSummoned
| <code>bool IsSummoned()</code>
| Is this unit summoned?
|-
| IsCreature
| <code>bool IsCreature()</code>
| Is this a Creature type NPC
|-
| IsHero
| <code>bool IsHero()</code>
| Is this a hero or hero illusion?
|-
| IsRealHero
| <code>bool IsRealHero()</code>
| Is this a real hero?
|-
| IsTower
| <code>bool IsTower()</code>
| Is this a tower?
|-
| IsAlive
| <code>bool IsAlive()</code>
| Is this unit alive?
|-
| IsMechanical
| <code>bool IsMechanical()</code>
| Is the unit mechanical?
|-
| IsPhantom
| <code>bool IsPhantom()</code>
| Is this a phantom unit?
|-
| SetInitialGoalEntity
| <code>void SetInitialGoalEntity( hscript )</code>
| Sets the initial waypoint goal for this NPC
|-
| GetInitialGoalEntity
| <code>hscript GetInitialGoalEntity()</code>
| Returns the initial waypoint goal for this NPC
|-
| SetMustReachEachGoalEntity
| <code>void SetMustReachEachGoalEntity( bool )</code>
| Set whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
|-
| GetMustReachEachGoalEntity
| <code>bool GetMustReachEachGoalEntity()</code>
| Get whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
|-
| AddNewModifier
| <code>void AddNewModifier( hscript, hscript, cstring, hscript )</code>
| Add a modifier to this unit
|-
| HasModifier
| <code>bool HasModifier( cstring )</code>
| Sees if this unit has a given modifier
|-
| RemoveModifierByName
| <code>void RemoveModifierByName( cstring )</code>
| Removes a modifier
|-
| RemoveModifierByNameAndCaster
| <code>void RemoveModifierByNameAndCaster( cstring, hscript )</code>
| Removes a modifier that was cast by the given caster
|-
| AddItem
| <code>void AddItem( hscript )</code>
| Add an item to this unit's inventory.
|-
| AddAbility
| <code>void AddAbility( cstring )</code>
| Add an ability to this unit by name.
|-
| RemoveAbility
| <code>void RemoveAbility( cstring )</code>
| Remove an ability from this unit by name.
|-
| HasAbility
| <code>bool HasAbility( cstring )</code>
| See whether this unit has an ability by name.
|-
| HasItemInInventory
| <code>bool HasItemInInventory( cstring )</code>
| See whether this unit has an item by name.
|-
| FindAbilityByName
| <code>hscript FindAbilityByName( cstring )</code>
| Retrieve an ability by name from the unit.
|-
| GetGoldBounty
| <code>int GetGoldBounty()</code>
| Get the gold bounty on this unit
|-
| SetDeathXP
| <code>void SetDeathXP( int )</code>
| Set the XP bounty on this unit
|-
| GetDeathXP
| <code>int GetDeathXP()</code>
| Get the XP bounty on this unit
|-
| GetUnitName
| <code>cstring GetUnitName()</code>
| Get the name of this unit.
|-
| GetTeamNumber
| <code>int GetTeamNumber()</code>
| Get the team number of this unit.
|-
| GetPlayerOwner
| <code>hscript GetPlayerOwner()</code>
| Returns the player that owns this unit
|-
| SetMaximumGoldBounty
| <code>void SetMaximumGoldBounty( int )</code>
| Set the maximum gold bounty for this unit.
|-
| SetMinimumGoldBounty
| <code>void SetMinimumGoldBounty( int )</code>
| Set the minimum gold bounty for this unit.
|-
| GetTotalPurchasedUpgradeGoldCost
| <code>int GetTotalPurchasedUpgradeGoldCost()</code>
| Get how much gold has been spent on ability upgrades.
|-
| ForceKill
| <code>void ForceKill( bool )</code>
| Kill this unit immediately.
|-
| GetBaseDamageMin
| <code>int GetBaseDamageMin()</code>
| Get the minimum attack damage of this unit.
|-
| GetBaseDamageMax
| <code>int GetBaseDamageMax()</code>
| Get the maximum attack damage of this unit.
|-
| Heal
| <code>void Heal( float, hscript )</code>
| Heal this unit.
|-
| GetMaxHealth
| <code>int GetMaxHealth()</code>
| Get the maximum health of this unit.
|-
| GetHealthPercent
| <code>int GetHealthPercent()</code>
| Get the current health percent of the unit.
|-
| SetMana
| <code>void SetMana( float )</code>
| Set the mana on this unit.
|-
| GetMaxMana
| <code>float GetMaxMana()</code>
| Get the maximum mana of this unit.
|-
| RespawnUnit
| <code>void RespawnUnit()</code>
| Respawns the target unit if it can be respawned.
|-
| GetLevel
| <code>int GetLevel()</code>
| Returns the level of this unit.
|-
| GetItemInSlot
| <code>hscript GetItemInSlot( int )</code>
| Returns nth item in inventory slot (index is zero based)
|-
| SetOriginalModel
| <code>void SetOriginalModel( cstring )</code>
| Sets the original model of this entity, which it will tend to fall back to anytime its state changes
|-
| AddNoDraw
| <code>void AddNoDraw()</code>
| Adds the no draw flag.
|-
| RemoveNoDraw
| <code>void RemoveNoDraw()</code>
| Remove the no draw flag.
|-
| GetPlayerOwnerID
| <code>int GetPlayerOwnerID()</code>
| Get the owner player ID for this unit.
|-
| IsRangedAttacker
| <code>bool IsRangedAttacker()</code>
| Is this unit a ranged attacker?
|-
| GetCurrentActiveAbility
| <code>hscript GetCurrentActiveAbility()</code>
| Get the ability this unit is currently casting.
|-
| MoveToPosition
| <code>void MoveToPosition( vector )</code>
| Issue a Move-To command
|-
| MoveToPositionAggressive
| <code>void MoveToPositionAggressive( vector )</code>
| Issue an Attack-Move-To command
|-
| MoveToNPC
| <code>void MoveToNPC( hscript )</code>
| Move to follow a unit.
|-
| MoveToTargetToAttack
| <code>void MoveToTargetToAttack( hscript )</code>
| Move to a target to attack.
|-
| Hold
| <code>void Hold()</code>
| Hold position.
|-
| Stop
| <code>void Stop()</code>
| Stop the current order.
|-
| CastAbilityToggle
| <code>void CastAbilityToggle( hscript, int )</code>
| Toggle an ability.
|-
| CastAbilityImmediately
| <code>void CastAbilityImmediately( hscript, int )</code>
| Cast an ability immediately.
|-
| CastAbilityOnPosition
| <code>void CastAbilityOnPosition( vector, hscript, int )</code>
| Cast an ability on a position.
|-
| CastAbilityOnTarget
| <code>void CastAbilityOnTarget( hscript, hscript, int )</code>
| Cast an ability on a target entity.
|-
| CastAbilityNoTarget
| <code>void CastAbilityNoTarget( hscript, int )</code>
| Cast an ability with no target.
|-
| DropItemAtPosition
| <code>void DropItemAtPosition( vector, hscript )</code>
| Drop an item at a given point.
|-
| MoveToNPCToGiveItem
| <code>void MoveToNPCToGiveItem( hscript, hscript )</code>
| Give an item to another unit.
|-
| PickupDroppedItem
| <code>void PickupDroppedItem( hscript )</code>
| Pick up a dropped item.
|-
| PickupRune
| <code>void PickupRune( hscript )</code>
| Pick up a rune.
|-
| DropItemAtPositionImmediate
| <code>void DropItemAtPositionImmediate( hscript, vector )</code>
| Immediately drop a carried item at a given position.
|-
| SetAdditionalBattleMusicWeight
| <code>void SetAdditionalBattleMusicWeight( float )</code>
| Combat involving this creature will have this weight added to the music calcuations
|-
| GetAdditionalBattleMusicWeight
| <code>float GetAdditionalBattleMusicWeight()</code>
| Combat involving this creature will have this weight added to the music calcuations
|}
=== CDOTA_BaseNPC_Creature extends CDOTA_BaseNPC ===
''A Dota NPC Unit''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| CreatureLevelUp
| <code>void CreatureLevelUp( int )</code>
| Level the creature up by the specified number of levels
|-
| AddItemDrop
| <code>void AddItemDrop( hscript )</code>
| Add the specified item drop to this creature
|-
| SetChampion
| <code>void SetChampion( bool )</code>
| Flag this unit as a champion creature.
|-
| IsChampion
| <code>bool IsChampion()</code>
| Is this unit a champion?
|-
| SetHPGain
| <code>void SetHPGain( int )</code>
| Set the hit points gained per level on this creature.
|-
| SetManaGain
| <code>void SetManaGain( int )</code>
| Set the mana points gained per level on this creature.
|-
| SetHPRegenGain
| <code>void SetHPRegenGain( float )</code>
| Set the hit points regen gained per level on this creature.
|-
| SetManaRegenGain
| <code>void SetManaRegenGain( float )</code>
| Set the mana points regen gained per level on this creature.
|-
| SetDamageGain
| <code>void SetDamageGain( int )</code>
| Set the damage gained per level on this creature.
|-
| SetArmorGain
| <code>void SetArmorGain( float )</code>
| Set the armor gained per level on this creature.
|-
| SetMagicResistanceGain
| <code>void SetMagicResistanceGain( float )</code>
| Set the magic resistance gained per level on this creature.
|-
| SetDisableResistanceGain
| <code>void SetDisableResistanceGain( float )</code>
| Set the disable resistance gained per level on this creature.
|-
| SetAttackTimeGain
| <code>void SetAttackTimeGain( float )</code>
| Set the attack time gained per level on this creature.
|-
| SetMoveSpeedGain
| <code>void SetMoveSpeedGain( int )</code>
| Set the move speed gained per level on this creature.
|-
| SetBountyGain
| <code>void SetBountyGain( int )</code>
| Set the bounty gold gained per level on this creature.
|-
| SetXPGain
| <code>void SetXPGain( int )</code>
| Set the xp reward gained per level on this creature.
|}
=== CDOTA_Unit_Nian extends CDOTA_BaseNPC_Creature ===
''A Dota NPC Unit''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| IsHornAlive
| <code>bool IsHornAlive()</code>
| Is the Nian's horn broken?
|-
| IsTailAlive
| <code>bool IsTailAlive()</code>
| Is the Nian's tail broken?
|-
| GetHorn
| <code>hscript GetHorn()</code>
| Is the Nian horn?
|-
| GetTail
| <code>hscript GetTail()</code>
| Is the Nian's tail broken?
|}
=== CDOTABaseAbility extends CBaseEntity ===
''An ability''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| GetAbilityName
| <code>cstring GetAbilityName()</code>
| Returns the name of this ability.
|-
| GetSpecialValueFor
| <code>variant GetSpecialValueFor( cstring )</code>
| Gets a value from this ability's special value block for its current level.
|-
| GetCastRange
| <code>int GetCastRange()</code>
| Gets the cast range of the ability.
|-
| IsFullyCastable
| <code>bool IsFullyCastable()</code>
| Returns whether the ability can be cast.
|-
| IsChanneling
| <code>bool IsChanneling()</code>
| Returns whether the ability is currently channeling.
|-
| IsInAbilityPhase
| <code>bool IsInAbilityPhase()</code>
| Returns whether the ability is currently casting.
|-
| GetCooldown
| <code>float GetCooldown( int )</code>
| Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
|-
| EndCooldown
| <code>void EndCooldown()</code>
| Clear the cooldown remaining on this ability.
|-
| MarkAbilityButtonDirty
| <code>void MarkAbilityButtonDirty()</code>
| Mark the ability button for this ability as needing a refresh
|-
| SetLevel
| <code>void SetLevel( int )</code>
| Sets the level of this ability.
|}
=== CDOTA_Ability_Animation_Attack extends CDOTABaseAbility ===
''A Dota NPC Unit''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetPlaybackRate
| <code>void SetPlaybackRate( float )</code>
| Override playbackrate
|}
=== CDOTA_Ability_Nian_Dive extends CDOTABaseAbility ===
''A Dota NPC Unit''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetPlaybackRate
| <code>void SetPlaybackRate( float )</code>
| Override playbackrate
|}
=== CDOTA_Ability_Animation_TailSpin extends CDOTABaseAbility ===
''A Dota NPC Unit''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetPlaybackRate
| <code>void SetPlaybackRate( float )</code>
| Override playbackrate
|}
=== CDOTA_Ability_Nian_Leap extends CDOTABaseAbility ===
''A Dota NPC Unit''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetPlaybackRate
| <code>void SetPlaybackRate( float )</code>
| Override playbackrate
|}
=== CDOTA_BaseNPC_Hero extends CDOTA_BaseNPC ===
''A Dota Hero NPC''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| ModifyGold
| <code>int ModifyGold( int, bool, int )</code>
| Gives this hero some gold
|-
| GetGold
| <code>int GetGold()</code>
| Returns gold amount for the player owning this hero
|-
| SetGold
| <code>void SetGold( int, bool )</code>
| Sets the gold amount for the player owning this hero
|-
| GetCurrentXP
| <code>int GetCurrentXP()</code>
| Returns the amount of XP
|-
| GetPlayerID
| <code>int GetPlayerID()</code>
| Returns player ID of the player owning this hero
|-
| RespawnHero
| <code>void RespawnHero( bool, bool, bool )</code>
| Respawn this hero.
|-
| HeroLevelUp
| <code>void HeroLevelUp( bool )</code>
| Levels up the hero, true or false to play effects.
|-
| GetAbilityPoints
| <code>int GetAbilityPoints()</code>
| Gets the current unspent ability points.
|-
| SetAbilityPoints
| <code>void SetAbilityPoints( int )</code>
| Sets the current unspent ability points.
|-
| SetCustomDeathXP
| <code>void SetCustomDeathXP( int )</code>
| Sets a custom experience value for this hero.  Note, GameRules boolean must be set for this to work!
|}
=== CDOTAPlayer extends CBaseAnimating ===
''dota_player''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| GetPlayerID
| <code>int GetPlayerID()</code>
| Get the player's official PlayerID; notably is -1 when the player isn't yet on a team.
|-
| GetAssignedHero
| <code>hscript GetAssignedHero()</code>
| Get the player's hero.
|-
| SetKillCamUnit
| <code>void SetKillCamUnit( hscript )</code>
| Set the kill cam unit for this hero.
|-
| MakeRandomHeroSelection
| <code>void MakeRandomHeroSelection()</code>
| Randoms this player's hero.
|-
| SetMusicStatus
| <code>void SetMusicStatus( int, float )</code>
| (nMusicStatus, flIntensity) - Set the music status for this player, note this will only really apply if dota_music_battle_enable is off.
|}
=== CDotaQuest extends CBaseEntity ===
''A quest''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetTextReplaceValue
| <code>void SetTextReplaceValue( int, int )</code>
| Set a quest value
|-
| CompleteQuest
| <code>void CompleteQuest()</code>
| Mark this quest complete
|-
| SetTextReplaceString
| <code>void SetTextReplaceString( cstring )</code>
| Set the text replace string for this quest
|-
| AddSubquest
| <code>void AddSubquest( hscript )</code>
| Add a subquest to this quest
|-
| RemoveSubquest
| <code>void RemoveSubquest( hscript )</code>
| Remove a subquest from this quest
|-
| GetSubquestByName
| <code>hscript GetSubquestByName( cstring )</code>
| Finds a subquest from this quest by name
|-
| GetSubquest
| <code>hscript GetSubquest( int )</code>
| Finds a subquest from this quest by index
|}
=== CDotaSubquestBase extends CBaseEntity ===
''A subquest''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetTextReplaceValue
| <code>void SetTextReplaceValue( int, int )</code>
| Set a subquest value
|-
| CompleteSubquest
| <code>void CompleteSubquest()</code>
| Mark this subquest complete
|-
| SetTextReplaceString
| <code>void SetTextReplaceString( cstring )</code>
| Set the text replace string for this subquest
|}
=== CDOTA_Item extends CDOTABaseAbility ===
''A usable item.''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| SetPurchaseTime
| <code>void SetPurchaseTime( float )</code>
| Set the purchase time of this item
|-
| GetPurchaseTime
| <code>float GetPurchaseTime()</code>
| Get the purchase time of this item
|-
| SetPurchaser
| <code>void SetPurchaser( hscript )</code>
| Set the purchaser of record for this item.
|-
| GetInitialCharges
| <code>int GetInitialCharges()</code>
| Get the initial number of charges this item has.
|-
| GetCurrentCharges
| <code>int GetCurrentCharges()</code>
| Get the number of charges this item currently has.
|-
| SetCurrentCharges
| <code>void SetCurrentCharges( int )</code>
| Set the number of charges on this item
|-
| GetPurchaser
| <code>hscript GetPurchaser()</code>
| Get the purchaser for this item.
|-
| Think
| <code>void Think()</code>
| Think this item
|-
| IsPermanent
| <code>bool IsPermanent()</code>
| Is this a permanent item?
|-
| StacksWithOtherOwners
| <code>bool StacksWithOtherOwners()</code>
|
|-
| SetStacksWithOtherOwners
| <code>void SetStacksWithOtherOwners( bool )</code>
|
|-
| GetShareability
| <code>int GetShareability()</code>
|
|-
| GetCost
| <code>int GetCost()</code>
|
|-
| LaunchLoot
| <code>void LaunchLoot( bool, float, float, vector )</code>
|
|-
| GetContainer
| <code>hscript GetContainer()</code>
| Get the container for this item.
|}
=== CDOTA_Item_DataDriven extends CDOTA_Item ===
''A data driven usable item.''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| ApplyDataDrivenModifier
| <code>void ApplyDataDrivenModifier( hscript, hscript, cstring, hscript )</code>
| Applies a data driven modifier to the target
|}
=== CDOTA_Item_Physical extends CBaseAnimating ===
''A physical item dropped in the world''
{| class="standard-table" style="width: 100;"
! Function
! Signature
! Description
|-
| GetCreationTime
| <code>float GetCreationTime()</code>
| Returns the game time when this item was created in the world
|-
| GetContainedItem
| <code>hscript GetContainedItem()</code>
| Returned the contained item.
|-
| SetContainedItem
| <code>void SetContainedItem( hscript )</code>
| Set the contained item.
|}
|-
| ShowMessage
| <code>void ShowMessage( cstring )</code>
| Print a hud message on all clients
|-
| GetMapName
| <code>cstring GetMapName()</code>
| Get the name of the map.
|-
| SendToConsole
| <code>void SendToConsole( cstring )</code>
| Send a string to the console as a client command
|-
| SendToServerConsole
| <code>void SendToServerConsole( cstring )</code>
| Send a string to the console as a server command
|-
| PrintLinkedConsoleMessage
| <code>void PrintLinkedConsoleMessage( cstring, cstring )</code>
| Print a console message with a linked console command
|-
| InitLogFile
| <code>void InitLogFile( cstring, cstring )</code>
| If the given file doesn't exist, creates it with the given contents; does nothing if it exists
|-
| AppendToLogFile
| <code>void AppendToLogFile( cstring, cstring )</code>
| Appends a string to a log file on the server
|-
| DoScriptAssert
| <code>void DoScriptAssert( bool, cstring )</code>
| #ScriptAssert:Asserts the passed in value. Prints out a message and brings up the assert dialog.
|-
| Time
| <code>float Time()</code>
| Get the current server time
|-
| UTIL_RemoveImmediate
| <code>void UTIL_RemoveImmediate( hscript )</code>
| Immediately removes the specified entity
|-
| DoEntFire
| <code>void DoEntFire( cstring, cstring, cstring, float, hscript, hscript )</code>
| #EntFire:Generate and entity i/o event
|-
| EntFireByHandle
| <code>void EntFireByHandle( hscript, cstring, cstring, float, hscript, hscript )</code>
| Generate and entity i/o event
|-
| IsValidEntity
| <code>bool IsValidEntity( hscript )</code>
| Checks to see if the given hScript is a valid entity
|-
| IsMarkedForDeletion
| <code>bool IsMarkedForDeletion( hscript )</code>
| Returns true if the entity is valid and marked for deletion.
|-
| DoUniqueString
| <code>cstring DoUniqueString( cstring )</code>
| #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.
|-
| EntIndexToHScript
| <code>hscript EntIndexToHScript( int )</code>
| Turn an entity index integer to an HScript representing that entity's script instance.
|-
| PlayerInstanceFromIndex
| <code>hscript PlayerInstanceFromIndex( int )</code>
| Get a script instance of a player by index.
|-
| GetListenServerHost
| <code>hscript GetListenServerHost()</code>
| Get the local player on a listen server.
|-
| ScreenShake
| <code>void ScreenShake( vector, float, float, float, float, int, bool )</code>
| Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake
|-
| SpawnEntityFromTable
| <code>hscript SpawnEntityFromTable( cstring, hscript )</code>
| Spawns a single entity from a table
|-
| SpawnEntityFromTableSync
| <code>hscript SpawnEntityFromTableSync( cstring, hscript )</code>
| Spawns a single entity from a table
|-
| SpawnEntityGroupFromTable
| <code>bool SpawnEntityGroupFromTable( hscript, bool, hscript )</code>
| Hierarchically spawn an entity group from a set of spawn tables.
|-
| PrecacheEntityFromTable
| <code>bool PrecacheEntityFromTable( hscript )</code>
| Precache an entity from KeyValues in table
|-
| VectorToAngles
| <code>qangle VectorToAngles( vector )</code>
| Get Qangles (with no roll) for a Vector.
|-
| RotatePosition
| <code>vector RotatePosition( vector, qangle, vector )</code>
| Rotate a Vector around a point.
|-
| RotateOrientation
| <code>qangle RotateOrientation( qangle, qangle )</code>
| Rotate a QAngle by another QAngle.
|-
| RotationDelta
| <code>qangle RotationDelta( qangle, qangle )</code>
| Find the delta between two angles.
|-
| EmitSoundOn
| <code>void EmitSoundOn( cstring, hscript )</code>
| Play named sound on Entity
|-
| EmitSoundOnClient
| <code>void EmitSoundOnClient( cstring, hscript )</code>
| Play named sound only on the client for the passed in player
|-
| StopSoundOn
| <code>void StopSoundOn( cstring, hscript )</code>
| Stop named sound on Entity
|-
| GetPhysVelocity
| <code>vector GetPhysVelocity( hscript )</code>
| Get Velocity for VPHYS or normal object
|-
| GetPhysAngularVelocity
| <code>vector GetPhysAngularVelocity( hscript )</code>
| Get Angular Velocity for VPHYS or normal object
|-
| Say
| <code>void Say( hscript, cstring, bool )</code>
| Have Entity say string, and teamOnly or not
|-
| AddThinkToEnt
| <code>void AddThinkToEnt( hscript, cstring )</code>
| Adds a late bound think function to the C++ think tables for the obj
|-
| LoadKeyValues
| <code>variant LoadKeyValues( cstring )</code>
| Creates a table from the specified keyvalues text file
|-
| LoadKeyValuesFromString
| <code>variant LoadKeyValuesFromString( cstring )</code>
| Creates a table from the specified keyvalues string
|-
| DebugDrawScreenTextLine
| <code>void DebugDrawScreenTextLine( float, float, int, cstring, int, int, int, int, float )</code>
| Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration)
|-
| DebugDrawText
| <code>void DebugDrawText( vector, cstring, bool, float )</code>
| Draw text in 3d (origin, text, bViewCheck, duration)
|-
| DebugDrawBox
| <code>void DebugDrawBox( vector, vector, vector, int, int, int, int, float )</code>
| Draw a debug overlay box (origin, mins, maxs, forward, r, g, b, a, duration )
|-
| DebugDrawLine
| <code>void DebugDrawLine( vector, vector, int, int, int, bool, float )</code>
| Draw a debug overlay line (origin, target, r, g, b, ztest, duration)
|-
| DebugDrawCircle
| <code>void DebugDrawCircle( vector, vector, float, float, bool, float )</code>
| Draw a debug circle (center, vRgb, a, rad, a, ztest, duration)
|-
| DebugDrawLine_vCol
| <code>void DebugDrawLine_vCol( vector, vector, vector, bool, float )</code>
| Draw a debug line using color vec (start, end, vRgb, a, ztest, duration)
|-
| DebugDrawBoxDirection
| <code>void DebugDrawBoxDirection( vector, vector, vector, vector, vector, float, float )</code>
| Draw a debug forward box (cent, min, max, forward, vRgb, a, duration)
|-
| DebugDrawClear
| <code>void DebugDrawClear()</code>
| Try to clear all the debug overlay info
|-
| GetFrameCount
| <code>int GetFrameCount()</code>
| Returns the engines current frame count
|-
| IsDedicatedServer
| <code>bool IsDedicatedServer()</code>
| Returns true if this server is a dedicated server.
|-
| RandomInt
| <code>int RandomInt( int, int )</code>
| Get a random int within a range
|-
| RandomFloat
| <code>float RandomFloat( float, float )</code>
| Get a random float within a range
|-
| RandomVector
| <code>vector RandomVector( float )</code>
| Get a random vector within a range
|-
| RollPercentage
| <code>bool RollPercentage( int )</code>
| Rolls a number from 1 to 100 and returns true if the roll is less than or equal to the number specified
|}

Revision as of 13:25, 5 February 2014

Dost thou even hoist? —Mattshu 17:47, 1 March 2013 (PST)


CScriptParticleManager

!Used to create and manage particle effects

Function Signature Description
CreateParticle int CreateParticle( cstring, int, hscript ) Creates a new particle effect
CreateParticleForPlayer int CreateParticleForPlayer( cstring, int, hscript, hscript ) Creates a new particle effect that only plays for the specified player
SetParticleControl void SetParticleControl( int, int, vector ) Set the control point data for a control on a particle effect
ReleaseParticleIndex void ReleaseParticleIndex( int ) Frees the specified particle index

|- | DoIncludeScript | bool DoIncludeScript( cstring, hscript ) | Execute a script (internal)

CEntityScriptFramework

C-side of entity framework


CEntities

!The global list of entities

Function Signature Description
First hscript First() Begin an iteration over the list of entities
Next hscript Next( hscript ) Continue an iteration over the list of entities, providing reference to a previously found entity
CreateByClassname hscript CreateByClassname( cstring ) Creates an entity by classname
FindByClassname hscript FindByClassname( hscript, cstring ) Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByClassname variant FindAllByClassname( cstring ) Finds all entities by class name. Returns an array containing all the found entities.
FindByName hscript FindByName( hscript, cstring ) Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByName variant FindAllByName( cstring ) Find all entities by name. Returns an array containing all the found entities in it.
FindInSphere hscript FindInSphere( hscript, vector, float ) Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllInSphere variant FindAllInSphere( vector, float ) Find entities within a radius.
FindByTarget hscript FindByTarget( hscript, cstring ) Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByTarget variant FindAllByTarget( cstring ) Find entities by targetname.
FindByModel hscript FindByModel( hscript, cstring ) Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByModel variant FindAllByModel( cstring ) Find entities by model name.
FindByNameNearest hscript FindByNameNearest( cstring, vector, float ) Find entities by name nearest to a point.
FindByNameWithin hscript FindByNameWithin( hscript, cstring, vector, float ) Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
FindAllByNameWithin variant FindAllByNameWithin( cstring, vector, float ) Find entities by name within a radius.
FindByClassnameNearest hscript FindByClassnameNearest( cstring, vector, float ) Find entities by class name nearest to a point.
FindByClassnameWithin hscript FindByClassnameWithin( hscript, cstring, vector, float ) 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
FindAllByClassnameWithin variant FindAllByClassnameWithin( cstring, vector, float ) Find entities by class name within a radius.


Convars

!Access to convar functions

Function Signature Description
GetFloat variant GetFloat( cstring ) GetFloat(name) : returns the convar as a float. May return null if no such convar.
GetStr variant GetStr( cstring ) GetFloat(name) : returns the convar as a string. May return null if no such convar.
GetBool variant GetBool( cstring ) GetBool(name) : returns the convar as a boolean flag.
RegisterCommand void RegisterCommand( cstring, hscript, cstring, int ) RegisterCommand(name, fn, helpString, flags) : register a console command.
RegisterConvar void RegisterConvar( cstring, cstring, cstring, int ) RegisterConvar(name, defaultValue, helpString, flags): register a new console variable.
GetCommandClient hscript GetCommandClient() GetCommandClient() : returns the player who issued this console command.
GetDOTACommandClient hscript GetDOTACommandClient() GetDOTACommandClient() : returns the DOTA player who issued this console command.

|- | GetWorldMinX | float GetWorldMinX() | Gets the world's minimum X position. |- | GetWorldMinY | float GetWorldMinY() | Gets the world's maximum Y position. |- | GetWorldMaxX | float GetWorldMaxX() | Gets the world's minimum X position. |- | GetWorldMaxY | float GetWorldMaxY() | Gets the world's maximum Y position. |- | GetSystemTime | cstring GetSystemTime() | Get the current real world time |- | GetSystemDate | cstring GetSystemDate() | Get the current real world date |- | ListenToGameEvent | int ListenToGameEvent( cstring, hscript, hscript ) | Register as a listener for a game event from script. |- | StopListeningToGameEvent | bool StopListeningToGameEvent( int ) | Stop listening to a particular game event. |- | FireGameEvent | void FireGameEvent( cstring, hscript ) | Fire a game event. |- | FireGameEventLocal | void FireGameEventLocal( cstring, hscript ) | Fire a game event without broadcasting to the client. |- | PauseGame | void PauseGame( bool ) | Pause or unpause the game. |- | EmitGlobalSound | void EmitGlobalSound( cstring ) | Play named sound for all players |- | CreateUnitByName | hscript CreateUnitByName( cstring, vector, bool, hscript, hscript, int ) | Creates a DOTA unit by its dota_npc_units.txt name |- | PrecacheUnitByName | bool PrecacheUnitByName( cstring ) | Precaches a DOTA unit by its dota_npc_units.txt name |- | CreateHeroForPlayer | hscript CreateHeroForPlayer( cstring, hscript ) | Creates a DOTA hero by its dota_npc_units.txt name and sets it as the given player's controlled hero |- | CreateItem | hscript CreateItem( cstring, hscript, hscript ) | Create a DOTA item |- | CreateItemOnPosition | hscript CreateItemOnPosition( vector ) | Create a physical item at a given location |- | FindClearSpaceForUnit | void FindClearSpaceForUnit( hscript, vector, bool ) | Place a unit somewhere not already occupied. |- | FindUnitsInRadius | variant FindUnitsInRadius( int, vector, hscript, float, int, int, int, int, bool ) | Finds the units in a given radius with the given flags. |- | PrecacheUnit | void PrecacheUnit( cstring, hscript ) | Precaches all the resources for a given unit. |- | GetGroundPosition | vector GetGroundPosition( vector, hscript ) | Returns the supplied position moved to the ground. Second parameter is an NPC for measuring movement collision hull offset. |- | PrecacheResource | void PrecacheResource( cstring, cstring ) | Manually precache a single resource |- | GetFrostyPointsForRound | int GetFrostyPointsForRound( int, int, int ) | |- | GetGoldFrostyPointsForRound | int GetGoldFrostyPointsForRound( int, int, int ) | |- | GetFrostyBoostAmount | float GetFrostyBoostAmount( int, int ) | |- | GetGoldFrostyBoostAmount | float GetGoldFrostyBoostAmount( int, int ) | |- | SendFrostyPointsMessageToGC | void SendFrostyPointsMessageToGC( hscript ) | |- | SendFrostivusTimeElapsedToGC | void SendFrostivusTimeElapsedToGC() | |- | UpdateEventPoints | void UpdateEventPoints( hscript ) | |- | ExecuteOrderFromTable | void ExecuteOrderFromTable( hscript ) | Issue an order from a script table |- | ShowGenericPopup | void ShowGenericPopup( cstring, cstring, cstring, cstring, int ) | Show a generic popup dialog for all players. |- | ShowGenericPopupToPlayer | void ShowGenericPopupToPlayer( hscript, cstring, cstring, cstring, cstring, int ) | Show a generic popup dialog to a specific player.

CScriptHeroList

!The global list of heroes

Function Signature Description
GetHero hscript GetHero( int ) Get the Nth hero in the Hero List
GetHeroCount int GetHeroCount() Returns the number of heroes in the world
GetAllHeroes variant GetAllHeroes() Returns all the heroes in the world


CDOTAGamerules

!DOTA GameRules

Function Signature Description
State_Get unknown_variant_type State_Get() Get the current Gamerules state
GetGameTime float GetGameTime() Returns the number of seconds elapsed since map start. This time doesn't count up when the game is paused
GetDifficulty int GetDifficulty() Returns difficulty level of the custom game mode
GetCustomGameDifficulty int GetCustomGameDifficulty() Returns the difficulty level of the custom game mode
Defeated void Defeated() Kills the ancient, etc.
ResetDefeated void ResetDefeated() Restart after killing the ancient, etc.
SetGameWinner void SetGameWinner( int ) Makes ths specified team win
MakeTeamLose void MakeTeamLose( int ) Makes ths specified team lose
ResetMap void ResetMap( int ) Resets the map in one of several ways
GetDroppedItem hscript GetDroppedItem( int ) Gets the Xth dropped item
NumDroppedItems int NumDroppedItems() Returns the number of items currently dropped on the ground
SendCustomMessage void SendCustomMessage( cstring, int, int ) Sends a string to the defined team.
SetHeroRespawnEnabled void SetHeroRespawnEnabled( bool ) Control if the normal DOTA hero respawn rules apply.
Playtesting_UpdateCustomKeyValues void Playtesting_UpdateCustomKeyValues() Updates custom hero, unit and ability KeyValues in memory with the latest values from disk
ResetToHeroSelection void ResetToHeroSelection() Restart the game at hero selection
SetTreeRegrowTime void SetTreeRegrowTime( float ) Sets the tree regrow time in seconds.
SetHeroSelectionTime void SetHeroSelectionTime( float ) Sets the amount of time players have to pick their hero.
SetPreGameTime void SetPreGameTime( float ) Sets the amount of time players have between picking their hero and game start.
SetPostGameTime void SetPostGameTime( float ) Sets the amount of time players have between the game ending and the server disconnecting them.
SetRuneSpawnTime void SetRuneSpawnTime( float ) Sets the amount of time between rune spawns.
SetSameHeroSelectionEnabled void SetSameHeroSelectionEnabled( bool ) When true, players can repeatedly pick the same hero.
SetUseUniversalShopMode void SetUseUniversalShopMode( bool ) When true, all items are available at as long as any shop is in range.
SetTimeOfDay void SetTimeOfDay( float ) Set the time of day.
SetOverlayHealthBarUnit void SetOverlayHealthBarUnit( hscript, int ) Show this unit's health on the overlay health bar
SetHeroMinimapIconSize void SetHeroMinimapIconSize( int ) (nMinimapHeroIconSize) - Set the hero minimap icon size.
SetCreepMinimapIconScale void SetCreepMinimapIconScale( float ) (flMinimapCreepIconScale) - Scale the creep icons on the minimap.
SetRuneMinimapIconScale void SetRuneMinimapIconScale( float ) (flMinimapRuneIconScale) - Scale the rune icons on the minimap.
SetSafeToLeave void SetSafeToLeave( bool ) (bSafeToLeave) - Mark this game as safe to leave.
SetUseCustomHeroXPValues void SetUseCustomHeroXPValues( bool ) Allows heroes in the map to give a specific amount of XP (this value must be set).
SetCustomGameDifficulty void SetCustomGameDifficulty( int ) Set the difficulty level of the custom game mode
SetGoldTickTime void SetGoldTickTime( float ) Set the time interval between auto gold increases.
SetGoldPerTick void SetGoldPerTick( int ) Set the auto gold increase per timed interval.
SetNianFightStartTime void SetNianFightStartTime( float ) Sets the start time for the Nian fight
GetNianFightStartTime float GetNianFightStartTime() Gets the start time for the Nian fight
GetMatchSignoutComplete bool GetMatchSignoutComplete() Have we received the post match signout message that includes reward information
DidMatchSignoutTimeOut bool DidMatchSignoutTimeOut() true when we have waited some time after end of the game and not received signout
GetNianTotalDamageTaken int GetNianTotalDamageTaken() For New Bloom, get total damage taken by the Nian / Year Beast


CDOTAVoteSystem

!DOTA Vote System

Function Signature Description
StartVote void StartVote( hscript ) Starts a vote, based upon a table of parameters


CBaseEntity

Root class of all server-side entities

Function Signature Description
ConnectOutput void ConnectOutput( cstring, cstring ) Adds an I/O connection that will call the named function when the specified output fires
DisconnectOutput void DisconnectOutput( cstring, cstring ) Removes a connected script function from an I/O event.
GetHealth int GetHealth()
SetHealth void SetHealth( int )
GetMaxHealth int GetMaxHealth()
SetMaxHealth void SetMaxHealth( int )
IsAlive bool IsAlive()
Remove void Remove()
SetModel void SetModel( cstring )
GetModelName cstring GetModelName() Returns the name of the model
EmitSound void EmitSound( cstring ) Plays a sound from this entity.
EmitSoundParams void EmitSoundParams( cstring, int, float ) Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol is > 0.
StopSound void StopSound( cstring ) Stops a named sound playing from this entity.
PrecacheSoundScript void PrecacheSoundScript( cstring ) Precache a sound for later playing.
GetSoundDuration float GetSoundDuration( cstring, cstring ) Returns float duration of the sound. Takes soundname and optional actormodelname.
GetClassname cstring GetClassname()
GetName cstring GetName()
GetPreTemplateName cstring GetPreTemplateName() Get the entity name stripped of template unique decoration
GetAbsOrigin vector GetAbsOrigin()
SetAbsOrigin void SetAbsOrigin( vector )
GetOrigin vector GetOrigin()
SetAbsOrigin void SetAbsOrigin( vector ) SetOrigin
SetOrigin void SetOrigin( vector )
GetForwardVector vector GetForwardVector() Get the forward vector of the entity
GetRightVector vector GetRightVector() Get the right vector of the entity
GetUpVector vector GetUpVector() Get the up vector of the entity
SetForwardVector void SetForwardVector( vector ) Set the orientation of the entity to have this forward vector
GetVelocity vector GetVelocity()
SetVelocity void SetVelocity( vector )
SetAngularVelocity void SetAngularVelocity( float, float, float ) Set the local angular velocity - takes float pitch,yaw,roll velocities
GetAngularVelocity vector GetAngularVelocity() Get the local angular velocity - returns a vector of pitch,yaw,roll
GetCenter vector GetCenter() Get vector to center of object - absolute coords
EyePosition vector EyePosition() Get vector to eye position - absolute coords
SetAngles void SetAngles( float, float, float ) Set entity pitch, yaw, roll
GetAngles vector GetAngles() Get entity pitch, yaw, roll as a vector
SetSize void SetSize( vector, vector )
GetBoundingMins vector GetBoundingMins() Get a vector containing min bounds, centered on object
GetBoundingMaxs vector GetBoundingMaxs() Get a vector containing max bounds, centered on object
Destroy void Destroy()
SetOwner void SetOwner( hscript )
GetTeam int GetTeam()
SetTeam void SetTeam( int )
GetMoveParent hscript GetMoveParent() If in hierarchy, retrieves the entity's parent
GetRootMoveParent hscript GetRootMoveParent() If in hierarchy, walks up the hierarchy to find the root parent
FirstMoveChild hscript FirstMoveChild()
NextMovePeer hscript NextMovePeer()
__KeyValueFromString bool __KeyValueFromString( cstring, cstring ) @
__KeyValueFromFloat bool __KeyValueFromFloat( cstring, float ) @
__KeyValueFromInt bool __KeyValueFromInt( cstring, int ) @
__KeyValueFromVector bool __KeyValueFromVector( cstring, vector ) @
Trigger void Trigger() Fires off this entity's OnTrigger responses
ValidateScriptScope bool ValidateScriptScope() Ensure that an entity's script scope has been created
GetScriptScope hscript GetScriptScope() Retrieve the script-side data associated with an entity
GetScriptId cstring GetScriptId() Retrieve the unique identifier used to refer to the entity within the scripting system
GetOwner hscript GetOwner() Gets this entity's owner
SetOwner void SetOwner( hscript ) Sets this entity's owner
entindex unknown_variant_type entindex()


CDOTA_PlayerResource extends CBaseEntity

Interface to player data

Function Signature Description
SetHasRepicked void SetHasRepicked( int )
HasRepicked bool HasRepicked( int )
SetHasRandomed void SetHasRandomed( int )
HasRandomed bool HasRandomed( int )
IsValidTeamPlayerID bool IsValidTeamPlayerID( int )
IsValidTeamPlayer bool IsValidTeamPlayer( int )
IsValidPlayerID bool IsValidPlayerID( int )
IsValidPlayer bool IsValidPlayer( int )
GetLevel int GetLevel( int )
IncrementKills void IncrementKills( int, int )
IncrementAssists void IncrementAssists( int )
IncrementDeaths void IncrementDeaths( int )
GetKills int GetKills( int )
GetAssists int GetAssists( int )
GetDeaths int GetDeaths( int )
GetStuns float GetStuns( int )
GetHealing float GetHealing( int )
GetTowerKills int GetTowerKills( int )
GetRoshanKills int GetRoshanKills( int )
GetTeamKills int GetTeamKills( int )
IncrementStreak void IncrementStreak( int )
ClearStreak void ClearStreak( int )
GetStreak int GetStreak( int )
ModifyGold int ModifyGold( int, int, bool, int )
SetGold void SetGold( int, int, bool )
SpendGold void SpendGold( int, int, int )
GetGold int GetGold( int )
GetReliableGold int GetReliableGold( int )
GetUnreliableGold int GetUnreliableGold( int )
ResetTotalEarnedGold void ResetTotalEarnedGold( int )
GetTotalEarnedGold int GetTotalEarnedGold( int )
GetTotalGoldSpent int GetTotalGoldSpent( int )
AddGoldSpentOnSupport void AddGoldSpentOnSupport( int, int )
GetGoldSpentOnSupport int GetGoldSpentOnSupport( int )
GetGoldSpentOnConsumables int GetGoldSpentOnConsumables( int )
GetGoldSpentOnItems int GetGoldSpentOnItems( int )
GetGoldLostToDeath int GetGoldLostToDeath( int )
GetGoldSpentOnBuybacks int GetGoldSpentOnBuybacks( int )
GetGoldPerMin float GetGoldPerMin( int )
GetXPPerMin float GetXPPerMin( int )
GetAegisPickups int GetAegisPickups( int )
AddAegisPickup void AddAegisPickup( int )
GetRunePickups int GetRunePickups( int )
AddRunePickup void AddRunePickup( int )
GetNumConsumablesPurchased int GetNumConsumablesPurchased( int )
GetNumItemsPurchased int GetNumItemsPurchased( int )
GetTimeOfLastItemPurchase float GetTimeOfLastItemPurchase( int )
GetTimeOfLastConsumablePurchase float GetTimeOfLastConsumablePurchase( int )
GetTimeOfLastDeath float GetTimeOfLastDeath( int )
GetRespawnSeconds int GetRespawnSeconds( int )
IncrementTotalEarnedXP void IncrementTotalEarnedXP( int, int )
GetTotalEarnedXP int GetTotalEarnedXP( int )
AddClaimedFarm void AddClaimedFarm( int, float )
GetClaimedFarm float GetClaimedFarm( int )
GetRawPlayerDamage int GetRawPlayerDamage( int )
ClearRawPlayerDamageMatrix void ClearRawPlayerDamageMatrix( int )
ClearKillsMatrix void ClearKillsMatrix( int )
GetTowerDamageTaken int GetTowerDamageTaken( int )
GetCreepDamageTaken int GetCreepDamageTaken( int )
GetHeroDamageTaken int GetHeroDamageTaken( int )
GetDamageDoneToHero int GetDamageDoneToHero( int, int )
GetKillsDoneToHero int GetKillsDoneToHero( int, int )
GetSelectedHeroName cstring GetSelectedHeroName( int )
GetSelectedHeroID int GetSelectedHeroID( int )
IsHeroSelected bool IsHeroSelected( cstring )
WhoSelectedHero int WhoSelectedHero( cstring )
GetSelectedHeroEntity hscript GetSelectedHeroEntity( int )
HasSelectedHero bool HasSelectedHero( int )
GetPlayer hscript GetPlayer( int )
GetNthPlayerIDOnTeam int GetNthPlayerIDOnTeam( int, int )
IncrementLastHits void IncrementLastHits( int )
GetLastHits int GetLastHits( int )
IncrementGoldBagsCollected void IncrementGoldBagsCollected( int )
GetGoldBagsCollected int GetGoldBagsCollected( int )
IncrementLastHitStreak void IncrementLastHitStreak( int )
ClearLastHitStreak void ClearLastHitStreak( int )
GetLastHitStreak int GetLastHitStreak( int )
IncrementLastHitMultikill void IncrementLastHitMultikill( int )
ClearLastHitMultikill void ClearLastHitMultikill( int )
GetLastHitMultikill int GetLastHitMultikill( int )
IncrementNearbyCreepDeaths void IncrementNearbyCreepDeaths( int )
GetNearbyCreepDeaths int GetNearbyCreepDeaths( int )
IncrementDenies void IncrementDenies( int )
GetDenies int GetDenies( int )
IncrementClaimedMisses void IncrementClaimedMisses( int )
GetClaimedMisses int GetClaimedMisses( int )
IncrementClaimedDenies void IncrementClaimedDenies( int )
GetClaimedDenies int GetClaimedDenies( int )
IncrementMisses void IncrementMisses( int )
GetMisses int GetMisses( int )
UpdateTeamSlot void UpdateTeamSlot( int, int )
GetTeam int GetTeam( int )
IsBroadcaster bool IsBroadcaster( int )
GetBroadcasterChannel uint GetBroadcasterChannel( int )
GetBroadcasterChannelSlot uint GetBroadcasterChannelSlot( int )
GetSteamAccountID uint GetSteamAccountID( int )
IsFakeClient bool IsFakeClient( int )
HaveAllPlayersJoined bool HaveAllPlayersJoined()
GetPlayerLoadedCompletely bool GetPlayerLoadedCompletely( int )
SetPlayerReservedState void SetPlayerReservedState( int, bool )
GetPlayerReservedState bool GetPlayerReservedState( int )
GetConnectionState unknown_variant_type GetConnectionState( int )
HeroLevelUp void HeroLevelUp( int )
SetLastBuybackTime void SetLastBuybackTime( int, int )
GetPlayerName cstring GetPlayerName( int )
GetUnitShareMaskForPlayer int GetUnitShareMaskForPlayer( int, int )
IsHeroSharedWithPlayerID bool IsHeroSharedWithPlayerID( int, int )
AreUnitsSharedWithPlayerID bool AreUnitsSharedWithPlayerID( int, int )
IsDisableHelpSetForPlayerID bool IsDisableHelpSetForPlayerID( int, int )
SetUnitShareMaskForPlayer void SetUnitShareMaskForPlayer( int, int, int, bool )
GetNumCouriersForTeam int GetNumCouriersForTeam( int )
GetNthCourierForTeam hscript GetNthCourierForTeam( int, int )
SetBuybackCooldownTime void SetBuybackCooldownTime( int, float )
SetBuybackGoldLimitTime void SetBuybackGoldLimitTime( int, float )
ResetBuybackCostTime void ResetBuybackCostTime( int )
ReplaceHeroWith hscript ReplaceHeroWith( int, cstring, int, int ) (playerID, heroClassName, gold, XP) - replaces the player's hero with a new one of the specified class, gold and XP
SetCustomBuybackCost void SetCustomBuybackCost( int, int ) Set the buyback cost for this player.
SetCustomBuybackCooldown void SetCustomBuybackCooldown( int, float ) Set the buyback cooldown for this player.
GetCustomBuybackCost int GetCustomBuybackCost( int )
GetCustomBuybackCooldown float GetCustomBuybackCooldown( int )
SetCameraTarget void SetCameraTarget( int, hscript ) (playerID, entity) - force the given player's camera to follow the given entity
GetEventPointsForPlayerID int GetEventPointsForPlayerID( int )
GetEventPremiumPointsGranted int GetEventPremiumPointsGranted( int )
GetEventRankGranted int GetEventRankGranted( int )


CDOTABaseGameMode extends CBaseEntity

Base game mode class

Function Signature Description
BeginThink bool BeginThink( cstring, hscript, float ) Start a think callback. Takes a function and an interval
EndThink void EndThink( cstring ) Stop a think callback.
SetAlwaysShowPlayerInventory void SetAlwaysShowPlayerInventory( bool ) Show the player hero's inventory in the HUD, regardless of what unit is selected.
SetGoldSoundDisabled void SetGoldSoundDisabled( bool ) Turn the sound when gold is acquired off/on. Takes a bool.
SetRecommendedItemsDisabled void SetRecommendedItemsDisabled( bool ) Turn the panel for showing recommended items at the shop off/on. Takes a bool.
SetCameraDistanceOverride void SetCameraDistanceOverride( float ) Set a different camera distance; dota default is 1134.
SetOverrideSelectionEntity void SetOverrideSelectionEntity( hscript ) Set an override for the default selection entity, instead of each player's hero.
SetRemoveIllusionsOnDeath void SetRemoveIllusionsOnDeath( bool ) Make it so illusions are immediately removed upon death, rather than sticking around for a few seconds.
ClientLoadGridNav void ClientLoadGridNav() Tell clients that they need to load gridnav information. Used for things like allowing clients to identify valid locations to place buildings.
SetFogOfWarDisabled void SetFogOfWarDisabled( bool ) Turn the fog of war on or off.
SetCustomBuybackCostEnabled void SetCustomBuybackCostEnabled( bool ) Turns on capability to define custom buyback costs.
SetCustomBuybackCooldownEnabled void SetCustomBuybackCooldownEnabled( bool ) Turns on capability to define custom buyback cooldowns.
SetTopBarTeamValuesOverride void SetTopBarTeamValuesOverride( bool ) Override the values of the team values on the top game bar.
SetTopBarTeamValuesVisible void SetTopBarTeamValuesVisible( bool ) Turning on/off the team values on the top game bar.
SetTopBarTeamValue void SetTopBarTeamValue( int, int ) Set the team values on the top game bar.


CBaseAnimating extends CBaseEntity

Animating models

Function Signature Description
LookupAttachment int LookupAttachment( cstring ) Get the named attachement id
GetAttachmentOrigin vector GetAttachmentOrigin( int ) Get the attachement id's origin vector
GetAttachmentAngles vector GetAttachmentAngles( int ) Get the attachement id's angles as a p,y,r vector
IsSequenceFinished bool IsSequenceFinished() Ask whether the main sequence is done playing
SetBodygroup void SetBodygroup( int, int ) Sets a bodygroup
SetModelScale void SetModelScale( float, float ) Set the model scale


CBaseFlex extends CBaseAnimating

Animated characters who have vertex flex capability.

Function Signature Description
GetCurrentScene hscript GetCurrentScene() Returns the instance of the oldest active scene entity (if any).
GetSceneByIndex hscript GetSceneByIndex( int ) Returns the instance of the scene entity at the specified index.


CDOTA_BaseNPC extends CBaseFlex

A Dota NPC Unit

Function Signature Description
IsAncient bool IsAncient() Is this creature an Ancient?
IsNeutralUnitType bool IsNeutralUnitType() Is this a neutral?
IsSummoned bool IsSummoned() Is this unit summoned?
IsCreature bool IsCreature() Is this a Creature type NPC
IsHero bool IsHero() Is this a hero or hero illusion?
IsRealHero bool IsRealHero() Is this a real hero?
IsTower bool IsTower() Is this a tower?
IsAlive bool IsAlive() Is this unit alive?
IsMechanical bool IsMechanical() Is the unit mechanical?
IsPhantom bool IsPhantom() Is this a phantom unit?
SetInitialGoalEntity void SetInitialGoalEntity( hscript ) Sets the initial waypoint goal for this NPC
GetInitialGoalEntity hscript GetInitialGoalEntity() Returns the initial waypoint goal for this NPC
SetMustReachEachGoalEntity void SetMustReachEachGoalEntity( bool ) Set whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
GetMustReachEachGoalEntity bool GetMustReachEachGoalEntity() Get whether this NPC is required to reach each goal entity, rather than being allowed to 'unkink' their path
AddNewModifier void AddNewModifier( hscript, hscript, cstring, hscript ) Add a modifier to this unit
HasModifier bool HasModifier( cstring ) Sees if this unit has a given modifier
RemoveModifierByName void RemoveModifierByName( cstring ) Removes a modifier
RemoveModifierByNameAndCaster void RemoveModifierByNameAndCaster( cstring, hscript ) Removes a modifier that was cast by the given caster
AddItem void AddItem( hscript ) Add an item to this unit's inventory.
AddAbility void AddAbility( cstring ) Add an ability to this unit by name.
RemoveAbility void RemoveAbility( cstring ) Remove an ability from this unit by name.
HasAbility bool HasAbility( cstring ) See whether this unit has an ability by name.
HasItemInInventory bool HasItemInInventory( cstring ) See whether this unit has an item by name.
FindAbilityByName hscript FindAbilityByName( cstring ) Retrieve an ability by name from the unit.
GetGoldBounty int GetGoldBounty() Get the gold bounty on this unit
SetDeathXP void SetDeathXP( int ) Set the XP bounty on this unit
GetDeathXP int GetDeathXP() Get the XP bounty on this unit
GetUnitName cstring GetUnitName() Get the name of this unit.
GetTeamNumber int GetTeamNumber() Get the team number of this unit.
GetPlayerOwner hscript GetPlayerOwner() Returns the player that owns this unit
SetMaximumGoldBounty void SetMaximumGoldBounty( int ) Set the maximum gold bounty for this unit.
SetMinimumGoldBounty void SetMinimumGoldBounty( int ) Set the minimum gold bounty for this unit.
GetTotalPurchasedUpgradeGoldCost int GetTotalPurchasedUpgradeGoldCost() Get how much gold has been spent on ability upgrades.
ForceKill void ForceKill( bool ) Kill this unit immediately.
GetBaseDamageMin int GetBaseDamageMin() Get the minimum attack damage of this unit.
GetBaseDamageMax int GetBaseDamageMax() Get the maximum attack damage of this unit.
Heal void Heal( float, hscript ) Heal this unit.
GetMaxHealth int GetMaxHealth() Get the maximum health of this unit.
GetHealthPercent int GetHealthPercent() Get the current health percent of the unit.
SetMana void SetMana( float ) Set the mana on this unit.
GetMaxMana float GetMaxMana() Get the maximum mana of this unit.
RespawnUnit void RespawnUnit() Respawns the target unit if it can be respawned.
GetLevel int GetLevel() Returns the level of this unit.
GetItemInSlot hscript GetItemInSlot( int ) Returns nth item in inventory slot (index is zero based)
SetOriginalModel void SetOriginalModel( cstring ) Sets the original model of this entity, which it will tend to fall back to anytime its state changes
AddNoDraw void AddNoDraw() Adds the no draw flag.
RemoveNoDraw void RemoveNoDraw() Remove the no draw flag.
GetPlayerOwnerID int GetPlayerOwnerID() Get the owner player ID for this unit.
IsRangedAttacker bool IsRangedAttacker() Is this unit a ranged attacker?
GetCurrentActiveAbility hscript GetCurrentActiveAbility() Get the ability this unit is currently casting.
MoveToPosition void MoveToPosition( vector ) Issue a Move-To command
MoveToPositionAggressive void MoveToPositionAggressive( vector ) Issue an Attack-Move-To command
MoveToNPC void MoveToNPC( hscript ) Move to follow a unit.
MoveToTargetToAttack void MoveToTargetToAttack( hscript ) Move to a target to attack.
Hold void Hold() Hold position.
Stop void Stop() Stop the current order.
CastAbilityToggle void CastAbilityToggle( hscript, int ) Toggle an ability.
CastAbilityImmediately void CastAbilityImmediately( hscript, int ) Cast an ability immediately.
CastAbilityOnPosition void CastAbilityOnPosition( vector, hscript, int ) Cast an ability on a position.
CastAbilityOnTarget void CastAbilityOnTarget( hscript, hscript, int ) Cast an ability on a target entity.
CastAbilityNoTarget void CastAbilityNoTarget( hscript, int ) Cast an ability with no target.
DropItemAtPosition void DropItemAtPosition( vector, hscript ) Drop an item at a given point.
MoveToNPCToGiveItem void MoveToNPCToGiveItem( hscript, hscript ) Give an item to another unit.
PickupDroppedItem void PickupDroppedItem( hscript ) Pick up a dropped item.
PickupRune void PickupRune( hscript ) Pick up a rune.
DropItemAtPositionImmediate void DropItemAtPositionImmediate( hscript, vector ) Immediately drop a carried item at a given position.
SetAdditionalBattleMusicWeight void SetAdditionalBattleMusicWeight( float ) Combat involving this creature will have this weight added to the music calcuations
GetAdditionalBattleMusicWeight float GetAdditionalBattleMusicWeight() Combat involving this creature will have this weight added to the music calcuations


CDOTA_BaseNPC_Creature extends CDOTA_BaseNPC

A Dota NPC Unit

Function Signature Description
CreatureLevelUp void CreatureLevelUp( int ) Level the creature up by the specified number of levels
AddItemDrop void AddItemDrop( hscript ) Add the specified item drop to this creature
SetChampion void SetChampion( bool ) Flag this unit as a champion creature.
IsChampion bool IsChampion() Is this unit a champion?
SetHPGain void SetHPGain( int ) Set the hit points gained per level on this creature.
SetManaGain void SetManaGain( int ) Set the mana points gained per level on this creature.
SetHPRegenGain void SetHPRegenGain( float ) Set the hit points regen gained per level on this creature.
SetManaRegenGain void SetManaRegenGain( float ) Set the mana points regen gained per level on this creature.
SetDamageGain void SetDamageGain( int ) Set the damage gained per level on this creature.
SetArmorGain void SetArmorGain( float ) Set the armor gained per level on this creature.
SetMagicResistanceGain void SetMagicResistanceGain( float ) Set the magic resistance gained per level on this creature.
SetDisableResistanceGain void SetDisableResistanceGain( float ) Set the disable resistance gained per level on this creature.
SetAttackTimeGain void SetAttackTimeGain( float ) Set the attack time gained per level on this creature.
SetMoveSpeedGain void SetMoveSpeedGain( int ) Set the move speed gained per level on this creature.
SetBountyGain void SetBountyGain( int ) Set the bounty gold gained per level on this creature.
SetXPGain void SetXPGain( int ) Set the xp reward gained per level on this creature.


CDOTA_Unit_Nian extends CDOTA_BaseNPC_Creature

A Dota NPC Unit

Function Signature Description
IsHornAlive bool IsHornAlive() Is the Nian's horn broken?
IsTailAlive bool IsTailAlive() Is the Nian's tail broken?
GetHorn hscript GetHorn() Is the Nian horn?
GetTail hscript GetTail() Is the Nian's tail broken?


CDOTABaseAbility extends CBaseEntity

An ability

Function Signature Description
GetAbilityName cstring GetAbilityName() Returns the name of this ability.
GetSpecialValueFor variant GetSpecialValueFor( cstring ) Gets a value from this ability's special value block for its current level.
GetCastRange int GetCastRange() Gets the cast range of the ability.
IsFullyCastable bool IsFullyCastable() Returns whether the ability can be cast.
IsChanneling bool IsChanneling() Returns whether the ability is currently channeling.
IsInAbilityPhase bool IsInAbilityPhase() Returns whether the ability is currently casting.
GetCooldown float GetCooldown( int ) Get the cooldown duration for this ability at a given level, not the amount of cooldown actually left.
EndCooldown void EndCooldown() Clear the cooldown remaining on this ability.
MarkAbilityButtonDirty void MarkAbilityButtonDirty() Mark the ability button for this ability as needing a refresh
SetLevel void SetLevel( int ) Sets the level of this ability.


CDOTA_Ability_Animation_Attack extends CDOTABaseAbility

A Dota NPC Unit

Function Signature Description
SetPlaybackRate void SetPlaybackRate( float ) Override playbackrate


CDOTA_Ability_Nian_Dive extends CDOTABaseAbility

A Dota NPC Unit

Function Signature Description
SetPlaybackRate void SetPlaybackRate( float ) Override playbackrate


CDOTA_Ability_Animation_TailSpin extends CDOTABaseAbility

A Dota NPC Unit

Function Signature Description
SetPlaybackRate void SetPlaybackRate( float ) Override playbackrate


CDOTA_Ability_Nian_Leap extends CDOTABaseAbility

A Dota NPC Unit

Function Signature Description
SetPlaybackRate void SetPlaybackRate( float ) Override playbackrate


CDOTA_BaseNPC_Hero extends CDOTA_BaseNPC

A Dota Hero NPC

Function Signature Description
ModifyGold int ModifyGold( int, bool, int ) Gives this hero some gold
GetGold int GetGold() Returns gold amount for the player owning this hero
SetGold void SetGold( int, bool ) Sets the gold amount for the player owning this hero
GetCurrentXP int GetCurrentXP() Returns the amount of XP
GetPlayerID int GetPlayerID() Returns player ID of the player owning this hero
RespawnHero void RespawnHero( bool, bool, bool ) Respawn this hero.
HeroLevelUp void HeroLevelUp( bool ) Levels up the hero, true or false to play effects.
GetAbilityPoints int GetAbilityPoints() Gets the current unspent ability points.
SetAbilityPoints void SetAbilityPoints( int ) Sets the current unspent ability points.
SetCustomDeathXP void SetCustomDeathXP( int ) Sets a custom experience value for this hero. Note, GameRules boolean must be set for this to work!


CDOTAPlayer extends CBaseAnimating

dota_player

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


CDotaQuest extends CBaseEntity

A quest

Function Signature Description
SetTextReplaceValue void SetTextReplaceValue( int, int ) Set a quest value
CompleteQuest void CompleteQuest() Mark this quest complete
SetTextReplaceString void SetTextReplaceString( cstring ) Set the text replace string for this quest
AddSubquest void AddSubquest( hscript ) Add a subquest to this quest
RemoveSubquest void RemoveSubquest( hscript ) Remove a subquest from this quest
GetSubquestByName hscript GetSubquestByName( cstring ) Finds a subquest from this quest by name
GetSubquest hscript GetSubquest( int ) Finds a subquest from this quest by index


CDotaSubquestBase extends CBaseEntity

A subquest

Function Signature Description
SetTextReplaceValue void SetTextReplaceValue( int, int ) Set a subquest value
CompleteSubquest void CompleteSubquest() Mark this subquest complete
SetTextReplaceString void SetTextReplaceString( cstring ) Set the text replace string for this subquest


CDOTA_Item extends CDOTABaseAbility

A usable item.

Function Signature Description
SetPurchaseTime void SetPurchaseTime( float ) Set the purchase time of this item
GetPurchaseTime float GetPurchaseTime() Get the purchase time of this item
SetPurchaser void SetPurchaser( hscript ) Set the purchaser of record for this item.
GetInitialCharges int GetInitialCharges() Get the initial number of charges this item has.
GetCurrentCharges int GetCurrentCharges() Get the number of charges this item currently has.
SetCurrentCharges void SetCurrentCharges( int ) Set the number of charges on this item
GetPurchaser hscript GetPurchaser() Get the purchaser for this item.
Think void Think() Think this item
IsPermanent bool IsPermanent() Is this a permanent item?
StacksWithOtherOwners bool StacksWithOtherOwners()
SetStacksWithOtherOwners void SetStacksWithOtherOwners( bool )
GetShareability int GetShareability()
GetCost int GetCost()
LaunchLoot void LaunchLoot( bool, float, float, vector )
GetContainer hscript GetContainer() Get the container for this item.


CDOTA_Item_DataDriven extends CDOTA_Item

A data driven usable item.

Function Signature Description
ApplyDataDrivenModifier void ApplyDataDrivenModifier( hscript, hscript, cstring, hscript ) Applies a data driven modifier to the target


CDOTA_Item_Physical extends CBaseAnimating

A physical item dropped in the world

Function Signature Description
GetCreationTime float GetCreationTime() Returns the game time when this item was created in the world
GetContainedItem hscript GetContainedItem() Returned the contained item.
SetContainedItem void SetContainedItem( hscript ) Set the contained item.

|- | ShowMessage | void ShowMessage( cstring ) | Print a hud message on all clients |- | GetMapName | cstring GetMapName() | Get the name of the map. |- | SendToConsole | void SendToConsole( cstring ) | Send a string to the console as a client command |- | SendToServerConsole | void SendToServerConsole( cstring ) | Send a string to the console as a server command |- | PrintLinkedConsoleMessage | void PrintLinkedConsoleMessage( cstring, cstring ) | Print a console message with a linked console command |- | InitLogFile | void InitLogFile( cstring, cstring ) | If the given file doesn't exist, creates it with the given contents; does nothing if it exists |- | AppendToLogFile | void AppendToLogFile( cstring, cstring ) | Appends a string to a log file on the server |- | DoScriptAssert | void DoScriptAssert( bool, cstring ) | #ScriptAssert:Asserts the passed in value. Prints out a message and brings up the assert dialog. |- | Time | float Time() | Get the current server time |- | UTIL_RemoveImmediate | void UTIL_RemoveImmediate( hscript ) | Immediately removes the specified entity |- | DoEntFire | void DoEntFire( cstring, cstring, cstring, float, hscript, hscript ) | #EntFire:Generate and entity i/o event |- | EntFireByHandle | void EntFireByHandle( hscript, cstring, cstring, float, hscript, hscript ) | Generate and entity i/o event |- | IsValidEntity | bool IsValidEntity( hscript ) | Checks to see if the given hScript is a valid entity |- | IsMarkedForDeletion | bool IsMarkedForDeletion( hscript ) | Returns true if the entity is valid and marked for deletion. |- | DoUniqueString | cstring DoUniqueString( 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. |- | EntIndexToHScript | hscript EntIndexToHScript( int ) | Turn an entity index integer to an HScript representing that entity's script instance. |- | PlayerInstanceFromIndex | hscript PlayerInstanceFromIndex( int ) | Get a script instance of a player by index. |- | GetListenServerHost | hscript GetListenServerHost() | Get the local player on a listen server. |- | ScreenShake | void ScreenShake( vector, float, float, float, float, int, bool ) | Start a screenshake with the following parameters. vecCenter, flAmplitude, flFrequency, flDuration, flRadius, eCommand( SHAKE_START = 0, SHAKE_STOP = 1 ), bAirShake |- | SpawnEntityFromTable | hscript SpawnEntityFromTable( cstring, hscript ) | Spawns a single entity from a table |- | SpawnEntityFromTableSync | hscript SpawnEntityFromTableSync( cstring, hscript ) | Spawns a single entity from a table |- | SpawnEntityGroupFromTable | bool SpawnEntityGroupFromTable( hscript, bool, hscript ) | Hierarchically spawn an entity group from a set of spawn tables. |- | PrecacheEntityFromTable | bool PrecacheEntityFromTable( hscript ) | Precache an entity from KeyValues in table |- | VectorToAngles | qangle VectorToAngles( vector ) | Get Qangles (with no roll) for a Vector. |- | RotatePosition | vector RotatePosition( vector, qangle, vector ) | Rotate a Vector around a point. |- | RotateOrientation | qangle RotateOrientation( qangle, qangle ) | Rotate a QAngle by another QAngle. |- | RotationDelta | qangle RotationDelta( qangle, qangle ) | Find the delta between two angles. |- | EmitSoundOn | void EmitSoundOn( cstring, hscript ) | Play named sound on Entity |- | EmitSoundOnClient | void EmitSoundOnClient( cstring, hscript ) | Play named sound only on the client for the passed in player |- | StopSoundOn | void StopSoundOn( cstring, hscript ) | Stop named sound on Entity |- | GetPhysVelocity | vector GetPhysVelocity( hscript ) | Get Velocity for VPHYS or normal object |- | GetPhysAngularVelocity | vector GetPhysAngularVelocity( hscript ) | Get Angular Velocity for VPHYS or normal object |- | Say | void Say( hscript, cstring, bool ) | Have Entity say string, and teamOnly or not |- | AddThinkToEnt | void AddThinkToEnt( hscript, cstring ) | Adds a late bound think function to the C++ think tables for the obj |- | LoadKeyValues | variant LoadKeyValues( cstring ) | Creates a table from the specified keyvalues text file |- | LoadKeyValuesFromString | variant LoadKeyValuesFromString( cstring ) | Creates a table from the specified keyvalues string |- | DebugDrawScreenTextLine | void DebugDrawScreenTextLine( float, float, int, cstring, int, int, int, int, float ) | Draw text with a line offset (x, y, lineOffset, text, r, g, b, a, duration) |- | DebugDrawText | void DebugDrawText( vector, cstring, bool, float ) | Draw text in 3d (origin, text, bViewCheck, duration) |- | DebugDrawBox | void DebugDrawBox( vector, vector, vector, int, int, int, int, float ) | Draw a debug overlay box (origin, mins, maxs, forward, r, g, b, a, duration ) |- | DebugDrawLine | void DebugDrawLine( vector, vector, int, int, int, bool, float ) | Draw a debug overlay line (origin, target, r, g, b, ztest, duration) |- | DebugDrawCircle | void DebugDrawCircle( vector, vector, float, float, bool, float ) | Draw a debug circle (center, vRgb, a, rad, a, ztest, duration) |- | DebugDrawLine_vCol | void DebugDrawLine_vCol( vector, vector, vector, bool, float ) | Draw a debug line using color vec (start, end, vRgb, a, ztest, duration) |- | DebugDrawBoxDirection | void DebugDrawBoxDirection( vector, vector, vector, vector, vector, float, float ) | Draw a debug forward box (cent, min, max, forward, vRgb, a, duration) |- | DebugDrawClear | void DebugDrawClear() | Try to clear all the debug overlay info |- | GetFrameCount | int GetFrameCount() | Returns the engines current frame count |- | IsDedicatedServer | bool IsDedicatedServer() | Returns true if this server is a dedicated server.

|- | RandomInt | int RandomInt( int, int ) | Get a random int within a range |- | RandomFloat | float RandomFloat( float, float ) | Get a random float within a range |- | RandomVector | vector RandomVector( float ) | Get a random vector within a range |- | RollPercentage | bool RollPercentage( int ) | Rolls a number from 1 to 100 and returns true if the roll is less than or equal to the number specified |}