Class Hero
public static class Hero
- Inheritance
-
objectHero
Properties
- Equipment
Access the hero's equipment to check what items are equipped or equip/unequip items
- Inventory
Gets all items in the hero's inventory as an enumerable collection.
Methods
- AttackNearestEnemy(int)
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.
- FindNearestItem(string, string, string, float)
Finds the nearest item on the ground that matches the specified name criteria.
- FollowCursorAndAttack()
Makes your hero follow your mouse cursor and attack nearest enemies in a way
- FollowFlags(Color)
Follow the flags of a certain color
- 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.
- Idle()
Called once every second
- PickUp(ItemBehaviour)
Pick up an item, moving to it if necessary
- 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.
- Say(string)
Makes the hero say something. Useful for debugging, casting spells, and giving commands.