In player eventI would like to know if it is possible when i attack a training monk gain only 50% of the skill, as training offline
I am using OTX 3.9 based on TFS 1.2
Player:onGainSkillTries you can do something like this:local target = self:getTarget()
if target and target:getName() == "Training Monk" then
tries = math.ceil(tries / 2)
end
In player eventPlayer:onGainSkillTriesyou can do something like this:
LUA:local target = self:getTarget() if target and target:getName() == "Training Monk" then tries = math.ceil(tries / 2) end
function Player:onGainSkillTries(skill, tries)
local target = self:getTarget()
if target and target:getName() == "Training Monk" then
tries = math.ceil(tries / 2)
end
if APPLY_SKILL_MULTIPLIER == false then
return tries
end
if skill == SKILL_MAGLEVEL then
return tries * configManager.getNumber(configKeys.RATE_MAGIC)
end
return tries * configManager.getNumber(configKeys.RATE_SKILL)
end