So coloquei nome, level, health e mana caso você queria outro é so fala
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = {}
for i = 0, getPlayerInstantSpellCount(cid) - 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 text, 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, item.itemid, 'Nome : '..getCreatureName(cid)..' \nLevel : '..getPlayerLevel(cid)..' \nHealth : ['..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..'] \nMana: ['..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..'] \n \n'..text..'') -- é aqui onde adiciona mais
return true
end





info
Grupo: Visconde
Registrado: 26/04/08
Posts: 251
Reputação: +36
Gênero: Masculino
Char no Tibia: Senhor Mithril
Olá, gostaria de pedir uma script que seja um parchment ou um pergaminho que quando usar ele ele mostra como se fosse um livro
escrito o nome do player
mana
health
etc.
E que nesse script mostrasse as magias que ele tem no pergaminho.
Desde já, grato pela atenção
Seria mais ou menos um spellbook só que mostrando mais informações sobre o player
Vou postar a script do spellbook aqui caso ajude.
Editado Junho 22 por Fjinst