No categories assigned

LUA:CanHarvest

Revision as of 18:39, 9 September 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: CanHarvest() = Checks to see if the given player has the skills to harvest the given ground spawn ==== Syntax ==== CanHarvest(param1, param2) ==== Parameters...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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