Ta funcionando sim cara, eu testo antes de colocar. Seguinte, mudei um pouco o código aqui, lá vai:
function onAdvance(cid, skill, oldlevel, newlevel) local maxMl = 10 if skill == 7 then if newlevel >= maxMl then doPlayerSetMagicRate(cid, 0) setPlayerStorageValue(cid, 20130314, maxMl) end end return true end
login.lua:
--resto do código registerCreatureEvent(cid, "LimitMl") if getPlayerStorageValue(cid, 20130314) ~= -1 and getPlayerMagLevel(cid, true) >= getPlayerStorageValue(cid, 20130314) then doPlayerSetMagicRate(cid, 0) end return true end
Esse com certeza funciona, eu testei aqui.
O ruim desse código é que você não pode mudar o magic level depois que você escolheu, só se mudar o storage junto.







info
Grupo: Infante
Registrado: 27/01/13
Posts: 1.7k
Reputação: +104
Gênero: Masculino
Nem funfa man,seria melhor vc testa TUDO E ver se esta TUDO ARRUMADO E DPS POSTA