Table of Contents

Class AutomaticHero

Namespace
GrindFest.BotApi
Assembly
GrindFest.dll

Base class for all bots

public abstract class AutomaticHero : MonoBehaviour
Inheritance
object
Object
Component
Behaviour
MonoBehaviour
AutomaticHero
Derived

Fields

AttackTarget
Party
PickUpDistance

Properties

CurrentArea
Equipment

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

Health
Inventory

Gets all the items in the hero's inventory

IsBotting
IsSelected
MaxHealth

Methods

AttackNearestEnemy(int)

Attack the nearest enemy

BuyStat(Stat, int)
DrinkHealthPotion()

Start drinking a health potion if the hero has one

Equip(ItemBehaviour)

Equip an item, picking it up if necessary

FindItemInInventory(string, bool)

Finds an item in the inventory by name

FindItemsOnGround(string, string, string, float)

Finds items on the ground by name. If no name is provided, all items are returned

FindNearestEnemy(float)

Returns a list of nearby enemies

FindNearestItem(string, string, string, float)

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

Follow(GameObject, float)
FollowCursor()

Makes your hero follow the mouse cursor

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)
GoToAnd(Vector3, float, Func<bool>)
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.

RunAroundInAreaAndAttack()

Makes your hero run around and attack enemies in the area

RunAwayFromNearestEnemy(float)
RunInDirection(Direction)
Say(string)
SayTo(string, Transform)

Say something

StopRunningAround()
Think(string, ValidateResultDelegate<string>, Func<string, string>)

Uses LLM to think