Table of Contents

Method GoToArea

Namespace
GrindFest
Assembly
GrindFest.dll

GoToArea(string)

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

public static void GoToArea(string areaName)

Parameters

areaName string

Name of the target area to move to

Remarks

This method handles pathfinding between different areas using waypoints. The hero will automatically find the best path and follow waypoints to reach the destination.

Basic area navigation:
if (Hero.CurrentArea?.Root.Name != "Stony Plains")
{
    Hero.GoToArea("Stony Plains");
}
else
{
    Hero.RunAroundInAreaAndAttack();
}
Area-specific farming with safety checks:
if (Hero.CurrentArea?.Root.Name != "Stony Plains")
{
    Hero.GoToArea("Stony Plains");
}
else
{
    if (Hero.Health < Hero.MaxHealth * 0.6f && Hero.HasHealthPotion())
    {
        Hero.DrinkHealthPotion();
        Hero.RunAwayFromNearestEnemy();
    }
    else if (!Hero.AttackNearestEnemy())
    {
        Hero.RunAroundInArea();
    }
}