Ir para conteúdo

Posts Recomendados

Olá gostaria de pedir á alguém que possa arrumar esse script

 

local VocPoints = {
	[1] = 3,
	[2] = 3,
	[3] = 3,
	[4] = 5,
	[5] = 5,
	[6] = 5,
	[7] = 5,
	[8] = 8,
	}
function onAdvance(cid, skill, oldlevel, newlevel)
	if not (VocPoints[getPlayerVocation(cid)]) then
			return true
	end
	if (skill == 8) then
			if (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
	end
	return true
end

 

pois uso sistema de reset no meu otserv e gostaria que os pontos fossem acumulativos, o servidor é high exp então não terá problema em ser acumulativos :D

 

Detalhes:

Distro: TFS 0.3.6

Versão: 8.60

 

mesmo quando eu retiro essa linha if (getPlayerStorageValue(cid, 14573) < newlevel) then que é linha em que faz com que não dê pontos ao mesmo level, depois começa da alguns erros no distro.

 

Obrigado à todos.

Editado por joadson
Link para o comentário
https://xtibia.com/forum/topic/203738-level-points-com-sistema-de-reset/
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...