HA

[Resolvido] ola tenho um server wodbo 8.54 mais ele n tem o comando !spells e nem !tecnicas

Por hangrys, 25 de abr. de 2014 em Resolvidos

5
1.3k
hangrysH
25 de abril de 2014 às 21:54

eu quero bota para o comando !tecnicas mais nem o comando !spells tem no server wodbo 8.54 para poder ver as magias dos personagens pff min ajudam....

Junior001J
25 de abril de 2014 às 22:08
Melhor resposta

vá em talckations/script e crie um arquivo chamado spells.lua e coloca esse script

function onSay(cid, words, param)

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,6120,text)
return TRUE
end

depois abra o talckations,xml e adiciona essa tag

	<talkaction words="!tecnicas" script="spells.lua"/>

e seja feliz :p

hangrysH
25 de abril de 2014 às 22:23

senpre ajudado vlw

Junior001J
25 de abril de 2014 às 22:26

Resolvido, Movido.

3 anos depois...
FrenviusF
29 de novembro de 2017 às 14:22
A questão neste tópico de suporte foi respondida e/ou o autor do tópico resolveu o problema. Este tópico está fechado e foi movido para Suporte - Resolvidos. Se você tiver outras dúvidas, crie um novo tópico.