Ir para conteúdo

Featured Replies

Postado

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)

Resolvido por Rusherzin

Ir para solução
  • Respostas 5
  • Visualizações 465
  • Created
  • Última resposta

Top Posters In This Topic

Most 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 = { --

  • 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,

Postado

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

Postado
  • Autor

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)

Postado
  • 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

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 520.2k

Informação Importante

Confirmação de Termo