Ir para conteúdo

Featured Replies

Postado

Oi galera Estou vendo este script

 

 

Ele pode ser modificado para ser diferentes prêmios de vocações?

tente mas nao funciona 

 

local rewards = {
    SORCERER = {
    [10] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40000},
    [20] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40001},
    },
 
    DRUID = {
    [10] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40002},
    [20] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40003},
    },
 
    PALADIN = {
    [10] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40004},
    [20] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40005},
    },
 
    KNIGHT = {
    [10] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40006},
    [20] = {items = {
            [1] = {itemid = 1111, count = 1},
            [2] = {itemid = 1111, count = 1}
            }, storage = 40007},
    }
}
 
local sorc = {1, 5, 9}
local druid1 = {2, 6, 10}
local paladin1 = {3, 7, 11}
local knight1 = {4, 8, 12}
local magicEffect_reward = 14
function onAdvance(player, skill, oldlevel, newlevel)
         if skill ~= SKILL__LEVEL then
             return true
         end
   
        if isInArray(sorc, player:getVocation():getId()) then
            VOC = rewards.SORCERER
        elseif isInArray(druid1, player:getVocation():getId()) then
            VOC = rewards.DRUID
        elseif isInArray(paladin1, player:getVocation():getId()) then
            VOC = rewards.PALADIN
        elseif isInArray(knight1, player:getVocation():getId()) then
            VOC = rewards.KNIGHT
        end
   
        if not VOC then return true end
   
        REWARD = VOC[newlevel]
   
        if not REWARD then return true end
   
        if player:getStorageValue(REWARD.storage) == nil then
            for i = 1, #REWARD.items do
                player:addItem(REWARD.items[i].itemid, rewards.items[i].count)
            end
            player:setStorageValue(REWARD.items[i].storage, 1)
            player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Congratulations, you have reached level "..player:getLevel().." and received your rewards.")
            player:getPosition():sendMagicEffect(magicEffect_reward)
        end
     
return true
end

 

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

Informação Importante

Confirmação de Termo