Ir para conteúdo
  • Cadastre-se

(Resolvido)Level Por Tabela


Ir para solução Resolvido por Rusherzin,

Posts Recomendados

Queria Que Se Um Player Lv 1000+ Morresse Ia Perder No Minimo Uns 40~46 Leveis Sera Que Da Para Por Em Tabela Os Leveis Tipo Lv 100 Perde Tanto Level O Lv 200 Perder Tanto....

 

Espero Que Alguem Me Ajude :D 

 

 

@UP 

Editado por Ziguirifido (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Respostas 5
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Estranho não ter funcionado. Configurou a tabela direitinho? Se sim, usa o script assim para tentarmos diagnosticar o problema:   function onDeath(cid, corpse, killer) local lvltable = { -- min, max, perda {1000, 1099, 50}, {1100, 1199, 60} } local level = getPlayerLevel(cid) print(1) if isPlayer(cid) then print(2) for k, v in pairs(lvltable) do if level >= v[1] and level <= v[2] then print(3) doPlayerAddExp(cid, getExperienceForLevel(lev

Não testei, fiz direto aqui no editor de texto. Se não entender a tabela, avisa. function onDeath(cid, corpse, killer) local lvltable = { -- min, max, perda {1000, 1099, 50}, {1100, 1199, 60} } local level = getPlayerLevel(cid) if isPlayer(cid) then for k, v in pairs(lvltable) do if level >= v[1] and level <= v[2] then doPlayerAddExp(cid, getExperienceForLevel(level - v[3]) - getPlayerExperience(cid)) end end end return true end  

Não testei, fiz direto aqui no editor de texto. Se não entender a tabela, avisa.

function onDeath(cid, corpse, killer)

		local lvltable = {
		-- min, max, perda
		{1000, 1099, 50},
		{1100, 1199, 60}
	}
		local level = getPlayerLevel(cid)

	if isPlayer(cid) then	
		for k, v in pairs(lvltable) do
	  		if level >= v[1] and level <= v[2] then
	    		doPlayerAddExp(cid, getExperienceForLevel(level - v[3]) - getPlayerExperience(cid))
	    	end
	    end
	end
return true
end


 

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

                                                                     Ajudei? De nada \o/                                            Att Rusherzin

Link para o post
Compartilhar em outros sites

ta vou testa soq tipo tem que botar no CREATURESCRIPT e por no LOGIN ?

 

Olha testei aki no CREATURESCRIPT sem por no LOGIN ou pondo no LOGIN nao funcionava sera porque nao funciona ou eu nao soube instalar fiz assim:

    <event type="death" name="PlayerDeath2" event="script" value="morte.lua"/>

 

e botei o script que voce me passou no " MORTE.LUA "

 

Editado por Ziguirifido (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Solução

Estranho não ter funcionado. Configurou a tabela direitinho? Se sim, usa o script assim para tentarmos diagnosticar o problema:
 

function onDeath(cid, corpse, killer)

		local lvltable = {
		-- min, max, perda
		{1000, 1099, 50},
		{1100, 1199, 60}
	}
		local level = getPlayerLevel(cid)
	print(1)
	if isPlayer(cid) then	
	print(2)
		for k, v in pairs(lvltable) do
	  		if level >= v[1] and level <= v[2] then
                print(3)
	    		doPlayerAddExp(cid, getExperienceForLevel(level - v[3]) - getPlayerExperience(cid))
	    	end
	    end
	end
return true
end

Depois que morrer, olha na distro se tem alguma mensagem com 1, 2 ou 3 nela.

                                                                     Ajudei? De nada \o/                                            Att Rusherzin

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96846
    Tópicos
    519606
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo