Jump to content

corregir quest


stein20

Mensajes recomendados

Hola todos Como seria la secuencia por muerte anuncie la sumatoria de las muertes?

 

when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() and pc.get_map_index() == 103 and game.get_event_flag("reinos_war")== 1 begin
if pc.get_empire()== 1 then
game.set_event_flag("Jinno", game.get_event_flag("Jinno")+1)
notice_all("Jinno: "..game.set_event_flag("Jinno").." Shinso: "..game.set_event_flag("Shinso").." Chunjo: "..game.set_event_flag("Chunjo").." ")
elseif pc.get_empire()== 2 then
game.set_event_flag("Shinso", game.get_event_flag("Shinso")+1)
notice_all("Jinno: "..game.set_event_flag("Jinno").." Shinso: "..game.set_event_flag("Shinso").." Chunjo: "..game.set_event_flag("Chunjo").." ")

elseif pc.get_empire()== 3 then
game.set_event_flag("Chunjo", game.get_event_flag("Chunjo")+1)
notice_all("Jinno: "..game.set_event_flag("Jinno").." Shinso: "..game.set_event_flag("Shinso").." Chunjo: "..game.set_event_flag("Chunjo").." ")
end

 

cada vez que muere un pj de un reino muestra en el chat algo asi

 

muertes jinno 2 chunjo 10 shinso 3

Enlace para comentar
Compartir en otros sitios

Pues na mas tiene un fallito que en el notice_all muestra un game.set en vez de un game.get, por lo que es normal que no vaya. Ademas, es mejor utilizar un notice_in_map para que solo se vea en el mapa de la guerra:

 

when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() and pc.get_map_index() == 103 and game.get_event_flag("reinos_war")== 1 begin
if pc.get_empire()== 1 then
game.set_event_flag("Jinno", game.get_event_flag("Jinno")+1)
notice_in_map("Jinno: "..game.get_event_flag("Jinno").." Shinso: "..game.get_event_flag("Shinso").." Chunjo: "..game.get_event_flag("Chunjo").." ")
elseif pc.get_empire()== 2 then
game.set_event_flag("Shinso", game.get_event_flag("Shinso")+1)
notice_in_map("Jinno: "..game.get_event_flag("Jinno").." Shinso: "..game.get_event_flag("Shinso").." Chunjo: "..game.get_event_flag("Chunjo").." ")
elseif pc.get_empire()== 3 then
game.set_event_flag("Chunjo", game.get_event_flag("Chunjo")+1)
notice_in_map("Jinno: "..game.get_event_flag("Jinno").." Shinso: "..game.get_event_flag("Shinso").." Chunjo: "..game.get_event_flag("Chunjo").." ")
end

Quedaria así, si al hacer qc se queja del notice_in_map agregalo al quest functions.

Enlace para comentar
Compartir en otros sitios


when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() and pc.get_map_index() == 103 and game.get_event_flag("reinos_war")== 1 begin

game.set_event_flag("reino"..npc.get_empire(),game.get_event_flag("reino"..npc.get_empire())+1)

notice_all("Rojo: "..game.get_event_flag("reino1").." Amarillo: "..game.get_event_flag("reino2").." Azul: "..game.get_event_flag("reino3"))

end

Enlace para comentar
Compartir en otros sitios

when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() and pc.get_map_index() == 103 and game.get_event_flag("reinos_war")== 1 begin
game.set_event_flag("reino"..npc.get_empire(),game.get_event_flag("reino"..npc.get_empire())+1)
notice_all("Rojo: "..game.get_event_flag("reino1").." Amarillo: "..game.get_event_flag("reino2").." Azul: "..game.get_event_flag("reino3"))
end

Um de ese modo coje el imperio del pj al que matas y le suma un flag a su reino, así que la puntuacion seria pal otro reino no pal tuyo.

Enlace para comentar
Compartir en otros sitios

por eso esta

...and pc.get_empire() != npc.get_empire()...

Claro, pa que no cuente cuando mates a uno de tu mismo reino, pero eso no quita que tu quest deberia ser así:

 

when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() and pc.get_map_index() == 103 and game.get_event_flag("reinos_war")== 1 begin
game.set_event_flag("reino"..pc.get_empire(),game.get_event_flag("reino"..pc.get_empire())+1)
notice_all("Rojo: "..game.get_event_flag("reino1").." Amarillo: "..game.get_event_flag("reino2").." Azul: "..game.get_event_flag("reino3"))
end

Para que asi cuando alguien mate a alguien que no es de su reino el reino del que acaba de matar al otro gane un punto, y no el reino del que murio.

Enlace para comentar
Compartir en otros sitios

  • 2 weeks later...

bueno yo eh estado intentando hacerla funcionar bien esta guerra pero no consigo una solución :S de ambas maneras me cuenta mal las muertes :S

 

ambas manera funcionan casi exactamente. cuenta la muerte y su ejemlo: jinno mata un player de otro reino y otro reino hace una muerte se al cuenta es a el reino que hizo la muerte anteriormente :S una solicion?

 

 

when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() and pc.get_map_index() == 103 and game.get_event_flag("reinos_war")== 1 begin

game.set_event_flag("reino"..pc.get_empire(),game.get_event_flag("reino"..pc.get_empire())+1)

notice_all("Rojo: "..game.get_event_flag("reino1").." Amarillo: "..game.get_event_flag("reino2").." Azul: "..game.get_event_flag("reino3"))

end <<<< ---- en caso que alguien tenga una idea si coloco este end no me deja compilar

 

if game.get_event_flag("empire3") >= 200 then

notice_all("Jinno ha demostrado ser el reino mas fuerte de todos")

game.set_event_flag("reinos_war", 0)

 

elseif game.get_event_flag("empire2") >= 200 then

notice_all("Chunjo ha demostrado ser el reino mas fuerte de todos")

game.set_event_flag("reinos_war", 0)

 

 

elseif game.get_event_flag("empire1") >= 200 then

notice_all("Shinso ha demostrado ser el reino mas fuerte de todos")

game.set_event_flag("reinos_war", 0)

end

end

Enlace para comentar
Compartir en otros sitios

melo mire mejor y lo puse asi.

when kill with npc.is_pc() and pc.get_empire() != npc.get_empire() and pc.get_map_index() == 103 and game.get_event_flag("reinos_war")== 1 begin
game.set_event_flag("reino"..npc.get_empire(),game.get_event_flag("reino"..npc.get_empire())+1)
notice_all("Rojo: "..game.get_event_flag("reino1").." Amarillo: "..game.get_event_flag("reino2").." Azul: "..game.get_event_flag("reino3"))
if game.get_event_flag("reino"..npc.get_empire() >= 200 then
  notice_all(locale.empire_names[pc.get_empire()].." ha demostrado ser el reino mas fuerte de todos")
  game.set_event_flag("reinos_war", 0)
end
end
el error que tiene keko es que el pc.get_empire() te da solo el reino del jugador aktual y no el jugador que mates
Enlace para comentar
Compartir en otros sitios

  • 2 weeks later...

Bueno yo continuo sin hacerla funcionar :S

 

acá esta la demostración del fallo

 

Debes iniciar sesión para ver el contenido del enlace en esta publicación.
<<<<-- link del un pequeño video

Enlace para comentar
Compartir en otros sitios

  • Dilong locked this tema
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...