Table of Contents

Method RunAroundInAreaAnd

Namespace
GrindFest
Assembly
GrindFest.dll

RunAroundInAreaAnd(Func<bool>)

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

public static bool RunAroundInAreaAnd(Func<bool> action)

Parameters

action Func<bool>

Action to perform while running around. If action returns true, running stops.

Returns

bool

True if the action was completed, false if still running around

Remarks

This method is useful for combining area exploration with other activities.

Run around while picking up items:
Hero.RunAroundInAreaAnd(() => {
    var item = Hero.FindNearestItem("Gold");
    if (item != null)
    {
        return Hero.PickUp(item);
    }
    return false;
});