LE
suporte scripts

[Resolvido] [Suporte] Script bugado

Por LeoTK, 03 de jul. de 2017 em Resolvidos

20
2.5k
LeoTKL
06 de julho de 2017 às 18:39
Agora, Nogard disse:

É, funciona, mas fica extenso em... Resolvido então!

e mas parece que funcionou direitinho kkk mas agraço muito pela sua ajuda também xD

 

Wase WissW
06 de julho de 2017 às 19:25
51 minutos atrás, Brunds disse:

um maninho me passou um aqui nogard que resolveu vou postar pra você ver

 

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

 

e um segundo com

 

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

 

@Nogard

o primeiro com onadvance e o segundo com onlogin

O mano, poderia min onde usar essa script ?

LeoTKL
06 de julho de 2017 às 19:26
Agora, Henrique Gomes disse:

O mano, poderia min onde usar essa script ?

eu postei um tópico já maninho na área de scripts/ creaturescripts da uma olhada nome do tópico

[script] Bloqueando Limite de Skills

Wase WissW
06 de julho de 2017 às 19:28
Agora, Brunds disse:

eu postei um tópico já maninho na área de scripts/ creaturescripts da uma olhada nome do tópico

[script] Bloqueando Limite de Skills

Blz mano, vou da uma olhada, obrigado pela ajuda

MudrockM
06 de julho de 2017 às 20:01

A questão neste tópico de suporte foi respondida e/ou o autor do tópico resolveu o problema. Este tópico está fechado e foi movido para Suporte - Resolvidos. Se você tiver outras dúvidas, crie um novo tópico.