local spells = {
[1] = { --sorcerer
level = {
[1] = {"utevo lux", "exura", "adori"},
[40] = {"exevo gran mas vis"}
}
},
[2] = { --druid
level = {
[1] = {"utevo lux", "exura", "adori"},
[28] = {"exevo gran mas pox"}
}
},
[3] = { --paladin
level = {
[1] = {"utevo lux", "exura", "exevo con"},
[14] = {"exevo con vis"}
}
},
[4] = { --knight
level = {
[1] = {"utevo lux", "exura"},
[5] = {"exori"}
}
}
}
local vocs = {
{1,4,8},
{2,5,9},
{3,6,10},
{4,7,11}
}
local vocationSpells = {}
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == 7 then
for i, class in ipairs(vocs) do
if isInArray(class, getPlayerVocation(cid)) then
vocationSpells = spells
end
end
if vocationSpells == nil then
return false
end
local lvl = getPlayerMagLevel(cid)
local playerSpells = vocationSpells.level[lvl]
if #playerSpells == nil or #playerSpells == 0 then
return false
end
for x = 1, #playerSpells do
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "New spells for level["..lvl.."]: "..playerSpells[x]..".")
end
end
return true
end






info
Grupo: Campones
Registrado: 14/04/13
Posts: 89
Reputação: 0
Char no Tibia: GM Strikker
Alguém poderia passar esse script que foi feito pra 1x pra 0.4?
É um sistema de qnd passar de ml mostra msg dependendo do seu ml vai cada msg
local spells = { [1] = { --sorcerer level = { [1] = {"utevo lux", "exura", "adori"}, [40] = {"exevo gran mas vis"} } }, [2] = { --druid level = { [1] = {"utevo lux", "exura", "adori"}, [28] = {"exevo gran mas pox"} } }, [3] = { --paladin level = { [1] = {"utevo lux", "exura", "exevo con"}, [14] = {"exevo con vis"} } }, [4] = { --knight level = { [1] = {"utevo lux", "exura"}, [5] = {"exori"} } } } local vocs = { {1,4,8}, {2,5,9}, {3,6,10}, {4,7,11} } local vocationSpells = {} function onAdvance(player, skill, oldLevel, newLevel) if skill == 7 then for i, class in ipairs(vocs) do if isInArray(class, player:getVocation():getId()) then vocationSpells = spells[i] end end if vocationSpells == nil then return false end local lvl = player:getMagicLevel() local playerSpells = vocationSpells.level[lvl] if #playerSpells == nil or #playerSpells == 0 then return false end for x = 1, #playerSpells do player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "New spells for level["..lvl.."]: "..playerSpells[x]..".") end end return true end