Ir para conteúdo

Featured Replies

Postado

Acho que isso resolve:
 

local spells = {
    [1] = { --sorcerer
        level = {
            [1] = "utevo lux", "exura", "adori",
            [40] = "exevo gran mas vis"
        }
    },
    
    [2] = { --druid
        level = {
            [1] = "utevo lux", "exura", "adori",
            [28] = "exevo gran mas pox"
        }
    },
    
    [3] = { --paladin
        level = {
            [1] = "utevo lux", "exura", "exevo con",
            [14] = "exevo con vis"
        }
    },
    
    [4] = { --knight
        level = {
            [1] = "utevo lux", "exura",
            [5] = "exori"
        }
    }
}

local array_sorc = {"Sorcerer", "Master Sorcerer", "Epic Sorcerer"}
local array_druid = {"Druid", "Elder Druid", "Epic Druid"}
local array_paladin = {"Paladin", "Royal Paladin", "Epic Paladin"}
local array_knight = {"Knight", "Elite Knight", "Epic Knight"}
local text = ""

function onAdvance(cid, skill, oldLevel, newLevel)
    if skill == SKILL__MAGLEVEL then

        if isInArray(array_sorc, getPlayerVocationName(cid)) then
            CONFIG = spells[1]
        elseif isInArray(array_druid, getPlayerVocationName(cid)) then
            CONFIG = spells[2]
        elseif isInArray(array_paladin, getPlayerVocationName(cid)) then
            CONFIG = spells[3]
        elseif isInArray(array_knight, getPlayerVocationName(cid)) then
            CONFIG = spells[4]
        end
        
        if not CONFIG then return false end
        EVENT = CONFIG.level[getPlayerSkillLevel(cid, 7)]
        if not EVENT then
            return false
        end
        for i, v in ipairs(EVENT) do
            text = text..""..i..", "
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "New spells: "..text.."")
    end
    return true
end
  • Respostas 6
  • Visualizações 537
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Acho que isso resolve:   local spells = { [1] = { --sorcerer level = { [1] = "utevo lux", "exura", "adori", [40] = "exevo gran mas vis" } },

  • aqui tem tudo que vc precisa http://www.tibiaking.com/forum/topic/49941-spell-info-ao-avan%C3%A7ar-o-level  leia os comentários

  • esse script q vc postou tá certo, só q ele é pra tfs 1.0+, o seu é 0.36~0,4?

Postado
  • Autor

 

Acho que isso resolve:

 

local spells = {
    [1] = { --sorcerer
        level = {
            [1] = "utevo lux", "exura", "adori",
            [40] = "exevo gran mas vis"
        }
    },
    
    [2] = { --druid
        level = {
            [1] = "utevo lux", "exura", "adori",
            [28] = "exevo gran mas pox"
        }
    },
    
    [3] = { --paladin
        level = {
            [1] = "utevo lux", "exura", "exevo con",
            [14] = "exevo con vis"
        }
    },
    
    [4] = { --knight
        level = {
            [1] = "utevo lux", "exura",
            [5] = "exori"
        }
    }
}

local array_sorc = {"Sorcerer", "Master Sorcerer", "Epic Sorcerer"}
local array_druid = {"Druid", "Elder Druid", "Epic Druid"}
local array_paladin = {"Paladin", "Royal Paladin", "Epic Paladin"}
local array_knight = {"Knight", "Elite Knight", "Epic Knight"}
local text = ""

function onAdvance(cid, skill, oldLevel, newLevel)
    if skill == SKILL__MAGLEVEL then

        if isInArray(array_sorc, getPlayerVocationName(cid)) then
            CONFIG = spells[1]
        elseif isInArray(array_druid, getPlayerVocationName(cid)) then
            CONFIG = spells[2]
        elseif isInArray(array_paladin, getPlayerVocationName(cid)) then
            CONFIG = spells[3]
        elseif isInArray(array_knight, getPlayerVocationName(cid)) then
            CONFIG = spells[4]
        end
        
        if not CONFIG then return false end
        EVENT = CONFIG.level[getPlayerSkillLevel(cid, 7)]
        if not EVENT then
            return false
        end
        for i, v in ipairs(EVENT) do
            text = text..""..i..", "
        end
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "New spells: "..text.."")
    end
    return true
end

 

De novo rodou sem erros, mas na hora de executar, peguei ml de 5 ao 80 num sorcerer e nenhuma mensagem foi mostrada...

 

Alguém sabe corrigir esse script ou fazer com que o outro rode em meu servidor?

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