Table of Contents

Class Hero

Namespace
GrindFest.BotApi
Assembly
GrindFest.dll
public static class Hero
Inheritance
object
Hero

Properties

Character
CurrentArea
Dexterity
Equipment

Access the hero's equipment to check what items are equipped or equip/unequip items

Health
Intelligence
Inventory

Gets all items in the hero's inventory as an enumerable collection.

Level
MaxHealth
Party
SelectedHero
SkillPoints
Skills
StatPoints
Strength

Methods

AttackNearestEnemy(int)

Attacks the nearest enemy within range using the hero's basic attack skill.

BuyStat(Stat, int)

Spends available stat points to increase a specific stat.

DrinkHealthPotion()

Start drinking a health potion if the hero has one

Equip(ItemBehaviour)

Equips an item, automatically picking it up from the ground if needed. Useful for gear management and automatic equipment upgrades.

FindItemInInventory(string, bool)

Finds an item in the inventory by name

FindItemsOnGround(string, string, string, float)

Returns a list of all items on the ground within range that match the specified name criteria.

FindNearestEnemy(float, float)

Finds the nearest hostile enemy within range that the hero can reach.

FindNearestItem(string, string, string, float)

Finds the nearest item on the ground that matches the specified name criteria.

Follow(GameObject, float)
FollowCursorAndAttack()

Makes your hero follow your mouse cursor and attack nearest enemies in a way

FollowFlags(Color)

Follow the flags of a certain color

GetFlagsByColor(Color)
GetRandomPointInArea()
GoTo(Vector3, float)

Moves the hero to a specific position in the world.

GoToAnd(Vector3, float, Func<bool>)

Moves to a position while performing an action.

GoToAndAttack(Vector3, float)
GoToArea(string)
HasHealthPotion()
HasManaPotion()
HealthPotionCount()
Idle()

Called once every second

LookAt(InteractiveBehaviour)
OnEnterArea(AreaBehaviour)
OnHear(SpeechBehaviour, string)
OnSay(string, Transform)
OpenInventory()
PickUp(ItemBehaviour)

Pick up an item, moving to it if necessary

ResetFlags()
RunAroundInArea()

Makes the hero run around randomly within the current area.

RunAroundInAreaAnd(Func<bool>)

Makes the hero run around in the current area while performing an action.

RunAroundInAreaAndAttack()

Makes your hero run around and attack enemies in the area automatically.

RunAwayFromNearestEnemy(float)
RunInDirection(Direction)
Say(string)

Makes the hero say something. Useful for debugging, casting spells, and giving commands.

SayTo(string, Transform)
StopMoving()
StopRunningAround()