local config = {
mLevel = 80,
fist = 50,
club = 60,
sword = 60,
axe = 70,
dist = 70,
shield = 121,
fishing = 91,
storageKey = 12345
storageValue = 1
}
function onAdvance(player, skill, oldLevel, newLevel)
if player:getStorageValue(config.storageKey) then
return true
end
if player:getMagicLevel() == config.mLevel
and player:getSkillLevel(SKILL_FIST) == config.fist
and player:getSkillLevel(SKILL_CLUB) == config.club
and player:getSkillLevel(SKILL_SWORD) == config.sword
and (
player:getSkillLevel(SKILL_AXE) == config.axe or
player:getSkillLevel(SKILL_DISTANCE) == config.dist
)
and player:getSkillLevel(SKILL_SHIELD) == config.shield
and player:getSkillLevel(SKILL_FISHING) == config.fishing
then
player:setStorageValue(config.storageKey, config.storageValue)
player:getPosition():sendMagicEffect(2)
end
return true
end