e ae pessoal!! vou ensinar vcs a colocarem a uma TalkAction
no seu ot 8.6 que serve para vcs verem o spellbook sem
precisar te-lo apenas digitando !spells.
1º: primeiramente va na pasta do seu ot vá em data/talkactions e clique no arquivo xml chamado talkactions (vc pode abri-lo com bloco de notas ou com OTScript Live!) adicione a linha de comando em player se preferir
<talkaction words="!spells" event="script" value="talkspellbook.lua"/>
obs*: coloque como os outros! salve e feche
2º: depois vá em data/talkactions/scripts copie e cole um arquivo .lua (formato LUA) renomeie para talkspellbook abra-o apague tudo e cole:
function onSay(cid, words, param, channel)
local count = getPlayerInstantSpellCount(cid)
local text = ""
local t = {}
for i = 0, count - 1 do
local spell = getPlayerInstantSpellInfo(cid, i)
if spell.level ~= 0 then
if spell.manapercent > 0 then
spell.mana = spell.manapercent .. "%"
end
table.insert(t, spell)
end
end
table.sort(t, function(a, b) return a.level < b.level end)
local prevLevel = -1
for i, spell in ipairs(t) do
local line = ""
if prevLevel ~= spell.level then
if i ~= 1 then
line = "\n"
end
line = line .. "Spells for Level " .. spell.level .. "\n"
prevLevel = spell.level
end
text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n"
end
doShowTextDialog(cid, words, text)
return TRUE
end
SALVE E Feche
agora abra seu ot e com qualquer player digite !spells que vai abri o spellbook! gente esse é meu primeiro post ake no tibia king espero que tenham gostado (clika em gostei pra me ajuda)