Table of Contents

Class AutomaticHero

Namespace
_GrindFest.Scripts.BotApi
Assembly
GrindFest.dll

Base class for all bots

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

Fields

AttackTarget
PickUpDistance

Properties

CurrentArea
Health
Inventory

Gets all the items in the hero's inventory

IsBotting
IsSelected
MaxHealth
TopMostArea

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)
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)
HasHealthPotion()
HasManaPotion()
HealthPotionCount()
Idle()

Called once every second

LookAt(InteractiveBehaviour)
OnEnterArea(AreaBehaviour)
OnHear(SpeechBehaviour, string)
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()
RunAwayFromNearestEnemy(float)
RunInDirection(Direction)
Say(string, Transform)

Say something

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

Uses LLM to think