Jump to content

Evento PvP


LeyendasMt2

Mensajes recomendados

hola buenas , tengo una quest , que buena la idea es que empiece el evento y los teletransporte al mapa X , se cierre entrada, todos los jugadores tengan 25 vidas, y cada vez que matan a uno se le resta 1 vida, cuando llegue a 0 , lo manda a city. Ya tengo echo un modelo pero no me funciona.. Si me podeis ayudar lo agradeceria mucho. Salu2

 

quest eventopvp begin
state start begin
  when 9012.chat."Evento PvP" begin
   if game.get_event_flag("evento") == 0 then
	if pc.is_gm() then
		 say("El evento pvp está desactivado.")
		 say("Deseas activarlo?")
		 local a = select ("Sí", "No")
		 if a == 1 then
		  game.set_event_flag("evento", 1)
		  notice_all("El evento pvp ha comenzado")
		  notice_all("Ve al npc X para participar.")
		 end
	else
		 say("El evento pvp está activado.")
		 say("Quieres desactivarlo?")
		 local b = select ("Si", "no")
		 if b == 1 then
		  game.set_event_flag("evento", 0)
		  notice_all("El evento pvp ha terminado.")
         end
   else
	say("El evento pvp está activado.")
	say("Deseas participar?")
	local c = select ("Sí", "No")
	if c == 1 then
		 pc.warp(204800, 486400)
	end
   end
  end
  when kill with npc.is_pc() and pc.get_map_index() == 63 and game.get_event_flag("evento") == 1 begin
   pc.setqf("vidas", pc.getqf("vidas") 25-1)
   if pc.getqf("vidas") == 0 then
   chat("has sido eliminado")
	warp_to_village()
   end
  end
end
end
Enlace para comentar
Compartir en otros sitios

Bueno lo que quieres hacer como lo estás haciendo está mal echo, no puedo decirte exactamente como hacerlo por que mi team me cortaría los huevos pero vas equivocado, aunque le pongas a cada uno 25 vidas se las estás quitando cuando matan a un personaje y debes quitarla cuando muere, o quieres hacerla que el personaje que mata a otro personaje pierda vidas ? el evento sería un desastre..

Enlace para comentar
Compartir en otros sitios

joder tio parece mentira ke no se entienda algo tan sencillo xD.

 

Aver lo que pretendo es que cada pj tenga 25 vidas, si muere a manos de otro, en vez de tener 25 tiene 24 , si muere otra vez tendra 23.

 

Cada pj con sus 25 vidas independientes.

 

P.d: Aver si tu team te va a decir que te tires de un puente y lo haces .___.

Enlace para comentar
Compartir en otros sitios

joder tio parece mentira ke no se entienda algo tan sencillo xD.

 

Aver lo que pretendo es que cada pj tenga 25 vidas, si muere a manos de otro, en vez de tener 25 tiene 24 , si muere otra vez tendra 23.

 

Cada pj con sus 25 vidas independientes.

 

P.d: Aver si tu team te va a decir que te tires de un puente y lo haces .___.

 

Aver, el te ha entendido perfectamente solo que obviamente no te va a explicar como hacer su propio evento -.- aun así te ha dado una pista sobre por donde tienen que ir los tiros.

 

Lo de tirarse por el puente lo veo innecesario ._.

Enlace para comentar
Compartir en otros sitios

Los Juegos del Hambre [ Evento PVP ]

Imagen enviada

 

 

Has visto la pelicula los Juegos del Hambre ? la película gira en torno a un torneo un poco escalofriante, el país organiza un torneo anual donde las comunidades que lo forman se enfrentan entre sí por la comida del año, cada comunidad tiene que envíar a 2 combatientes al torneo y la comunidad que gane el evento ese año tendrá comida de sobra, la película es un poco "fuerte" ya que los combatientes son niños y el torneo es a muerte, en este caso nosotros hemos echo algo parecido, no irán solo dos personajes por reino ni vamos a matar a nadie.

 

Una vez que a comenzado el torneo podrás participar si cumples los requisitos necesarios, cuando estÉs dentro del mapa tendrás 10 vidas, si te matan 10 veces regresarás a la ciudad, el campeón del evento ganará el premio que se disponga para el evento y premiará a su reino con evento de exp, yang y drop durante 24 horas.

 

Como bien dice keko ya lo tenemos echo y te dí alguna pista pero es cosa tuya el que lo saques o no, lo que posteastes se te corrigió y yo como dije en otro post ( abandono el edificio )

 

PD: Lo que tienes echo se aleja MUCHOooo de lo que quieres hacer es decir que esa quest no te sirve :)

 

saludos

Enlace para comentar
Compartir en otros sitios

Ya lo se , esa quest es tiro al aire jaja , no hay nada raro, simplemente funciones basicas. Y ya se ke no hace nada , pero no lo veo muy dificil.

Si he visto la pelicula, y es curioso :P. Pero claro como keko es tan sumamente listo, y vacila en vez de informar, pero yo no sabia que era un evento vuestro, disculpa ^^

Enlace para comentar
Compartir en otros sitios

  • 1 year later...
  • 1 year later...
quest evento_pvp begin
	state start begin
		function Config()
			return 
			{
			["Coordenadas"] = {55500,55500}--Coordenadas del mapa cuando das al boton Participar
			["Index"] = {360}--Index del mapa del evento
			["Vidas"] = {3}--Vidas del usuario
			}
		end
		when 20011.chat("Evento pvp") with game.get_event_flag("eventopvp") == 1 begin
			local r = game.get_event_flag("eventopvp2")
			if pc.getqf("eventopvp") != r then
				pc.setqf("eventopvp",r)
				pc.setqf("muertes",0)
				pc.setqf("intento",0)
			end
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] then
				say("Usted ya agoto sus "..evento_pvp.Config().Vidas[1].." vidas.")
				return
			end
			if select ("Participar","Salir") == 1 then
				pc.warp(evento_pvp.Config().Coordenadas[1],evento_pvp.Config().Coordenadas[2])
			end
		end
		when 20358.chat."Evento pvp GM" with pc.is_gm() begin
			local e = select ("Iniciar evento","Terminar evento","Nada")
			if e == 1 then
				notice_all("El evento pvp ha iniciado, ve a uriel para participar.")
				game.set_event_flag("eventopvp",1)
				game.set_event_flag("eventopvp2",game.get_event_flag("eventopvp2")+1)
			elseif e == 2 then
				notice_all("El evento pvp ha terminado.")
				game.set_event_flag("eventopvp",0)
			end
		end
		when login with pc.get_map_index() == evento_pvp.Config().Index[1] begin
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] or game.get_event_flag("eventopvp2") == 0 then
				warp_to_village()
				return
			end
			loop_timer("revisar_pvp",0.5)
		end
		when revisar_pvp.timer begin
			if pc.get_hp() <= 0 and pc.getqf("intento") == 0 then
				pc.setqf("intento",1)
				local m = pc.getqf("muertes")+1
				pc.setqf("muertes",m)
				if m >= evento_pvp.Config().Vidas[1] then
					notice_in_map("El usuario "..pc.get_name().." ha muerto "..m.." veces y fue descalificado.")
					cleartimer("revisar_pvp")
					warp_to_village()
					return
				end
				chat("Has muerto "..m.." veces")
			end
			if pc.getqf("intento") == 1 and pc.get_hp() >= 1 then
				pc.setqf("intento",0)
			end
			if game.get_event_flag("eventopvp2") == 0 then
				cleartimer("revisar_pvp")
				warp_to_village()
			end
		end
	end
end

Casi nunca ayudo pero hoy fue la excepsion, disfrutela.

Debes iniciar sesión para ver el contenido del enlace en esta publicación.

Enlace para comentar
Compartir en otros sitios

quest evento_pvp begin
	state start begin
		function Config()
			return 
			{
			["Coordenadas"] = {55500,55500}--Coordenadas del mapa cuando das al boton Participar
			["Index"] = {360}--Index del mapa del evento
			["Vidas"] = {3}--Vidas del usuario
			}
		end
		when 20011.chat("Evento pvp") with game.get_event_flag("eventopvp") == 1 begin
			local r = game.get_event_flag("eventopvp2")
			if pc.getqf("eventopvp") != r then
				pc.setqf("eventopvp",r)
				pc.setqf("muertes",0)
				pc.setqf("intento",0)
			end
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] then
				say("Usted ya agoto sus "..evento_pvp.Config().Vidas[1].." vidas.")
				return
			end
			if select ("Participar","Salir") == 1 then
				pc.warp(evento_pvp.Config().Coordenadas[1],evento_pvp.Config().Coordenadas[2])
			end
		end
		when 20358.chat."Evento pvp GM" with pc.is_gm() begin
			local e = select ("Iniciar evento","Terminar evento","Nada")
			if e == 1 then
				notice_all("El evento pvp ha iniciado, ve a uriel para participar.")
				game.set_event_flag("eventopvp",1)
				game.set_event_flag("eventopvp2",game.get_event_flag("eventopvp2")+1)
			elseif e == 2 then
				notice_all("El evento pvp ha terminado.")
				game.set_event_flag("eventopvp",0)
			end
		end
		when login with pc.get_map_index() == evento_pvp.Config().Index[1] begin
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] or game.get_event_flag("eventopvp2") == 0 then
				warp_to_village()
				return
			end
			loop_timer("revisar_pvp",0.5)
		end
		when revisar_pvp.timer begin
			if pc.get_hp() <= 0 and pc.getqf("intento") == 0 then
				pc.setqf("intento",1)
				local m = pc.getqf("muertes")+1
				pc.setqf("muertes",m)
				if m >= evento_pvp.Config().Vidas[1] then
					notice_in_map("El usuario "..pc.get_name().." ha muerto "..m.." veces y fue descalificado.")
					cleartimer("revisar_pvp")
					warp_to_village()
					return
				end
				chat("Has muerto "..m.." veces")
			end
			if pc.getqf("intento") == 1 and pc.get_hp() >= 1 then
				pc.setqf("intento",0)
			end
			if game.get_event_flag("eventopvp2") == 0 then
				cleartimer("revisar_pvp")
				warp_to_village()
			end
		end
	end
end

Casi nunca ayudo pero hoy fue la excepsion, disfrutela.

 

eres el mejor te amoamos jajaja maricatu marica yo marica todos la la la xD ajajajajaja

Enlace para comentar
Compartir en otros sitios

quest evento_pvp begin
	state start begin
		function Config()
			return 
			{
			["Coordenadas"] = {55500,55500}--Coordenadas del mapa cuando das al boton Participar
			["Index"] = {360}--Index del mapa del evento
			["Vidas"] = {3}--Vidas del usuario
			}
		end
		when 20011.chat("Evento pvp") with game.get_event_flag("eventopvp") == 1 begin
			local r = game.get_event_flag("eventopvp2")
			if pc.getqf("eventopvp") != r then
				pc.setqf("eventopvp",r)
				pc.setqf("muertes",0)
				pc.setqf("intento",0)
			end
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] then
				say("Usted ya agoto sus "..evento_pvp.Config().Vidas[1].." vidas.")
				return
			end
			if select ("Participar","Salir") == 1 then
				pc.warp(evento_pvp.Config().Coordenadas[1],evento_pvp.Config().Coordenadas[2])
			end
		end
		when 20358.chat."Evento pvp GM" with pc.is_gm() begin
			local e = select ("Iniciar evento","Terminar evento","Nada")
			if e == 1 then
				notice_all("El evento pvp ha iniciado, ve a uriel para participar.")
				game.set_event_flag("eventopvp",1)
				game.set_event_flag("eventopvp2",game.get_event_flag("eventopvp2")+1)
			elseif e == 2 then
				notice_all("El evento pvp ha terminado.")
				game.set_event_flag("eventopvp",0)
			end
		end
		when login with pc.get_map_index() == evento_pvp.Config().Index[1] begin
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] or game.get_event_flag("eventopvp2") == 0 then
				warp_to_village()
				return
			end
			loop_timer("revisar_pvp",0.5)
		end
		when revisar_pvp.timer begin
			if pc.get_hp() <= 0 and pc.getqf("intento") == 0 then
				pc.setqf("intento",1)
				local m = pc.getqf("muertes")+1
				pc.setqf("muertes",m)
				if m >= evento_pvp.Config().Vidas[1] then
					notice_in_map("El usuario "..pc.get_name().." ha muerto "..m.." veces y fue descalificado.")
					cleartimer("revisar_pvp")
					warp_to_village()
					return
				end
				chat("Has muerto "..m.." veces")
			end
			if pc.getqf("intento") == 1 and pc.get_hp() >= 1 then
				pc.setqf("intento",0)
			end
			if game.get_event_flag("eventopvp2") == 0 then
				cleartimer("revisar_pvp")
				warp_to_village()
			end
		end
	end
end

Casi nunca ayudo pero hoy fue la excepsion, disfrutela.

 

Gracias por la ayuda pero no funciona.

Enlace para comentar
Compartir en otros sitios

quest evento_pvp begin
	state start begin
		function Config()
			return 
			{
			["Coordenadas"] = {55500,55500}--Coordenadas del mapa cuando das al boton Participar
			["Index"] = {360}--Index del mapa del evento
			["Vidas"] = {3}--Vidas del usuario
			}
		end
		when 20011.chat"Evento pvp" with game.get_event_flag("eventopvp") == 1 begin
			local r = game.get_event_flag("eventopvp2")
			if pc.getqf("eventopvp") != r then
				pc.setqf("eventopvp",r)
				pc.setqf("muertes",0)
				pc.setqf("intento",0)
			end
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] then
				say("Usted ya agoto sus "..evento_pvp.Config().Vidas[1].." vidas.")
				return
			end
			if select ("Participar","Salir") == 1 then
				pc.warp(evento_pvp.Config().Coordenadas[1],evento_pvp.Config().Coordenadas[2])
			end
		end
		when 20358.chat."Evento pvp GM" with pc.is_gm() begin
			local e = select ("Iniciar evento","Terminar evento","Nada")
			if e == 1 then
				notice_all("El evento pvp ha iniciado, ve a uriel para participar.")
				game.set_event_flag("eventopvp",1)
				game.set_event_flag("eventopvp2",game.get_event_flag("eventopvp2")+1)
			elseif e == 2 then
				notice_all("El evento pvp ha terminado.")
				game.set_event_flag("eventopvp",0)
			end
		end
		when login with pc.get_map_index() == evento_pvp.Config().Index[1] begin
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] or game.get_event_flag("eventopvp2") == 0 then
				warp_to_village()
				return
			end
			loop_timer("revisar_pvp",0.5)
		end
		when revisar_pvp.timer begin
			if pc.get_hp() <= 0 and pc.getqf("intento") == 0 then
				pc.setqf("intento",1)
				local m = pc.getqf("muertes")+1
				pc.setqf("muertes",m)
				if m >= evento_pvp.Config().Vidas[1] then
					notice_in_map("El usuario "..pc.get_name().." ha muerto "..m.." veces y fue descalificado.")
					cleartimer("revisar_pvp")
					warp_to_village()
					return
				end
				chat("Has muerto "..m.." veces")
			end
			if pc.getqf("intento") == 1 and pc.get_hp() >= 1 then
				pc.setqf("intento",0)
			end
			if game.get_event_flag("eventopvp2") == 0 then
				cleartimer("revisar_pvp")
				warp_to_village()
			end
		end
	end
end

puse un paréntesis donde no iba, ahí esta arreglada.

Enlace para comentar
Compartir en otros sitios

Ya no sale ese error y me la carga correctamente pero al darle a uriel no muestra nada osea, le doy a evento pvp y cierra la ventana no muestra para participar ni nada.

 

Gracias.

quest evento_pvp begin
	state start begin
		function Config()
			return 
			{
			["Coordenadas"] = {55500,55500},--Coordenadas del mapa cuando das al boton Participar
			["Index"] = {360},--Index del mapa del evento
			["Vidas"] = {3}--Vidas del usuario
			}
		end
		when 20011.chat."Evento pvp" with game.get_event_flag("eventopvp") == 1 begin
			local r = game.get_event_flag("eventopvp2")
			if pc.getqf("eventopvp") != r then
				pc.setqf("eventopvp",r)
				pc.setqf("muertes",0)
				pc.setqf("intento",0)
			end
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] then
				say("Usted ya agoto sus "..evento_pvp.Config().Vidas[1].." vidas.")
				return
			end
			if select ("Participar","Salir") == 1 then
				pc.warp(evento_pvp.Config().Coordenadas[1],evento_pvp.Config().Coordenadas[2])
			end
		end
		when 20358.chat."Evento pvp GM" with pc.is_gm() begin
			local e = select ("Iniciar evento","Terminar evento","Nada")
			if e == 1 then
				notice_all("El evento pvp ha iniciado, ve a uriel para participar.")
				game.set_event_flag("eventopvp",1)
				game.set_event_flag("eventopvp2",game.get_event_flag("eventopvp2")+1)
			elseif e == 2 then
				notice_all("El evento pvp ha terminado.")
				game.set_event_flag("eventopvp",0)
			end
		end
		when login with pc.get_map_index() == evento_pvp.Config().Index[1] begin
			if pc.getqf("muertes") >= evento_pvp.Config().Vidas[1] or game.get_event_flag("eventopvp2") == 0 then
				warp_to_village()
				return
			end
			loop_timer("revisar_pvp",0.5)
		end
		when revisar_pvp.timer begin
			if pc.get_hp() <= 0 and pc.getqf("intento") == 0 then
				pc.setqf("intento",1)
				local m = pc.getqf("muertes")+1
				pc.setqf("muertes",m)
				if m >= evento_pvp.Config().Vidas[1] then
					notice_in_map("El usuario "..pc.get_name().." ha muerto "..m.." veces y fue descalificado.")
					cleartimer("revisar_pvp")
					warp_to_village()
					return
				end
				chat("Has muerto "..m.." veces")
			end
			if pc.getqf("intento") == 1 and pc.get_hp() >= 1 then
				pc.setqf("intento",0)
			end
			if game.get_event_flag("eventopvp2") == 0 then
				cleartimer("revisar_pvp")
				warp_to_village()
			end
		end
	end
end

Corregido el ultimo error (faltaban unas comas en la tabla) la he testado y funciona.

Enlace para comentar
Compartir en otros sitios

Guest
Este tema está cerrado a otras respuestas.
  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...