Ir para conteúdo

Featured Replies

  • Respostas 21
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Postado
function onUse(cid, item, fromPosition, itemEx, toPosition)
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 .. "%"
spell.soul = getInstantSpellInfoByName(cid, soul)
spell.voc = getInstantSpellInfoByName(cid, vocationid)
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 .. " Palavra chave:" .. spell.words .. " - Nome da spell: " .. spell.name .. " Mana: " .. spell.mana .. " Soul:".. spell.soul .." Voc:".. spell.voc .."\n"
end
doShowTextDialog(cid, item.itemid, text)
return TRUE
end

Editado por Vinicius Xxgamexx (veja o histórico de edições)

Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais...

________________________________________________________________________________

Minhas Sprites:

Mega Metagross

Mega Abomasnow

Pack de Shinys

[Posso atualizá-lo com novos shinys a qualquer momento]

Tutoriais:

[Completo] Criando e adicionando um novo Pokémon

[Actions] Criando quest no RME

Editores Lua/Xml/Sync Entre outros:

Editores Win/Mac/Linux

Postado
  • Autor
function onUse(cid, item, fromPosition, itemEx, toPosition)local count = getPlayerInstantSpellCount(cid)local text = ""local t = {}for i = 0, count - 1 dolocal spell = getPlayerInstantSpellInfo(cid, i)if spell.level ~= 0 thenif spell.manapercent > 0 thenspell.mana = spell.manapercent .. "%"spell.soul = getInstantSpellInfoByName(cid, soul)spell.voc = getInstantSpellInfoByName(cid, vocationid)endtable.insert(t, spell)endendtable.sort(t, function(a, b) return a.level < b.level end)local prevLevel = -1for i, spell in ipairs(t) dolocal line = ""if prevLevel ~= spell.level thenif i ~= 1 thenline = "\n"endline = line .. "Spells for Level " .. spell.level .. "\n"prevLevel = spell.levelendtext = text .. line .. " Palavra chave:" .. spell.words .. " - Nome da spell: " .. spell.name .. " Mana: " .. spell.mana .. " Soul:".. spell.soul .." Voc:".. spell.voc .."\n"enddoShowTextDialog(cid, item.itemid, text)return TRUEend

Action? Usei em action e deu erro, e em talkaction não funcionou.

Editado por ScythePhantom (veja o histórico de edições)

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo