Você só quer retirar "tecnicas"?
É talkaction ou spell?
info
Grupo: Conde
Registrado: 04/08/12
Posts: 762
Reputação: +80

Você só quer retirar "tecnicas"?
É talkaction ou spell?
info
Grupo: Visconde
Registrado: 28/07/12
Posts: 273
Reputação: +26
Char no Tibia: Kisame of Tenebra

Não po seguinte, quando o player da "tecnicas" para ver as magias que pode usar la em baixo aparece umas 20 magia de level 500 ai eu removi elas do spells mas era spell de bixo ai os bixo n atacava ai eu coloquei denovo, ai tipo eu quiser q aparecese só a spell do char
ex: o cara usa tecnicas ai aparece spells do lv 5 ao 250 ai não aparece as spells dos monstros x;
info
Grupo: Conde
Registrado: 04/08/12
Posts: 762
Reputação: +80

Me manda o script.
Deve ser encontrado em data/talkactions/scripts.
info
Grupo: Conde
Registrado: 10/12/11
Posts: 962
Reputação: +99
Gênero: Masculino

tenta esse script ake
em talckactions scripts cria um arquivo. lua com o nome tecnicas e bota isso
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, 2175, text)
return TRUE
end
tag
<talkaction words="tecnicas" script="tecnicas.lua" />
info
Grupo: Visconde
Registrado: 28/07/12
Posts: 273
Reputação: +26
Char no Tibia: Kisame of Tenebra

Desculpe mais ainda continua dando o mesmo " erro " aparecendo as transform de level 500 que no caso são de monstros.
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, 2175, text)
return TRUE
end
Editado Agosto 10 por jhonatanp
info
Grupo: Conde
Registrado: 10/12/11
Posts: 962
Reputação: +99
Gênero: Masculino

então essas magias são para vocações
vc tentou usar o comando com um god ?? se s tente com um player
info
Grupo: Visconde
Registrado: 28/07/12
Posts: 273
Reputação: +26
Char no Tibia: Kisame of Tenebra

Intão eu loguei em um char de testes e mesmo assim aparece la Magia de Lvl 500 bla bla.
info
Grupo: Conde
Registrado: 04/08/12
Posts: 762
Reputação: +80

Manda seu spells.xml
info
Grupo: Conde
Registrado: 10/12/11
Posts: 962
Reputação: +99
Gênero: Masculino

então n sei desculpe mais n posso ajuda-lo
info
Grupo: Visconde
Registrado: 28/07/12
Posts: 273
Reputação: +26
Char no Tibia: Kisame of Tenebra

Ta ae lembrando que quando eu deletei as magias que estavam aparecendo no lv 500 os bixos que usam ela pararam de attacar.
<?xml version="1.0"?>
info
Grupo: Conde
Registrado: 04/08/12
Posts: 762
Reputação: +80

Abre talkactions.xml e me manda tudo que ta dentro.
Se localiza em: data/talkactions/talkactions.xml
info
Grupo: Visconde
Registrado: 28/07/12
Posts: 273
Reputação: +26
Char no Tibia: Kisame of Tenebra

<?xml version="1.0"?>
Olá, jhonatanp
Use o script abaixo:
local monsterSpells = {"Berserk"}
function onSay(cid, words, param, channel)
local count = getPlayerInstantSpellCount(cid)
local msg = ""
local spells = {}
for j = (count - 1), 0, -1 do
local spell = getPlayerInstantSpellInfo(cid, j)
if not isInArray(monsterSpells, spell.name) then
if spell.level > 0 then
if spell.manapercent > 0 then
spell.mana = (spell.manapercent / 100) * getCreatureMaxMana(cid)
end
table.insert(spells, spell)
end
end
end
table.sort(spells, function(a, b) return a.level < b.level end)
local level = -1
for index, spell in ipairs(spells) do
local line = ""
if level ~= spell.level then
if index > 1 then
line = "\n"
end
line = line .."Spells for Level ".. spell.level .."\n"
level = spell.level
end
msg = msg .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n"
end
doShowTextDialog(cid, 2175, msg)
end
Com uma pequena observação, você terá que colocar os NOMES das magias que você não quer que apareça no prompt do comando no array monsterSpells, por exemplo, quero que não apareça a magia Haste e Berserk, então:
local monsterSpells = {"Berserk", "Haste"}
Espero que tenha compreendido
Um grande abraço.
info
Grupo: Visconde
Registrado: 28/07/12
Posts: 273
Reputação: +26
Char no Tibia: Kisame of Tenebra
como tirar as skills de monstros do tecnicas ?
tenho fservidor de wodbo quando fala "tecnicas" aparece as magias so que aparece a dos bixo como retiro elas dali ?