Ir para conteúdo

Ajuda Eu


joadson15

Posts Recomendados

alguem pode colocar pra so upar healando quem for lvl 150k pra baixo?

porque nesse script qualquer lvl upa e heala toda life e mana, quero que so noob do lvl 150k pra baixo heale upando

function onAdvance(cid, skill, oldlevel, newlevel)
   if skill == 8 then
       if oldlevel < newlevel then
   local addmana = getPlayerMaxMana(cid)
   local addhp = getCreatureMaxHealth(cid)
   local addattribute = (getPlayerStorageValue(cid, 47061)+(newlevel-oldlevel)*2)
   doSendAnimatedText(getPlayerPosition(cid), "Level UP", 129) -- will show a hovering text of "Level Up"
   doSendMagicEffect(getPlayerPosition(cid),math.random(28, 30)) -- will show the range of fireworks
   doCreatureAddHealth(cid, addhp) -- will give max Hp after level up 
   doPlayerAddMana(cid, addmana) -- Will give Max mana after level up
   setPlayerStorageValue(cid, 47061, addattribute)  -- Will add 2 attribute points after level
       end
   end
   return true
end

aqui o script!

 

UPP?

Editado por joadson15
Link para o comentário
Compartilhar em outros sites

local lvl = 150000 -- coloque aki o level q tem q ser menor ou igual para curar mana e vida ao máximo

function onAdvance(cid, skill, oldlevel, newlevel)

if skill == 8 then

if oldlevel < newlevel then

local addmana = getPlayerMaxMana(cid)

local addhp = getCreatureMaxHealth(cid)

local addattribute = (getPlayerStorageValue(cid, 47061)+(newlevel-oldlevel)*2)

doSendAnimatedText(getPlayerPosition(cid), "Level UP", 129) -- will show a hovering text of "Level Up"

doSendMagicEffect(getPlayerPosition(cid),math.random(28, 30)) -- will show the range of fireworks

if getPlayerLevel(cid) <= lvl then

doCreatureAddHealth(cid, addhp) -- will give max Hp after level up

doPlayerAddMana(cid, addmana) -- Will give Max mana after level up

end

setPlayerStorageValue(cid, 47061, addattribute) -- Will add 2 attribute points after level

end

end

return true

end

 

Caso não funcione me mande uma pm

Editado por Eskylo
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...