1
0
EQ2Emu/docs/lua_functions/CanHarvest.md
2025-05-13 22:57:49 -04:00

691 B
Raw Blame History

Function: CanHarvest(Player, GroundSpawn)

Description: Determines if the specified spawn (which should be a player) is currently able to harvest resources (i.e., not in combat and has the required skill/tool). This function checks general conditions for harvesting.

Parameters:

Player: Spawn  The player to check.
GroundSpawn: Spawn  The groundspawn to apply the check on.

Returns: Boolean true if the player can harvest at the moment; false if something prevents harvesting (lacking skill).

Example:

-- Example usage (before starting an auto-harvest routine, verify the player can harvest) if CanHarvest(Player, GroundSpawn) then Harvest(Player, GroundSpawn) end