Pessoal tenho um ot server 8.50 SQL e quero por o comando !Spells para informar as magias e os levels dela.
Como se fosse um !notice mais em forma de !spells
Como faço isso?
obrigado.
Pessoal tenho um ot server 8.50 SQL e quero por o comando !Spells para informar as magias e os levels dela.
Como se fosse um !notice mais em forma de !spells
Como faço isso?
obrigado.
/data/talkactions/scripts/spells.lua
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 doPlayerPopupFYI(cid, text) return TRUE end
/data/talkactions/talkactions.xml
<talkaction words="!spells" event="script" value="spells.lua"/>
Este script foi feito pela equipe TFS, adaptado para funcionar com talkactions.
Mas, iRockStar. Isso eu tenho que mudar todas as magias ou ele automáticamente se adapta às magias do meu OT?
Alguns dos meus trabalhos no fórum
Projeto Tutores de Scripting (encerrado)
Evento Blood Castle Automático
Killua Task System
Killua Automatic Raids System
Função AccountStorageValue
Player Pull Action (puxar jogador)
NPC Trocador - Troca itens por outros (SIMPLIFICADO)
Teleportar Membros Da Guild Para Seu Lado
Itens Ganhando Exp e Upando (Upgrade System)
Como usar addEvent - Tutorial
Sistema de Cultivo (Plantação)
Cart System (Andar de carrinho)
Mas, iRockStar. Isso eu tenho que mudar todas as magias ou ele automáticamente se adapta às magias do meu OT?
Faço de suas palavras, as minhas.
Faço de suas palavras, as minhas.
Haha, que pena. Mas, independente disso essa talkaction nao está funcionando aqui. Deve ser por eu usar a versão 7.92 =~/
Alguns dos meus trabalhos no fórum
Projeto Tutores de Scripting (encerrado)
Evento Blood Castle Automático
Killua Task System
Killua Automatic Raids System
Função AccountStorageValue
Player Pull Action (puxar jogador)
NPC Trocador - Troca itens por outros (SIMPLIFICADO)
Teleportar Membros Da Guild Para Seu Lado
Itens Ganhando Exp e Upando (Upgrade System)
Como usar addEvent - Tutorial
Sistema de Cultivo (Plantação)
Cart System (Andar de carrinho)
Acho mais fácil você testar e ver, mais pelo que entendo de scripting acho que ele vai se adaptar somente as que o player pode usar. Por exemplo se ele for knight só vai aparecer as de knight e pro level dele.
Até mais.
Atenciosamente, Kaonic
Trabalhando para um futuro melhor do Xtibia - By Kaonic, não use sem colocar os créditos.
Email (não uso como msn): kaonic@xtibia.com
MSN: Envie MP
Mapping Teacher: Koddy
Copa XTibia Design - Participante #2 do Grupo A
/data/talkactions/scripts/spells.lua
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 doPlayerPopupFYI(cid, text) return TRUE end
/data/talkactions/talkactions.xml
<talkaction words="!spells" event="script" value="spells.lua"/>
Este script foi feito pela equipe TFS, adaptado para funcionar com talkactions.
Testei isso no meu slayer yurotss 8.50 e não pegou...
Eu falo o comando !spells mais não acontece simplesmente nada.