LE

[Script] Bloquear Limite de Skills

Por LeoTK, 06 de jul. de 2017 em CreatureScripts e Movements

19
6.2k
LeoTKL
06 de julho de 2017 às 21:36
Agora, leozinpbb disse:

no caso do magic level posso aumenta pra 200?

se o seu magic level chegar lá porque geralmente o maximo de magic level padrão das sorucers é 156 

PoccnnP
07 de julho de 2017 às 07:26
9 horas atrás, Brunds disse:

vixi mano eu fico constantemente entrando em vários tópico agora não lembro de qual é esse kkk se não me engano peguei do outro fórumzinho xD

Verifique. Pois os creditos são essenciais para o tópico vigorar.

3 anos depois...
boxxer321B
04 de julho de 2020 às 02:02
Em 06/07/2017 em 18:29, LeoTK disse:

Fala guys um script para bloquear o limite de skills do servidor de vocês espero que ajude vocês xD

 

creaturescripts.xml

  

 <event type="advance" name="skillblock" event="script" value="skillblock.lua"/>
    <event type="login" name="skillblock2" event="script" value="skillblock2.lua"/>

creaturescripts/scripts

crie dois arquivos.lua

skillblock.lua

skillblock2.lua

 

em login.lua coloque esses registers

 

           registerCreatureEvent(cid, "skillblock")
           registerCreatureEvent(cid, "skillblock2")

 

agora no skillblock.lua abra apague tudo que tem dentro e coloque esse código

 

obs: 249 ele vai upar do 249 para o 250 e vai travar ok guys então coloque um número a menos da quantia que vocês querem

local skills = {
    [SKILL_FIST] = {maxLevel = 249},
    [SKILL_SWORD] = {maxLevel = 249},
    [SKILL_AXE] = {maxLevel = 249},
    [SKILL_CLUB] = {maxLevel = 249},
    [SKILL_DISTANCE] = {maxLevel = 249},
    [SKILL_SHIELD] = {maxLevel = 249},
    [SKILL_FISHING] = {maxLevel = 249},
    [SKILL__MAGLEVEL] = {maxLevel = 150},
}
function onAdvance(cid, skill, oldLevel, newLevel)
    local i = skills[skill]
    
    if i then
        if newLevel > i.maxLevel then
            
            doPlayerSetRate(cid, skill, 0.0)
            doPlayerSave(cid)
			doPlayerSetStorageValue(cid, skill+10000, 1)
            return false
        end
    end
    return true
end

em skillblock2.lua coloque

 

function onLogin(cid)
    
    
    
        if getPlayerStorageValue(cid, 0+10000) == 1 then
            doPlayerSetRate(cid, 0, 0.0)
                                end
                                if getPlayerStorageValue(cid, 1+10000) == 1 then
            doPlayerSetRate(cid, 1, 0.0)
                                end
                                if getPlayerStorageValue(cid, 2+10000) == 1 then
            doPlayerSetRate(cid, 2, 0.0)
                                end
                                if getPlayerStorageValue(cid, 3+10000) == 1 then
            doPlayerSetRate(cid, 3, 0.0)
                                end
                                if getPlayerStorageValue(cid, 4+10000) == 1 then
            doPlayerSetRate(cid, 4, 0.0)
                                end
                                if getPlayerStorageValue(cid, 5+10000) == 1 then
            doPlayerSetRate(cid, 5, 0.0)
                                end
                                if getPlayerStorageValue(cid, 6+10000) == 1 then
            doPlayerSetRate(cid, 6, 0.0)
                                end
                                if getPlayerStorageValue(cid, 7+10000) == 1 then
            doPlayerSetRate(cid, 7, 0.0)
                                end
                                return true
                                end

 

Créditos:

@Allencar (por ter arrumado o script)

 

seria possivel fazer com que certas vocações não ganhassem mais skill?

LeoTKL
04 de julho de 2020 às 11:22
9 horas atrás, boxxer321 disse:

seria possivel fazer com que certas vocações não ganhassem mais skill?

tudo é possível só depende de você fazer