Ir para conteúdo
Banner com Efeitos

Featured Replies

Resolvido por KotZletY

Ir para solução
Postado
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
  • 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)

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • 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.

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.6k

Informação Importante

Confirmação de Termo