Skip to content

Vocation

Vocation Class

The Vocation class represents player vocations (Knight, Sorcerer, etc.).

Constructor

Vocation(id)
Vocation(name)

Methods

MethodReturnsDescription
getId()numberVocation ID
getClientId()numberClient vocation ID
getName()stringVocation name
getDescription()stringDescription
getPromotion()VocationPromoted vocation
getBaseId()numberBase vocation ID
getFromVocation()VocationBase vocation
getRequiredManaSpent(magLevel)numberMana for magic level
getRequiredSkillTries(skill, level)numberTries for skill
getCapacityGain()numberCapacity per level
getHealthGain()numberHP per level
getHealthGainTicks()numberHP regen interval
getHealthGainAmount()numberHP regen amount
getManaGain()numberMana per level
getManaGainTicks()numberMana regen interval
getManaGainAmount()numberMana regen amount
getMaxSoul()numberMaximum soul
getSoulGainTicks()numberSoul regen interval
getAttackSpeed()numberAttack speed
getBaseSpeed()numberBase movement speed
getDemotion()VocationDemoted vocation
local voc = player:getVocation()
print("Vocation: " .. voc:getName())
print("HP per level: " .. voc:getHealthGain())
-- Get promotion
local promo = voc:getPromotion()
if promo then
print("Promotes to: " .. promo:getName())
end