Ir para conteúdo

Featured Replies

Postado

E ae galera, vcs tão bem?

Então, como vocês viram no titulo, eu preciso de um script que limite de um char lvl 8 fique com 120 de skill.

 

Gostaria de que fosse no estilo.

Do level 1 ao 30, o máximo de qualquer skill se limite para 30.

Do level 31 ao 50, o máximo seria 50.

Do 61 ao 80, o máximo seria 75.

No level 80, o char adquire a profissão que você deseja ser.

Dentro da profissão terá varios ranks e esses ranks determinarão o limite de skill.

Mas isso é pra outra hora kkkk....

Quem estiver afim de entrar em contato comigo pra conversar sobre montar uma equipe é só me mandar uma mensagem.

No momento só preciso de um script que vá até level 80.

Obrigado a atenção. 

Boa noite.

 

Resolvido por Dwarfer

Ir para solução
  • Respostas 6
  • Visualizações 643
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Em creaturescripts/scripts crie um arquivo:   limitskill.lua     No login.lua, adicione: registerCreatureEvent(cid, "LimitSkill")   Crie outro arquivo.lua em creat

Postado
  • Solução

Em creaturescripts/scripts crie um arquivo:

 

limitskill.lua

 

Spoiler

local t = {
{level = {1, 30}, max = 30},
{level = {31,60}, max = 50},
{level = {61,80}, max = 75}
}

function onAdvance(cid, skill, oldLevel, newLevel)
local level, skills = getPlayerLevel(cid), {SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD} 
    for i, k in pairs(t) do
        if skill == SKILL__LEVEL and newLevel == k.level[1] then
            for i = 0, 5 do
                setPlayerStorageValue(cid, 19870 + i, -1)
                doPlayerSetRate(cid, i, getConfigValue('rateSkill')) 
            end
        end
        if level >= k.level[1] and level <= k.level[2] then
            if isInArray(skills, skill) and newLevel >= k.max then
                doPlayerSetRate(cid, skill, 0.0)
                doPlayerSave(cid)
                setPlayerStorageValue(cid, 19870 + skill, 1)
                return false
            end
        end
    end
return true
end

 

 

No login.lua, adicione: registerCreatureEvent(cid, "LimitSkill")

 

Crie outro arquivo.lua em creaturescripts/scripts:

 

checklimit.lua

 

function onLogin(cid)
    for i = 0, 5 do
        if getPlayerStorageValue(cid, 19870 + i) == 1 then
            doPlayerSetRate(cid, i, 0.0)
        end
    end
return true
end

Adicione as tags no creaturescripts.xml:

 

 <event type="advance" name="LimitSkill" event="script" value="limitskill.lua"/>
 <event type="login" name="CheckLimit" event="script" value="checklimit.lua"/>

 

Editado por Dwarfer (veja o histórico de edições)

Contato:

 

Postado
  • Autor
3 horas atrás, Dwarfer disse:

Em creaturescripts/scripts crie um arquivo:

 

limitskill.lua

 

  Mostrar conteúdo oculto


local t = {
{level = {1, 30}, max = 30},
{level = {31,60}, max = 50},
{level = {61,80}, max = 75}
}

function onAdvance(cid, skill, oldLevel, newLevel)
local level, skills = getPlayerLevel(cid), {SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD} 
    for i, k in pairs(t) do
        if skill == SKILL__LEVEL and newLevel == k.level[1] then
            for i = 0, 5 do
                setPlayerStorageValue(cid, 19870 + i, -1)
                doPlayerSetRate(cid, i, getConfigValue('rateSkill')) 
            end
        end
        if level >= k.level[1] and level <= k.level[2] then
            if isInArray(skills, skill) and newLevel >= k.max then
                doPlayerSetRate(cid, skill, 0.0)
                doPlayerSave(cid)
                setPlayerStorageValue(cid, 19870 + skill, 1)
                return false
            end
        end
    end
return true
end

 

 

No login.lua, adicione: registerCreatureEvent(cid, "LimitSkill")

 

Crie outro arquivo.lua em creaturescripts/scripts:

 

checklimit.lua

 


function onLogin(cid)
    for i = 0, 5 do
        if getPlayerStorageValue(cid, 19870 + i) == 1 then
            doPlayerSetRate(cid, i, 0.0)
        end
    end
return true
end

Adicione as tags no creaturescripts.xml:

 

 <event type="advance" name="LimitSkill" event="script" value="limitskill.lua"/>
 <event type="login" name="CheckLimit" event="script" value="checklimit.lua"/>

 

 

 

n consegui fazer nada kkkkkkk 

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