Table of Contents

Class AutomaticHero

Namespace
GrindFest
Assembly
GrindFest.dll

Base class for all bots

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

Fields

AttackTarget
Character
Hero
Party
PickUpDistance

Properties

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.

IsBotting
IsSelected
Level
MaxHealth
SkillPoints
Skills
StatPoints
Strength

Methods

AttackNearestEnemy(float)

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.

FindNearestInteractive(Predicate<InteractiveBehaviour>, float)
FindNearestInteractive(string, string, string, float)

Finds the nearest interactive object (like chests or shrines) that matches the name criteria.

FindNearestItem(string, string, string, float)
FindNearestItemOnGround(Predicate<ItemBehaviour>, float)
FindNearestItemOnGround(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)

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)

Moves to a position while attacking any enemies that come within range.

GoToArea(string)

Makes the hero navigate to a specific area in the game world.

HasHealthPotion()
HasManaPotion()
HealthPotionCount()
Idle(string)

A simple bot that handles basic combat, looting, and survival in a specified area. Call this method repeatedly to make your hero automatically fight and survive.

InteractWith(InteractiveBehaviour)

Makes the hero move to and interact with an interactive object like a chest, shrine, or NPC.

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)

Makes the hero run away from the nearest enemy.

RunInDirection(Direction)
Say(string)

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

SayTo(string, Transform)

Makes the hero say something to a specific target. Essential for targeted spells and commands.

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

Uses LLM to think