Ir para conteúdo

Featured Replies

  • Respostas 5
  • Visualizações 867
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado
  • Autor
-- #######################################-- ####### Developed by Infernalotwar #######
-- ####### Level Points System        #######
-- ####### Version: 1.0               #######
-- #######################################


local VocPoints = L_LvlPoints.vocPoints


function onAdvance(cid, skill, oldlevel, newlevel)
if not (VocPoints[getPlayerVocation(cid)]) then
return true
end


if skill == 8 and getPlayerStorageValue(cid, 14573) < newlevel then
if (getPlayerStorageValue(cid, 14574) < 0) then
setPlayerStorageValue(cid, 14574, 0)
setPlayerStorageValue(cid, 14573, 0)
end


setPlayerStorageValue(cid, 14573, newlevel)
setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]))
doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18)
end


return true
end

estou aguardando ajuda obrigado

Postado

Cade essa tabela? L_LvlPoints.vocPoints

local VocPoints = L_LvlPoints.vocPoints
 
function onAdvance(cid, skill, oldlevel, newlevel)
 
	if (VocPoints[getPlayerVocation(cid)]) and (skill == SKILL__LEVEL) and (getPlayerStorageValue(cid, 14573) < newlevel) then 
		setPlayerStorageValue(cid, 14573, newlevel)
		setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + ((newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)])))
		doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18)
	end
 
	return true
end
Postado
  • Autor

-- #######################################
-- ####### Developed by Infernaotwar #######
-- ####### Level Points System     #######
-- ####### Version: 1.0            #######
-- #######################################

L_LvlPoints = {
vocPoints = {
  -- [skill] = Pontos que ganha,
  [1] = 3,
  [2] = 3,
  [3] = 3,
  [4] = 5,
  [5] = 5,
  [6] = 5,
  [7] = 5,
  [8] = 5,
  [9] = 2,
  [10] = 2,
  [11] = 3,
  [12] = 3,
  [13] = 1,
  [14] = 1,
  [15] = 2,
  [16] = 2,
},

attributes = {
  ["vitalidade"] = {np = 40, vl = 5, nm = "Hit Points"}, -- Precisa usar 2 points para adicionar 5 de hp
  ["energy"] = {np = 40, vl = 2, nm = "Mana Points"},
  ["shielding"] = {np = 40, vl = 1, nm = "Shielding Skill"},
  ["sword"] = {np = 40, vl = 1, nm = "Sword Skill"},
  ["axe"] = {np = 40, vl = 1, nm = "Axe Skill"},
  ["club"] = {np = 40, vl = 1, nm = "Club Skill"},
  ["distance"] = {np = 40, vl = 1, nm = "Distance Skill"},
}

}

 

 

 

e essa

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

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