Click here to go to the first staff post in this thread. Thread: LuaFunctions bot functions list

Page 1 of 2 12 LastLast
Results 1 to 20 of 21
  1.   Click here to go to the next staff post in this thread.   #1
    Offline
    S2 Staff Member S2 Games Staff
    Join Date
    Aug 2011
    Posts
    408

    LuaFunctions bot functions list

    Hey guys, here is a list of the functions you can use to interface with the HoN engine in your bot code. We'll be working on some more complete documentation further down the road, but I hope this will be useful in the interim.





    (Updated 2/18/13, last thorough diff: 1/3/13)

    CBotMetaDataNode members

    • String CBotMetaDataNode:GetName()
    • Vector3 CBotMetaDataNode:GetPosition()
    • String/Number/Boolean CBotMetaDataNode:GetProperty(sName)


    CTeamBotBrain members

    • Boolean CTeamBotBrain:CanSeeUnit(unitTarget)
    • Vector3 CTeamBotBrain:GetFrontOfCreepWavePosition(sLane)
    • Number CTeamBotBrain:GetTeam()


    IEntityAbility members

    • Boolean IEntityAbility:CanActivate()
    • Boolean IEntityAbility:CanLevelUp()
    • Number IEntityAbility:GetActiveChannelPercent()
    • Number IEntityAbility:GetActiveChannelTime()
    • Number IEntityAbility:GetActiveManaCost()
    • String IEntityAbility:GetActiveModifierKey()
    • Number IEntityAbility:GetActualRemainingCooldownPercent()
    • Number IEntityAbility:GetActualRemainingCooldownTime()
    • Number IEntityAbility:GetAdjustedActionTime()
    • Number IEntityAbility:GetAdjustedCastTime()
    • Boolean IEntityAbility:GetAllowAutoCast()
    • Boolean IEntityAbility:GetAllowOutOfBoundsCast()
    • Boolean IEntityAbility:GetAllowOutOfRangeCast()
    • Number IEntityAbility:GetAreaCastRange()
    • Boolean IEntityAbility:GetAutoToggleOffWhenDisabled()
    • Boolean IEntityAbility:GetAutoToggleOffWithTriggeredManaCo st()
    • Number IEntityAbility:GetCastActionTime()
    • Number IEntityAbility:GetCastTime()
    • Number IEntityAbility:GetChannelRange()
    • Number IEntityAbility:GetChannelTime()
    • Number IEntityAbility:GetChargeCost()
    • Number IEntityAbility:GetCharges()
    • Number IEntityAbility:GetConeCastRange()
    • Number IEntityAbility:GetConeCastWidth()
    • Number IEntityAbility:GetCooldownOnDamage()
    • Number IEntityAbility:GetCooldownTime()
    • Boolean IEntityAbility:GetDeferChannelCost()
    • Boolean IEntityAbility:GetDeferChannelImpact()
    • Boolean IEntityAbility:GetDoubleActivate()
    • Number IEntityAbility:GetForceRange()
    • Boolean IEntityAbility:GetFrontQueue()
    • Boolean IEntityAbility:GetIgnoreCooldown()
    • Boolean IEntityAbility:GetIgnoreInvulnerable()
    • Number IEntityAbility:GetInitialCharges()
    • Boolean IEntityAbility:GetIsChanneling()
    • Number IEntityAbility:GetLevel()
    • Number IEntityAbility:GetLineCastMaxRange()
    • Number IEntityAbility:GetLineCastRange()
    • Number IEntityAbility:GetLineCastWidth()
    • Number IEntityAbility:GetManaCost()
    • Number IEntityAbility:GetMaxCharges()
    • Number IEntityAbility:GetMaxLevel()
    • Number IEntityAbility:GetMinRange()
    • Boolean IEntityAbility:GetNeedVision()
    • Boolean IEntityAbility:GetNonInterrupting()
    • Boolean IEntityAbility:GetNoRangeClamp()
    • Boolean IEntityAbility:GetNoStun()
    • Boolean IEntityAbility:GetNoTargetIgnoreInvulnerable()
    • Boolean IEntityAbility:GetNoTurnToTarget()
    • Number IEntityAbility:GetRange()
    • Number IEntityAbility:GetRangeBuffer()
    • Number IEntityAbility:GetSlot()
    • Number IEntityAbility:GetTargetRadius()
    • Number IEntityAbility:GetToggleOffCooldownTime()
    • Number IEntityAbility:GetToggleOffManaCost()
    • Number IEntityAbility:GetTriggeredManaCost()
    • Number IEntityAbility:GetType()
    • String IEntityAbility:GetTypeName()
    • Boolean IEntityAbility:GetUsePathForRange()
    • Boolean IEntityAbility:IsActive()
    • Boolean IEntityAbility:IsDisabled()
    • Boolean IEntityAbility:IsReady()
    • Boolean IEntityAbility:IsValid()
    • void IEntityAbility:LevelUp()


    IBehavior members

    • ActionState IBehavior:GetAttackingActionState()
    • Unit IBehavior:GetAttackTarget()
    • ActionState IBehavior:GetCastingActionState()
    • Vector3 IBehavior:GetGoalPosition()
    • Player IBehavior:GetIssuedPlayer()
    • Boolean IBehavior:GetMoving()
    • ActionState IBehavior:GetMovingActionState()
    • unit IBehavior:GetOwnerUnit()
    • Unit IBehavior:GetTarget()
    • String IBehavior:GetType()
    • Boolean IBehavior:IsChanneling()
    • Boolean IBehavior:IsForced()
    • Boolean IBehavior:IsIdle()
    • Boolean IBehavior:IsTraveling()


    Vector3 library

    • Vector3 Vector3.Create([nX, nY, nZ])
    • Vector3 Vector3.Cross(vec1, vec2)
    • Number Vector3.Distance(vec1, vec2)
    • Number Vector3.Distance2D(vec1, vec2)
    • Number Vector3.Distance2DSq(vec1, vec2)
    • Number Vector3.DistanceSq(vec1, vec2)
    • Number Vector3.Dot(vec1, vec2)
    • Number Vector3.Length(vec)
    • Number Vector3.LengthSq(vec)
    • Vector3 Vector3.Normalize(vec)
    • Vector3 Vector3.Project(vecOnto, vecToProject)


    HoN library

    • Boolean HoN.CanSeePosition(vecPos)
    • void HoN.DrawDebugLine(vecStart, vecEnd[, bArrow = false, sColor = "yellow"])
    • Boolean HoN.GameEntityExists(nIndex)
    • Number HoN.GetCreepWaveSpawnInterval()
    • Number HoN.GetExperienceForLevel(nLevel)
    • Number HoN.GetGameTime() --This is time since the lobby started
    • Number HoN.GetHellbourneTeam()
    • Table{unit} HoN.GetHeroes(nTeam)
    • itemdef HoN.GetItemDefinition(sItemName)
    • Number HoN.GetLegionTeam()
    • Number HoN.GetMatchTime() --This is time since the 0:00 mark (nil if before)
    • Table HoN.GetMetaTable(sObjectType)
    • Number HoN.GetNeutralTeam()
    • Number HoN.GetRemainingPreMatchTime()
    • teambot HoN.GetTeamBotBrain()
    • Number HoN.GetTimeUntilCreepWaveSpawn()
    • Number HoN.GetTotalTime()
    • Table{unit, ...} HoN.GetTreesInRadius(vecCenter, nRadius)
    • Table{unit, ...} HoN.GetUnitsInRadius(vecCenter, nRadius, nMask)
    • Boolean HoN.WillBlockNeutralSpawn(vecPos)


    Global functions

    • void AddBot(nTeam, sDefinitionName)
    • void StartGame(String type, String name, String options)
    • void Echo(String text)
    • Number GetTime()
    • Number GetTimeOfDawn()
    • void print(...)
    • Number Round(Number)
    • void StartProfile(sName)
    • void StopProfile()


    CBotMetaDataLink members

    • String CBotMetaDataLink:GetName()
    • Vector3 CBotMetaDataLink:GetPosition()
    • String/Number/Boolean CBotMetaDataLink:GetProperty(sName)


    IUnitEntity members

    • Boolean IUnitEntity:CanAccess(item)
    • Table{item} IUnitEntity:FindItemInInventory(sItemName)
    • ability IUnitEntity:GetAbility(nSlot)
    • Number IUnitEntity:GetAbilityPointsAvailable()
    • String IUnitEntity:GetActionState()
    • Number IUnitEntity:GetAdjustedAttackActionTime()
    • Number IUnitEntity:GetAdjustedAttackCooldown()
    • Number IUnitEntity:GetAdjustedAttackDuration()
    • Number IUnitEntity:GetArmor()
    • Number IUnitEntity:GetAttackDamageMax()
    • Number IUnitEntity:GetAttackDamageMin()
    • Number IUnitEntity:GetAttackProjectileSpeed()
    • Number IUnitEntity:GetAttackRange()
    • Number IUnitEntity:GetAttackSpeed()
    • String IUnitEntity:GetAttackTarget()
    • String IUnitEntity:GetAttackType()
    • Number IUnitEntity:GetBaseDamage()
    • Behavior IUnitEntity:GetBehavior()
    • Number IUnitEntity:GetBoundsRadius()
    • Number IUnitEntity:GetBuyBackCost()
    • Boolean IUnitEntity:GetCanAttack()
    • Boolean IUnitEntity:GetCliffwalking()
    • sName IUnitEntity:GetDisplayName()
    • Number IUnitEntity:GetEvasionMelee()
    • Number IUnitEntity:GetEvasionRanged()
    • Number IUnitEntity:GetExperienceForCurrentLevel()
    • Number IUnitEntity:GetExperienceForNextLevel()
    • Number IUnitEntity:GetFinalAttackDamageMax()
    • Number IUnitEntity:GetFinalAttackDamageMin()
    • Number IUnitEntity:GetHealth()
    • Number IUnitEntity:GetHealthPercent()
    • Number IUnitEntity:GetHealthRegen()
    • Table{Item} IUnitEntity:GetInventory([bAppendStash = false])
    • item IUnitEntity:GetItem(nSlot)
    • Table{itemdef} IUnitEntity:GetItemComponentsRemaining(itemdef)
    • Number IUnitEntity:GetItemCostRemaining(itemdef)
    • Number IUnitEntity:GetLevel()
    • Number IUnitEntity:GetLifeSteal()
    • Number IUnitEntity:GetMagicArmor()
    • Number IUnitEntity:GetMagicResistance()
    • Number IUnitEntity:GetMana()
    • Number IUnitEntity:GetManaPercent()
    • Number IUnitEntity:GetManaRegen()
    • Number IUnitEntity:GetMaxHealth()
    • Number IUnitEntity:GetMaxMana()
    • Number IUnitEntity:GetMoveSpeed()
    • Number IUnitEntity:GetNumBuyBacks()
    • player IUnitEntity:GetOwnerPlayer()
    • Number IUnitEntity:GetPhysicalResistance()
    • Vector3 IUnitEntity:GetPosition()
    • String IUnitEntity:GetPrimaryAttribute()
    • Number IUnitEntity:GetRemainingCooldownTime(sName | itemdef)
    • Number IUnitEntity:GetRemainingRespawnTime()
    • Boolean IUnitEntity:GetStashAccess()
    • Table{Number} IUnitEntity:GetStats()
    • Number IUnitEntity:GetTeam()
    • Boolean IUnitEntity:GetTreewalking()
    • String IUnitEntity:GetTypeName()
    • Number IUnitEntity:GetUniqueID()
    • Boolean IUnitEntity:GetUnitwalking()
    • Number IUnitEntity:GetXPM()
    • Boolean IUnitEntity:HasDeniablePotential()
    • Boolean IUnitEntity:HasState(sName)
    • Boolean IUnitEntity:IsAlive()
    • Boolean IUnitEntity:IsAttackReady()
    • Boolean IUnitEntity:IsBase()
    • Boolean IUnitEntity:IsBotControlled()
    • Boolean IUnitEntity:IsBuilding()
    • Boolean IUnitEntity:IsChanneling()
    • Boolean IUnitEntity:IsDeniable()
    • Boolean IUnitEntity:IsDisarmed()
    • Boolean IUnitEntity:IsHero()
    • Boolean IUnitEntity:IsImmobilized()
    • Boolean IUnitEntity:IsInvulnerable()
    • Boolean IUnitEntity:IsPerplexed()
    • Boolean IUnitEntity:IsRax()
    • Boolean IUnitEntity:IsShop()
    • Boolean IUnitEntity:IsSilenced()
    • Boolean IUnitEntity:IsStealth()
    • Boolean IUnitEntity:IsStunned()
    • Boolean IUnitEntity:IsTower()
    • Boolean IUnitEntity:IsUnitType(sType)
    • Boolean IUnitEntity:IsValid()
    • void IUnitEntity:PurchaseRemaining(itemdef)
    • void IUnitEntity:Sell(item)
    • void IUnitEntity:SellBySlot(nSlot)
    • void IUnitEntity:SwapItems(nSlot1, nSlot2)
    • void IUnitEntity:TeamShare()


    IActionState members

    • Boolean IActionState:IsActive()
    • Boolean IActionState:IsAllDone()
    • Boolean IActionState:IsAttackReady()
    • Boolean IActionState:IsCommitted()
    • Boolean IActionState:IsCompleted()
    • Boolean IActionState:IsInterrupted()


    BotMetaData library

    • Table BotMetaData.FindPath(vecStartPos, vecEndPos[, funcGetCost, funcGetHeuristic])
    • CBotMetaDataNode BotMetaData.GetClosestNode(vecPos)
    • CBotMetaDataNode,Number BotMetaData.GetClosestNodeOnPath(tPath, vecPos)
    • Table BotMetaData.RegisterLayer(sPath)
    • Table BotMetaData.SetActiveLayer(sPath)


    CItemDefinition members

    • Number CItemDefinition:GetActiveManaCost()
    • Boolean CItemDefinition:GetAllowAutoCast()
    • Boolean CItemDefinition:GetAllowDisassemble()
    • Boolean CItemDefinition:GetAllowOutOfBoundsCast()
    • Boolean CItemDefinition:GetAllowOutOfRangeCast()
    • Boolean CItemDefinition:GetAllowSharing()
    • Boolean CItemDefinition:GetAllowTransfer()
    • Number CItemDefinition:GetAreaCastRange()
    • Boolean CItemDefinition:GetAutoAssemble()
    • Boolean CItemDefinition:GetAutoRecharge()
    • Boolean CItemDefinition:GetAutoToggleOffWhenDisabled()
    • Boolean CItemDefinition:GetAutoToggleOffWithTriggeredManaC ost()
    • Boolean CItemDefinition:GetBindOnPickup()
    • Number CItemDefinition:GetCastActionTime()
    • Number CItemDefinition:GetCastTime()
    • Number CItemDefinition:GetChannelRange()
    • Number CItemDefinition:GetChannelTime()
    • Number CItemDefinition:GetChargeCost()
    • Table{itemdef} CItemDefinition:GetComponents()
    • Number CItemDefinition:GetConeCastRange()
    • Number CItemDefinition:GetConeCastWidth()
    • Number CItemDefinition:GetCooldownOnDamage()
    • Number CItemDefinition:GetCooldownTime()
    • Number CItemDefinition:GetCost()
    • Boolean CItemDefinition:GetDeferChannelCost()
    • Boolean CItemDefinition:GetDeferChannelImpact()
    • Boolean CItemDefinition:GetDestroyOnEmpty()
    • Boolean CItemDefinition:GetDisabled()
    • String CItemDefinition:GetDisplayName()
    • Boolean CItemDefinition:GetDoubleActivate()
    • Boolean CItemDefinition:GetDropOnDeath()
    • Number CItemDefinition:GetForceRange()
    • Boolean CItemDefinition:GetFrontQueue()
    • Boolean CItemDefinition:GetIgnoreCooldown()
    • Boolean CItemDefinition:GetIgnoreInvulnerable()
    • Number CItemDefinition:GetInitialCharges()
    • Number CItemDefinition:GetInitialStock()
    • Boolean CItemDefinition:GetIsChanneling()
    • Number CItemDefinition:GetLineCastMaxRange()
    • Number CItemDefinition:GetLineCastRange()
    • Number CItemDefinition:GetLineCastWidth()
    • Number CItemDefinition:GetManaCost()
    • Number CItemDefinition:GetMaxLevel()
    • Number CItemDefinition:GetMaxOwned()
    • Number CItemDefinition:GetMaxStock()
    • Number CItemDefinition:GetMinRange()
    • String CItemDefinition:GetName()
    • Boolean CItemDefinition:GetNeedVision()
    • Boolean CItemDefinition:GetNew()
    • Boolean CItemDefinition:GetNoDrop()
    • Boolean CItemDefinition:GetNonInterrupting()
    • Boolean CItemDefinition:GetNoPurchase()
    • Boolean CItemDefinition:GetNoRangeClamp()
    • Boolean CItemDefinition:GetNoSell()
    • Boolean CItemDefinition:GetNoStash()
    • Boolean CItemDefinition:GetNoStun()
    • Boolean CItemDefinition:GetNoTargetIgnoreInvulnerable()
    • Boolean CItemDefinition:GetNoTurnToTarget()
    • Number CItemDefinition:GetRange()
    • Number CItemDefinition:GetRangeBuffer()
    • Boolean CItemDefinition:GetRechargeable()
    • Number CItemDefinition:GetRestockDelay()
    • Number CItemDefinition:GetTargetRadius()
    • Number CItemDefinition:GetToggleOffCooldownTime()
    • Number CItemDefinition:GetToggleOffManaCost()
    • Number CItemDefinition:GetTotalCost([nIndex = 0])
    • Number CItemDefinition:GetTriggeredManaCost()
    • Number CItemDefinition:GetTypeID()
    • Boolean CItemDefinition:GetUnkillable()
    • Boolean CItemDefinition:GetUsePathForRange()
    • Boolean CItemDefinition:IsValid()


    IEntityItem members

    • Boolean IEntityItem:CanActivate()
    • Boolean IEntityItem:CanDrop()
    • Boolean IEntityItem:CanUse()
    • Number IEntityItem:GetActiveManaCost()
    • String IEntityItem:GetActiveModifierKey()
    • Boolean IEntityItem:GetAllowAutoCast()
    • Boolean IEntityItem:GetAllowDisassemble()
    • Boolean IEntityItem:GetAllowOutOfBoundsCast()
    • Boolean IEntityItem:GetAllowOutOfRangeCast()
    • Boolean IEntityItem:GetAllowSharing()
    • Boolean IEntityItem:GetAllowTransfer()
    • Number IEntityItem:GetAreaCastRange()
    • Boolean IEntityItem:GetAutoAssemble()
    • Boolean IEntityItem:GetAutoRecharge()
    • Boolean IEntityItem:GetAutoToggleOffWhenDisabled()
    • Boolean IEntityItem:GetAutoToggleOffWithTriggeredManaCost( )
    • Boolean IEntityItem:GetBindOnPickup()
    • Number IEntityItem:GetCastActionTime()
    • Number IEntityItem:GetCastTime()
    • String IEntityItem:GetCategory()
    • Number IEntityItem:GetChannelRange()
    • Number IEntityItem:GetChannelTime()
    • Number IEntityItem:GetChargeCost()
    • Number IEntityItem:GetCharges()
    • Table{itemdef} IEntityItem:GetComponents()
    • Number IEntityItem:GetConeCastRange()
    • Number IEntityItem:GetConeCastWidth()
    • Number IEntityItem:GetCooldownOnDamage()
    • Number IEntityItem:GetCooldownTime()
    • Number IEntityItem:GetCost()
    • Boolean IEntityItem:GetDeferChannelCost()
    • Boolean IEntityItem:GetDeferChannelImpact()
    • Boolean IEntityItem:GetDestroyOnEmpty()
    • Boolean IEntityItem:GetDisabled()
    • Boolean IEntityItem:GetDoubleActivate()
    • Boolean IEntityItem:GetDropOnDeath()
    • Number IEntityItem:GetForceRange()
    • Boolean IEntityItem:GetFrontQueue()
    • Boolean IEntityItem:GetIgnoreCooldown()
    • Boolean IEntityItem:GetIgnoreInvulnerable()
    • Number IEntityItem:GetInitialCharges()
    • Number IEntityItem:GetInitialStock()
    • Boolean IEntityItem:GetIsChanneling()
    • itemdef IEntityItem:GetItemDefinition()
    • Number IEntityItem:GetLevel()
    • Number IEntityItem:GetLineCastMaxRange()
    • Number IEntityItem:GetLineCastRange()
    • Number IEntityItem:GetLineCastWidth()
    • Number IEntityItem:GetManaCost()
    • Number IEntityItem:GetMaxCharges()
    • Number IEntityItem:GetMaxLevel()
    • Number IEntityItem:GetMaxStock()
    • Number IEntityItem:GetMinRange()
    • Boolean IEntityItem:GetNeedVision()
    • Boolean IEntityItem:GetNoDrop()
    • Boolean IEntityItem:GetNonInterrupting()
    • Boolean IEntityItem:GetNoPurchase()
    • Boolean IEntityItem:GetNoRangeClamp()
    • Boolean IEntityItem:GetNoSell()
    • Boolean IEntityItem:GetNoStash()
    • Boolean IEntityItem:GetNoStun()
    • Boolean IEntityItem:GetNoTargetIgnoreInvulnerable()
    • Boolean IEntityItem:GetNoTurnToTarget()
    • Number IEntityItem:GetRange()
    • Number IEntityItem:GetRangeBuffer()
    • Boolean IEntityItem:GetRechargeable()
    • Number IEntityItem:GetRemainingCooldownTime()
    • Number IEntityItem:GetRestockDelay()
    • Number IEntityItem:GetSlot()
    • Number IEntityItem:GetTargetRadius()
    • Number IEntityItem:GetToggleOffCooldownTime()
    • Number IEntityItem:GetToggleOffManaCost()
    • Number IEntityItem:GetTotalCost()
    • Number IEntityItem:GetTriggeredManaCost()
    • Number IEntityItem:GetType()
    • String IEntityItem:GetTypeName()
    • Boolean IEntityItem:GetUnkillable()
    • Boolean IEntityItem:GetUsePathForRange()
    • Number IEntityItem:GetValue()
    • Boolean IEntityItem:IsActive()
    • Boolean IEntityItem:IsRecipe()
    • Boolean IEntityItem:IsValid()


    CBotBrain members

    • Boolean CBotBrain:CanSeeUnit(unitTarget)
    • Boolean CBotBrain:CanSelectHero(sHeroName)
    • void CBotBrain:Chat(sText)
    • void CBotBrain:ChatTeam(sText)
    • Number CBotBrain:GetGold()
    • Number CBotBrain:GetGoldEarned()
    • Number CBotBrain:GetGPM()
    • unit CBotBrain:GetHeroUnit()
    • String CBotBrain:GetName()
    • String CBotBrain:GetPotentialHero()
    • Number CBotBrain:GetTeam()
    • Boolean CBotBrain:HasSelectedHero()
    • Boolean CBotBrain:IsHeroLocked()
    • void CBotBrain:Order(Unit unit, String order, String queue = "none")
    • void CBotBrain:OrderAbility(Ability ability, [bool queueCommand = false])
    • void CBotBrain:OrderAbility2(Ability ability, [bool queueCommand = false])
    • void CBotBrain:OrderAbilityEntity(Ability ability, Unit target, [bool queueCommand = false])
    • void CBotBrain:OrderAbilityPosition(Ability ability, Vector3 pos, [bool queueCommand = false])
    • void CBotBrain:OrderAbilityVector(Ability ability, Vector3 startPos, Vector3 endPos, [bool queueCommand = false])
    • void CBotBrain:OrderEntity(Unit unit, String order, [Unit target = NULL, String queue = "none", Item item = NULL, bool useDirectPathing = false])
    • void CBotBrain:OrderItem(Item item, [bool queueCommand = false])
    • void CBotBrain:OrderItem2(Item item, [bool queueCommand = false])
    • void CBotBrain:OrderItemEntity(Item item, Unit target, [bool queueCommand = false])
    • void CBotBrain:OrderItemPosition(Item item, Vector3 pos, [bool queueCommand = false])
    • void CBotBrain:OrderItemVector(Item item, Vector3 startPos, Vector3 endPos, [bool queueCommand = false])
    • void CBotBrain:OrderPosition(Unit unit, String order, Vector3 position, [String queue = "none", Item item = NULL, bool useDirectPathing = false])
    • void CBotBrain:Ready()
    • void CBotBrain:SelectHero(sHeroName)
    • void CBotBrain:SelectPotentialHero(sHeroName)
    • void CBotBrain:SendBotMessage(bAllChat, sMessageKey, tMessageTokens)
    • void CBotBrain:ShareControl(player, bShare, bFullControl)



    There is also a ton of useful functions in the scripts themselves (such as those in core and botbraincore), and on the snippets subforum.
    Last edited by malloc; 02-18-2013 at 04:50 PM. Reason: added HoN.GetRemainingPreMatchTime()

    S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
    -----------------------------



  2. #2
    Hi Malloc, I was wondering if there is a timeline for when the documentation will be available for the listed functions? I always find it very useful to have API documentation available when I need it.

    Thanks,
    BranigansLaw
    Last edited by BranigansLaw; 02-01-2013 at 05:03 AM.

  3. #3
    Will you ever make a compendium of sorts that will at least give the brief detail of what each or each group of functions do?

  4. #4
    Offline
    Account Icon
    Join Date
    Nov 2011
    Posts
    379
    a short comment above each of the different groups of commands would do for it me, just stuff like IUnitEntity - what is that ?


    I look up Entity on wiki and get this, not helpful to me - the context of programming - what does it do, obviously i could start debugging to figure it out, then again I know some of you guys know, so you could share with the rest of us

    An entity is something that exists by itself, although it need not be of material existence. In particular, abstractions and legal fictions are usually regarded as entities. In general, there is also no presumption that an entity is animate.
    In business, an entity is a person, department, team, corporation, cooperative, partnership, or other group with whom it is possible to conduct business
    Last edited by minus10; 02-04-2013 at 05:14 AM.

  5. #5
    Quote Originally Posted by minus10 View Post
    IUnitEntity - what is that ?
    If something is an IUnitEntity, that's basically the same as saying that is a unit. Whether that unit be a creep, hero, building, neutral, or whatever.
    So say you have a unit stored in a variable called unitAwesome. You could then say:
    nHealth = unitAwesome:GetHealth()
    

    Now you would have the health of the unit stored in nHealth.

  6. #6
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Aug 2010
    Location
    Germany, Bavaria
    Posts
    903
    ^ local unitSelf = core.unitSelf
    This would be your bots unit, its a IUnitEntity, you can use all the functions listed like MidSpeck explained.
    If you see me talking about bots, be aware im not a S2 representative.

    -------

    Take a look at my lua tutorial series i made especially for bots

    -------

    Take a look at my mods
    or/and follow me on Twitter for Mod-Updates and News
    Now enjoy the improved HoN!

    ---

    I'm lazy.

  7. #7
    Can we sticky this or something? It is one of the most important posts currently and id hate for it to get buried.

  8.   Click here to go to the next staff post in this thread.   #8
    Offline
    S2 Staff Member S2 Games Staff
    Join Date
    Aug 2011
    Posts
    408
    Quote Originally Posted by Spennerino View Post
    Can we sticky this or something? It is one of the most important posts currently and id hate for it to get buried.
    Stuck. Sorry it wasn't before.

    I'll see if I can get someone who is better at formatting than I to make the post a little nicer.

    Edit: Inomares is a boss.
    Last edited by malloc; 02-05-2013 at 03:52 PM.

    S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
    -----------------------------



  9. #9
    This is amazing, Thank you!

  10. #10
    Can we get this in the form of a Wiki? I would love to get something like this as people learn what all the available methods do. That has always been a great resource while I was developing WoW mods.
    Last edited by Zerotorescue; 02-05-2013 at 04:40 PM.

  11. #11
    It seems to be somewhat off?

    I mean the stuff under IUnitEntity are items entity functions instead.

  12. #12
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Aug 2010
    Location
    Germany, Bavaria
    Posts
    903
    You're right, some headlines are wrong.
    Told the mods about it, concider it done, thx for report
    If you see me talking about bots, be aware im not a S2 representative.

    -------

    Take a look at my lua tutorial series i made especially for bots

    -------

    Take a look at my mods
    or/and follow me on Twitter for Mod-Updates and News
    Now enjoy the improved HoN!

    ---

    I'm lazy.

  13. #13
    Offline
    S2 Staff Member S2 Games Staff
    Join Date
    Sep 2011
    Posts
    5,003
    Should be fixed now, my bad!

    S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
    -----------------------------


    Customer & Tech Support
    Also available by emailing support@heroesofnewerth.com!

    Eric S. | Remote Quality Assurance


  14. #14
    String IEntityItem:GetActiveModifierKey() seems to be missing from this list

    also the Updated comment is inaccurate (nit picky):

    Quote Originally Posted by malloc View Post
    (Updated 1/3/13)
    Quote Originally Posted by malloc View Post
    Last edited by malloc; Today at 06:56 PM.
    Last edited by Spennerino; 02-07-2013 at 04:28 PM.

  15. #15
    I got a question regarding functions like

    void CBotBrain:OrderPosition(Unit unit, String order, Vector3 position, [String queue = "none", Item item = NULL, bool useDirectPathing = false])

    are those optional parameters one block, or are they optional on their own?
    Is it possible to do something like

    CBotBrain:OrderPosition(theUnit, theOrder, thePosition, nil, nil, true)

    or do I have to include a parameter for queue and item, if I want to set useDirectPathing?

  16.   This is the last staff post in this thread.   #16
    Offline
    S2 Staff Member S2 Games Staff
    Join Date
    Aug 2011
    Posts
    408
    Quote Originally Posted by tchackie View Post
    I got a question regarding functions like

    void CBotBrain:OrderPosition(Unit unit, String order, Vector3 position, [String queue = "none", Item item = NULL, bool useDirectPathing = false])

    are those optional parameters one block, or are they optional on their own?
    Is it possible to do something like

    CBotBrain:OrderPosition(theUnit, theOrder, thePosition, nil, nil, true)

    or do I have to include a parameter for queue and item, if I want to set useDirectPathing?
    Each optional on their own, and your code is valid.

    The order functions are direct interfaces to the C++ functions of the same name, but they're kind of weird. That's why I wrote the wrappers in botbraincore, to make it easier to use them. Feel free to use either though.

    S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
    -----------------------------



  17. #17
    The list is missing HoN.GetRemainingPreMatchTime()

  18. #18
    Now that Honpedia can be edited by anyone I started transferring this list to the Wiki. Here's the start:

    http://hon.gamepedia.com/Bot_API

  19. #19
    Is there any way of seeing the states/debuffs of an IUnitEntity, and their remaining duration?
    So, e.g. to see how long a unit is going to remain stunned, and make decision based on that?

    As far as I see, there are only IsStunned() and so on, but well, I started development today, so I could have missed that ;P

  20. #20
    Pretty sure there isn't A very small amount of information can be queried by bots about what enemy hero abilities or their buffs/debuffs do. I made an API request involving this a long time ago but I'm guessing it would be a considerable amount of work to get this implemented for a low payout. But don't quote me on that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •