No categories assigned

LUA:CanHarvest

LUA Functions: CanHarvest()

Checks to see if the given player has the skills to harvest the given ground spawn


Syntax

CanHarvest(param1, param2)


Parameters

Required - param1 (Spawn), param2 (Spawn)
param1 is the player who's skills we want to check
param2 is the ground spawn we want to check


Usage

function precast(Caster, Target)
	if IsGroundSpawn(Target) then
		return CanHarvest(Caster, Target)
	end
	
	return false
end

This spell will check to see if the player can harvest the ground spawn.

Notes

Returns true if the player has the skill

If it returns false this function will also send the message stating the skill needed