Postado Setembro 3, 2017 7 anos quero tirar o comando tecnicas , ao invés disso, quero um item que mostre as magias acho mais prático, alguém pra me ajudar?
Postado Setembro 3, 2017 7 anos 3 horas atrás, Suckie disse: quero tirar o comando tecnicas , ao invés disso, quero um item que mostre as magias acho mais prático, alguém pra me ajudar? Post o script de técnicas aqui que eu vejo em que posso te ajudar.
Postado Setembro 3, 2017 7 anos Solução data/actions/scripts e cria um arquivo.lua e adicionem esse code: Spoiler 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, text) return true end data/actions e abram o arquivo actions.xml e adicionem essa tag: <action itemid="XXXX" event="script" value="other/spellbook.lua"/> XXXX é o id do item que ao ser clicado vai mostrar os jutsus(spells)
Postado Setembro 4, 2017 7 anos Autor 2 horas atrás, KotZletY disse: data/actions/scripts e cria um arquivo.lua e adicionem esse code: Mostrar conteúdo oculto 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, text) return true end data/actions e abram o arquivo actions.xml e adicionem essa tag: <action itemid="XXXX" event="script" value="other/spellbook.lua"/> XXXX é o id do item que ao ser clicado vai mostrar os jutsus(spells) pior que eu já tinha kk, mas só fui saber com sua ajuda valeu men
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.